From 816ef38b7c97b811a5822ceab9ebbe81609b1b6b Mon Sep 17 00:00:00 2001 From: Vlad Patrascu Date: Wed, 13 Jul 2022 00:31:37 +0300 Subject: [PATCH] clusterer: properly compute sync fallback interval in all cases The timestamp of the sync request was not saved when queueing the sync after certain send errors. --- modules/clusterer/sync.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/clusterer/sync.c b/modules/clusterer/sync.c index e540feed81d..ddaa27acf86 100644 --- a/modules/clusterer/sync.c +++ b/modules/clusterer/sync.c @@ -167,6 +167,9 @@ int cl_request_sync(str *capability, int cluster_id) /* node was up and ready but in the meantime got disabled or down */ lock_get(cluster->lock); lcap->flags |= CAP_SYNC_PENDING; + + if (cluster->current_node->flags & NODE_IS_SEED) + gettimeofday(&lcap->sync_req_time, NULL); lock_release(cluster->lock); } else if (rc == CLUSTERER_SEND_ERR) { return -1;