You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wyxxxcat (via GitHub)" <gi...@apache.org> on 2025/10/28 06:35:22 UTC

[PR] [feat](cloud) Write and recycle restore job log [doris]

wyxxxcat opened a new pull request, #57405:
URL: https://github.com/apache/doris/pull/57405

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "wyxxxcat (via GitHub)" <gi...@apache.org>.
wyxxxcat commented on code in PR #57405:
URL: https://github.com/apache/doris/pull/57405#discussion_r2485998574


##########
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:
   they will be created by create_partition rpc from fe



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "wyxxxcat (via GitHub)" <gi...@apache.org>.
wyxxxcat commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3466708637

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "wyxxxcat (via GitHub)" <gi...@apache.org>.
wyxxxcat commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3484967448

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3484973151

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3484972881

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3454830327

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "wyxxxcat (via GitHub)" <gi...@apache.org>.
wyxxxcat commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3471013237

   run vault_p0


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3485068549

   # Cloud UT Coverage Report
   Increment line coverage `5.77% (3/52)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/669a0aeee9011ecd0bcc0e47a01c5c8d1bee3630_669a0aeee9011ecd0bcc0e47a01c5c8d1bee3630_cloud/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/669a0aeee9011ecd0bcc0e47a01c5c8d1bee3630_669a0aeee9011ecd0bcc0e47a01c5c8d1bee3630_cloud/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 80.71% (1674/2074) |
   | Line Coverage     | 66.97% (29555/44132) |
   | Region Coverage   | 67.57% (14708/21768) |
   | Branch Coverage   | 57.82% (7823/13530) |


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "w41ter (via GitHub)" <gi...@apache.org>.
w41ter merged PR #57405:
URL: https://github.com/apache/doris/pull/57405


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3466827316

   # Cloud UT Coverage Report
   Increment line coverage `5.66% (3/53)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/b4598f490fe30138230d02dae2adafd6cc080c8d_b4598f490fe30138230d02dae2adafd6cc080c8d_cloud/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/b4598f490fe30138230d02dae2adafd6cc080c8d_b4598f490fe30138230d02dae2adafd6cc080c8d_cloud/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 80.74% (1673/2072) |
   | Line Coverage     | 66.96% (29510/44072) |
   | Region Coverage   | 67.49% (14668/21734) |
   | Branch Coverage   | 57.80% (7804/13502) |


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "w41ter (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](cloud) Write and recycle restore job log [doris]

Posted by "wyxxxcat (via GitHub)" <gi...@apache.org>.
wyxxxcat commented on PR #57405:
URL: https://github.com/apache/doris/pull/57405#issuecomment-3471013026

   run cloud_p0


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org