w41ter commented on code in PR #57405:
URL: https://github.com/apache/doris/pull/57405#discussion_r2472316304


##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1991,6 +2018,19 @@ void 
MetaServiceImpl::commit_restore_job(::google::protobuf::RpcController* cont
             .tag("tablet_id", tablet_meta->tablet_id())
             .tag("stats key", hex(stats_key));
 
+    if (is_versioned_write) {

Review Comment:
   meta_tablet_key is versioned too.



##########
cloud/src/recycler/recycler_operation_log.cpp:
##########
@@ -137,6 +137,8 @@ class OperationLogRecycler {
 
     int recycle_schema_change_log(const SchemaChangeLogPB& schema_change_log);
 
+    int recycle_restore_job_log(const RestoreJobLogPB& restore_job_log);

Review Comment:
   Recycler::recycle_restore_job also need to recycle the residual versioned 
keys.



##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -2010,6 +2050,27 @@ void 
MetaServiceImpl::commit_restore_job(::google::protobuf::RpcController* cont
             .tag("state", restore_job_pb.state())
             .tag("mtime_s", restore_job_pb.mtime_s())
             .tag("committed_rowset_num", converted_rowset_num);
+
+    if (!restore_job_log.recycle_rowsets().empty() && is_versioned_write) {

Review Comment:
   The restore job also creates some partitions and indexes, which need to be 
written to the multi-version key.



##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1991,6 +2018,19 @@ void 
MetaServiceImpl::commit_restore_job(::google::protobuf::RpcController* cont
             .tag("tablet_id", tablet_meta->tablet_id())
             .tag("stats key", hex(stats_key));
 
+    if (is_versioned_write) {
+        TabletStatsPB tablet_load_stats;
+        tablet_load_stats.CopyFrom(stats_pb);
+        auto tablet_load_stats_val = tablet_load_stats.SerializeAsString();
+        std::string tablet_load_stats_version_key =
+                versioned::tablet_load_stats_key({instance_id, 
tablet_meta->tablet_id()});
+        LOG_INFO("put versioned tablet load stats key")
+                .tag("tablet_load_stats_version_key", 
hex(tablet_load_stats_version_key))
+                .tag("tablet_id", tablet_meta->tablet_id())
+                .tag("value_size", tablet_load_stats_val.size())
+                .tag("instance_id", instance_id);
+        versioned_put(txn.get(), tablet_load_stats_version_key, 
tablet_load_stats_val);

Review Comment:
   tablet_compact_stats_key need to be write.



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