chaojixinren commented on code in PR #3635:
URL: https://github.com/apache/dubbo-go/pull/3635#discussion_r3755321934
##########
remoting/nacos/builder.go:
##########
@@ -43,6 +43,23 @@ var (
newNacosConfigClient = nacosClient.NewNacosConfigClient
)
+// nacosClientPoolKey derives the gost client-pool key from the fields that
+// distinguish one nacos connection from another: endpoint/address, namespace
+// and credentials. Components pointing at the same cluster (registry,
+// config-center, metadata-report) resolve to the same key and share one SDK
+// client session instead of each opening its own. Role-scoped client names
+// must not be used as the key — they would defeat the sharing.
+func nacosClientPoolKey(kind string, url *common.URL) string {
Review Comment:
Fixed. Password/secretKey now join the pool-key identity along with
username/accessKey (mapped to an opaque id to keep credentials out of logs and
avoid the CodeQL alert). Any credential difference prevents sharing. Tests
added: different password/secretKey → different keys. PTAL.
--
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]