Skip to content

Conversation

sachinpkale
Copy link
Member

@sachinpkale sachinpkale commented Aug 14, 2025

Description

  • In multipart upload flow, we open IndexInput for each part and this can cause exhaustion of virtual memory for the OpenSearch process.
  • In this PR, instead of creating new IndexInput instance, we clone the original IndexInput instance. Cloned IndexInput instance makes sure not to create a separate map entry in the virtual memory.

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.

Signed-off-by: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

❌ Gradle check result for ee8717d: 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: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

❌ Gradle check result for cf27be8: 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: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

❌ Gradle check result for 18138d7: 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: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

❌ Gradle check result for 0464761: 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: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

✅ Gradle check result for b04e72a: SUCCESS

Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.94%. Comparing base (292407b) to head (c4cf7f4).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...va/org/opensearch/index/store/RemoteDirectory.java 51.92% 19 Missing and 6 partials ⚠️
...earch/index/store/RemoteSegmentStoreDirectory.java 37.50% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19072      +/-   ##
============================================
- Coverage     73.02%   72.94%   -0.09%     
+ Complexity    69548    69418     -130     
============================================
  Files          5647     5647              
  Lines        319106   319119      +13     
  Branches      46163    46164       +1     
============================================
- Hits         233034   232769     -265     
- Misses        67232    67492     +260     
- Partials      18840    18858      +18     

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

Signed-off-by: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

❌ Gradle check result for b1069f8: 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: Sachin Kale <sachinpkale@gmail.com>
Signed-off-by: Sachin Kale <sachinpkale@gmail.com>
Copy link
Contributor

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

@sachinpkale
Copy link
Member Author

Test failures seems flaky. Re-triggered the build.

Copy link
Contributor

❕ Gradle check result for c4cf7f4: 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.

@gbbafna gbbafna merged commit 484454c into opensearch-project:main Aug 19, 2025
31 of 34 checks passed

completionListener = ActionListener.runAfter(completionListener, () -> {
try {
indexInput.close();
Copy link
Member

Choose a reason for hiding this comment

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

good to add a debug/trace log line for places where the close is happening to check in future if any potential leak happens.

Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

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

Overall, looks good and should fix the virtual memory issue that we have seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants