You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xiaobaicai66695 (via GitHub)" <gi...@apache.org> on 2026/09/12 07:17:53 UTC

[PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

xiaobaicai66695 opened a new pull request, #3725:
URL: https://github.com/apache/dubbo-go/pull/3725

   Nacos delivers configuration deletion through the listener callback with an empty payload. The callback previously emitted EventTypeUpdate unconditionally, so consumers relying on EventTypeDel did not clear local state, including Script Router. This change emits EventTypeDel for empty payloads, keeps metrics aligned with the emitted event type, and adds callback coverage for deletion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on code in PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#discussion_r3998829237


##########
config_center/nacos/listener.go:
##########
@@ -81,9 +81,18 @@ func (s *keyListenerSet) snapshot() []config_center.ConfigurationListener {
 }
 
 func callback(set *keyListenerSet, _, group, dataId, data string) {
+	eventType := remoting.EventTypeUpdate
+	// Nacos invokes configuration listeners for both changes and deletions;
+	// see https://nacos.io/en/docs/v3.0/manual/user/python-sdk/usage/.

Review Comment:
   ```suggestion
   	// see https://nacos.io/en/docs/v3.0/manual/user/go-sdk/usage/.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on code in PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#discussion_r3998929417


##########
config_center/nacos/listener.go:
##########
@@ -81,9 +81,13 @@ func (s *keyListenerSet) snapshot() []config_center.ConfigurationListener {
 }
 
 func callback(set *keyListenerSet, _, group, dataId, data string) {
+	eventType := remoting.EventTypeUpdate
+	if data == "" {
+		eventType = remoting.EventTypeDel
+	}

Review Comment:
   直接回答这个问题,因为结论会影响注释怎么写:
   
   - **「删除会通知监听器」是 Nacos 文档写明的**(也就是你链接的那一页)。
   - **「用空 data 表示删除」不是文档规定**,是 `nacos-sdk-go` 配置缓存层的实现细节。也就是说,把链接贴上去并不能支撑这句注释。
   
   在 v2.2.5 上的实际路径:`clients/config_client/config_client.go:488 refreshContentAndCheck` → `cacheData.content = configQueryResponse.Content`(配置被删时服务端返回的 Content 为空)→ `cacheData.md5 = util.Md5(cacheData.content)` → MD5 与 `lastMd5` 不同 → `:85 executeListener()` 把空 Content 交给监听器。空值来自「MD5 变了」这个判定,不是回调字段本身的语义。
   
   建议把注释改成陈述 SDK 行为,并且指出这个仓库里已有的先例:`config_center/zookeeper/listener.go` 的 `DataChange` 里同样有 `if event.Content == "" { changeType = remoting.EventTypeDel }`。所以这个改动是让两个配置中心行为一致,而不是新引入一条约定 —— 这句话比文档链接更有说服力。
   
   另外有一个当前注释没有覆盖的限制,建议一并写清楚:这个回调签名区分不了「删除」和「把配置值设成空串」,而下游是按删除处理的 —— `cluster/router/condition/dynamic_router.go:183` 收到 Del 会把 `d.conditionRouter` 置为 nil(条件路由被清空),`registry/base_configuration_listener.go:82` 会 `setConfigurators(nil)`。也就是说,一次把配置清空的更新会让这些监听器认为规则被删除。如果这是有意接受的取舍(与 zookeeper 侧保持一致、且空规则本就等价于无规则),那注释里明说就好;如果想要区分,就需要在回调之外拿到「配置是否存在」的信息,单靠这个回调参数做不到。



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5651492886

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5674655603

   lgtm


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5644478024

   ## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3725?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 56.94%. Comparing base ([`60d1c2a`](https://app.codecov.io/gh/apache/dubbo-go/commit/60d1c2a949f0ee0da4be3fe09fb79d295491e040?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ca9dec9`](https://app.codecov.io/gh/apache/dubbo-go/commit/ca9dec98acea4bd0314f5afb8187cbb9b5a97fa0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 973 commits behind head on develop.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##           develop    #3725       +/-   ##
   ============================================
   + Coverage    46.76%   56.94%   +10.17%     
   ============================================
     Files          295      478      +183     
     Lines        17172    38640    +21468     
   ============================================
   + Hits          8031    22004    +13973     
   - Misses        8287    14923     +6636     
   - Partials       854     1713      +859     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo-go/pull/3725?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5644447831

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5652365373

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on code in PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#discussion_r3998432924


##########
config_center/nacos/listener.go:
##########
@@ -81,9 +81,13 @@ func (s *keyListenerSet) snapshot() []config_center.ConfigurationListener {
 }
 
 func callback(set *keyListenerSet, _, group, dataId, data string) {
+	eventType := remoting.EventTypeUpdate
+	if data == "" {
+		eventType = remoting.EventTypeDel
+	}

Review Comment:
   这个data为空就视为del操作是nacos那边的规定吗 如果是的话把文档链接放到注释里面去



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5644422800

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks merged PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "xiaobaicai66695 (via GitHub)" <gi...@apache.org>.
xiaobaicai66695 commented on code in PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#discussion_r3999272440


##########
config_center/nacos/listener.go:
##########
@@ -81,9 +81,13 @@ func (s *keyListenerSet) snapshot() []config_center.ConfigurationListener {
 }
 
 func callback(set *keyListenerSet, _, group, dataId, data string) {
+	eventType := remoting.EventTypeUpdate
+	if data == "" {
+		eventType = remoting.EventTypeDel
+	}

Review Comment:
   > 直接回答这个问题,因为结论会影响注释怎么写:
   > 
   > * **「删除会通知监听器」是 Nacos 文档写明的**(也就是你链接的那一页)。
   > * **「用空 data 表示删除」不是文档规定**,是 `nacos-sdk-go` 配置缓存层的实现细节。也就是说,把链接贴上去并不能支撑这句注释。
   > 
   > 在 v2.2.5 上的实际路径:`clients/config_client/config_client.go:488 refreshContentAndCheck` → `cacheData.content = configQueryResponse.Content`(配置被删时服务端返回的 Content 为空)→ `cacheData.md5 = util.Md5(cacheData.content)` → MD5 与 `lastMd5` 不同 → `:85 executeListener()` 把空 Content 交给监听器。空值来自「MD5 变了」这个判定,不是回调字段本身的语义。
   > 
   > 建议把注释改成陈述 SDK 行为,并且指出这个仓库里已有的先例:`config_center/zookeeper/listener.go` 的 `DataChange` 里同样有 `if event.Content == "" { changeType = remoting.EventTypeDel }`。所以这个改动是让两个配置中心行为一致,而不是新引入一条约定 —— 这句话比文档链接更有说服力。
   > 
   > 另外有一个当前注释没有覆盖的限制,建议一并写清楚:这个回调签名区分不了「删除」和「把配置值设成空串」,而下游是按删除处理的 —— `cluster/router/condition/dynamic_router.go:183` 收到 Del 会把 `d.conditionRouter` 置为 nil(条件路由被清空),`registry/base_configuration_listener.go:82` 会 `setConfigurators(nil)`。也就是说,一次把配置清空的更新会让这些监听器认为规则被删除。如果这是有意接受的取舍(与 zookeeper 侧保持一致、且空规则本就等价于无规则),那注释里明说就好;如果想要区分,就需要在回调之外拿到「配置是否存在」的信息,单靠这个回调参数做不到。
   
   感谢指出。Nacos 文档只说明删除会触发监听通知,并未规定空回调内容代表删除;此前的文档链接不足以支撑这一判断,已移除。  
   当前判断基于 nacos-sdk-go v2.2.5 的缓存刷新实现:删除配置后,SDK 会以空内容触发该回调。由于回调本身不携带操作类型,我将其与现有 ZooKeeper cache listener 的处理保持一致,空内容按 Del 传递给下游。  
   这也意味着“更新为空字符串”和“删除配置”会等价处理;这是当前有意接受的兼容取舍。相关注释已补充说明。



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(config-center): emit delete for empty Nacos callbacks [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3725:
URL: https://github.com/apache/dubbo-go/pull/3725#issuecomment-5651362455

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3725&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3725&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3725&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3725)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org