Sync log replica process

Michael Menge michael.menge at zdv.uni-tuebingen.de
Tue Mar 13 06:56:48 EDT 2012


Hi,

Quoting Manel Gimeno Zaragozá <magiza83 at hotmail.com>:

>
> Hello,
>
> I've some doubts about how sync logs and the order about how they  
> should be processed. I've done some bunch tests and during the  
> process stop replic to try to simulate a possible crash.
> In my test I've saw the following:
>
> 1.- I send 10 mails to Master and it starts to replicate.
> 2.- file "log" is created and change to "log-13835"
> 3.- Replica crash and "log-13835" never ends and remains in  
> /var/lib/imap/sync/ "forever"
> 4.- while replica is crashed the user is making actions in the 10  
> mails send before (moving aroung folders, deleting, etc...) and all  
> "changes" are saved in "log" file
> 5.- Replica comes up and i run "sync_client -r" to sincronize the changes.
>     The question is here. Should I first run "sync_client -r -f  
> /var/lib/imap/sync/log-13835" before starts "sync_client -r"? I  
> understand that the log-13835 has the information about the 10 mail  
> received, and "log" has information about mail that are not yet in  
> replica.
> 6.- Anyway, I run "sync_client -r"    without process "log-13835"  
> and, what a surprise!! everything is on their place and sync works  
> ok with out processing the log-13835
> 7.- I run my  "integrity_check" based on Bron's integrity check and  
> the only "problem" I see is a mismatch in "highestmodseq" for the  
> folder where the user moves the mails.
>     Mismatched 'highestmodseq' for "user.gdatmgim.temp" master=7, replica=9
>     This error remain until some action is taken in the folder.
>
> So, my question is, is it necessary to process the "log-PID" before  
> sync the "log" file? Because in my test it looks like it's not  
> necessary.
>

It depends on what actions where done while the syncornisation was down
Cyrus does not log every changed mail, but in which mailbox mails  
where changed.

So if log-13835 contains "MAILBOX user.gdatmgim.temp" and
"MAILBOX user.gdatmgim" and he recieved new mails in the INBOX but did  
not change mails in the temp folder, the INBOX will be in sync without  
the log-13835, but not user.gdatmgim.temp".

So the replication will at some point catch missed actions from unprocessed
logs, but it can take some time (forever in worst case). On the other hand
it does not harm to run old logs.

Michael



--------------------------------------------------------------------------------

M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
michael.menge at zdv.uni-tuebingen.de
Wächterstraße 76
72074 Tübingen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5267 bytes
Desc: S/MIME Signatur
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20120313/c8c81a22/attachment-0001.bin 


More information about the Info-cyrus mailing list