Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-31 Thread via GitHub


Alanxtl merged PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


sonarqubecloud[bot] commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4585865593

   ## [![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=3357) 
**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=3357&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=3357&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=3357&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=3357&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [31.5% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3357&metric=new_duplicated_lines_density&view=list)
  
 
   
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3357)
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


AsperforMias commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4585842393

   > cool work, lgtm
   
   thanks for ur guide~


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


AsperforMias commented on code in PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#discussion_r3329755844


##
metadata/info/metadata_info.go:
##
@@ -124,6 +125,13 @@ func removeUrl(m map[string][]*common.URL, url 
*common.URL) {
}
 }
 
+func urlEqual(left, right *common.URL) bool {
+   if left == nil || right == nil {
+   return left == right
+   }
+   return left.String() == right.String() && slices.Equal(left.Methods, 
right.Methods)
+}

Review Comment:
   ok



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


sonarqubecloud[bot] commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4585808930

   ## [![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=3357) 
**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=3357&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=3357&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=3357&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=3357&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [31.5% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3357&metric=new_duplicated_lines_density&view=list)
  
 
   
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3357)
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


Alanxtl commented on code in PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#discussion_r3329742018


##
metadata/info/metadata_info.go:
##
@@ -124,6 +125,13 @@ func removeUrl(m map[string][]*common.URL, url 
*common.URL) {
}
 }
 
+func urlEqual(left, right *common.URL) bool {
+   if left == nil || right == nil {
+   return left == right
+   }
+   return left.String() == right.String() && slices.Equal(left.Methods, 
right.Methods)
+}

Review Comment:
   不要抽象一个函数 没必要
   
   你可以用common/url里面有一个
   func (c *URL) URLEqual(url *URL) bool {



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


AsperforMias commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4585700971

   > 1. remote metadata storage:
   >
   >* unregister 后如果还有剩余 exported services:是的,应该重新计算 revision、publish app 
metadata、更新存活 instance 上的 revision。这个方向符合预期。
   >* unregister 后如果 exported services 为空:我建议本 issue 里只做本地 revision 置 
`0`,remote metadata 保留历史 revision 数据。因为没有 live instance 再引用旧 revision 了;remote 
unpublish / cleanup 应该放到 cleanup policy 那个独立问题里,不要在 `#3349` 里扩 scope。
   > 2. cleanup 顺序:
   >
   >* `UnSubscribe`:是的,先 `serviceNameMapping.Remove(url)`,成功后再删本地 
subscribed metadata。失败就保留本地 metadata。
   >* provider `UnRegister`:我倾向选 A,也就是按实际成功结果同步 cleanup。成功 unregister 的删 
metadata,失败保留的继续留在 metadata。B 的 all-or-nothing 太强,反而会让已经成功下线的 instance 继续残留 
metadata。
   
   已逐个自检+测试,感觉现在基本完成要求(?
   叨扰您再看一下还有没有要修订的点


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


sonarqubecloud[bot] commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4585700198

   ## [![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=3357) 
**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=3357&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=3357&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=3357&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=3357&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [30.9% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3357&metric=new_duplicated_lines_density&view=list)
  
 
   
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3357)
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


Alanxtl commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4585678280

   1. remote metadata storage:
  - unregister 后如果还有剩余 exported services:是的,应该重新计算 revision、publish app 
metadata、更新存活 instance 上的 revision。这个方向符合预期。
  - unregister 后如果 exported services 为空:我建议本 issue 里只做本地 revision 置 
`0`,remote metadata 保留历史 revision 数据。因为没有 live instance 再引用旧 revision 了;remote 
unpublish / cleanup 应该放到 cleanup policy 那个独立问题里,不要在 `#3349` 里扩 scope。
   
   2. cleanup 顺序:
  - `UnSubscribe`:是的,先 `serviceNameMapping.Remove(url)`,成功后再删本地 subscribed 
metadata。失败就保留本地 metadata。
  - provider `UnRegister`:我倾向选 A,也就是按实际成功结果同步 cleanup。成功 unregister 的删 
metadata,失败保留的继续留在 metadata。B 的 all-or-nothing 太强,反而会让已经成功下线的 instance 继续残留 
metadata。
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


Copilot commented on code in PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#discussion_r3329577875


##
registry/servicediscovery/service_discovery_registry.go:
##
@@ -188,6 +206,50 @@ func (s *serviceDiscoveryRegistry) UnSubscribe(url 
*common.URL, listener registr
if err != nil {
return err
}
+   if id, exist := s.url.GetNonDefaultParam(constant.RegistryIdKey); exist 
{
+   metadata.RemoveSubscribeURL(id, url)
+   }
+   return nil
+}
+
+func (s *serviceDiscoveryRegistry) 
syncExportedMetadataAfterUnregister(removedURLs []*common.URL, keep 
[]registry.ServiceInstance) error {
+   if len(removedURLs) == 0 {
+   return nil

Review Comment:
   This skips metadata cleanup whenever there are no tracked `removedURLs`, 
even though `Register` can already have added the provider URL to local 
metadata before any service-discovery instance is created. If `UnRegister` is 
called before `RegisterService` succeeds, `removedURLs` stays empty and the 
exported URL/revision remain stale. The unregister path should also reconcile 
the `url` passed to `UnRegister` (or otherwise handle the no-instance case) 
after the unregister succeeds.



##
metadata/metadata.go:
##
@@ -56,3 +56,19 @@ func AddSubscribeURL(registryId string, url *common.URL) {
}
registryMetadataInfo[registryId].AddSubscribeURL(url)
 }
+
+func RemoveService(registryId string, url *common.URL) {
+   metadataInfo, exist := registryMetadataInfo[registryId]
+   if !exist {
+   return
+   }
+   metadataInfo.RemoveService(url)

Review Comment:
   The new top-level remove API delegates to `MetadataInfo.RemoveService`, 
which deletes the `Services` entry unconditionally for the URL's match key. 
Because `AddService` can store multiple exported URLs under the same service 
key/protocol, removing one of them can leave other URLs in 
`exportedServiceURLs` while the corresponding `ServiceInfo` has been deleted, 
so subsequent metadata publication can omit a still-exported service. The 
remove logic should only delete the `Services` entry when no exported URL for 
that match key remains, or rebuild it from a remaining URL.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


AsperforMias commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4583102606

   > cleanup 发生在实际 unregister / remove 成功之前。如果后面的 registry unregister 或 
service-app mapping remove 失败,本地 metadata 已经被删了,也会造成状态不一致。
   
   然后这个的话,我也想确认一下:
   
   1. 对于 `UnSubscribe`,我理解应该是:
  - 先执行 `serviceNameMapping.Remove(url)`
  - 只有成功后才删除本地 subscribed metadata
  这个顺序是您要的吗?
   
   2. 对于 provider `UnRegister`,当前 service discovery 这条链路还是 bulk 
`UnRegisterService()` 语义,不是 targeted unregister
   
  我现在的处理方向是:
  - 先执行实际 unregister
  - 只对成功 unregister 的 instances 同步做 metadata cleanup
  - 对失败保留的 instances 不改本地 metadata
   
  您这里期望的是哪种?:
  - A. 这样按成功结果同步 cleanup 就可以
  - B. 需要更强的一致性语义,例如出现部分失败时不更新任何 metadata


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


AsperforMias commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4583095171

   有俩问题想对齐一下您的期望:
   
   关于 remote metadata storage 这点:
   
   1. 如果 unregister 之后仍然有剩余 exported services,我当前理解是:
  - 重新计算 revision
  - 重新 publish app metadata
  - 更新存活 instance 的 revision
  这个方向符合预期吗?
   
   2. 如果 unregister 之后 exported services 已经为空,您比较期望的是哪种?
  - 1. 只把本地 revision 置为 `0`,remote metadata 保留历史 revision 数据
  - 2. 仍然向 remote metadata publish 一个“空的/清空后的” MetadataInfo
  - 3. 需要有明确的 remote unpublish / cleanup 语义


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


sonarqubecloud[bot] commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4583090591

   ## [![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=3357) 
**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=3357&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=3357&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=3357&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=3357&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [31.5% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3357&metric=new_duplicated_lines_density&view=list)
  
 
   
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3357)
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


Alanxtl commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4583039023

   1. `UnRegister(url)` 只删当前 URL 的 metadata,但后面仍然调用 `UnRegisterService()`,它会注销 
`s.instances` 里的所有实例。这样会出现“metadata 只删一个,registry 注销全部”的状态不一致。
   
   2. `RemoveService` / `RemoveSubscribeURL` 底层是指针相等判断,`url.Clone()` 
或逻辑相同但不是同一个指针的 URL 删不掉,旧 URL 仍会残留并参与 revision 计算。
   
   3. #3349 “删除后重新计算并发布应用级 metadata revision”,这个 PR 只刷新了本地 `Revision`,没有处理 
remote metadata storage 下的 publish/update。
   
   4. cleanup 发生在实际 unregister / remove 成功之前。如果后面的 registry unregister 或 
service-app mapping remove 失败,本地 metadata 已经被删了,也会造成状态不一致。


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


Alanxtl commented on code in PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#discussion_r3328838105


##
registry/servicediscovery/service_discovery_registry.go:
##
@@ -166,13 +166,23 @@ func (s *serviceDiscoveryRegistry) UnRegister(url 
*common.URL) error {
if !shouldRegister(url) {
return nil
}
+   if id, exist := s.url.GetNonDefaultParam(constant.RegistryIdKey); exist 
{
+   metadata.RemoveService(id, url)
+   if metadataInfo := metadata.GetMetadataInfo(id); metadataInfo 
!= nil {
+   instance := createInstance(metadataInfo, url)
+   metadataInfo.Revision = 
instance.GetMetadata()[constant.ExportedServicesRevisionPropertyName]
+   }
+   }
return s.UnRegisterService()
 }
 
 func (s *serviceDiscoveryRegistry) UnSubscribe(url *common.URL, listener 
registry.NotifyListener) error {
if !shouldSubscribe(url) {
return nil
}
+   if id, exist := s.url.GetNonDefaultParam(constant.RegistryIdKey); exist 
{
+   metadata.RemoveSubscribeURL(id, url)
+   }

Review Comment:
   `UnRegister(url)` 现在只删当前 URL 的 metadata,但随后仍调用 bulk 的 
`UnRegisterService()`,它会遍历并注销 `s.instances` 里的所有 instance。也就是说两个 provider URL 
注册后,注销 `providerURL1` 会把 `providerURL2` 的 instance 也从 service discovery 删除,但本地 
metadata 还保留 `providerURL2`。这会造成 registry 侧和本地 metadata 状态分裂。
   
   建议要么做 targeted unregister,要么如果语义就是注销整个 app,就同步清空对应 metadata;测试里也应断言 
`mockSD.unregisterIDs` 只包含目标 URL。



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


codecov-commenter commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4582777496

   ## 
[Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3357?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :x: Patch coverage is `76.47059%` with `4 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 52.49%. Comparing base 
([`e6e14fd`](https://app.codecov.io/gh/apache/dubbo-go/commit/e6e14fd3076a056808a2f844bbc851a23f42865a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`4227fbc`](https://app.codecov.io/gh/apache/dubbo-go/commit/4227fbc1e64d5cefc2a9ac390398a3acaf445170?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3 commits behind head on develop.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/dubbo-go/pull/3357?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[metadata/metadata.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3357?src=pr&el=tree&filepath=metadata%2Fmetadata.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvbWV0YWRhdGEuZ28=)
 | 60.00% | [2 Missing and 2 partials :warning: 
](https://app.codecov.io/gh/apache/dubbo-go/pull/3357?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   Additional details and impacted files
   
   
   
   ```diff
   @@ Coverage Diff @@
   ##   develop#3357  +/-   ##
   ===
   + Coverage52.40%   52.49%   +0.08% 
   ===
 Files  492  492  
 Lines3778537810  +25 
   ===
   + Hits 1980019847  +47 
   + Misses   1638016359  -21 
   + Partials  1605 1604   -1 
   ```
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/dubbo-go/pull/3357?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).
:rocket: New features to boost your workflow: 
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] feat: complete local app metadata lifecycle [dubbo-go]

2026-05-30 Thread via GitHub


sonarqubecloud[bot] commented on PR #3357:
URL: https://github.com/apache/dubbo-go/pull/3357#issuecomment-4582765729

   ## [![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=3357) 
**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=3357&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=3357&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=3357&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=3357&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=3357&metric=new_duplicated_lines_density&view=list)
  
 
   
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3357)
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]