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

Implement LookupExtractor.close() and avoid deleting off-heap cache while LookupExtractor is in use #3771

Closed
leventov opened this issue Dec 12, 2016 · 5 comments

Comments

@leventov
Copy link
Member

Addressing https://github.com/druid-io/druid/blob/78159d7ca442cf8d99ea356d39932ab3adb8e10f/extensions-core/lookups-cached-global/src/main/java/io/druid/server/lookup/namespace/cache/OffHeapNamespaceExtractionCacheManager.java#L122

Proposed solution: make LookupExtractor closeable, and remove the cache only after it is replaced by a newer cache via periodic updates, and there are no open LookupExtractors accessing this cache. (Implementation may require some kind of manual reference counting.)

Currently, because of #3663, while off-heap cache is not functional, so this issue is not important because "closing" on-heap cache while using it is harmless ("closing" is just cleaning references to it, the cache itself is unchanged.)

@drcrallen
Copy link
Contributor

One reason this was not resolved in the initial release was I couldn't find the right "responsibility chain" to tie the closeable resource into. Essentially things that require closeable resources tend to have their own QueryRunner that closes the resources appropriately, and I didn't want to add yet another one without some significant thought regarding the best way to actually handle query resources.

@stale
Copy link

stale bot commented Jun 21, 2019

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

@stale stale bot added the stale label Jun 21, 2019
@stale
Copy link

stale bot commented Jul 5, 2019

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

@github-actions
Copy link

This issue has been marked as stale due to 280 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the [email protected] list.
Thank you for your contributions.

@github-actions github-actions bot added the stale label May 30, 2023
@github-actions
Copy link

This issue has been closed due to lack of activity. If you think that
is incorrect, or the issue requires additional review, you can revive the issue at
any time.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants