re-add lock journal before reading journal files
authorJoey Hess <joeyh@joeyh.name>
Mon, 18 Jul 2022 20:40:25 +0000 (16:40 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 18 Jul 2022 20:40:25 +0000 (16:40 -0400)
commit28b0aaea54e9515c16e440f9f22688dc2e7dc642
treee0a2e30fe8956fdb8b1d06e0d892adce4b474089
parent36f0bdcd574738d53574104168054ae33d20d8ba
re-add lock journal before reading journal files

This reverts commit 2e6e9876e3fc420a22eee82eedec54ac3f678878.

This is gonna be needed after all.. The append will only be atomic if
the journal is locked, because the file being appended will have to be
moved out of the way to avoid an old version of git-annex seeing an
incomplete write to it. When git-annex finds that the file is not in the
journal, and checks the append location, locking will be needed to avoid
a race causing it to miss it in the append location too due to it being
moved back to the journal.
Annex/Branch.hs