liubao68 commented on code in PR #3413:
URL:
https://github.com/apache/servicecomb-java-chassis/pull/3413#discussion_r1004386626
##########
core/src/main/java/org/apache/servicecomb/core/definition/ServiceRegistryListener.java:
##########
@@ -87,12 +98,30 @@ public void
onCreateMicroserviceVersion(CreateMicroserviceVersionEvent event) {
// service center better to resolve the problem.
if (!isServiceCenter) {
for (String schemaId : microservice.getSchemas()) {
- Swagger swagger =
scbEngine.getSwaggerLoader().loadSwagger(microservice,
microserviceVersion.getInstances(),
- schemaId);
- // allow users register schemaId, but without schema contents. This is
useful when cooperate with other
- // non java-chassis framework.
- if (swagger != null) {
- microserviceMeta.registerSchemaMeta(schemaId, swagger);
+ for (int i = 0; i <= SCHEMA_RETRY; i++) {
Review Comment:
这个过程发生在一次RPC调用,不适合等待一段时间重试。 立即重试只解决短暂的故障场景,很多错误很可能会连续失败, 这个时候RPC调用失败。
当然如果没有第三方调用的场景,建议给配置项打开,下次调用的时候会成功。
--
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]