-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
@CrazyHZM @chickenlj PTAL |
@qinliujie PTAL |
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
Outdated
Show resolved
Hide resolved
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
Outdated
Show resolved
Hide resolved
LGTM |
Quality Gate passedIssues Measures |
LGTM |
if (!invokersToReconnect.isEmpty()) { | ||
checkConnectivity(); | ||
} | ||
}); |
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 noticed there are three separate code snippets in this method that are protected with locks. Would a single method-level lock do the trick?
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.
To prevent lock isAvailable()
What is the purpose of the change
ReentrantLock
to sync all the operation of invokers inDirectory
Brief changelog
Verifying this change
Checklist