[ 
https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561584#comment-16561584
 ] 

ASF GitHub Bot commented on SCB-782:
------------------------------------

heyile commented on a change in pull request #842: [SCB-782]support revision 
check when use pull mode with config center
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206028000
 
 

 ##########
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##########
 @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean 
wait) {
               }
               latch.countDown();
             });
-          } else {
+          }else if (rsp.statusCode() == 
HttpResponseStatus.NOT_MODIFIED.code()){
+            latch.countDown();
+          }else {
             rsp.bodyHandler(buf -> {
               LOGGER.error("Server error message is [{}].", buf);
               latch.countDown();
             });
             EventManager.post(new ConnFailEvent("fetch config fail"));
             LOGGER.error("Config refresh from {} failed.", configcenter);
           }
-        });
+        }).setTimeout((BOOTUP_WAIT_TIME -1 )* 1000);
 
 Review comment:
   I do not think so, I set the the timeout of the sub thread to pull the 
setting from config-center is less than the main thread to wait . hence , the 
main thread will  wait until sub thread finish pull or throw a time out 
exception.  of course, it can gurantee each pull run sequentially

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [SCB-782]support revision check when use pull mode with config center
> ---------------------------------------------------------------------
>
>                 Key: SCB-782
>                 URL: https://issues.apache.org/jira/browse/SCB-782
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Java-Chassis
>            Reporter: 何一乐
>            Assignee: 何一乐
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to