Repository navigation
fix(store): honor configured raft segment size - #3420
Conversation
- Pass resolved segment sizes to the JRaft log storage factory. - Preserve the effective 1 GiB default and legacy property fallback. - Test explicit sizes, backend selection and legacy segment recovery. - Document per-segment limits and sparse disk accounting.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3420 +/- ##
============================================
+ Coverage 57.27% 57.47% +0.20%
+ Complexity 6577 2447 -4130
============================================
Files 776 777 +1
Lines 68881 68952 +71
Branches 9431 9443 +12
============================================
+ Hits 39449 39628 +179
+ Misses 25804 25688 -116
- Partials 3628 3636 +8
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Isolate only validated incompatible blank allocations under the RocksDB directory lock. Sync the directory before JRaft can reuse numeric filenames, preserving nonempty logs. Release failed initialization resources and make repeated failure cleanup safe. Cover native grow/shrink recovery, unknown headers and symlinks; document retained files.
HG review summary: round R10-contract-check (head
|
Retain upstream learner-promotion retry changes. Keep both log-storage and membership regressions enabled. Preserve configured segment sizes and verified blank isolation.
Before → After
Before: Store bound
raft.maxSegmentFileSizebut did not pass it to JRaft, so an explicit size had no effect.After: pass the resolved segment size to log storage, retaining the effective 1 GiB default and legacy system-property fallback. Explicit Store configuration takes precedence. Document existing-file recovery, sparse files, and the encoded-entry size constraint.
Validation boundary
The source PR reports five real log-storage tests, including configuration precedence and reopening legacy segments with a 20 MiB entry, plus reactor/build checks. This is author-reported validation; it is not a new independent runtime or performance acceptance. Existing review follow-ups remain applicable.
Source PR: 🔗 hugegraph/hugegraph #341
Visual overview
Verified-blank preallocated segments with incompatible sizes are atomically isolated before allocation; used segments remain unchanged. Unknown or truncated headers and symlinks fail closed. Isolated files still consume disk. This diagram is not power-loss, performance or RC acceptance.