summaryrefslogtreecommitdiff
path: root/Locations.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-18 15:54:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-18 15:54:24 -0400
commitd8125c9ea6d00b41f994162a0060f39e56107b12 (patch)
tree3f52039b7be3f4a52a124eb31cdbe341fcc4270f /Locations.hs
parentd3012ca604d631122f3e304adbb5e60d5d706f82 (diff)
use WAL mode to ensure read from db always works, even when it's being written to
Also, moved the database to a subdir, as there are multiple files. This seems to work well with concurrent fscks, although they still do redundant work due to the commit granularity. Occasionally two writes will conflict, and one is then deferred and happens later. Except, with 3 concurrent fscks, I got failures: git-annex: user error (SQLite3 returned ErrorBusy while attempting to perform prepare "SELECT \"fscked\".\"key\"\nFROM \"fscked\"\nWHERE \"fscked\".\"key\" = ?\n": database is locked) Argh!!!
Diffstat (limited to 'Locations.hs')
-rw-r--r--Locations.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Locations.hs b/Locations.hs
index 41e0c4201..18238d86d 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -29,7 +29,7 @@ module Locations (
gitAnnexBadLocation,
gitAnnexUnusedLog,
gitAnnexFsckState,
- gitAnnexFsckDb,
+ gitAnnexFsckDbDir,
gitAnnexFsckDbLock,
gitAnnexFsckResultsLog,
gitAnnexScheduleState,
@@ -229,9 +229,9 @@ gitAnnexFsckDir u r = gitAnnexDir r </> "fsck" </> fromUUID u
gitAnnexFsckState :: UUID -> Git.Repo -> FilePath
gitAnnexFsckState u r = gitAnnexFsckDir u r </> "state"
-{- Database used to record fsck info. -}
-gitAnnexFsckDb :: UUID -> Git.Repo -> FilePath
-gitAnnexFsckDb u r = gitAnnexFsckDir u r </> "fsck.db"
+{- Directory containing database used to record fsck info. -}
+gitAnnexFsckDbDir :: UUID -> Git.Repo -> FilePath
+gitAnnexFsckDbDir u r = gitAnnexFsckDir u r </> "db"
{- Lock file for the fsck database. -}
gitAnnexFsckDbLock :: UUID -> Git.Repo -> FilePath