[Dovecot] dsync, hard-links and refcounts

Christoph Bußenius busseniu at in.tum.de
Tue Feb 21 13:55:05 EET 2012


On 21.02.2012 12:04, Timo Sirainen wrote:
> On Tue, 2012-02-21 at 11:23 +0100, Christoph Bußenius wrote:
>> Hi,
>>
>> On 15.02.2012 04:46, Timo Sirainen wrote:
>>>
>>> It worked when the GUID already existed somewhere in destination, but not if it was added only during the same session. The attached patch fixes it. I'll commit it to v2.1 hg after I'll release v2.1.0..
>>
>> sorry to bother you again, but I think there is a problem with this patch:
>>
>> If a maildir contains several copies of the same message all in the same
>> folder, dsync will not deduplicate them.
>
> Correct. I nearly finished implementing this also, but then I thought it
> just makes the code unnecessarily complex for no good reason.
>
>> While IMAP cannot directly create copies of a message in the same
>> folder,
>
> It can: SELECT INBOX, COPY 1 INBOX

Oh, mea culpa :)

>
>> it does still happen if you copy (or move) a message back and
>> forth between two folders.
>
> Is it common enough to be an actual problem?

Actually we have some mailboxes with massively duplicated messages in 
the same folder.  Of course I cannot tell how common it is in general. 
I could imagine that some people routinely copy all INBOX messages into 
archive folders and do not check whether the archive already contains 
these messages.

Apart from the waste of space, I was wondering:
Is it okay for an mdbox to have several duplicate instances of a message 
with the same GUID?  Might some kind of corruption arise from this?

Cheers,
Christoph

-- 
Christoph Bußenius
Rechnerbetriebsgruppe der Fakultäten Informatik und Mathematik
Technische Universität München
+49 89-289-18519 <> Raum 00.05.055 <> Boltzmannstr. 3 <> Garching


More information about the dovecot mailing list