eliminate single/multi writer distinction

After commit f4bdecc4ec, there is no
longer any distinction between SingleWriter and MultiWriter's handling
of read after write.

Databases that were SingleWriter still have lock files that are used to
prevent multiple writers.

This does make writing to such databases a bit more expensive,
because the MultiWriter code path that is now used opens a second db
connection in order to write to them.
This commit is contained in:
Joey Hess 2021-10-20 12:24:40 -04:00
parent c47794991c
commit f5b642318d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 21 additions and 49 deletions

View file

@ -107,7 +107,7 @@ benchDb :: RawFilePath -> Integer -> Annex BenchDb
benchDb tmpdir num = do
liftIO $ putStrLn $ "setting up database with " ++ show num ++ " items"
initDb db SQL.createTables
h <- liftIO $ H.openDbQueue H.MultiWriter db SQL.containedTable
h <- liftIO $ H.openDbQueue db SQL.containedTable
liftIO $ populateAssociatedFiles h num
sz <- liftIO $ getFileSize db
liftIO $ putStrLn $ "size of database on disk: " ++