changeset 5288:be68f8b64aee HEAD

If we can't rotate log file because there's no disk space, don't abort appending the transaction.
author Timo Sirainen <tss@iki.fi>
date Sun, 11 Mar 2007 20:50:01 +0200
parents 8a88f44c2151
children f9b1c0f5bff4
files src/lib-index/mail-transaction-log-append.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-append.c	Sun Mar 11 20:16:45 2007 +0200
+++ b/src/lib-index/mail-transaction-log-append.c	Sun Mar 11 20:50:01 2007 +0200
@@ -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;
 		}
 	}