changeset 17923:568f817804b3

lib-index: Moved MAIL_TRANSACTION_LOG_LOCK_WARN_SECS as part of public API.
author Timo Sirainen <tss@iki.fi>
date Thu, 09 Oct 2014 18:17:26 +0300
parents 00115d4930d4
children 1c3dcade6f02
files src/lib-index/mail-index.h src/lib-index/mail-transaction-log-private.h
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index.h	Thu Oct 09 18:14:43 2014 +0300
+++ b/src/lib-index/mail-index.h	Thu Oct 09 18:17:26 2014 +0300
@@ -12,6 +12,10 @@
 
 #define MAIL_INDEX_HEADER_MIN_SIZE 120
 
+/* Log a warning when transaction log has been locked for this many seconds.
+   This lock is held also between mail_index_sync_begin()..commit(). */
+#define MAIL_TRANSACTION_LOG_LOCK_WARN_SECS 30
+
 enum mail_index_open_flags {
 	/* Create index if it doesn't exist */
 	MAIL_INDEX_OPEN_FLAG_CREATE		= 0x01,
--- a/src/lib-index/mail-transaction-log-private.h	Thu Oct 09 18:14:43 2014 +0300
+++ b/src/lib-index/mail-transaction-log-private.h	Thu Oct 09 18:17:26 2014 +0300
@@ -10,7 +10,6 @@
    mails. */
 #define MAIL_TRANSACTION_LOG_LOCK_TIMEOUT (3*60)
 #define MAIL_TRANSACTION_LOG_LOCK_CHANGE_TIMEOUT (3*60)
-#define MAIL_TRANSACTION_LOG_LOCK_WARN_SECS 30
 
 /* Rotate when log is older than ROTATE_TIME and larger than MIN_SIZE */
 #define MAIL_TRANSACTION_LOG_ROTATE_MIN_SIZE (1024*32)