[dovecot/core] 221950: lib-index: Use nfs_safe_stat() to avoid having to ...

GitHub noreply at github.com
Wed Jul 12 18:00:11 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 2219501dc63a6fc5ab6346ea0b0df8d44a3b97d1
      https://github.com/dovecot/core/commit/2219501dc63a6fc5ab6346ea0b0df8d44a3b97d1
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-12 (Wed, 12 Jul 2017)

  Changed paths:
    M src/lib-index/mail-transaction-log.c

  Log Message:
  -----------
  lib-index: Use nfs_safe_stat() to avoid having to handle stat() ESTALE error

Slightly simplifies the code.


  Commit: a13a14862a6b4f87a736e013615276171942f391
      https://github.com/dovecot/core/commit/a13a14862a6b4f87a736e013615276171942f391
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-12 (Wed, 12 Jul 2017)

  Changed paths:
    M src/doveadm/doveadm-dump-index.c

  Log Message:
  -----------
  doveadm dump: Include "last temp file scan" in index header dump


  Commit: fd71a4ab1c89b6a8cf7f3864a84868b2043fcc60
      https://github.com/dovecot/core/commit/fd71a4ab1c89b6a8cf7f3864a84868b2043fcc60
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-12 (Wed, 12 Jul 2017)

  Changed paths:
    M src/lib-index/mail-transaction-log.c

  Log Message:
  -----------
  lib-index: Check .log.2 rotation only when syncing

Instead of also whenever appending transactions to .log file. This
shouldn't change the behavior much, and it's needed for the following
change to work correctly.


  Commit: 4394b73cacaf2c31a9b601f66b6e26a1c8f114b4
      https://github.com/dovecot/core/commit/4394b73cacaf2c31a9b601f66b6e26a1c8f114b4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-12 (Wed, 12 Jul 2017)

  Changed paths:
    M src/doveadm/doveadm-dump-index.c
    M src/lib-index/mail-index-map-hdr.c
    M src/lib-index/mail-index-private.h
    M src/lib-index/mail-index-sync.c
    M src/lib-index/mail-index-write.c
    M src/lib-index/mail-index.h
    M src/lib-index/mail-transaction-log.c

  Log Message:
  -----------
  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.


Compare: https://github.com/dovecot/core/compare/6e62aa36a319...4394b73cacaf


More information about the dovecot-cvs mailing list