Skip to content

[feat](cloud) implement decouple_instance (#61221)#61697

Open
w41ter wants to merge 1 commit intobranch-4.1from
cherry-pick-61221-to-4.1
Open

[feat](cloud) implement decouple_instance (#61221)#61697
w41ter wants to merge 1 commit intobranch-4.1from
cherry-pick-61221-to-4.1

Conversation

@w41ter
Copy link
Contributor

@w41ter w41ter commented Mar 25, 2026

When an instance is cloned via clone_instance, it maintains references to the source instance and snapshot. After snapshot compaction completes, these references can be safely removed to decouple the cloned instance, making it fully independent.

Usage Example:

curl -X POST "http://ms_host:port/decouple_instance?instance_id=my_cloned_instance&token=xxx"

Requirements:

  • instance_id: The ID of the cloned instance to decouple
  • The instance must have been created via clone_instance
  • The instance's snapshot_compact_status must be SNAPSHOT_COMPACT_DONE

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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

When an instance is cloned via clone_instance, it maintains references
to the source instance and snapshot. After snapshot compaction
completes, these references can be safely removed to decouple the cloned
instance, making it fully independent.

Usage Example:

```
curl -X POST "http://ms_host:port/decouple_instance?instance_id=my_cloned_instance&token=xxx"
```

Requirements:
  - instance_id: The ID of the cloned instance to decouple
  - The instance must have been created via clone_instance
  - The instance's snapshot_compact_status must be SNAPSHOT_COMPACT_DONE
@w41ter w41ter requested a review from yiguolei as a code owner March 25, 2026 03:29
@Thearas
Copy link
Contributor

Thearas commented Mar 25, 2026

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?

@yiguolei
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.47% (1786/2276)
Line Coverage 64.23% (32012/49838)
Region Coverage 65.05% (16011/24612)
Branch Coverage 55.61% (8530/15340)

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.

4 participants