You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/10/25 11:50:22 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on a diff in pull request #3413: [SCB-2704]Improve the quality when loading swagger failed when set in…

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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org