dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Bug] registries 多个相同配置被过滤掉,导致丢失了key

Open super-newbie94 opened this issue 1 year ago • 0 comments

Pre-check

  • [X] I am sure that all the content I provide is in English.

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo Java 3.2.10 , OpenJDK17

Steps to reproduce this issue

我使用registries进行配置多个注册中心,其实在开发和测试环境这多个注册中心的配置相同(注册zk地址相同)。代码中RegistryConfig.equles 会比较所有属性。会去掉。这样注册中心就找不到了,我理解是想相同配置用同一个注册中心配置但是我们在生产环境使用时可能又不同,这样失去了灵活性。 而且RegistryConfig.equles 居然还过滤了id属性,让我无法避免这个问题。我只能使用 parameters来区分。

  registries:
    account-employee-registry:
      address: zookeeper://${DUBBO_REGISTRY_AMS_ADDRESS:10.111.15.315:291381}
      parameters:
        a: 1
    ai-common-registry:
      address: zookeeper://${DUBBO_REGISTRY_AI_COMMON_ADDRESS:10.111.15.315:291381}
      check: false
      parameters:
        a: 2
    mdm-registry:
      address: zookeeper://${DUBBO_MDM_REGISTRY:10.111.15.315:291381}
      parameters:
        a: 3
    rms-registry:
      address: zookeeper://${DUBBO_RMS_REGISTRY:10.111.15.315:291381}
      parameters:
        a: 4
image

What you expected to happen

注册中心的去重复按照configsCache的key来进行比较唯一性。或者允许id参与RegistryConfig中equles的比较

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • [X] Yes I am willing to submit a pull request on my own!

Code of Conduct

super-newbie94 avatar Mar 15 '24 12:03 super-newbie94