Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Descriptions
Both the ConfigCenter and the MetadataCenter support option check. When the initial connection attempt fails, true means interrupt the whole process once it fails, but false is not fully supported.
Overall, I believe the following points need to be supported here:
- When the initial connection attempt fails, the whole process will not interrupted
- When the connection recovery, some related functions also need to be recovered and supported
ConfigCenter
- Add
boolean isAvailable() method to DynamicConfiguration, used for fail fast before connection recovery.
- Once the ConfigCenter completes initialization, it will update the config items
ExternalConfig and AppExternalConfig. Do we need to update these config items after the connection is recovered? Some discussions are needed.
- In the process of service export and reference, every service will create a listener for every ConfigCenter. There should recreate listener after the connection is recovered. Also the Router Rule listener need to be recreated.
- A listener is created when the
MigrationRuleListener is initialized. Recovery also need to be supported here.
MetadataCenter
- Add
boolean isAvailable() method to MetadataReport, used for fail fast before connection recovery.
- When reporting
ServiceDefinition, each MetadataReport will be traversed for reporting, and there will be failure retries. However, if all reports fail, some logging should be required.
- When reporting
ServiceNameMapping, it will retry if all MetadataReport report fail, but there is a lack of retry for each MetadataReport.
- In the
ServiceDiscovery, it is necessary to support both MetadataInfo and ServiceInstance reporting retries. Maybe a status for whether it has been reported or not needs to be introduced here.
Something else
SPI extensions should support the method boolean isAvailable().
Related issues
This issue is a continuation of #15271 and it is part of PR #15594 .
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Descriptions
Both the ConfigCenter and the MetadataCenter support option
check. When the initial connection attempt fails,truemeans interrupt the whole process once it fails, butfalseis not fully supported.Overall, I believe the following points need to be supported here:
ConfigCenter
boolean isAvailable()method toDynamicConfiguration, used for fail fast before connection recovery.ExternalConfigandAppExternalConfig. Do we need to update these config items after the connection is recovered? Some discussions are needed.MigrationRuleListeneris initialized. Recovery also need to be supported here.MetadataCenter
boolean isAvailable()method toMetadataReport, used for fail fast before connection recovery.ServiceDefinition, eachMetadataReportwill be traversed for reporting, and there will be failure retries. However, if all reports fail, some logging should be required.ServiceNameMapping, it will retry if allMetadataReportreport fail, but there is a lack of retry for eachMetadataReport.ServiceDiscovery, it is necessary to support bothMetadataInfoandServiceInstancereporting retries. Maybe a status for whether it has been reported or not needs to be introduced here.Something else
SPI extensions should support the method
boolean isAvailable().Related issues
This issue is a continuation of #15271 and it is part of PR #15594 .
Are you willing to submit a pull request to fix on your own?
Code of Conduct