import Annex.Wanted
import Annex.Notification
-import Utility.ThreadScheduler
-
import System.Log.Logger (debugM)
import qualified Data.Set as S
( \proof -> do
liftIO $ debugM "drop" $ unwords
[ "Dropping from here"
- , "proof: "
+ , "proof:"
, show proof
]
removeAnnex contentlock
, "proof: "
, show proof
]
- liftIO $ print "waiting to drop.."
- liftIO $ threadDelaySeconds (Seconds 10)
ok <- Remote.removeKey remote key
next $ cleanupRemote key remote ok
, stop
while it's asking B to drop it. Then when B tells A to drop it,
it'll be locked and that'll fail (and vice-versa).
+> Done, and verified the fix works in this situation.
+
# the bug part 2
<pre>
the change is from checking if content is in a location, to locking it in
that location while performing a drop from another location.
+> Done, and verified the fix works in this situation.
+
# the bug part 3 (where it gets really nasty)
<pre>
Dipping below desired numcopies in an unusual race condition, and then
doing extra work later to recover may be good enough.
+> Implemented, and I've now verified this solves the case above.
+> Indeed, neither drop succeeds, because no copy can be locked.
+
### to drop from local repo
When dropping an object from the local repo, lock it for drop,