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. |
d7c8280f58292cc292eba9209dcc9024fe96cf06 |
|
03-May-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Updated dovecot.index file only by recreating it, never write to it directly.
This is safer, and nowadays there shouldn't be much of a performance loss
with it either, since dovecot.index isn't updated very often.
This also allows removing all locking from dovecot.index file, although for
now we'll keep it in case old Dovecot versions are simultaneously writing to
the index. |