[fix](cloud) checkpoint save cloud tablet stats to image - #60705
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This PR updates FE checkpoint/image generation for cloud mode so that the saved image includes cloud-specific runtime metadata (table/partition versions and tablet/replica stats), reducing reliance on rebuilding those values after restart.
Changes:
- Add a cloud-mode post-processing step during checkpoint generation to copy table/partition versions and replica stats from the serving env into the checkpoint env before saving the image.
- Persist additional cloud metadata by adding Gson
@SerializedNameannotations (e.g., table cached version, replica rowset/segment counts). - Make
OlapTable.setCachedTableVersion()callable from checkpoint code.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java |
Adds postProcessCloudMetadata() to copy versions and tablet stats into the checkpoint catalog before saveImage(). |
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudReplica.java |
Persists segmentCount and rowsetCount into image via @SerializedName. |
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java |
Persists cached table version via @SerializedName and exposes setter for checkpoint to populate it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
run buildall |
TPC-H: Total hot run time: 30543 ms |
TPC-DS: Total hot run time: 189007 ms |
ClickBench: Total hot run time: 28.85 s |
FE Regression Coverage ReportIncrement line coverage |
7c0af96 to
f7bf894
Compare
|
run buildall |
FE Regression Coverage ReportIncrement line coverage |
f7bf894 to
66cffc1
Compare
|
run buildall |
TPC-H: Total hot run time: 28693 ms |
TPC-DS: Total hot run time: 183259 ms |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
66cffc1 to
c91c38a
Compare
d3a9bc8 to
007ddd6
Compare
|
run buildall |
TPC-H: Total hot run time: 27044 ms |
TPC-DS: Total hot run time: 169627 ms |
FE UT Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
run p0 |
### What problem does this PR solve? Issue Number: None Related PR: apache#60705, apache#66154 Problem Summary: Periodically regenerating a cloud checkpoint without a newer finalized journal reused the same image sequence. That exposed checkpoint version mismatches, same-version image publication, and follower synchronization ambiguity. Stop triggering checkpoints solely because an image is stale while retaining cloud metadata persistence during normal checkpoints. Do not persist tablet-stat refresh scheduling state so an FE can use cached stats immediately after restart and then rebuild the refresh schedule. ### Release note Cloud FE no longer regenerates a checkpoint solely because the current image is stale. Tablet-stat refresh scheduling state is rebuilt after FE restart. ### Check List (For Author) - Test: No need to test (commit-history squash only; code diff is unchanged) - Behavior changed: Yes (remove periodic stale-image checkpoint generation and persisted tablet-stat scheduling state) - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: apache#60705, apache#66154 Problem Summary: Periodically regenerating a cloud checkpoint without a newer finalized journal reused the same image sequence. That exposed checkpoint version mismatches, same-version image publication, and follower synchronization ambiguity. Stop triggering checkpoints solely because an image is stale while retaining cloud metadata persistence during normal checkpoints. Do not persist tablet-stat refresh scheduling state so an FE can use cached stats immediately after restart and then rebuild the refresh schedule. Also align the OlapTable test mock lambda with FE Checkstyle indentation rules. ### Release note Cloud FE no longer regenerates a checkpoint solely because the current image is stale. Tablet-stat refresh scheduling state is rebuilt after FE restart. ### Check List (For Author) - Test: No need to test (commit-history squash; functional code diff is unchanged) - Checkstyle: `mvn -pl fe-core checkstyle:check` - Behavior changed: Yes (remove periodic stale-image checkpoint generation and persisted tablet-stat scheduling state) - Does this need documentation: No
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)