Skip to content

Conversation

@harshitakaushik-dev
Copy link
Contributor

@harshitakaushik-dev harshitakaushik-dev commented Sep 16, 2025

Description

This PR adds rate limiting capabilities for forced merges in OpenSearch. It introduces both index-level and cluster-level settings to control the maximum throughput of forced merge operations, helping to prevent these resource-intensive operations from overwhelming system resources.

The implementation includes:

  1. A new index-level setting index.merge.scheduler.max_force_merge_mb_per_sec to control forced merge rate at the index level
  2. A new cluster-level setting cluster.merge.scheduler.max_force_merge_mb_per_sec as a fallback when index-level setting is not specified
  3. Clear precedence rules where index-level settings take priority over cluster-level settings
  4. Dynamic configuration support allowing settings to be updated without node restarts

This enhancement gives administrators fine-grained control over forced merge operations, allowing them to balance merge performance against other system operations.

Related Issues

Resolves #[19308]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@harshitakaushik-dev
Copy link
Contributor Author

@gbbafna requesting code review.

@github-actions
Copy link
Contributor

❌ Gradle check result for 389b54f: 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?

@github-actions
Copy link
Contributor

❌ Gradle check result for eeb7130: 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?

@harshitakaushik-dev harshitakaushik-dev force-pushed the feature/merge-rate-limiting branch from eeb7130 to 8e96a82 Compare September 17, 2025 08:03
@github-actions
Copy link
Contributor

❌ Gradle check result for 8e96a82: 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?

@harshitakaushik-dev harshitakaushik-dev force-pushed the feature/merge-rate-limiting branch from 8e96a82 to 06398dc Compare September 17, 2025 09:51
@github-actions
Copy link
Contributor

❌ Gradle check result for 06398dc: 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?

@harshitakaushik-dev harshitakaushik-dev force-pushed the feature/merge-rate-limiting branch from 06398dc to 37e78bc Compare September 17, 2025 10:01
@github-actions
Copy link
Contributor

❌ Gradle check result for 8973857: 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?

Signed-off-by: Harshita Kaushik <[email protected]>
@github-actions
Copy link
Contributor

❌ Gradle check result for a430c66: 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?

Signed-off-by: Harshita Kaushik <[email protected]>
Signed-off-by: Harshita Kaushik <[email protected]>
@github-actions
Copy link
Contributor

❌ Gradle check result for 9f3babb: 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?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

❌ Gradle check result for 9f3babb: 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?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

❌ Gradle check result for 9f3babb: null

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?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

❌ Gradle check result for 1c0f321: 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?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

❌ Gradle check result for 1c0f321: null

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?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

✅ Gradle check result for 1c0f321: SUCCESS

@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 73.68421% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.98%. Comparing base (cb65261) to head (1c0f321).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...in/java/org/opensearch/indices/IndicesService.java 28.57% 5 Missing ⚠️
...c/main/java/org/opensearch/index/IndexService.java 0.00% 3 Missing ⚠️
...ava/org/opensearch/index/MergeSchedulerConfig.java 81.81% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19309      +/-   ##
============================================
- Coverage     73.00%   72.98%   -0.02%     
+ Complexity    70483    70453      -30     
============================================
  Files          5717     5717              
  Lines        323021   323057      +36     
  Branches      46790    46793       +3     
============================================
- Hits         235826   235796      -30     
- Misses        68207    68247      +40     
- Partials      18988    19014      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gbbafna gbbafna merged commit 5c8a730 into opensearch-project:main Oct 7, 2025
35 of 39 checks passed
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Oct 11, 2025
Gagan6164 pushed a commit to Gagan6164/OpenSearch that referenced this pull request Oct 13, 2025
Signed-off-by: Harshita Kaushik <[email protected]>
Signed-off-by: Gagan Singh Saini <[email protected]>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Oct 15, 2025
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.

6 participants