Mercurial > dovecot > core-2.2
diff src/lib-index/mail-index-private.h @ 22326:ba1a35c5ead7
lib-index: Track .log.2 rotation time in index header
This avoids unnecessarily stat()ing the file. Also it's a bit better
since it's tracking the actual rotation time, not the mtime of what the
.log file happened to have at the time of rotation.
The initial rotation timestamp is written only to the dovecot.index header
without going through dovecot.index.log. This works, because the
dovecot.index is written practically always after a log rotation. For the
rare cases when it doesn't happen, the dovecot.index.log.2 just gets
deleted later after the next log rotation.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 11 Jul 2017 15:35:16 +0300 |
parents | 5d905618c4b1 |
children | b7e049f3aa16 |
line wrap: on
line diff
--- a/src/lib-index/mail-index-private.h Tue Jul 11 15:33:56 2017 +0300 +++ b/src/lib-index/mail-index-private.h Tue Jul 11 15:35:16 2017 +0300 @@ -174,6 +174,7 @@ uoff_t log_rotate_min_size, log_rotate_max_size; unsigned int log_rotate_min_created_ago_secs; unsigned int log_rotate_log2_stale_secs; + uint32_t pending_log2_rotate_time; pool_t extension_pool; ARRAY(struct mail_index_registered_ext) extensions;