unexpunge+replication behaviour

Bron Gondwana brong at fastmail.fm
Thu Sep 27 09:59:12 EDT 2007


On Thu, Sep 27, 2007 at 02:50:15PM +0300, Стоян Цалев wrote:
> Hi guys,
> I'm currently playing around with cyrus 2.3.9 and replication. It seems quite 
> stable and in fact, perfectly usable. However, I ran into a problem with 
> the delayed expunge feature. It looks like this - when I delete a mail (via 
> IMAP) on the master, the same happens on the replica, as it should. Then I 
> use the unexpunge utility to list deleted mails (both on the master and 
> replica) and they are being displayed correctly - i.e. same number of deleted 
> msgs, same msg UIDs, etc. Then I  use unexpunge to "undelete" a mail, and it 
> works great - the msg appears as new on the master. However, it remains 
> deleted on the replica...
> I guess it's a problem when bringing the replica up as a master after a 
> failure, because the previously unexpunged mail on the master would appear as 
> deleted. So my question is: Is this behaviour expected/planned? I mean, is it 
> a feature or a bug ;)

Yes.  (never ask a computer person an "or" question!)

Seriously, it's a bug.  It's a bug because the sync protocol doesn't
understand about delayed expunge at all.

You could turn off delayed expunge on the replica, which would cause
the messages to re-sync, but if you failed over in the usual case then
the deleted messages wouldn't be there.

This is on my checklist to do something about, so expect a fix to come
some time in the new few months, either from FastMail or from David/Ken
who are also working on replication stuff.  It's probably going to cause
a protocol change, which means we should try to sync up any other
protocol changes as well.  Actually, I think 2.3.10 will have a sync
protocol change anyway due to the new GUID stuff, so maybe I should push
myself a bit harder and try to get it in before the release!

Thing is, I haven't worked out the best approach yet.  Well, I probably
have, but it's the wildly unpopular "flag in the index file and get
rid of the expunged file all together" technique.  Might even be able
to manage it without a protocol change in that case... hmmm.

Bron ( thinking/typing out loud and too tired to write any real code
       now )


More information about the Info-cyrus mailing list