XnLemon commented on code in PR #3579:
URL: https://github.com/apache/dubbo-go/pull/3579#discussion_r3687752065
##########
registry/servicediscovery/service_instances_changed_listener_impl.go:
##########
@@ -273,6 +285,15 @@ func metadataCacheKey(app, registryId, revision string)
string {
// and falls back to RPC if the report fails or returns nil. For all other
storage
// types (including absent), it uses RPC directly.
func GetMetadataInfo(app string, instance registry.ServiceInstance, revision
string, registryId string) (*info.MetadataInfo, error) {
+ return GetMetadataInfoWithContext(context.Background(), app, instance,
revision, registryId)
+}
+
+// GetMetadataInfoWithContext retrieves metadata using the supplied lifecycle
+// context for metadata RPC fallbacks.
+func GetMetadataInfoWithContext(ctx context.Context, app string, instance
registry.ServiceInstance, revision string, registryId string)
(*info.MetadataInfo, error) {
Review Comment:
可以把里面的一些逻辑拆成helper?
不过之前这里好像我改过的时候就这样了 而且阈值变成15了(
--
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]