improve sqlite MultiWriter handling of read after write
authorJoey Hess <joeyh@joeyh.name>
Tue, 19 Oct 2021 19:13:29 +0000 (15:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 19 Oct 2021 19:13:29 +0000 (15:13 -0400)
commitf4bdecc4ecce8bcbb2d8ccbb524ba1f3f76565ba
tree7967bfe55e9593f5ec4bad0e8142bac480b8f268
parentade67b78c54e5e013f98734e9e035ac1ad7c5130
improve sqlite MultiWriter handling of read after write

This removes a messy caveat that was easy to forget and caused at least one
bug. The price paid is that, after a write to a MultiWriter db, it has to
close the db connection that it had been using to read, and open a new
connection. So it might be a little bit slower. But, writes are usually
batched together, so there's often only a single write, and so there should
not be much of a slowdown. Notice that SingleWriter already closed the db
connection after a write, so paid the same overhead.

This is the second try at fixing a bug: git-annex get when run as the first
git-annex command in a new repo did not populate all unlocked files.
(Reversion in version 8.20210621)

Sponsored-by: Boyd Stephen Smith Jr. on Patreon
CHANGELOG
Database/Handle.hs
Database/Queue.hs
doc/bugs/initial_get_of_unlocked_file_fails_to_populate_pointer.mdwn