fix: fix nacos deregister when receiving shutdown signal
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.
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?
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函数根本没有被调用,而且serviceDiscoveryRegistry的instances成员根本没有被修改
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.
Quality Gate passed
Issues
7 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code