]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: If transaction log was locked for at least 30 secs, log a warning (not...
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 28 Jan 2016 11:45:48 +0000 (13:45 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 28 Jan 2016 11:45:48 +0000 (13:45 +0200)
This is because we log a warning about it already when locking it took 30
seconds, so it's useful to see which process was actually keeping the lock.

src/lib-index/mail-transaction-log-file.c

index 5865cda0b4a86b905364020cf736217d4e8a1cc2..a016caee9e40899c4e784d21abfa567ee841d2d5 100644 (file)
@@ -409,7 +409,7 @@ void mail_transaction_log_file_unlock(struct mail_transaction_log_file *file,
                return;
 
        lock_time = time(NULL) - file->lock_created;
-       if (lock_time >= MAIL_TRANSACTION_LOG_LOCK_TIMEOUT && lock_reason != NULL) {
+       if (lock_time >= MAIL_TRANSACTION_LOG_LOCK_WARN_SECS && lock_reason != NULL) {
                i_warning("Transaction log file %s was locked for %u seconds (%s)",
                          file->filepath, lock_time, lock_reason);
        }