This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 79f19d98ff5 [Enhancement](Snapshot) recycling op logs should remove 
versioned tablet meta (#55367)
79f19d98ff5 is described below

commit 79f19d98ff5b41475cd38ba0681fba21fbe4ddef
Author: abmdocrt <[email protected]>
AuthorDate: Fri Aug 29 20:44:25 2025 +0800

    [Enhancement](Snapshot) recycling op logs should remove versioned tablet 
meta (#55367)
---
 cloud/src/recycler/recycler_operation_log.cpp | 32 +++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/cloud/src/recycler/recycler_operation_log.cpp 
b/cloud/src/recycler/recycler_operation_log.cpp
index fe7476ee308..3cbd8191afb 100644
--- a/cloud/src/recycler/recycler_operation_log.cpp
+++ b/cloud/src/recycler/recycler_operation_log.cpp
@@ -253,6 +253,21 @@ int OperationLogRecycler::recycle_compaction_log(const 
CompactionLogPB& compacti
                 .tag("error_code", err);
         return -1;
     }
+
+    int64_t tablet_id = compaction_log.tablet_id();
+    TabletMetaCloudPB tablet_meta;
+    Versionstamp versionstamp;
+    err = meta_reader.get_tablet_meta(tablet_id, &tablet_meta, &versionstamp);
+    if (err != TxnErrorCode::TXN_OK) {
+        LOG_WARNING("failed to get tablet meta for recycling operation log")
+                .tag("tablet_id", tablet_id)
+                .tag("error_code", err);
+        return -1;
+    }
+    std::string tablet_compact_stats_key =
+            versioned::tablet_compact_stats_key({instance_id_, tablet_id});
+    
keys_to_remove_.emplace_back(encode_versioned_key(tablet_compact_stats_key, 
versionstamp));
+
     for (const RecycleRowsetPB& recycle_rowset_pb : 
compaction_log.recycle_rowsets()) {
         // recycle rowset meta key
         std::string recycle_rowset_value;
@@ -338,6 +353,23 @@ int OperationLogRecycler::recycle_schema_change_log(const 
SchemaChangeLogPB& sch
                 .tag("error_code", err);
         return -1;
     }
+
+    int64_t new_tablet_id = schema_change_log.new_tablet_id();
+    TabletMetaCloudPB tablet_meta;
+    Versionstamp versionstamp;
+    err = meta_reader.get_tablet_meta(new_tablet_id, &tablet_meta, 
&versionstamp);
+    if (err != TxnErrorCode::TXN_OK) {
+        LOG_WARNING("failed to get tablet meta for recycling operation log")
+                .tag("tablet_id", new_tablet_id)
+                .tag("error_code", err);
+        return -1;
+    }
+    std::string tablet_meta_key = versioned::meta_tablet_key({instance_id_, 
new_tablet_id});
+    keys_to_remove_.emplace_back(encode_versioned_key(tablet_meta_key, 
versionstamp));
+    std::string tablet_load_stats_key =
+            versioned::tablet_load_stats_key({instance_id_, new_tablet_id});
+    keys_to_remove_.emplace_back(encode_versioned_key(tablet_load_stats_key, 
versionstamp));
+
     for (const RecycleRowsetPB& recycle_rowset_pb : 
schema_change_log.recycle_rowsets()) {
         // recycle rowset meta key
         std::string recycle_rowset_value;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to