Skip to content

Conversation

rgsriram
Copy link
Contributor

Description

Introduced an adaptive merge policy system in OpenSearch that dynamically tunes Lucene segment merge settings based on shard size. The solution replaces static defaults with context-aware configurations, improving benchmark consistency and search performance across varying index sizes. Key additions include an AdaptiveTieredMergePolicyProvider for shard-specific optimisations, a SegmentTopologyAnalyzer for segment distribution analysis, and a REST API for real-time monitoring. This change delivers more predictable performance and optimised search behaviour for users.

Related Issues

Resolves #11163

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.

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

❌ Gradle check result for c5a14ad: 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: Sriram Ganesh <[email protected]>

Fixed the style check issues

Signed-off-by: Sriram Ganesh <[email protected]>

Fixed javadocs

Signed-off-by: Sriram Ganesh <[email protected]>

Refactored the code

Signed-off-by: Sriram Ganesh <[email protected]>

Changed the api version

Signed-off-by: Sriram Ganesh <[email protected]>

Refactored the code

Signed-off-by: Sriram Ganesh <[email protected]>

Refactored the code

Signed-off-by: Sriram Ganesh <[email protected]>

Refactored the code

Signed-off-by: Sriram Ganesh <[email protected]>

Resolved stylecheck issues.

Signed-off-by: Sriram Ganesh <[email protected]>

Refactored the code

Signed-off-by: Sriram Ganesh <[email protected]>
Copy link
Contributor

github-actions bot commented Oct 2, 2025

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

Copy link
Contributor

github-actions bot commented Oct 2, 2025

❕ Gradle check result for 97148d6: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 23.82671% with 211 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.91%. Comparing base (983c4d7) to head (97148d6).

Files with missing lines Patch % Lines
...search/index/analysis/SegmentTopologyAnalyzer.java 0.00% 141 Missing ⚠️
...earch/index/AdaptiveTieredMergePolicyProvider.java 53.21% 47 Missing and 4 partials ⚠️
...h/rest/action/admin/RestSegmentTopologyAction.java 16.66% 15 Missing ⚠️
.../main/java/org/opensearch/index/IndexSettings.java 50.00% 3 Missing ⚠️
...in/java/org/opensearch/index/shard/IndexShard.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19352      +/-   ##
============================================
- Coverage     73.08%   72.91%   -0.17%     
+ Complexity    70491    70413      -78     
============================================
  Files          5712     5715       +3     
  Lines        322762   323040     +278     
  Branches      46743    46769      +26     
============================================
- Hits         235879   235541     -338     
- Misses        67941    68504     +563     
- Partials      18942    18995      +53     

☔ 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.

@rgsriram
Copy link
Contributor Author

rgsriram commented Oct 2, 2025

@msfroh - Could you please review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Search:Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize segment size and merge settings
1 participant