[pysqlite] select during a commit
dcharno <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
The flash on my system is slow, so commits are taking about a second or
longer. If another thread does a select while this occurs I'm seeing a
huge delay. In the following, my 1 second commit ended up taking about
35s. The first select timed out. The second select which should have
taken 50ms ends up taking 3s.
32:44 aaaa DEBUG before BEGIN EXCLUSIVE
32:44 aaaa DEBUG after BEGIN EXCLUSIVE
32:44 aaaa DEBUG before COMMIT
32:45 b INFO before SELECT
33:18 b INFO before SELECT
33:18 aaaa DEBUG after COMMIT. Ran in 34.537153
33:21 b INFO after SELECT. Ran in 3.036871
33:21 b INFO before SELECT
33:21 b INFO after SELECT. Ran in 0.146346
33:21 b INFO before SELECT
33:21 b INFO after SELECT. Ran in 0.035919
Since the writer has an exclusive lock, shouldn't the reader threads
stall until the commit is finished? From the documentation of sqlite,
I'm not clear how this could be happening.