Re: CONDSTORE and replication in production?

2008-11-05 Thread Wesley Craig
On 05 Nov 2008, at 10:31, Ken Murchison wrote:
> I'm not aware of any CONDSTORE clients other than Polymer, written by
> Dave Cridland.  He may have written a similar client for a cell  
> phone m
> manufacturer.

As I understand it, the IMP people are working on CONDSTORE support,  
tho I think they are at the educating themselves stage.

:wes

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


Re: CONDSTORE and replication in production?

2008-11-05 Thread Ken Murchison
Bron Gondwana wrote:
> Hi,
> 
> So - I've been playing with CONDSTORE a bit.  Specifically, I'm looking at
> supporting cross folder searching through our web interface, and it would
> kind of suck to have to re-run the search on every folder every time we
> have a new query.  So I figured that checking HIGHESTMODSEQ would probably
> be more reliable than a bunch of dodgy heuristics for guaranteeing that the
> cache isn't stale.
> 
> Attached is a patch that makes rolling out condstore less painful, though
> the interface is a little unfriendly:
> 
> mailbox_default_options: 2
> 
> My question - is anyone actually using CONDSTORE and Cyrus replication in
> production?  For that matter, is anyone using CONDSTORE in production
> anywhere?  Any client gotchas to be aware of?

I'm not aware of any CONDSTORE clients other than Polymer, written by 
Dave Cridland.  He may have written a similar client for a cell phone m 
manufacturer.

-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University

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


Re: CONDSTORE and replication in production?

2008-11-05 Thread Bron Gondwana
On Wed, Nov 05, 2008 at 05:06:21PM +1100, Bron Gondwana wrote:
> Attached is a patch that makes rolling out condstore less painful, though
> the interface is a little unfriendly:
> 
> mailbox_default_options: 2

Oh yeah, indeed.  Alternatively.  Attached now.

Bron.
Index: cyrus-imapd-2.3.13/imap/mailbox.c
===
--- cyrus-imapd-2.3.13.orig/imap/mailbox.c	2008-11-05 13:58:46.0 +1100
+++ cyrus-imapd-2.3.13/imap/mailbox.c	2008-11-05 13:58:57.0 +1100
@@ -959,7 +959,10 @@
 	ntohl(*((bit32 *)(mailbox->index_base+OFFSET_HIGHESTMODSEQ)));
 #endif
 
-if (!mailbox->exists) mailbox->options |= OPT_POP3_NEW_UIDL;
+if (!mailbox->exists) {
+	mailbox->options = config_getint(IMAPOPT_MAILBOX_DEFAULT_OPTIONS);
+	mailbox->options |= OPT_POP3_NEW_UIDL;
+}
 
 if (!mailbox_doing_reconstruct &&
 	(mailbox->minor_version < MAILBOX_MINOR_VERSION)) {
@@ -1637,7 +1640,8 @@
 	calculate_flagcounts = 1;
 }
 if (oldstart_offset < OFFSET_MAILBOX_OPTIONS-quota_offset+sizeof(bit32)) {
-	unsigned long options = !exists ? OPT_POP3_NEW_UIDL : 0;
+	unsigned long options = config_getint(IMAPOPT_MAILBOX_DEFAULT_OPTIONS);
+	if (!exists) options |= OPT_POP3_NEW_UIDL;
 	*((bit32 *)(buf+OFFSET_MAILBOX_OPTIONS)) = htonl(options);
 }
 
@@ -2730,7 +2734,7 @@
 mailbox.deleted = 0;
 mailbox.answered = 0;
 mailbox.flagged = 0;
-mailbox.options = OPT_POP3_NEW_UIDL;
+mailbox.options = config_getint(IMAPOPT_MAILBOX_DEFAULT_OPTIONS) | OPT_POP3_NEW_UIDL;
 mailbox.leaked_cache_records = 0;
 mailbox.highestmodseq = 1;
 
Index: cyrus-imapd-2.3.13/lib/imapoptions
===
--- cyrus-imapd-2.3.13.orig/lib/imapoptions	2008-11-05 13:58:43.0 +1100
+++ cyrus-imapd-2.3.13/lib/imapoptions	2008-11-05 13:59:11.0 +1100
@@ -534,6 +534,11 @@
 /* Include notations in the protocol telemetry logs indicating the number of
seconds since the last command or response. */
 
+{ "mailbox_default_options", 0, INT }
+/* Default "options" field for the mailbox on create.  You'll want to know
+   what you're doing before setting this, but it can apply some default
+   annotations like condstore or duplicate supression */
+
 { "mailnotifier", NULL, STRING }
 /* Notifyd(8) method to use for "MAIL" notifications.  If not set, "MAIL"
notifications are disabled. */

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

CONDSTORE and replication in production?

2008-11-04 Thread Bron Gondwana
Hi,

So - I've been playing with CONDSTORE a bit.  Specifically, I'm looking at
supporting cross folder searching through our web interface, and it would
kind of suck to have to re-run the search on every folder every time we
have a new query.  So I figured that checking HIGHESTMODSEQ would probably
be more reliable than a bunch of dodgy heuristics for guaranteeing that the
cache isn't stale.

Attached is a patch that makes rolling out condstore less painful, though
the interface is a little unfriendly:

mailbox_default_options: 2

My question - is anyone actually using CONDSTORE and Cyrus replication in
production?  For that matter, is anyone using CONDSTORE in production
anywhere?  Any client gotchas to be aware of?

My first pass will probably be to write a dodgy tool that can update all
the cyrus.index files directly just by twiddling a bit, so I can revert the
change in a massive hurry.  Then if everyone says it's good I'll enable
CONDSTORE for new mailboxes on one store, and see how that goes.

Bron ( and I'll report back of course )
-- 
  Bron Gondwana
  [EMAIL PROTECTED]


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