avoid ingest lockdown file escaping the withOtherTmp call

Fixes bug that caused git-annex to fail to add a file when another
git-annex process cleaned up the temp directory it was using.

Solution is just to push withOtherTmp out to a higher level, so that
the whole ingest process can be completed inside it.

But in the assistant, that was not practical to do, since withOtherTmp runs
in the Annex monad and the assistant does not. Worked around by introducing
a separate temp directory that only the assistant uses for lockdown.
Since only one assistant can run at a time, it's easy to clean up that
directory of old cruft at startup.
This commit is contained in:
Joey Hess 2019-05-07 13:04:39 -04:00
parent 2a41712ef1
commit 2d33122215
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
8 changed files with 60 additions and 35 deletions

View file

@ -14,6 +14,8 @@ temp filepath. So, it's escaped the locking that `withOtherTmp` does, and
another process can clean up the temp files at the wrong point in time.
This will need some significant code reworking to fix.
> [[fixed|done]] --[[Joey]]
This is a fairly new problem because the code to have other processes
cleanup stale othertmp files was only added a couple months back.