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

Refresh valid invokers after connectivity check #13773

Merged
merged 8 commits into from
Feb 29, 2024

Conversation

AlbumenJ
Copy link
Member

@AlbumenJ AlbumenJ commented Feb 20, 2024

What is the purpose of the change

  • Add ReentrantLock to sync all the operation of invokers in Directory

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (caed64b) 70.39% compared to head (219376f) 70.37%.
Report is 11 commits behind head on 3.2.

Additional details and impacted files
@@            Coverage Diff             @@
##              3.2   #13773      +/-   ##
==========================================
- Coverage   70.39%   70.37%   -0.02%     
==========================================
  Files        1606     1607       +1     
  Lines       70022    70062      +40     
  Branches    10102    10099       -3     
==========================================
+ Hits        49294    49309      +15     
- Misses      16104    16124      +20     
- Partials     4624     4629       +5     

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

@AlbumenJ
Copy link
Member Author

@CrazyHZM @chickenlj PTAL

@AlbumenJ
Copy link
Member Author

@qinliujie PTAL

@cnwenf
Copy link

cnwenf commented Feb 21, 2024

LGTM

@AlbumenJ AlbumenJ requested a review from CrazyHZM February 21, 2024 07:21
Copy link

@AlbumenJ AlbumenJ requested a review from chickenlj February 21, 2024 10:54
@qinliujie
Copy link
Contributor

LGTM

if (!invokersToReconnect.isEmpty()) {
checkConnectivity();
}
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed there are three separate code snippets in this method that are protected with locks. Would a single method-level lock do the trick?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prevent lock isAvailable()

@AlbumenJ AlbumenJ merged commit 17b75a7 into apache:3.2 Feb 29, 2024
19 checks passed
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.

6 participants