LARGE single-system Cyrus installs?

David Carter dpc22 at cam.ac.uk
Tue Nov 13 08:55:25 EST 2007


On Tue, 13 Nov 2007, Bron Gondwana wrote:

> If you're planning to lift a consistent copy of a .index file, you need
> to lock it for the duration of reading it (read lock at least).

mailbox_lock_index() blocks flag updates (but this doesn't seem to be 
something that imapd worries about when FETCHing data). You don't need to 
worry about expunge or append events once the mailbox is open.

> But since I would like a consistent snapshot of the mailbox state, I 
> lock the cyrus.header and then the cyrus.index and then (if it's there) 
> the cyrus.expunge.  That means no sneaky process could (for example) 
> delete the mailbox and create another one with the same name while I was 
> busy downloading the last file - giving me totally bogus data.

chdir() into the mailbox data directory: with delayed delete and fast 
rename it shouldn't matter if the mailbox is replaced under your feet. 
That's the way replication worked on my 2.1 systems, prior to split-meta.

(Locking isn't a big deal, but safe concurrent access is always nice).

-- 
David Carter                             Email: David.Carter at ucs.cam.ac.uk
University Computing Service,            Phone: (01223) 334502
New Museums Site, Pembroke Street,       Fax:   (01223) 334679
Cambridge UK. CB2 3QH.


More information about the Info-cyrus mailing list