[DiskThresholdMonitor] Add cluster.blocks.read.auto_release setting - #22610
Conversation
… unconditional auto-release of user-set index read blocks The DiskThresholdMonitor unconditionally auto-releases index.blocks.read on all indices, even when manually set by users. This introduces a new dynamic cluster setting cluster.blocks.read.auto_release (default: true) that controls whether read blocks are automatically released. Setting it to false allows operators to prevent automatic release of manually-set read blocks. Resolves opensearch-project#20539 Signed-off-by: Nagendra Mohan <nagendramohan1990@gmail.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
❌ Gradle check result for 3dd7d77: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Gradle check failure is unrelated to this change. The failing test RestoreShallowSnapshotV2IT.testHashedPrefixTranslogMetadataCombination timed out (suite timeout exceeded >= 1200000 msec) — this is a remote store snapshot integration test with no relation to DiskThresholdSettings or DiskThresholdMonitor. Requesting re-run.https://build.ci.opensearch.org/job/gradle-check/82795/console |
Description
The
DiskThresholdMonitorunconditionally auto-releasesindex.blocks.readon all indices, even when manually set by users. This introduces a new dynamic cluster settingcluster.blocks.read.auto_release(default:true) that controls whetherread blocks are automatically released.
Setting it to
falseallows operators to prevent automatic release of manually-set read blocks.Design note: When
auto_release=false, system-set blocks (warm node file cache) are also not released automatically. This is intentional — the setting gives operators full manual control over all read blocks. Operators who disable auto-releaseaccept responsibility for managing all blocks, including system-set ones. This mirrors the behavior of the existing
cluster.blocks.create_index.auto_releasesetting.Related Issues
Resolves #20539
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.