fix a thundering herd problem
Avoid repeatedly opening keys db when accessing a local git remote and -J is used. What was happening was that Remote.Git.onLocal created a new annex state as each thread started up. The way the MVar was used did not prevent that. And that, in turn, led to repeated opening of the keys db, as well as probably other extra work or resource use. Also managed to get rid of Annex.remoteannexstate, and it turned out there was an unncessary Maybe in the keysdbhandle, since the handle starts out closed.
This commit is contained in:
parent
fada5c120c
commit
529f488ec4
5 changed files with 61 additions and 59 deletions
|
@ -517,7 +517,7 @@ pushRemote o remote (Just branch, _) = do
|
|||
, return True
|
||||
)
|
||||
where
|
||||
needemulation = Remote.Git.onLocal repo remote $
|
||||
needemulation = Remote.Git.onLocalRepo repo $
|
||||
(annexCrippledFileSystem <$> Annex.getGitConfig)
|
||||
<&&>
|
||||
needUpdateInsteadEmulation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue