Skip to content

[server] Add configurable disk write-limit recover gap#3612

Merged
wuchong merged 3 commits into
apache:mainfrom
swuferhong:dynamic-update-protect-dis-ratio
Jul 13, 2026
Merged

[server] Add configurable disk write-limit recover gap#3612
wuchong merged 3 commits into
apache:mainfrom
swuferhong:dynamic-update-protect-dis-ratio

Conversation

@swuferhong

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3611

Parameterize the DiskUsageMonitor recover gap with server.data-disk.write-limit-recover-gap and set its default value to 0.05.

The recover gap now supports dynamic updates together with server.data-disk.write-limit-ratio. Startup and dynamic config validation now enforce 0 < recover-gap < write-limit-ratio <= 1.0.

Brief change log

Tests

API and Format

Documentation

@swuferhong swuferhong force-pushed the dynamic-update-protect-dis-ratio branch 2 times, most recently from 6073098 to 4707ba2 Compare July 8, 2026 06:25
@wuchong wuchong requested a review from Copilot July 11, 2026 03:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (default 0.05) and enforces 0 < recover-gap < write-limit-ratio <= 1.0.
  • Updates DiskUsageMonitor/LocalDiskManager to 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.

Comment thread website/docs/maintenance/configuration.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Comment thread website/docs/maintenance/configuration.md Outdated
Comment thread fluss-server/src/main/java/org/apache/fluss/server/storage/DiskUsageMonitor.java Outdated
Comment thread fluss-server/src/main/java/org/apache/fluss/server/storage/LocalDiskManager.java Outdated
@swuferhong swuferhong force-pushed the dynamic-update-protect-dis-ratio branch from 6e7596e to d2acb0a Compare July 12, 2026 11:56

@wuchong wuchong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @swuferhong , I only have one comment.

Comment thread fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java Outdated
@wuchong wuchong added this to the v1.0 milestone Jul 12, 2026
@swuferhong

Copy link
Copy Markdown
Contributor Author

@wuchong comments addressed. PTAL, thanks.

@wuchong wuchong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wuchong wuchong merged commit e5e6bb4 into apache:main Jul 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[server] Support dynamic configuration for disk write-limit recover gap

3 participants