Skip to content

[fix](cloud) Track deleted instance recycle status#65330

Open
wyxxxcat wants to merge 1 commit into
apache:masterfrom
wyxxxcat:recycle_drop_instance
Open

[fix](cloud) Track deleted instance recycle status#65330
wyxxxcat wants to merge 1 commit into
apache:masterfrom
wyxxxcat:recycle_drop_instance

Conversation

@wyxxxcat

@wyxxxcat wyxxxcat commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See 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?

@wyxxxcat

wyxxxcat commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants