emacs-devel
[Top][All Lists]
Advanced

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

Re: sqlite3


From: Eli Zaretskii
Subject: Re: sqlite3
Date: Sat, 18 Dec 2021 11:30:49 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Sat, 18 Dec 2021 08:41:50 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Which sounds like a problem different from what you saw?
> 
> It may stem from the (incomplete) fix I added for the original problem,
> though.
> 
> > Adding (sleep-for 3) after call-process doesn't entirely fix the
> > problem, although it becomes more rare.
> >
> > I've installed a change in multisession.el that makes the problem much
> > more rare by forcing 'fsync' when we close the value file.  The
> > problem is not yet gone entirely, though: it happens with about 25%
> > probability here.  I think it could be related to the fact that
> > 'rename-file' is not an atomic operation on MS-Windows. But that's a
> > wild guess, I have no basis for it.
> 
> Right.  I'll do some further testing, but the real fix is to add some
> backoff logic when the file is locked, which I'll do now.  (And in that
> case, I think the `fsync' should be unnecessary.)

With the current master, the test still fails for me about 20% of the
time.  Seems like slightly less than before your recent changes, but
I'm not sure.

I think fsync should be necessary because we use temporary files, and
those are by default not fsync'ed when we close the descriptor to
which we wrote.  At least on MS-Windows, I think this could mean other
processes might get a stale file contents.



reply via email to

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