fix --all to include not yet committed files from the journal
Fix bug caused by recent optimisations that could make git-annex not see recently recorded status information when configured with annex.alwayscommit=false. This does mean that --all can end up processing the same key more than once, but before the optimisations that introduced this bug, it used to also behave that way. So I didn't try to fix that; it's an edge case and anyway git-annex behaves well when run on the same key repeatedly. I am not too happy with the use of a MVar to buffer the list of files in the journal. I guess it doesn't defeat lazy streaming of the list, if that list is actually generated lazily, and anyway the size of the journal is normally capped and small, so if configs are changed to make it huge and this code path fire, git-annex using enough memory to buffer it all is not a large problem.
This commit is contained in:
parent
74acf17a31
commit
653b719472
4 changed files with 55 additions and 30 deletions
|
@ -15,5 +15,8 @@ logs that are only in the journal.
|
|||
Before that optimisation, it was using Logs.Location.loggedKeys,
|
||||
which does look at the journal.
|
||||
|
||||
> fixed
|
||||
|
||||
(This is also a blocker for [[todo/hiding_a_repository]].)
|
||||
--[[Joey]]
|
||||
|
||||
[[done]] --[[Joey]]
|
||||
|
|
|
@ -151,19 +151,9 @@ later write.
|
|||
> No way to configure what repo is hidden yet. --[[Joey]]
|
||||
>
|
||||
> Implementation notes:
|
||||
>
|
||||
> * CmdLine.Seek precaches git-annex branch
|
||||
> location logs, but that does not include private ones. Since they're
|
||||
> cached, the private ones don't get read. Result is eg, whereis finds no
|
||||
> copies. Either need to disable CmdLine.Seek precaching when there's
|
||||
> hidden repos, or could make the cache indicate it's only of public
|
||||
> info, so private info still gets read.
|
||||
> * CmdLine.Seek contains a LsTreeRecursive over the branch to handle
|
||||
> --all, and again that won't see private information, including even
|
||||
> annexed files that are only present in the hidden repo.
|
||||
> * (And I wonder, don't both the caches above already miss things in
|
||||
> the journal?)
|
||||
> * Any other direct accesses of the branch, not going through
|
||||
>
|
||||
> * [[bugs/git-annex_branch_caching_bug]] was a problem, now fixed.
|
||||
> * Any other similar direct accesses of the branch, not going through
|
||||
> Annex.Branch, also need to be fixed (and may be missing journal files
|
||||
> already?) Command.ImportFeed.knownItems is one. Command.Log behavior
|
||||
> needs to be investigated, may be ok. And Logs.Web.withKnownUrls is another.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue