*IMPORTANT* - bugfix sync_append_commit index breakage

Bron Gondwana brong at fastmail.fm
Fri Aug 31 10:39:59 EDT 2007

We've had issues with broken indexes on the old master after a failover,
and puzzled for ages over the cause.  This is the reason behind the
SIGQUIT patch which would mitigate this by reducing the "unfinished
business" on a standard shutdown.

But still, the symptoms were weird.

I'm pretty sure I've figured out the cause, and the attached patch
(compile tested only) fixes it...  unfortunately it's a race condition
so it's hard to test.

Ken - it would be great if you can check this today and push it to CVS
if you agree with me.  It's a nasty one - especially since the symptoms
are offset index records right until something that's not a sync_server
append comes along and writes to the correct place in the index file

On a more structural note - it would be great to re-factor the lower
level APIs (mailbox.c, mboxlist.c, etc) to provide everything that
sync_server needs manipulate their data structures and remove all the
low level fiddling copy-and-pasted stuff from the sync layer.  This
comes back a bit to David's comments today about the difficulty of
having patches flying around - I suspect he copied and pasted so he
wasn't throwing tentacles deep through the main codebase - but the
end result is more brittle software and poor abstraction.  We need
to avoid doing that if there's a bunch of us all hacking in our own
little patch space!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyrus-sync-append-bugfix-2.3.9.diff
Type: text/x-diff
Size: 1575 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20070901/10b6e25c/attachment.bin 

More information about the Cyrus-devel mailing list