-
Notifications
You must be signed in to change notification settings - Fork 990
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
[Core]Support async lookup #4341
Conversation
@JingsongLi Could you please riview this PR? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @neuyilan , thanks for your contribution!
But I think there's a very big risk here, can we change it a little bit one by one to make everything in there thread-safe?
ReentrantLock lock = locks[Math.abs(file.hashCode()) % lookupAsyncThreadNumber]; | ||
try { | ||
lock.lock(); | ||
LookupFile lookupFile = lookupFileCache.getIfPresent(file.fileName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just create a lock in LookupFile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just create a lock in LookupFile?
I think is ok, create one lock in LookupFile
, the same DataFileMeta
file use the same lock to ensure thread safe, is that what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
In the current design,
|
Thanks for your reply, can you split the PR to multiple PRs? Ensure that every change is thoroughly discussed, otherwise there are too many things to discuss in a large PR, making it difficult to review. |
Got it, I will do this. |
I will close this PR, and submit new PRs |
Purpose
Currently, lookup join does not really support asynchronous, and the purpose of this PR is to support asynchronous lookup join.
Tests
IT in
LookupJoinITCase.java
API and Format
no
Documentation
no doc