-
Notifications
You must be signed in to change notification settings - Fork 443
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
[GLUTEN-6904] Remove additional synchronizations in JNILibLoader #6905
[GLUTEN-6904] Remove additional synchronizations in JNILibLoader #6905
Conversation
Thanks @zhztheplayer for pointing this out, if could please take a look and review |
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.
I see we use synchronized collections and synchronized
keywords at the same time. Were they for similar purpose? If yes, can we only keep one of them? So the code will be easier to understand and maintain. Say if synchronized collections are not enough for our case, we can just use synchronized
+ normal collections.
In addition, if we decide to stay on synchronized
keywords, I assume its usage in method mapAndLoad
is not needed now. Since method load
is already atomic (because mapLibraryName
should be stateless?).
Run Gluten Clickhouse CI |
Updated thanks, we need synchronized since there were thread unsafe operations being done outside the collections. I have removed the synchronized collection and kept the keyword, there were not much changes so the code flow is more simple now. Also removed it from mapAndLoad, since we have load protected anyway thanks! |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks. |
What changes were proposed in this pull request?
Fixes #6904
How was this patch tested?