diff src/doveadm/dsync/dsync-brain.c @ 22043:81e013b3207d

dsync: Try to commit transactions every dsync_commit_msgs_interval messages This was first attempted to be implemented by ec0cc8fa647794e44a1afaa448f495a713048dc4, but it was later partially reverted by 5973d496b16721af6d2c1fa90b016aacddf13554. This current commit should fix its problems.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 30 Apr 2017 12:31:48 +0300
parents 759962e70148
children e95435889161
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-brain.c	Fri May 12 12:44:27 2017 +0300
+++ b/src/doveadm/dsync/dsync-brain.c	Sun Apr 30 12:31:48 2017 +0300
@@ -221,6 +221,7 @@
 	memcpy(brain->sync_box_guid, set->sync_box_guid,
 	       sizeof(brain->sync_box_guid));
 	brain->lock_timeout = set->lock_timeout_secs;
+	brain->import_commit_msgs_interval = set->import_commit_msgs_interval;
 	brain->master_brain = TRUE;
 	dsync_brain_set_flags(brain, flags);
 
@@ -260,6 +261,7 @@
 	ibc_set.sync_type = sync_type;
 	ibc_set.hdr_hash_v2 = TRUE;
 	ibc_set.lock_timeout = set->lock_timeout_secs;
+	ibc_set.import_commit_msgs_interval = set->import_commit_msgs_interval;
 	/* reverse the backup direction for the slave */
 	ibc_set.brain_flags = flags & ~(DSYNC_BRAIN_FLAG_BACKUP_SEND |
 					DSYNC_BRAIN_FLAG_BACKUP_RECV);