-
Notifications
You must be signed in to change notification settings - Fork 8.9k
bugfix: the bug where multiple nodes cannot be retrieved from the naming server #6757
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
Conversation
# Conflicts: # changes/en-us/2.x.md # changes/zh-cn/2.x.md
# Conflicts: # changes/zh-cn/2.x.md
# Conflicts: # common/src/main/java/org/apache/seata/common/metadata/namingserver/Instance.java # common/src/main/java/org/apache/seata/common/metadata/namingserver/NamingServerNode.java # namingserver/src/main/java/org/apache/seata/namingserver/controller/NamingController.java # server/src/main/java/org/apache/seata/server/Server.java
…o 0812 # Conflicts: # common/src/main/java/org/apache/seata/common/ConfigurationKeys.java # namingserver/src/main/java/org/apache/seata/namingserver/manager/NamingManager.java
| public void appendUnits(List<Unit> unitData) { | ||
| this.unitData.addAll(unitData); | ||
| } | ||
| public void appendUnit(Unit unitData) { |
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.
new line
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.
done
xingfudeshi
left a comment
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.
LGTM
| this.unitData = unitData; | ||
| } | ||
|
|
||
| public void appendUnits(List<Unit> unitData) { |
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.
use Collection
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.
done
| if (!StringUtils.hasLength(unitName)) { | ||
| clusterResponse.setUnitData(new ArrayList<>(unitData.values())); | ||
| if (CollectionUtils.isEmpty(unitNames)) { | ||
| clusterResponse.appendUnits(new ArrayList<>(unitData.values())); |
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.
if use Collection, not wrap
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.
done
jsbxyyx
left a comment
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.
LGTM
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews