This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 94049f5393d branch-4.0: [fix](cloud) Skip empty rowsets before
accessor lookup in batch delete_rowset_data #60919 (#61161)
94049f5393d is described below
commit 94049f5393d7c6945d87aa2147ceb899c3df23c4
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Mar 10 15:35:02 2026 +0800
branch-4.0: [fix](cloud) Skip empty rowsets before accessor lookup in batch
delete_rowset_data #60919 (#61161)
Cherry-picked from #60919
Co-authored-by: Xin Liao <[email protected]>
---
cloud/src/recycler/recycler.cpp | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/cloud/src/recycler/recycler.cpp b/cloud/src/recycler/recycler.cpp
index dec78545f0f..cc24608a73e 100644
--- a/cloud/src/recycler/recycler.cpp
+++ b/cloud/src/recycler/recycler.cpp
@@ -3365,6 +3365,18 @@ int InstanceRecycler::delete_rowset_data(
}
}
+ int64_t num_segments = rs.num_segments();
+ // Check num_segments before accessor lookup, because empty rowsets
+ // (e.g. base compaction output of empty rowsets) may have no
resource_id
+ // set. Skipping them early avoids a spurious "no such resource id"
error
+ // that marks the entire batch as failed and prevents txn_remove from
+ // cleaning up recycle KV keys.
+ if (num_segments <= 0) {
+ metrics_context.total_recycled_num++;
+ metrics_context.total_recycled_data_size += rs.total_disk_size();
+ continue;
+ }
+
auto it = accessor_map_.find(rs.resource_id());
// possible if the accessor is not initilized correctly
if (it == accessor_map_.end()) [[unlikely]] {
@@ -3387,12 +3399,6 @@ int InstanceRecycler::delete_rowset_data(
ret = -1;
continue;
}
- int64_t num_segments = rs.num_segments();
- if (num_segments <= 0) {
- metrics_context.total_recycled_num++;
- metrics_context.total_recycled_data_size += rs.total_disk_size();
- continue;
- }
// Process delete bitmap
file_paths.push_back(delete_bitmap_path(tablet_id, rowset_id));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]