Eason09053360 opened a new pull request, #11214:
URL: https://github.com/apache/ozone/pull/11214

   ## 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 than
   the 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 `OzoneManager` monitor: 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 is
   not over budget. The v1 `OMDBCheckpointServlet` records before checking and 
was never affected.
   
   Follower side: `RDBSnapshotProvider` counts consecutive parts that bring no 
new file into the candidate dir and
   aborts with a diagnosable `IOException` after two instead of looping 
forever. One no-progress part is tolerated
   for transient causes such as a truncated exclude list. The `part : N` log is 
now 1-based.
   
   The `ozone-default.xml` description 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?
   
   - New 
`TestOMDbCheckpointServletInodeBasedXfer#testCollectFilesFromDirTransfersFileLargerThanMaxSize`:
 two
     files 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.
   - `testTarballBatching` assertion changed to `<=` to match the exact-fit 
semantics; both parameterizations pass.
   - New `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)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to