-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Adding reentrant locks, for raceconditon caused by connectivity issues #14643
base: master
Are you sure you want to change the base?
Adding reentrant locks, for raceconditon caused by connectivity issues #14643
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14643 +/- ##
============================================
+ Coverage 61.75% 63.99% +2.24%
- Complexity 207 1608 +1401
============================================
Files 2436 2706 +270
Lines 133233 149225 +15992
Branches 20636 22877 +2241
============================================
+ Hits 82274 95501 +13227
- Misses 44911 46712 +1801
- Partials 6048 7012 +964
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Trying to understand the problem here. Seems the issue is that refreshControllerLeaderMap()
takes too long. How is this PR going to fix that?
// instance even if there is already one. | ||
LOGGER.warn("Already created"); | ||
return; | ||
if (_instance == null) { |
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.
This is called only once during server starts, which is always single threaded. I don't think we need to synchronize this
Fixing an edge case , race condition. When zookeeper connection is broke or takes too long, the synchronzed methods will block all threads .
(bugfix, cleanup)