HDDS-16273. OM bootstrap never completes when a single SST file is larger than ozone.om.ratis.snapshot.max.total.sst.size - #11214
Open
Eason09053360 wants to merge 1 commit into
Open
Conversation
…rger than ozone.om.ratis.snapshot.max.total.sst.size Leader: record an oversized file when nothing has been collected for the request yet, so every part carries at least one file; treat a file that exactly fills the budget as fitting. Follower: abort with a diagnosable IOException after two consecutive parts that bring no new file instead of looping forever.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The functional fix is well-scoped, matches the PR description, and is covered by new targeted tests; remaining feedback is non-blocking.
Pull request overview
Fixes an OM HA bootstrap livelock where incremental checkpoint download never completes if a single SST exceeds ozone.om.ratis.snapshot.max.total.sst.size, by ensuring leader transfers always make progress and follower transfers abort instead of looping forever.
Changes:
- Leader: allow a single oversized SST to be transferred alone (and treat exact-fit as in-budget).
- Follower: detect consecutive no-progress parts during snapshot download and fail fast with a diagnosable
IOException. - Tests/docs: add targeted regression tests and clarify the config description in
ozone-default.xml.
File summaries
| File | Description |
|---|---|
| hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServletInodeBasedXfer.java | Ensures oversized SSTs are still sent (one per part) and fixes exact-fit budget semantics. |
| hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMDbCheckpointServletInodeBasedXfer.java | Adds coverage for oversized-file transfer progress and updates batching assertion for exact-fit behavior. |
| hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/RDBSnapshotProvider.java | Adds “no progress” part detection to prevent infinite looping during snapshot download. |
| hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/utils/TestRDBSnapshotProvider.java | Adds regression test validating abort after consecutive no-progress parts. |
| hadoop-hdds/common/src/main/resources/ozone-default.xml | Documents that an oversized SST is still transferred to ensure progress. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 changes were proposed in this pull request?
OMDBCheckpointServletInodeBasedXfer.collectFilesFromDir()checks the per-request budget(
ozone.om.ratis.snapshot.max.total.sst.size) before recording a file. When a single SST file is larger thanthe whole budget it is the first non-excluded file of every request, so the leader answers with an empty
tarball each time. The follower's exclude list never changes, and
RDBSnapshotProvider.downloadDBSnapshotFromLeader()loops forever while holding the
OzoneManagermonitor: no error, no bound, no progress. The comparison was also<= 0, so a file exactly equal to the remaining budget was treated as over budget.Leader side: when a file does not fit and nothing has been collected for the request yet, record it anyway and
end the part, so every request transfers at least one file. The budget check is now
< 0, so an exact fit isnot over budget. The v1
OMDBCheckpointServletrecords before checking and was never affected.Follower side:
RDBSnapshotProvidercounts consecutive parts that bring no new file into the candidate dir andaborts with a diagnosable
IOExceptionafter two instead of looping forever. One no-progress part is toleratedfor transient causes such as a truncated exclude list. The
part : Nlog is now 1-based.The
ozone-default.xmldescription now states that an oversized file is still sent.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16273
How was this patch tested?
TestOMDbCheckpointServletInodeBasedXfer#testCollectFilesFromDirTransfersFileLargerThanMaxSize: twofiles larger than the budget are sent one per request, the limit is enforced again once the tarball holds a
file, and a file exactly filling the budget is accepted.
testTarballBatchingassertion changed to<=to match the exact-fit semantics; both parameterizations pass.TestRDBSnapshotProvider#testDownloadAbortsWhenPartsBringNoNewFile: the first empty part is tolerated,the second aborts with the new message.
checkstyle.sh— 0 violations.Generated-by: Claude Code (Claude Fable 5.1)