help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: From Gnus to mu4e


From: Ian Zimmerman
Subject: Re: From Gnus to mu4e
Date: Fri, 28 Aug 2015 08:31:26 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On 2015-08-28 11:06 +0200, Suvayu Ali wrote:

> And essentially this is the beauty of the maildir
> format, data integrity.

I agree, but that is not the same as absence of races.  See below.

> Hopefully I have explained myself clearly enough.  Or maybe you were
> trying to say something else?  In that case please feel free to stop me.

We have different definitions of "race".  To me, corruption is not a
necessary ingredient; a race is just a situation where two (or more)
threads or processes mutate data in ways that are independent
(ie. commutative) in the abstract, and yet the final state of the data
depends on the order of the changes.

A race can even be completely harmless if the two concrete
representations of the final state in fact represent the same abstract
state.  An extreme example of that would be a log structured system,
where the difference is simply in the order of the log records left by
the changes.  Yes, this is a race by my definition; but it's a feature,
not a bug :-)

> When MUA 2 fails, it is easily handled by reporting to the user and not
> trying to commit the changes again.  E.g. in mutt, this is handled by
> telling the user something like: file does not exist (I don't recall the
> exact phrasing), and keeping the folder state as is.

I don't know about you, but if I got this blurb from my MUA I would
first stare at the screen for minutes, repeating "wtf wtf", then (if I
was having a good day) investigate, and finally mutate the state of my
computer to ensure exclusive access :-) IOW, I don't want such weirdness
to happen, whether I call it "race" or not.

Lastly, it is not even clear what we should consider "corruption", or
the absence of it.  Is internal consistency enough?  Consider the
classic motivating example for database transactions, with two threads
trying to update an account balance datum, and only one succeeding.
Let's say there's no separate transactions table (a stretch, I know).
Then the data after the mixup is internally consistent; there just
aren't many ways that a single numerical value can be incosistent :-)
But it doesn't reflect reality, so maybe it is corrupt?

And to close the circle, this example in fact has analogy with our
maildir situation:  the MUA trying to set the "Replied" flag presumably
just sent off a reply.  So the failure to set the flag means the maildir
state, while internally consistent, doesn't reflect reality.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]