master - master syncronization: *-temp-1-temp-1-temp-2-* recursion

Heiko Schlittermann hs at schlittermann.de
Mon Jul 5 14:46:39 EEST 2021


Hi,

I'm using dovecot 2.3.4.1 (f79e8e7e4) (Debian Build) and doing
master/master replication.

Recently we added a huuge .Archive* folder structure to the items being
replicated. And now, suddenly we see new folders with a naming like
*-temp-1-temp-1-temp-2-* appearing.

This finally lead to infinite recursion until the replicator crashed.
I've a theory, but please see below (**) for influence from outside of
dovecot:

SiteA starts replication of a huge .Archive folder, which doesn't exist
on siteB yet

        A               B
        .Archive ---->  .Archive-temp-1

Because it takes ages to sync, the replicator on siteB now sees the new
.Archive-temp-1 folder and starts replicating this back to siteA

        .Archive-temp-1-temp-1  <----- .Archive-temp-1

If now the replicator on siteA hits that new folder, it starts
replicating it to site B

        .Archive-temp-1-temp-1   ----> .Archive-temp-1-temp-1-temp-2

… and so on. Sometimes the digit is "2", or even "3".

I didn't check the Dovecot source yet, if the Replicator fails to skip
the temporary folders it gets "injected" from the other side.


(**) Possible external influence: On siteA a cronjob once per day moves the
.Archive* folders to another filesystem and replaces the .Archive*
directory with a symlink. This script "touches" the dovecot-uidlist.lock
prior to its action (but doesn't check if there is already a lock).

Could this mailbox move *behind* the back of the replicator be a reason
for the odd behaviour?


Additional info:

On *both* nodes the config looks like this:

    doveadm_password = <password>
    
    service doveadm {
      inet_listener {
        port = 9090
        ssl = yes
      }
    }
    
    replication_max_conns = 16
    
    plugin {
      mail_replica = tcps:<other site>:9090
    }
    
    service replicator {
      process_min_avail = 1
      unix_listener replicator-doveadm {
        mode = 0666
        user = dovecot
      }
    }
    
    service aggregator {
      fifo_listener replication-notify-fifo {
        mode = 0666
        user = dovecot
      }
      unix_listener replication-notify {
        mode = 0666
        user = dovecot
      }
    }
    

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20210705/34f0df8f/attachment.sig>


More information about the dovecot mailing list