-
Notifications
You must be signed in to change notification settings - Fork 383
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
[Improvement] Improve GravitinoCatalogManager close method #2911
Comments
I created a PR(#3096) for this, could you take a look at it? |
it's not supposed to work in the multi-thread environment, so I prefer not to change it. |
Is the fact that it won't work in a multi-thread environment documented anywhere? That seems like an omission that a user would want to know about. |
There is no document for this, maybe we could add some comment to the class file, WDYT? |
Is there a need to support multi-threading? It currently does not support multi-threading. |
Perhaps I'm misisng something, but I assume users expect this to support muti-threading. |
I agree with Justin, we couldn't stop user/client (especially it is a flink connector) from using it in multi-threading, so the code should be robust, especially that is too complex to achieve. |
What would you like to be improved?
GravitinoCatalogManager's close method mixes static and volatile variables in a nonstatic method and that may cause issues. Correctly updating a static field from a non-static method can be tricky to get right and could easily lead to bugs if there are multiple threads.
How should we improve?
See if this can be improved to be more thread safe.
The text was updated successfully, but these errors were encountered: