-
Notifications
You must be signed in to change notification settings - Fork 953
Optimize: remove deplicate judge available #2908
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
base: develop
Are you sure you want to change the base?
Optimize: remove deplicate judge available #2908
Conversation
} | ||
|
||
if !di.BaseInvoker.IsAvailable() { | ||
// Generally, the case will not happen, because the invoker has been removed |
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.
Can you explain why you want to delete it? If you delete it, will there be a certain risk of causing race conditions in high concurrency scenarios? I hope to get an answer
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.
You need to take a look at the complete Invoke method of dubbo Invoker. This function checks available twice, and the Invoke function is called very frequently, so it shouldn't spend extra time checking twice. The triple invoker only checks once, and the dubbo invoker should be synchronized with the triple invoker.
e72d0ea
to
31d31fa
Compare
|
The logic for determining whether the invoker is available is repeated.