[Dovecot] dsync redesign
Timo Sirainen
tss at iki.fi
Thu Mar 29 01:43:07 EEST 2012
On 23.3.2012, at 23.25, Timo Sirainen wrote:
> and even if you don't understand that, here's another document disguising as an algorithm class problem :) If anyone has thoughts on how to solve it, would be great:
>
> http://dovecot.org/tmp/dsync-redesign-problem.txt
>
> It only deals with saving new messages, not expunges/flag changes/etc, but those should be much simpler.
Step #3 was more difficult than I first realized. I spent last two days figuring out a way to make it work, and looks like I finally did. I didn't update the document yet, but I wrote a test program: http://dovecot.org/tmp/test-dsync.c
Step #2 should be easy enough.
Step #4 I think I'll forget about and just implement a per-mailbox dsync lock. The main reason I wanted to get rid of locks was because a per-user lock can't work with shared mailboxes. But a per-mailbox lock is okay enough. Note that #3 allows the two dsyncs to run in parallel and send duplicate changes, just not modifying the same mailbox at the same time (which would duplicate mails due to two transactions adding the same mails).
More information about the dovecot
mailing list