[Cyrus-CVS] src/cyrus/imap by brong

brong at andrew.cmu.edu brong at andrew.cmu.edu
Mon Feb 9 00:05:48 EST 2009


Update of /afs/andrew.cmu.edu/system/cvs/src/cyrus/imap
In directory unix34.andrew.cmu.edu:/afs/andrew.cmu.edu/usr3/brong/src/cyrus/imap

Modified Files:
	imapd.c sync_client.c 
Log Message:
sync MAILBOX events as well as USER events

sync_client "optimises" its sync list by removing
MAILBOX events where there's an associated USER
event.

This is fine until you have delayed delete, because

MAILBOX user.foo
MAILBOX DELETED.user.foo.4703FDCF
USER foo

Becomes:

MAILBOX DELETED.user.foo.4703FDCF
RESET foo

And the messages wind up being copied again entirely
because the server doesn't know about the mailbox
user.foo when the MAILBOX event is running.

This patch stops sync_client removing the MAILBOX event.

To make CREATE work correctly, this patch also makes
a "MAILBOX user.foo" event be generated along with a
"USER foo" event on user create - otherwise sub mailboxes
or appends that happen before the first sync will cause
bogus deletes on the replica.

Tracing a new user create, this correctly generates
the folders in the order one would expect on the
replica, and also runs the USER event at the end to
ensure all meta data is up-to-date.


--- links to diffs follow ---
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/imapd.c.diff?r1=1.556&r2=1.557
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/sync_client.c.diff?r1=1.40&r2=1.41


More information about the Cyrus-cvs mailing list