github-actions[bot] commented on code in PR #68005:
URL: https://github.com/apache/doris/pull/68005#discussion_r4321213132
##########
cloud/src/recycler/recycler.cpp:
##########
@@ -5425,6 +5436,12 @@ int InstanceRecycler::recycle_tablet(int64_t tablet_id,
RecyclerMetricsContext&
if (ret == 0) {
// All object files under tablet have been deleted
+ const auto recycled_bytes = recycle_rowsets_data_size +
recycle_rowsets_index_size;
+ tablet_metrics_context_.recycled_num += 1;
+ tablet_metrics_context_.recycled_bytes += recycled_bytes;
Review Comment:
[P2] Preserve physical-delete metrics across the tablet metadata commit
For a legacy tablet with one vault, all directory deletes can succeed and
the subsequent `txn->commit()` can fail. Moving these additions below that
commit makes the task and segment/byte metrics report zero for work already
completed; a later successful retry attributes the bytes to an idempotent
delete of the absent directory. This is a separate failure from the existing
partial-vault thread: every physical delete succeeds here and the later
metadata transaction fails. Record physical bytes and segments when deletion
succeeds, while keeping tablet-completion bookkeeping dependent on the KV
commit.
##########
cloud/src/recycler/recycler.cpp:
##########
@@ -7851,6 +7933,8 @@ bool InstanceRecycler::check_recycle_tasks() {
std::map<std::string, int64_t> tmp_running_recycle_tasks;
{
std::lock_guard lock(recycle_tasks_mutex);
+ tablet_metrics_context_.update_metrics();
Review Comment:
[P2] Skip inactive recyclers when publishing monitor gauges
`Recycler::check_recycle_tasks()` copies the map of shared pointers and
releases `mtx_` before calling this method. A delayed snapshot can retain
recycler A after its round finishes and its map entry is erased. If that round
exceeded `recycle_interval_seconds`, a queued round B for the same instance can
start and publish progress before the monitor reaches A. These new calls then
publish A's reset counters and absent start time as zeros into B's identical
instance/resource series. A's `recycle_tasks_mutex` cannot synchronize with B.
This stale-monitor case remains after the constructor/destructor reset fix;
skip inactive contexts here or validate that the publisher still owns the
current round.
--
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]