[fix](cloud) Track deleted instance recycle status#65330
Open
wyxxxcat wants to merge 1 commit into
Open
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Collaborator
Author
|
run buildall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_statuscan 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_statusvalues:INSTANCE_RECYCLE_PENDINGINSTANCE_DATA_DELETEDINSTANCE_META_AND_DATA_DELETEDThe API only accepts instances whose
InstanceInfoPB.statusisDELETED. A typical recovery case is to set a stuck deleted instance toINSTANCE_DATA_DELETEDafter 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
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)