-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
use a tmp variable named [isOldProviderGroupEmpty] to resolve the bug… #1444
use a tmp variable named [isOldProviderGroupEmpty] to resolve the bug… #1444
Conversation
… && adjust the location of method called [closeTransports();] (sofastack#1442) - sofastack#1442
Hi @shawnliang1124, welcome to SOFAStack community, Please sign Contributor License Agreement! After you signed CLA, we will automatically sync the status of this pull request in 3 minutes. |
WalkthroughThe pull request modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant Consumer
participant AbstractCluster
participant ProviderHelper
participant AddressHolder
participant ConnectionHolder
Consumer->>AbstractCluster: updateProviders(providerGroup)
AbstractCluster->>ProviderHelper: isEmpty(providerGroup)
alt if providerGroup is empty
AbstractCluster->>AddressHolder: updateProviders(providerGroup)
AbstractCluster->>ProviderHelper: isEmpty(oldProviderGroup)
alt if oldProviderGroup is not empty
AbstractCluster->>ConnectionHolder: closeTransports()
end
else
AbstractCluster->>AddressHolder: updateProviders(providerGroup)
AbstractCluster->>ConnectionHolder: updateProviders(providerGroup)
end
Assessment against linked issues
Possibly related PRs
Suggested labelsbug, cla:yes, size/S Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java (1 hunks)
Files skipped from review due to trivial changes (1)
- core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java
It has already been fixed in other PRs #1452. Thank you for your feedback. |
djust the location of method called [closeTransports();] (#1442)
Motivation:
there are two bugs in the AbstractCluster.java
variable named [oldProviderGroup] will be changed because of the method [addressHolder.updateProviders(providerGroup);], which will not execute method [ closeTransports();]
the method of [closeTransports();] should not be contain in the [LOGGER.isWarnEnabled(consumerConfig.getAppName())]
Modification:
Result:
Fixes #1442
Summary by CodeRabbit
updateProviders
method by reducing redundant checks.