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

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Problem Summary: Dropped instances could remain unrecycled when the cloud 
sub-account was removed before recycler deleted object data. In that case 
recycler could not access the bucket, so object deletion failed and metadata 
cleanup never progressed. This change adds deleted-instance recycle progress to 
InstanceInfoPB, lets recycler update the progress after object data and 
metadata cleanup, and adds a recycler HTTP API to manually set the recycle 
status for recovery. Control plane can use status, recycled_status, and 
last_recycle_time_ms to decide when it is safe to remove cloud sub-account 
permissions.
   
   HTTP API usage:
   
   The recycler HTTP API `set_instance_recycled_status` can be used to manually 
update the recycle progress of a deleted instance.
   
   Example:
   
   `curl 
"http://<recycler_host>:<recycler_http_port>/MetaService/http/set_instance_recycled_status?instance_id=<instance_id>&recycled_status=INSTANCE_DATA_DELETED"`
   
   Supported `recycled_status` values:
   
   - `INSTANCE_RECYCLE_PENDING`
   - `INSTANCE_DATA_DELETED`
   - `INSTANCE_META_AND_DATA_DELETED`
   
   The API only accepts instances whose `InstanceInfoPB.status` is `DELETED`. A 
typical recovery case is to set a stuck deleted instance to 
`INSTANCE_DATA_DELETED` after object data has already been removed or can no 
longer be accessed, so recycler can continue deleting metadata.
   
   ### 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: [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