Re: unexpunge+replication behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 27, 2007 at 02:17:05PM -0400, Wesley Craig wrote:
> This is a very simple bug: ipurge is not logging a sync event.  The  
> fix is to add sync_log_mailbox (or something similar) if ipurge makes  
> a change.  I suspect that unexpunge is suffering from a similar  
> problem, but I haven't actually looked, so it may be more complex.

Yeah, it's more complex.  The sync protocol doesn't check UIDVALIDITY
at all, it works purely with UIDs, and if a deleted UID re-appears,
it doesn't notice and remove it from cyrus.expunge, meaning the same
record is present in both cyrus.index and cyrus.expunge.

ipurge, yes, that's just a missing sync event.  It would probably
look something like this (I've added this to my local patch set)

Index: cyrus-imapd-2.3.9/imap/ipurge.c
===================================================================
--- cyrus-imapd-2.3.9.orig/imap/ipurge.c	2007-09-28 10:02:47.000000000 +1000
+++ cyrus-imapd-2.3.9/imap/ipurge.c	2007-09-28 10:04:16.000000000 +1000
@@ -67,6 +67,7 @@
 #include "mailbox.h"
 #include "xmalloc.h"
 #include "mboxlist.h"
+#include "sync_log.h"
 
 /* config.c stuff */
 const int config_need_data = CONFIG_NEED_PARTITION_DATA;
@@ -270,6 +271,8 @@
   mailbox_expunge(&the_box, purge_check, &stats, EXPUNGE_FORCE);
   mailbox_close(&the_box);
 
+  sync_log_mailbox(name);
+
   print_stats(&stats);
 
   return 0;
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux