liaoxin01 commented on code in PR #64630:
URL: https://github.com/apache/doris/pull/64630#discussion_r3434234227
##########
cloud/src/recycler/recycler.cpp:
##########
@@ -4358,24 +4358,23 @@ 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()) {
- // The rowset has no resource id and segments when it was generated by
compaction
- // with multiple hole rowsets or it's version is [0-1], so we can skip
it.
- if (!rs_meta.has_resource_id() && rs_meta.num_segments() == 0) {
- LOG_INFO("rowset meta does not have a resource id and no segments,
skip this rowset")
+ // Empty rowsets have no segment objects to delete, so they do not
need a resource id.
+ if (rs_meta.num_segments() == 0) {
Review Comment:
Updated the empty-rowset check to `num_segments() <= 0` for consistency with
the other recycler paths.
##########
cloud/src/recycler/recycler.cpp:
##########
@@ -4358,24 +4358,23 @@ 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()) {
- // The rowset has no resource id and segments when it was generated by
compaction
- // with multiple hole rowsets or it's version is [0-1], so we can skip
it.
- if (!rs_meta.has_resource_id() && rs_meta.num_segments() == 0) {
- LOG_INFO("rowset meta does not have a resource id and no segments,
skip this rowset")
+ // 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()) {
+ if (rs_meta.resource_id().empty()) {
LOG_WARNING("rowset meta does not have a resource id, impossible!")
Review Comment:
Updated the warning to say the resource ID is missing or empty, covering
both protobuf presence cases.
--
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]