hello-stephen commented on code in PR #70801:
URL: https://github.com/apache/doris/pull/70801#discussion_r4767829706


##########
cloud/src/meta-service/meta_service_job.cpp:
##########
@@ -1348,6 +1349,7 @@ void process_compaction_job(MetaServiceCode& code, 
std::string& msg, std::string
         } else {
             auto recycle_val = recycle_rowset.SerializeAsString();
             txn->put(recycle_key, recycle_val);
+            ++compaction_recycle_rowset_kv_put_count;

Review Comment:
   [P2] Include versioned compactions in the new totals
   
   For a `MULTI_VERSION_ENABLED` instance, `is_versioned_write` takes the 
branch above, so this count stays zero. The actual recycle-rowset KV puts occur 
later in `OperationLogRecycler::recycle_compaction_log` 
(`cloud/src/recycler/recycler_operation_log.cpp:354`) without updating the put 
total. `recycle_rowsets()` also dispatches to `recycle_versioned_rowsets()` 
before the new remove instrumentation, so neither total advances for this 
supported lifecycle. Please instrument the successful commits in those paths 
too. Existing `RecycleOperationLogTest.RecycleCompactionLog` and 
`RecycleVersionedKeysTest.RecycleRowset_Compaction` provide scenarios for 
counter-delta assertions.



##########
cloud/src/recycler/recycler.cpp:
##########
@@ -6056,6 +6061,10 @@ int InstanceRecycler::recycle_rowsets() {
                 return;
             }
             num_recycled.fetch_add(rowset_keys_to_delete.size(), 
std::memory_order_relaxed);
+            if (compacted_rowsets_to_delete > 0) {
+                
g_bvar_compaction_recycle_rowset_kv_remove_total.put({instance_id_},

Review Comment:
   [P2] Include dropped-tablet cleanup in the removal total
   
   This is the only update of the new removal total, but `recycle_tablet()` 
also removes COMPACT recycle-rowset keys through its range deletion at line 
5440, committed at line 5456. For example, setting dropped-partition retention 
below compaction retention lets tablet cleanup remove those keys while this 
rowset scan skips them as unexpired. Their puts were counted, but their 
removals are permanently omitted because later scans cannot see the deleted 
keys. Please account for successfully committed COMPACT removals in tablet 
cleanup too; `RecyclerTest.recycle_tablet` already exercises that deletion path.



-- 
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]

Reply via email to