You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/03 09:37:30 UTC

[GitHub] [apisix] spacewander opened a new pull request #4979: fix(consul): retry connecting after a delay

spacewander opened a new pull request #4979:
URL: https://github.com/apache/apisix/pull/4979


   Fix #4632
   Signed-off-by: spacewander <sp...@gmail.com>
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [x] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] spacewander merged pull request #4979: fix(consul): retry connecting after a delay

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4979:
URL: https://github.com/apache/apisix/pull/4979


   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] spacewander commented on a change in pull request #4979: fix(consul): retry connecting after a delay

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4979:
URL: https://github.com/apache/apisix/pull/4979#discussion_r702408967



##########
File path: apisix/discovery/consul_kv.lua
##########
@@ -331,6 +332,15 @@ function _M.connect(premature, consul_server)
             ", got result: ", json_delay_encode(result, true),
             ", with error: ", error_info)
 
+        if not retry_delay then
+            retry_delay = 1
+        else
+            retry_delay = retry_delay * 4

Review comment:
       Discussed in https://github.com/apache/apisix/issues/4632#issuecomment-883184083




-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tokers commented on a change in pull request #4979: fix(consul): retry connecting after a delay

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #4979:
URL: https://github.com/apache/apisix/pull/4979#discussion_r702393840



##########
File path: apisix/discovery/consul_kv.lua
##########
@@ -331,6 +332,15 @@ function _M.connect(premature, consul_server)
             ", got result: ", json_delay_encode(result, true),
             ", with error: ", error_info)
 
+        if not retry_delay then
+            retry_delay = 1
+        else
+            retry_delay = retry_delay * 4

Review comment:
       Why here we use `4` as the factor?




-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] spacewander commented on a change in pull request #4979: fix(consul): retry connecting after a delay

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4979:
URL: https://github.com/apache/apisix/pull/4979#discussion_r702409403



##########
File path: apisix/discovery/consul_kv.lua
##########
@@ -331,6 +332,15 @@ function _M.connect(premature, consul_server)
             ", got result: ", json_delay_encode(result, true),
             ", with error: ", error_info)
 
+        if not retry_delay then
+            retry_delay = 1
+        else
+            retry_delay = retry_delay * 4

Review comment:
       2 is not large enough for me.




-- 
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: notifications-unsubscribe@apisix.apache.org

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