From: Timo Sirainen Date: Fri, 18 Jun 2021 12:19:48 +0000 (+0300) Subject: replicator: doveadm replicator replicate -f didn't always start full sync X-Git-Tag: 2.3.18~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=051d39ee456b6a1f5eb9708d5d16348b05a7d59b;p=thirdparty%2Fdovecot%2Fcore.git replicator: doveadm replicator replicate -f didn't always start full sync The full sync happened only if the dsync queue was already full. If it wasn't, dsync was called too early before user->force_full_sync was set. --- diff --git a/src/replication/replicator/replicator-brain.c b/src/replication/replicator/replicator-brain.c index 3c2d9bacf6..65cfcecd49 100644 --- a/src/replication/replicator/replicator-brain.c +++ b/src/replication/replicator/replicator-brain.c @@ -36,7 +36,10 @@ static void replicator_brain_queue_changed(void *context) { struct replicator_brain *brain = context; - replicator_brain_fill(brain); + /* Delay a bit filling the replication. We could have gotten here + before the replicator_user change was fully filled out. */ + timeout_remove(&brain->to); + brain->to = timeout_add_short(0, replicator_brain_timeout, brain); } struct replicator_brain *