Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Segment Replication] [Bug] Wrap IndexInput inside try with resources to prevent file handle leaks #4206

Closed

Conversation

dreamer-89
Copy link
Member

Signed-off-by: Suraj Singh surajrider@gmail.com

Description

Wrap IndexInput inside try-with-resources to fix runtime exception due to file handle leaks

Issues Resolved

#4205

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: Suraj Singh <surajrider@gmail.com>
@dreamer-89 dreamer-89 requested review from a team and reta as code owners August 12, 2022 21:18
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dreamer-89 dreamer-89 marked this pull request as draft August 12, 2022 21:53
@dreamer-89
Copy link
Member Author

dreamer-89 commented Aug 12, 2022

Apparently this is not correct solution as the IndexInput is consumed in follow up method calls which all fail with closed IndexInput object.

Caused by: org.opensearch.transport.RemoteTransportException: [node_t1][127.0.0.1:53048][internal:index/shard/recovery/start_recovery]
Caused by: org.opensearch.common.io.stream.NotSerializableExceptionWrapper: runtime_exception: Abusing closed IndexInput!

@dreamer-89
Copy link
Member Author

Closing this in favour of separate PR involving cancellations.

@dreamer-89 dreamer-89 closed this Aug 18, 2022
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.

1 participant