"hg push" hangs for one minute (exactly one minute)
Anton Shestakov
engored at gmail.com
Fri Apr 29 16:55:59 UTC 2022
чт, 28 апр. 2022 г. в 23:12, Ernie Rael <err at raelity.com>:
>
> On 4/28/22 12:46 PM, Anton Shestakov wrote:
> > Looks like either another process is holding a lock on caches or the
> > FS doesn't support locking mechanisms that sqlite3 needs.
> >
> > If you want to dig further into this, check around these files:
> > .hg/cache/evoext_stablerange_v2.sqlite and
> > .hg/cache/evoext_obshashrange_v2.sqlite
> >
> check around these? Not with an editor I think...
Yeah, I phrased it terribly. What I meant is that, for example, if you
want to check if there are locks or if it's possible to acquire a lock
on one of these databases, you can use python REPL to imitate what
evolve does:
import sqlite3
con = sqlite3.connect('evoext_obshashrange_v2.sqlite', timeout=30,
isolation_level='IMMEDIATE')
con.text_factory = bytes
# queries, one by one
con.execute('SELECT * FROM obshashrange;').fetchall()
con.execute('INSERT INTO obshashrange(rev, idx, obshash) VALUES (?, ?,
?);', (1, 2, 3)).fetchall()
con.execute('DELETE FROM obshashrange;').fetchall() # it's fine, this
is a cache and will be regenerated
If any of the queries give you trouble, you can try and isolate the
cause by taking the original .sqlite file and placing it on a
different share with different mount options or try it locally just to
see that it should work fine.
But I see that others already pointed out that SMB and sqlite aren't
the best combo, so now it's a matter of figuring out how to make them
work together.
I can say that if you find a way to make the evolve caches work on
SMB, it's worth sending a patch (or sharing the solution here) so it
can be applied to evolve. These and some other caches in evolve are
known to be a bit rough around the edges (although it is somewhat
surprising to see a well-known DB solution have this locking issue),
and it's planned to do an overhaul of them at some point. But if
there's a patch to fix this bug, it's going to be put in the earliest
possible release.
More information about the Mercurial
mailing list