summaryrefslogtreecommitdiff
path: root/git-annex.cabal
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-11-18 01:32:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-11-18 01:32:24 -0400
commita00349b3096ddb9f51e2acbc73b87a73384afe55 (patch)
treea5dbb577a90bb0dfcc87de0d3e9f975e0da455d0 /git-annex.cabal
parent681b8e1f9c6597e3ad15b61db12b1403d3c9667f (diff)
Add content locking to P2P protocol
Is content locking needed in the P2P protocol? Based on re-reading bugs/concurrent_drop--from_presence_checking_failures.mdwn, I think so: Peers can form cycles, and multiple peers can all be trying to drop the same content. So, added content locking to the protocol, with some difficulty. The implementation is fine as far as it goes, but note the warning comment for lockContentWhile -- if the connection to the peer is dropped unexpectedly, the peer will then unlock the content, and yet the local side will still think it's locked. To be honest I'm not sure if Remote.Git's lockKey for ssh remotes doesn't have the same problem. It checks that the "ssh remote git-annex-shell lockcontent" process has not exited, but if the connection closes afer that check, the lockcontent command will unlock it, and yet the local side will still think it's locked. Probably this needs to be fixed by eg, making lockcontent catch any execptions due to the connection closing, and in that case, wait a significantly long time before dropping the lock. This commit was sponsored by Anthony DeRobertis on Patreon.
Diffstat (limited to 'git-annex.cabal')
0 files changed, 0 insertions, 0 deletions