Skip to content

Conversation

@jianliu
Copy link
Contributor

@jianliu jianliu commented Mar 28, 2025

#592 每次注册时刷新RegisterState,重新注册时使用最后一次的注册实例信息

Copy link
Member

@SkyeBeFreeman SkyeBeFreeman left a comment

Choose a reason for hiding this comment

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

com.tencent.polaris.discovery.client.flow.RegisterFlow#doRunHeartbeat方法内有心跳失败重注册逻辑,是否需要RegisterStateManager.putRegisterState注册request呢?

@codecov
Copy link

codecov bot commented Mar 29, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 20.21%. Comparing base (1ca6a8b) to head (7f5e2f6).
Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
...is/discovery/client/flow/RegisterStateManager.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #595      +/-   ##
============================================
- Coverage     20.46%   20.21%   -0.25%     
- Complexity      833      929      +96     
============================================
  Files           334      364      +30     
  Lines         13233    15020    +1787     
  Branches       1702     1889     +187     
============================================
+ Hits           2708     3037     +329     
- Misses        10171    11608    +1437     
- Partials        354      375      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SkyeBeFreeman SkyeBeFreeman force-pushed the main branch 2 times, most recently from 9cc2e2a to 3bb31ea Compare June 10, 2025 03:50
@jianliu
Copy link
Contributor Author

jianliu commented Jun 14, 2025

最后一次注册的request会覆盖前面的instanceRegisterRequest,重注册时用最新的request是符合预期的

@SkyeBeFreeman
Copy link
Member

提交有冲突,先解决冲突。

@SkyeBeFreeman SkyeBeFreeman force-pushed the main branch 2 times, most recently from 48f2fd3 to 6b85bbf Compare June 27, 2025 05:20
@SkyeBeFreeman
Copy link
Member

SkyeBeFreeman commented Jun 30, 2025

@jianliu
1、心跳失败触发重注册(com.tencent.polaris.discovery.client.flow.RegisterFlow#doRunHeartbeat)并没有调用com.tencent.polaris.discovery.client.flow.RegisterStateManager#putRegisterState来更新InstanceRegisterRequest?
2、什么场景下,InstanceRegisterRequest会有变更?

@jianliu
Copy link
Contributor Author

jianliu commented Jun 30, 2025

@SkyeBeFreeman
1、心跳失败触发重注册(com.tencent.polaris.discovery.client.flow.RegisterFlow#doRunHeartbeat)并没有调用com.tencent.polaris.discovery.client.flow.RegisterStateManager#putRegisterState来更新InstanceRegisterRequest?

是最后一次注册时更新state中的InstanceRegisterRequest,心跳失败重注册自动使用最后一次注册的InstanceRegisterRequest来重新注册

2、什么场景下,InstanceRegisterRequest会有变更?
注册场景并不会显示的提供更新的入口,实例的元数据可以被更新,一般多次调用register即表示更新

@SkyeBeFreeman
Copy link
Member

是最后一次注册时更新state中的InstanceRegisterRequest,心跳失败重注册自动使用最后一次注册的InstanceRegisterRequest来重新注册

@jianliu 心跳失败重注册时,是否需要更新state中的InstanceRegisterRequest呢?

Copy link
Member

@SkyeBeFreeman SkyeBeFreeman left a comment

Choose a reason for hiding this comment

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

LGTM.

@SkyeBeFreeman SkyeBeFreeman merged commit 8d0ddf5 into polarismesh:main Jul 7, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

实例支持重新注册,心跳失败重注册时使用了第一次注册的实例信息

2 participants