-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Search before asking
- I searched in the issues and found nothing similar.
Motivation
In CachingCatalog, when multi thread calls the getTable with the same Identifier ,if them all find cache miss, they will call the wrapped.getTable(identifier) multiple times concurrently, which is very expensive. And actually, we just need to call the wrapped.getTable(identifier) once, and return the result for all calls.
Solution
Only allow the first cache-missing thread to call wrapped.getTable(identifier). Other concurrent threads requesting the same Identifier should wait for and reuse the result. This can be implemented by introducing a lock or a Future-based coordination mechanism.
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request