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 2026/10/12 09:51:24 UTC

[PR] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary: The GCS-specific accessor deleted files and objects under a prefix one at a time. Remove that accessor and route GCS through the shared S3Accessor deletion paths, which use batch deletion for file lists and recursive deletion.
   
   ### 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] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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

   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] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://doris.apache.org/community/how-to-contribute/review-and-ci).
   
   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] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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


##########
cloud/src/recycler/s3_accessor.cpp:
##########
@@ -325,15 +325,7 @@ std::string S3Accessor::to_uri(const std::string& relative_path) const {
 
 int S3Accessor::create(S3Conf conf, std::shared_ptr<S3Accessor>* accessor) {
     TEST_SYNC_POINT_RETURN_WITH_VALUE("S3Accessor::init.s3_init_failed", (int)-1);
-    switch (conf.provider) {
-    case S3Conf::GCS:
-        *accessor = std::make_shared<GcsAccessor>(conf);
-        break;
-    default:
-        *accessor = std::make_shared<S3Accessor>(conf);
-        break;
-    }
-
+    *accessor = std::make_shared<S3Accessor>(conf);

Review Comment:
   [P2] Preserve GCS cleanup when the bucket is already absent
   
   If a GCS bucket is removed while rowset or COPY recycle metadata still exists, this factory change makes file-list cleanup fail indefinitely. The old `GcsAccessor::delete_files` called `delete_file`, which normalized HTTP 404/`NOT_FOUND` to success. The inherited `S3Accessor::delete_files` instead forwards `DeleteObjects` through `S3ObjStorageClient::delete_objects`, which returns nonzero `NOT_FOUND` for a missing bucket ([GCS XML error reference](https://docs.cloud.google.com/storage/docs/xml-api/reference-status)). Consequently `InstanceRecycler::delete_rowset_data` and COPY cleanup retain their KV entries on every retry even though no physical data remains. Preserve the previous not-found-as-success behavior for GCS batch deletion and cover a whole-request missing-bucket response in a test.



-- 
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] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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

   /review


-- 
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] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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


##########
cloud/src/recycler/s3_accessor.cpp:
##########
@@ -325,15 +325,7 @@ std::string S3Accessor::to_uri(const std::string& relative_path) const {
 
 int S3Accessor::create(S3Conf conf, std::shared_ptr<S3Accessor>* accessor) {
     TEST_SYNC_POINT_RETURN_WITH_VALUE("S3Accessor::init.s3_init_failed", (int)-1);
-    switch (conf.provider) {
-    case S3Conf::GCS:
-        *accessor = std::make_shared<GcsAccessor>(conf);
-        break;
-    default:
-        *accessor = std::make_shared<S3Accessor>(conf);
-        break;
-    }
-
+    *accessor = std::make_shared<S3Accessor>(conf);

Review Comment:
   The DeleteObjects of AWS S3 and GCS may both return HTTP 404 when bucket is removed, which is consistent with the existing behavior.



-- 
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] [improvement](cloud) Enable batch deletion for GCS objects in recycler [doris]

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


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