From 2d79757309bb62e1979ab0d370e196d291460021 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Tue, 27 Dec 2022 12:06:29 +0100 Subject: [PATCH] The Consul TTL is off by twice from reality (#2501) we use `ttl/2.0` when setting the value on the HTTPClient, but forgot to multiply the current value by 2. --- patroni/dcs/consul.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/dcs/consul.py b/patroni/dcs/consul.py index eb1a180b..105a75ab 100644 --- a/patroni/dcs/consul.py +++ b/patroni/dcs/consul.py @@ -272,7 +272,7 @@ class Consul(AbstractDCS): @property def ttl(self): - return self._client.http.ttl + return self._client.http.ttl * 2 # we multiply the value by 2 because it was divided in the `set_ttl()` method def set_retry_timeout(self, retry_timeout): self._retry.deadline = retry_timeout