mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-01-27 10:20:10 +00:00
Avoid unnecessary updates of /status key (#2782)
When we don't have permanent logical slots Patroni was updating the `/status` on every heart-beat loop even when LSN on the primary isn't moving forward. The issue was introduced in the #2485
This commit is contained in:
committed by
GitHub
parent
238aba3956
commit
384a2a4d8f
@@ -1033,7 +1033,9 @@ class AbstractDCS(abc.ABC):
|
||||
raise
|
||||
|
||||
self._last_seen = int(time.time())
|
||||
self._last_status = {self._OPTIME: cluster.last_lsn, 'slots': cluster.slots}
|
||||
self._last_status = {self._OPTIME: cluster.last_lsn}
|
||||
if cluster.slots:
|
||||
self._last_status['slots'] = cluster.slots
|
||||
self._last_failsafe = cluster.failsafe
|
||||
|
||||
with self._cluster_thread_lock:
|
||||
|
||||
Reference in New Issue
Block a user