Skip to content

Conversation

@funky-eyes
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. 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

ggbocoder and others added 23 commits January 2, 2024 10:47
# 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
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/server server module module/namingserver labels Aug 15, 2024
@funky-eyes funky-eyes added this to the 2.2.0 milestone Aug 15, 2024
@codecov
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 64.22018% with 39 lines in your changes missing coverage. Please review.

Project coverage is 50.56%. Comparing base (fb88638) to head (9bec44e).
Report is 1 commits behind head on 2.x.

Files Patch % Lines
...ache/seata/namingserver/manager/NamingManager.java 70.12% 13 Missing and 10 partials ⚠️
...java/org/apache/seata/common/metadata/Cluster.java 0.00% 4 Missing ⚠️
...eata/namingserver/controller/NamingController.java 33.33% 4 Missing ⚠️
.../namingserver/NamingserverRegistryServiceImpl.java 0.00% 3 Missing ⚠️
...ure/properties/server/store/StoreDBProperties.java 25.00% 3 Missing ⚠️
...ver/storage/db/store/VGroupMappingDataBaseDAO.java 0.00% 1 Missing ⚠️
...ge/redis/store/RedisVGroupMappingStoreManager.java 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6757      +/-   ##
============================================
+ Coverage     50.52%   50.56%   +0.03%     
- Complexity     5927     5934       +7     
============================================
  Files          1061     1061              
  Lines         37088    37123      +35     
  Branches       4400     4402       +2     
============================================
+ Hits          18738    18770      +32     
+ Misses        16453    16448       -5     
- Partials       1897     1905       +8     
Files Coverage Δ
...ava/org/apache/seata/common/ConfigurationKeys.java 0.00% <ø> (ø)
...he/seata/namingserver/entity/pojo/ClusterData.java 67.79% <100.00%> (+4.63%) ⬆️
...ver/storage/db/store/VGroupMappingDataBaseDAO.java 0.00% <0.00%> (ø)
...ge/redis/store/RedisVGroupMappingStoreManager.java 75.86% <85.71%> (ø)
.../namingserver/NamingserverRegistryServiceImpl.java 0.00% <0.00%> (ø)
...ure/properties/server/store/StoreDBProperties.java 27.86% <25.00%> (-0.21%) ⬇️
...java/org/apache/seata/common/metadata/Cluster.java 0.00% <0.00%> (ø)
...eata/namingserver/controller/NamingController.java 38.88% <33.33%> (ø)
...ache/seata/namingserver/manager/NamingManager.java 67.14% <70.12%> (+8.13%) ⬆️

... and 3 files with indirect coverage changes

@funky-eyes funky-eyes requested a review from l81893521 August 15, 2024 11:44
public void appendUnits(List<Unit> unitData) {
this.unitData.addAll(unitData);
}
public void appendUnit(Unit unitData) {
Copy link
Member

Choose a reason for hiding this comment

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

new line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@xingfudeshi xingfudeshi left a 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) {
Copy link
Member

Choose a reason for hiding this comment

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

use Collection

Copy link
Contributor Author

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()));
Copy link
Member

@jsbxyyx jsbxyyx Aug 17, 2024

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit f7c3866 into apache:2.x Aug 17, 2024
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/namingserver module/server server module type: bug Category issues or prs related to bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants