Skip to content

Commit

Permalink
replicator: fixed infinity loop on sync replication
Browse files Browse the repository at this point in the history
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 447e086
with initial implementation of replicator.
  • Loading branch information
catap committed Sep 25, 2024
1 parent 1fd4fcc commit f2bd4ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/replication/replicator/replicator-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
}

Expand Down

0 comments on commit f2bd4ec

Please sign in to comment.