[server] Add configurable disk write-limit recover gap#3612
Merged
wuchong merged 3 commits intoJul 13, 2026
Conversation
6073098 to
4707ba2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the TabletServer disk write-protection hysteresis (“recover gap”) configurable and dynamically updatable, replacing the previous hard-coded 10% gap in DiskUsageMonitor.
Changes:
- Introduces
server.data-disk.write-limit-recover-gap(default0.05) and enforces0 < recover-gap < write-limit-ratio <= 1.0. - Updates
DiskUsageMonitor/LocalDiskManagerto compute recover thresholds from the configured gap and to support dynamic updates of both values. - Adds/updates validation and tests across server dynamic config, storage, and client IT coverage; updates docs accordingly.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/maintenance/configuration.md | Documents the new recover-gap option and updates write-limit-ratio semantics. |
| fluss-server/src/test/java/org/apache/fluss/server/storage/LocalDiskManagerTest.java | Adds startup validation tests for ratio/gap and disabled mode. |
| fluss-server/src/test/java/org/apache/fluss/server/storage/DiskUsageMonitorTest.java | Extends tests for configurable recover gap and combined dynamic updates. |
| fluss-server/src/test/java/org/apache/fluss/server/replica/ReplicaManagerTest.java | Updates expectation/comment to reflect new default recover gap. |
| fluss-server/src/test/java/org/apache/fluss/server/DynamicConfigChangeTest.java | Adds coordinator/tablet dynamic-config validation coverage for ratio+gap. |
| fluss-server/src/main/java/org/apache/fluss/server/tablet/TabletServer.java | Updates comment to reflect dynamic disk write-limit configs (ratio + gap). |
| fluss-server/src/main/java/org/apache/fluss/server/storage/LocalDiskManager.java | Wires new config option, validates ratio+gap together, and reconfigures both dynamically. |
| fluss-server/src/main/java/org/apache/fluss/server/storage/DiskWriteLimitRatioValidator.java | Removes old single-key validator (ratio-only). |
| fluss-server/src/main/java/org/apache/fluss/server/storage/DiskWriteLimitConfigValidator.java | Adds cross-field validation for write-limit ratio + recover gap. |
| fluss-server/src/main/java/org/apache/fluss/server/storage/DiskUsageMonitor.java | Makes hysteresis configurable; supports updating ratio+gap together. |
| fluss-server/src/main/java/org/apache/fluss/server/DynamicServerConfig.java | Allows server.data-disk.write-limit-recover-gap as a dynamic key. |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorServer.java | Registers coordinator-side validation for disk write-limit config. |
| fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java | Adds SERVER_DATA_DISK_WRITE_LIMIT_RECOVER_GAP and updates ratio description/range. |
| fluss-client/src/test/java/org/apache/fluss/client/admin/FlussAdminITCase.java | Updates IT assertions to match new validation behavior/message. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6e7596e to
d2acb0a
Compare
wuchong
reviewed
Jul 12, 2026
wuchong
left a comment
Member
There was a problem hiding this comment.
Thanks @swuferhong , I only have one comment.
Contributor
Author
|
@wuchong comments addressed. PTAL, thanks. |
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.
Purpose
Linked issue: close #3611
Parameterize the
DiskUsageMonitorrecover gap withserver.data-disk.write-limit-recover-gapand set its default value to0.05.The recover gap now supports dynamic updates together with
server.data-disk.write-limit-ratio. Startup and dynamic config validation nowenforce 0 < recover-gap < write-limit-ratio <= 1.0.Brief change log
Tests
API and Format
Documentation