From f2bd4ec0516cfa894362636ffb0e0ffed74858eb Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Wed, 25 Sep 2024 18:30:52 +0200 Subject: [PATCH] replicator: fixed infinity loop on sync replication Before this fix, replicator adds the same lookup into callbacks over and over, until it reaches out of memory, and crashes. This regression was introduced 447e086422f1ab7cc16833583ed70a4af7a84bc5 with initial implementation of replicator. --- src/replication/replicator/replicator-queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/replication/replicator/replicator-queue.c b/src/replication/replicator/replicator-queue.c index 31f296af68..adc3cc9305 100644 --- a/src/replication/replicator/replicator-queue.c +++ b/src/replication/replicator/replicator-queue.c @@ -333,6 +333,7 @@ replicator_queue_handle_sync_lookups(struct replicator_queue *queue, } else { array_push_back(&callbacks, &lookups[i]); array_delete(&queue->sync_lookups, i, 1); + count--; } }