Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zeronerdzerogeekzerocool
Copy link
Contributor

Fixing an edge case , race condition. When zookeeper connection is broke or takes too long, the synchronzed methods will block all threads .
(bugfix, cleanup)

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 63.99%. Comparing base (59551e4) to head (32c35ee).
Report is 1502 commits behind head on master.

Files with missing lines Patch % Lines
...pinot/server/realtime/ControllerLeaderLocator.java 60.00% 6 Missing ⚠️
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     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.97% <60.00%> (+2.26%) ⬆️
java-21 63.88% <60.00%> (+2.25%) ⬆️
skip-bytebuffers-false 63.99% <60.00%> (+2.24%) ⬆️
skip-bytebuffers-true 56.13% <60.00%> (+28.40%) ⬆️
temurin 63.99% <60.00%> (+2.24%) ⬆️
unittests 63.99% <60.00%> (+2.24%) ⬆️
unittests1 56.29% <60.00%> (+9.40%) ⬆️
unittests2 34.45% <0.00%> (+6.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zeronerdzerogeekzerocool zeronerdzerogeekzerocool marked this pull request as ready for review December 23, 2024 21:20
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a 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) {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants