lock before writing to the ContentIdentifier db
This commit is contained in:
parent
aaacf431d8
commit
00722ba1f8
1 changed files with 2 additions and 1 deletions
|
@ -217,6 +217,7 @@ downloadImport remote importtreeconfig importablecontents = do
|
||||||
-- importablecontents (eg when it has a history),
|
-- importablecontents (eg when it has a history),
|
||||||
-- they will only be downloaded once.
|
-- they will only be downloaded once.
|
||||||
cidmap <- liftIO $ newTVarIO M.empty
|
cidmap <- liftIO $ newTVarIO M.empty
|
||||||
|
withExclusiveLock gitAnnexContentIdentifierLock $
|
||||||
bracket CID.openDb CID.closeDb (go cidmap importablecontents)
|
bracket CID.openDb CID.closeDb (go cidmap importablecontents)
|
||||||
-- TODO really support concurrency; avoid donwloading the same
|
-- TODO really support concurrency; avoid donwloading the same
|
||||||
-- ContentIdentifier twice.
|
-- ContentIdentifier twice.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue