Skip to content

branch-4.1: [feat](cloud) support compacting snapshots manuall #61078#61567

Open
github-actions[bot] wants to merge 1 commit intobranch-4.1from
auto-pick-61078-branch-4.1
Open

branch-4.1: [feat](cloud) support compacting snapshots manuall #61078#61567
github-actions[bot] wants to merge 1 commit intobranch-4.1from
auto-pick-61078-branch-4.1

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #61078

Compacting snapshots is necessary to break dependency chains. This PR
supports manual snapshot compaction.

Note:​ Suppose there is a dependency chain: A → B → C. Compacting A to B
is allowed, but compacting B to C is not allowed because B depends on A.

This PR adds a new HTTP API to trigger snapshot compaction manually:

```bash
# Compact snapshot for a specific instance
curl -X POST "http://<ms_host>:<ms_port>/v1/compact_snapshot?instance_id=<instance_id>"
```

Parameters:
- `instance_id` (required): The instance ID to compact snapshot for (A
-> B, instance_id = B)

Example:
```bash
curl -X POST "http://127.0.0.1:5000/compact_snapshot?instance_id=my-instance"
```
@github-actions github-actions bot requested a review from yiguolei as a code owner March 20, 2026 09:24
@hello-stephen
Copy link
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?

@dataroaring dataroaring reopened this Mar 20, 2026
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 32.89% (25/76) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.40% (1786/2278)
Line Coverage 64.26% (31939/49704)
Region Coverage 65.04% (15986/24580)
Branch Coverage 55.62% (8502/15286)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 100.00% (2/2) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.56% (19419/36943)
Line Coverage 36.04% (181360/503173)
Region Coverage 32.55% (140452/431549)
Branch Coverage 33.48% (61230/182890)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.03% (25686/36163)
Line Coverage 53.88% (270229/501530)
Region Coverage 51.29% (223426/435587)
Branch Coverage 52.66% (96602/183458)

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