git-annex/Database
Joey Hess 50fa17aee6
v6: recover from race between git mv and git-annex get/drop
Update pointer file next time reconcileStaged is run to recover from the
race.

Note that restagePointerFile causes git to run the clean filter,
and that will run reconcileStaged. So, normally by the time the git
annex get/drop command finishes, the race has already been dealt with.
It may be that, in some case, that won't happen and the race will be
dealt with at a later point. git-annex could run reconcileStaged at
shutdown if that becomes a problem.

This does not handle the situation where the git mv is committed before
git-annex gets a chance to run again. git commit does run the clean
filter, and that happens to re-inject the content if it was supposed to
be dropped but is still populated. But, the case where the file was
supposed to be gotten but is not populated is not handled yet.

This commit was supported by the NSF-funded DataLad project.
2018-08-22 15:56:43 -04:00
..
Keys refactor 2016-10-17 14:58:33 -04:00
Export.hs fix build with old version of persistent 2017-09-25 09:57:41 -04:00
Fsck.hs fix consistency bug reading from export database 2017-09-06 17:19:07 -04:00
Handle.hs fix bug that prevented db being written to disk in SingleWriter mode 2017-09-18 19:42:20 -04:00
Init.hs Work around sqlite's incorrect handling of umask when creating databases. 2017-02-13 17:39:16 -04:00
Keys.hs v6: recover from race between git mv and git-annex get/drop 2018-08-22 15:56:43 -04:00
Queue.hs fix consistency bug reading from export database 2017-09-06 17:19:07 -04:00
Types.hs add ExportTree table to export db 2017-09-18 13:59:59 -04:00