[dovecot/core] 478f25: dsync: Add debug logging for .dovecot-sync.lock lo...

GitHub noreply at github.com
Wed Jan 3 16:00:22 EET 2018


  Branch: refs/heads/master-2.3
  Home:   https://github.com/dovecot/core
  Commit: 478f2537979e4c677636c4b9c4da2c28a7a9103f
      https://github.com/dovecot/core/commit/478f2537979e4c677636c4b9c4da2c28a7a9103f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-01-03 (Wed, 03 Jan 2018)

  Changed paths:
    M src/doveadm/dsync/dsync-brain.c

  Log Message:
  -----------
  dsync: Add debug logging for .dovecot-sync.lock locking/unlocking


  Commit: e35a625b4d0ba2e3e2cc97acb29499db3e01474d
      https://github.com/dovecot/core/commit/e35a625b4d0ba2e3e2cc97acb29499db3e01474d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-01-03 (Wed, 03 Jan 2018)

  Changed paths:
    M src/lib/file-lock.c

  Log Message:
  -----------
  lib: Make file_lock_free(NULL) no-op


  Commit: 8fe22c9108db157d8891da58623b9c8736c49599
      https://github.com/dovecot/core/commit/8fe22c9108db157d8891da58623b9c8736c49599
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-01-03 (Wed, 03 Jan 2018)

  Changed paths:
    M src/doveadm/dsync/dsync-brain-mailbox.c
    M src/doveadm/dsync/dsync-brain-private.h
    M src/doveadm/dsync/dsync-brain.c
    M src/doveadm/dsync/dsync-mailbox.c
    M src/doveadm/dsync/dsync-mailbox.h

  Log Message:
  -----------
  dsync: Add per-mailbox sync lock that is always used.

Both importing and exporting gets the lock before they even sync the
mailbox. The lock is kept until the import/export finishes. This guarantees
that no matter how dsync is run, two dsyncs can't be working on the same
mailbox at the same time.

This lock is in addition to the optional per-user lock enabled by the -l
parameter. If the -l parameter is used, the same lock timeout is used for
the per-mailbox lock. Otherwise 30s timeout is used.

This should help to avoid email duplication when replication is enabled for
public namespaces, and maybe in some other rare situations as well.


Compare: https://github.com/dovecot/core/compare/393bfbea8f61...8fe22c9108db


More information about the dovecot-cvs mailing list