dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

fix: fix nacos deregister when receiving shutdown signal

Open Alanxtl opened this issue 2 months ago • 4 comments

fix #3107 in the previous version UnRegisterService, is not invoked at all, this function serves as the deregister hook when receiving shutdown signal. This pr fixes it.

Alanxtl avatar Dec 13 '25 07:12 Alanxtl

Looking at it this way, the previous logic seems a bit strange. Our application level supports multiple instance registrations, for example, the service needs to support both the Dubbo protocol and Triple, but it doesn't support unified deregistration?

1kasa avatar Dec 13 '25 09:12 1kasa

Looking at it this way, the previous logic seems a bit strange. Our application level supports multiple instance registrations, for example, the service needs to support both the Dubbo protocol and Triple, but it doesn't support unified deregistration?

是支持统一的方式unregister的,在UnRegisterService函数里面调用的s.serviceDiscovery.Unregister(v)函数实际上就是调用对应注册中心的Unregister方法,只不过在之前UnRegisterService函数根本没有被调用,而且serviceDiscoveryRegistryinstances成员根本没有被修改

Alanxtl avatar Dec 14 '25 04:12 Alanxtl

Codecov Report

:x: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 37.12%. Comparing base (60d1c2a) to head (fe8495f). :warning: Report is 662 commits behind head on develop.

Files with missing lines Patch % Lines
...try/servicediscovery/service_discovery_registry.go 88.88% 2 Missing :warning:
registry/protocol/protocol.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3108      +/-   ##
===========================================
- Coverage    46.76%   37.12%   -9.65%     
===========================================
  Files          295      460     +165     
  Lines        17172    32980   +15808     
===========================================
+ Hits          8031    12243    +4212     
- Misses        8287    19511   +11224     
- Partials       854     1226     +372     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Dec 14 '25 04:12 codecov-commenter