From 238fe3125c427eda496b857623ba17e67f722ecd Mon Sep 17 00:00:00 2001 From: mrwangyin <44059656+mrwangyin@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:20:30 +0800 Subject: [PATCH] 14372 fix multi registries (#14381) --- .../apache/dubbo/metadata/report/MetadataReportInstance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java index 59d2dcb874e..f9d7833730b 100644 --- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java +++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java @@ -115,6 +115,9 @@ private void init(MetadataReportConfig config, MetadataReportFactory metadataRep private String getRelatedRegistryId(MetadataReportConfig config, URL url) { String relatedRegistryId = config.getRegistry(); + if (isEmpty(relatedRegistryId)) { + relatedRegistryId = config.getId(); + } if (isEmpty(relatedRegistryId)) { relatedRegistryId = DEFAULT_KEY; }