dovecot-2.0: dsync: Flush workers' output earlier when saving me...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 17 10:57:10 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/b48c31797b93
changeset: 12608:b48c31797b93
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 17 10:57:05 2011 +0200
description:
dsync: Flush workers' output earlier when saving messages.

diffstat:

 src/dsync/dsync-brain-msgs-new.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r b1992c77e9d2 -r b48c31797b93 src/dsync/dsync-brain-msgs-new.c
--- a/src/dsync/dsync-brain-msgs-new.c	Thu Feb 17 10:55:38 2011 +0200
+++ b/src/dsync/dsync-brain-msgs-new.c	Thu Feb 17 10:57:05 2011 +0200
@@ -182,6 +182,11 @@
 		dest_iter->adding_msgs = FALSE;
 		if (dsync_worker_output_flush(src_iter->worker) < 0)
 			return -1;
+		if (dsync_worker_is_output_full(dest_iter->worker)) {
+			/* see if the output becomes less full by flushing */
+			if (dsync_worker_output_flush(dest_iter->worker) < 0)
+				return -1;
+		}
 	}
 	return dsync_worker_is_output_full(dest_iter->worker) ? 0 : 1;
 }


More information about the dovecot-cvs mailing list