[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Musings on ghost messages
From:       Till Adam <till () adam-lilienthal ! de>
Date:       2004-04-29 5:50:19
Message-ID: 200404290750.24765.till () adam-lilienthal ! de
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 29 April 2004 02:13, Ingo Klöcker wrote:
> On Wednesday 28 April 2004 21:15, Till Adam wrote:
> > The "ghost messages in the outbox" thingie bothers me, it really
> > does. So while sitting on my beautifull balcony watching the sun set
> > over the baltic sea, my thoughts krept back to that particular
> > mistery and by Jove, I think I found the reason at last. Maybe not,
> > though, so please tell me if this scenario could cause it:
> >
> > - user hits send in the composer
> > - mail enters outbox
> > - box gets new timestamp
> > - index is updated, get's new timestamp
> >
> > let's call that point in time A
> >
> > in the normal case, the following happens
> >
> > - mail leaves outbox
> > - outbox get's new timestamp        <= B
> > - index is _not_ updated
> > - eventually folder is closed
> > - index get's new timestamp          <= C
> >
> > In case of a crash, C is never reached, therefor the index is out of
> > date, it contains entries for already gone messages, the ghosts.
> >
> > Now, usually on the next open of the folder, the uptodate check
> > notices that the folder and index are out of sync and nukes and
> > reproduces the index. Why does that sometimes fail, though, and why
> > does it only (or much more frequently than with other folders) happen
> > with the outbox? Well, the uptodate check has a 5 second fuzzyness
> > factor, to avoid constant index regeneration with nfs mail stores
> > with slighly skewed clocks. The problem with the outbox could very
> > well be that it is the one mailbox where mail leaves the folder
> > within 5 seconds of arriving in it, and since leaving the folder
> > doesn't update the index, but updates the timestamp on the
> > box/folder, the ghost messages happen only in that scenario. So the
> > problem is that if A and B are within 5 seconds of each other the
> > uptodate check compares the index's timestamp (A) with the outbox's
> > (B) and finds them to be within the limit, which is wrong.
> >
> > Does that make sense? And if so, how do we remedy it?
>
> Didn't we already talk about this multiple times before? 

Parts of it, yes, and we've improved it already for many cases. It's still not 
fixed, though, for the outbox case.

> Obviously 
> checking the timestamp isn't sufficient. Additionally we should check
> the file size (in case of mbox) or the hashed list of message files (in
> case of maildir).

Ok, then what presizely are the conditions that tell us that index and mailbox 
are out of sync? What is the "correct" relationship between size of an mbox 
and the number of entries in an index, or some other info in/on the index? Do 
you mean store the size/hash in the index and check if that entry still 
matches? That could work, I guess.

Till
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAkJeftrsWGirveVsRAty/AJ9wo+iBBLDoJodTin5k/o93lS47/gCg3FnY
mmLeUbxjuDKTkc8ZDaIMATI=
=1l/+
-----END PGP SIGNATURE-----
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic