[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-append.c, 1.25, 1.26

tss at dovecot.org tss at dovecot.org
Sun Mar 11 20:50:03 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv10325

Modified Files:
	mail-transaction-log-append.c 
Log Message:
If we can't rotate log file because there's no disk space, don't abort
appending the transaction.



Index: mail-transaction-log-append.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log-append.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mail-transaction-log-append.c	11 Mar 2007 17:43:10 -0000	1.25
+++ mail-transaction-log-append.c	11 Mar 2007 18:50:01 -0000	1.26
@@ -417,7 +417,11 @@
 		mail_index_unlock(index, lock_id);
 
 		if (ARE_ALL_TRANSACTIONS_IN_INDEX(log, &idx_hdr)) {
-			if (mail_transaction_log_rotate(log, TRUE) < 0)
+			/* if rotation fails because there's not enough disk
+			   space, just continue. we'll probably move to
+			   in-memory indexes then. */
+			if (mail_transaction_log_rotate(log, TRUE) < 0 &&
+			    !index->nodiskspace)
 				return -1;
 		}
 	}



More information about the dovecot-cvs mailing list