[Dovecot] Something other than dotlock for uidlist locking?

Timo Sirainen tss at iki.fi
Sun Aug 28 22:30:47 EEST 2005


On Thu, 2005-08-25 at 10:26 -0700, James Berry wrote:
> If I read the code correctly, only dotlocks are supported for locking  
> of dovecot-uidlist. And I don't see any settings in the config file  
> for it.
> 
> As it turns out, dotlocks are very slow on my system, due to their  
> implementation via hardlinks.
> 
> Would it be possible to support other locking mechanisms for locking  
> of the uidlist file?

They are locked only when they are modified, and the modification works
by creating a new file and renaming it over the dovecot-uidlist file.

Is it only hardlinks that are problematic? It shouldn't be too difficult
to change the dotlock code to rely on working O_EXCL instead of
hardlinks.

Hmm. Actually I just did that in CVS. I guess I should also put out some
setting to enable it in config file. For now you could just change this:


	ret = set->use_excl_lock ?
		try_create_lock_excl(&lock_info, write_pid) :
		try_create_lock_hardlink(&lock_info, write_pid);

to

	ret = try_create_lock_excl(&lock_info, write_pid);

and see if it works faster.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20050828/23c8b425/attachment.pgp


More information about the dovecot mailing list