Stellar1999 opened a new issue, #15271:
URL: https://github.com/apache/dubbo/issues/15271

   ### 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](https://github.com/apache/dubbo/issues?q=is%3Aissue) 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**.  
      - 2. 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?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to