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

[Backport 2.x] [Searchable Snapshot] Use java.lang.ref.Cleaner to close cloned IndexInputs #6358

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport dae1566 from #6351.

As detailed [in this issue][1], Lucene does not close the cloned
IndexInput instances, so we are using the Cleaner mechanism from the JDK
to close any unclosed clones.

A single static Cleaner instance to ensure any unclosed clone of an
IndexInput is closed. This instance creates a single daemon thread on
which it performs the cleaning actions. For an already-closed
IndexInput, the cleaning action is a no-op. For an open IndexInput, the
close action will decrement a reference count.

[1]: #5243 (comment)

Signed-off-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit dae1566)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross andrross merged commit dd2727f into 2.x Feb 17, 2023
@andrross andrross deleted the backport/backport-6351-to-2.x branch February 17, 2023 18:59
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.

2 participants