Skip to content

Commit

Permalink
clusterer: properly compute sync fallback interval in all cases
Browse files Browse the repository at this point in the history
The timestamp of the sync request was not saved when queueing the sync
after certain send errors.
  • Loading branch information
rvlad-patrascu committed Jul 13, 2022
1 parent 2e5bf28 commit 816ef38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/clusterer/sync.c
Expand Up @@ -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;
Expand Down

0 comments on commit 816ef38

Please sign in to comment.