Skip to content

[Feature] Refactor Registry Implement #15271

@RainYuY

Description

@RainYuY

Pre-check

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

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Apache Dubbo Component

Java SDK (apache/dubbo)

Descriptions

  1. When the Registry is wrapped and created by ListenerRegistryWrapper, there is a possibility that the Registry is null (due to connection failure), which may result in a NullPointerException (NPE) in subsequent operations.
    Should we consider handling this error during initialization? If the Registry is null, an error can be thrown, allowing the upper-layer caller to handle it accordingly.

  2. When obtaining the ProviderUrl and the registration mode is ALL (default value), a ServiceDiscoveryRegistry URL will be generated synchronously (org.apache.dubbo.config.utils.ConfigValidationUtils#genCompatibleRegistries).
    However, if multiple registries exist and one of them goes down, the ServiceDiscoveryRegistry fails to generate, causing the startup process to fail.

    Should we consider:

      1. Implementing functionality in ServiceDiscoveryRegistry similar to MultipleRegistry, supporting check.
      1. Lowering the dependency level of ServiceDiscoveryRegistry, making it an attribute of Registry, and allowing other registries to handle its operations.

Related issues

#15003

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

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

Code of Conduct

Metadata

Metadata

Assignees

Labels

help wantedEverything needs help from contributorstype/enhancementEverything related with code enhancement or performancetype/proposalEverything you want Dubbo have

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions