This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new b4efa46eb fix dubbo.metadata.storage-type ==remote, metadata param is 
empty (#2953)
b4efa46eb is described below

commit b4efa46eb7dbc769b39de1587368a04d242e4378
Author: foghost <[email protected]>
AuthorDate: Fri Jul 18 16:38:18 2025 +0800

    fix dubbo.metadata.storage-type ==remote, metadata param is empty (#2953)
---
 .../customizer/metadata_service_version_customizer.go                 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/registry/servicediscovery/customizer/metadata_service_version_customizer.go 
b/registry/servicediscovery/customizer/metadata_service_version_customizer.go
index 62425e19d..71c898e8d 100644
--- 
a/registry/servicediscovery/customizer/metadata_service_version_customizer.go
+++ 
b/registry/servicediscovery/customizer/metadata_service_version_customizer.go
@@ -46,6 +46,10 @@ func (p *MetadtaServiceVersionCustomizer) GetPriority() int {
 
 // Customize put the the string like [{"protocol": "dubbo", "port": 123}] into 
instance's metadata
 func (p *MetadtaServiceVersionCustomizer) Customize(instance 
registry.ServiceInstance) {
+       if instance.GetMetadata()[constant.MetadataStorageTypePropertyName] != 
constant.DefaultMetadataStorageType {
+               return
+       }
+       // only run when storage-type == local
        metadata := 
instance.GetMetadata()[constant.MetadataServiceURLParamsPropertyName]
        params := make(map[string]string)
        err := json.Unmarshal([]byte(metadata), &params)

Reply via email to