653b719472
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.
22 lines
835 B
Markdown
22 lines
835 B
Markdown
If the journal contains a newer version of a log file than the git-annex
|
|
branch, and annex.alwayscommit=false so the branch is not getting updated,
|
|
the value from the journal can be ignored when reading that log file.
|
|
|
|
In CmdLine.Seek, there is some code that precaches location logs as an
|
|
optimisation (when using eg --copies). That streams info from the
|
|
git-annex branch into the cache. But it never checks for a journal file
|
|
with newer information.
|
|
|
|
> fixed this
|
|
|
|
Also in Cmdline.Seek, there is a LsTreeRecursive over the branch to handle
|
|
`--all`, and I think again that would mean it doesn't notice location
|
|
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]].)
|
|
|
|
[[done]] --[[Joey]]
|