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 2022/02/15 08:50:14 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #6322: feat: support for configuring the number of etcd health check retries

spacewander commented on a change in pull request #6322:
URL: https://github.com/apache/apisix/pull/6322#discussion_r806585670



##########
File path: apisix/cli/etcd.lua
##########
@@ -196,7 +196,9 @@ function _M.init(env, args)
 
         local res, err
         local retry_time = 0
-        while retry_time < 2 do
+        
+        local health_check_retry = tonumber(yaml_conf.etcd.health_check_retry or 2)

Review comment:
       ```suggestion
           local health_check_retry = tonumber(yaml_conf.etcd.health_check_retry) or 2
   ```

##########
File path: conf/config-default.yaml
##########
@@ -274,6 +274,7 @@ etcd:
   timeout: 30                     # 30 seconds
   #resync_delay: 5                # when sync failed and a rest is needed, resync after the configured seconds plus 50% random jitter
   #health_check_timeout: 10       # etcd retry the unhealthy nodes after the configured seconds
+  health_check_retry: 2           # etcd retry time, defalut 2 

Review comment:
       We should emphasize that the retry time only affects the health check in the comment.




-- 
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