4394b73cacaf2c31a9b601f66b6e26a1c8f114b4 |
|
12-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
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. |
2ecee6ed2bfd5c9bc5c6cc8a675b9db4cbbcd81f |
|
03-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index, lib-storage: Add mail_index_header.last_temp_file_scan
Also add index_mailbox_update_last_temp_file_scan() for easily updating it.
This is reusing an old "sync timestamp" field. Because it was a timestamp,
it doesn't matter if the old data still exists in it. This field could have
been added as an extension, but that's more work and this feature is generic
enough that it should be useful for many of the mail storage backends. |
9644b7914445f0fb1098038218bfcb7d135a8698 |
|
21-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Handle invalid headers as "corruption", not "temporary error"
This is especially required for "Header's corrupted flag is set" error,
which won't get fixed otherwise.
It's a bit more questionable if we should treat major version or CPU
architecture change as corruption, but it's possible those only exist
because of corruption. It's also very unlikely that either is really
happening. Ideally there would be a hash that verifies whether the
header is corrupted or not. |