github-actions[bot] commented on code in PR #65862:
URL: https://github.com/apache/doris/pull/65862#discussion_r3627131400
##########
cloud/src/recycler/recycler.cpp:
##########
@@ -4358,16 +4358,15 @@ int InstanceRecycler::recycle_tablet(int64_t tablet_id,
RecyclerMetricsContext&
TEST_SYNC_POINT_CALLBACK("InstanceRecycler::recycle_tablet.create_rowset_meta",
&resp);
for (const auto& rs_meta : resp.rowset_meta()) {
- // Empty rowsets have no segment objects to delete, so they do not
need a resource id.
- if (rs_meta.num_segments() <= 0) {
- LOG_INFO("rowset meta has no segments, skip this rowset")
- .tag("rs_meta", rs_meta.ShortDebugString())
- .tag("instance_id", instance_id_)
- .tag("tablet_id", tablet_id);
- recycle_rowsets_number += 1;
- continue;
- }
if (!rs_meta.has_resource_id() || rs_meta.resource_id().empty()) {
+ if (rs_meta.num_segments() <= 0) {
Review Comment:
[P1] Preserve the empty rowset's vault through versioned cleanup
This branch never sees the rowset when `should_recycle_versioned_keys()` is
true. `recycle_versioned_tablet()` runs first; for a ref-count-one rowset with
`num_segments == 0`, batch deletion returns success without deleting the tablet
prefix, and `cleanup_rowset_metadata()` then removes both versioned and
non-versioned rowset keys. When control reaches this loop,
`internal_get_rowset()` is empty, so no `resource_id` is collected and
`delete_directory(data/<tablet>/)` is never scheduled. A
`MULTI_VERSION_READ_WRITE` tablet containing only this empty rowset therefore
loses its last vault breadcrumb and permanently leaves failed-write objects
behind. Please carry the valid resource ID through the versioned path and defer
the prefix sweep only while snapshot/clone references actually remain, with a
multi-version regression test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]