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

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


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

Modified Files:
      Tag: branch_1_0
	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.17.2.7
retrieving revision 1.17.2.8
diff -u -d -r1.17.2.7 -r1.17.2.8
--- mail-transaction-log-append.c	11 Mar 2007 17:43:06 -0000	1.17.2.7
+++ mail-transaction-log-append.c	11 Mar 2007 18:49:58 -0000	1.17.2.8
@@ -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