Skip to content

bugfix: the issue where the TC occasionally fails to go offline from the NamingServer #6781

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

Merged
merged 13 commits into from
Aug 26, 2024

Conversation

funky-eyes
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

1.修复tc下线时,由于定时任务没有先关闭,导致下线后还会被注册上,需要靠namingserver的健康检查来下线的bug
2.修复change group时,由于先添加后删除,导致先添加的节点已经注册到了namingserver侧,去删除时使用错了cluster的节点去删除,导致change失败的bug

Fix the bug where TC remains registered after going offline because the scheduled tasks were not stopped first; the issue is dependent on the NamingServer's health check to eventually deregister.

Fix the bug that occurs during a change group operation where nodes are added before being deleted. This causes nodes added first to be registered on the NamingServer side, and the deletion process mistakenly uses the wrong cluster nodes, leading to a change failure.

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

@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/namingserver labels Aug 25, 2024
@funky-eyes funky-eyes added this to the 2.2.0 milestone Aug 25, 2024
Copy link

codecov bot commented Aug 25, 2024

Codecov Report

Attention: Patch coverage is 51.21951% with 40 lines in your changes missing coverage. Please review.

Project coverage is 52.17%. Comparing base (8af2d84) to head (611c7f4).
Report is 1 commits behind head on 2.x.

Files Patch % Lines
...rties/registry/RegistryNamingServerProperties.java 29.41% 12 Missing ⚠️
.../src/main/java/org/apache/seata/server/Server.java 8.33% 10 Missing and 1 partial ⚠️
...ache/seata/namingserver/manager/NamingManager.java 74.35% 6 Missing and 4 partials ⚠️
.../seata/server/store/VGroupMappingStoreManager.java 0.00% 3 Missing ⚠️
...he/seata/namingserver/entity/pojo/ClusterData.java 50.00% 2 Missing ⚠️
...ge/redis/store/RedisVGroupMappingStoreManager.java 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6781      +/-   ##
============================================
- Coverage     52.38%   52.17%   -0.21%     
+ Complexity     6309     6291      -18     
============================================
  Files          1064     1065       +1     
  Lines         37181    37199      +18     
  Branches       4417     4413       -4     
============================================
- Hits          19476    19409      -67     
- Misses        15779    15872      +93     
+ Partials       1926     1918       -8     
Files Coverage Δ
...toconfigure/SeataCoreEnvironmentPostProcessor.java 96.66% <100.00%> (+0.11%) ⬆️
...ta/spring/boot/autoconfigure/StarterConstants.java 100.00% <ø> (ø)
...ain/java/org/apache/seata/server/ServerRunner.java 51.61% <100.00%> (ø)
...ge/db/store/DataBaseVGroupMappingStoreManager.java 6.25% <ø> (ø)
...ver/storage/db/store/VGroupMappingDataBaseDAO.java 0.00% <ø> (ø)
...he/seata/namingserver/entity/pojo/ClusterData.java 67.79% <50.00%> (ø)
...ge/redis/store/RedisVGroupMappingStoreManager.java 71.87% <60.00%> (-3.99%) ⬇️
.../seata/server/store/VGroupMappingStoreManager.java 0.00% <0.00%> (-72.73%) ⬇️
...ache/seata/namingserver/manager/NamingManager.java 68.42% <74.35%> (+2.85%) ⬆️
.../src/main/java/org/apache/seata/server/Server.java 41.26% <8.33%> (-7.12%) ⬇️
... and 1 more

... and 9 files with indirect coverage changes

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

@funky-eyes funky-eyes merged commit d7e780c into apache:2.x Aug 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/namingserver type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants