]> dgit.raspbian.org Git - git-annex.git/commitdiff
fix negative DATA when 1 node of a cluster has a partial transfer
authorJoey Hess <joeyh@joeyh.name>
Tue, 30 Jul 2024 15:42:17 +0000 (11:42 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 30 Jul 2024 15:42:17 +0000 (11:42 -0400)
P2P/Proxy.hs
doc/todo/git-annex_proxies.mdwn

index 211a1e9420a5c363dd1ddf6a19d1ab62f3086377..cbd28902a1c99a0e334af172bf7e119d916c6df5 100644 (file)
@@ -563,7 +563,9 @@ proxyRequest proxydone proxyparams requestcomplete requestmessage protoerrhandle
                rs <- forMC (proxyConcurrencyConfig proxyparams) remotes $ \r@(remoteside, remoteoffset) ->
                        runRemoteSideOrSkipFailed remoteside $ do
                                net $ sendMessage $ DATA $ Len $
-                                       totallen - remoteoffset
+                                       if remoteoffset > totallen
+                                               then 0
+                                               else totallen - remoteoffset
                                return r
                protoerrhandler (send (catMaybes rs) minoffset) $
                        client $ net $ receiveBytes (Len datalen) nullMeterUpdate
index 36ca9b3f8b0b594a6e5dec0b1ec65a6ee2443dfe..1628677465fa8b745a7e7fd833c4f34bc6faf34c 100644 (file)
@@ -18,27 +18,19 @@ Joey has received funding to work on this.
 Planned schedule of work:
 
 * June: git-annex proxies and clusters
-* July, part 1: p2p protocol over http
-* July, part 2: git-annex proxy support for exporttree
-* August: balanced preferred content
-* September: streaming through proxy to special remotes (especially S3)
-* October: proving behavior of balanced preferred content with proxies
+* July: p2p protocol over http
+* August, part 1: git-annex proxy support for exporttree
+* August, part 2: balanced preferred content
+* September, part 1: balanced preferred content continued
+* September, part 2: streaming through proxy to special remotes (especially S3)
+* October, part 1: streaming through proxy continued
+* October, part 2: proving behavior of balanced preferred content with proxies
 
 [[!tag projects/openneuro]]
 
 ## work notes
 
-* When part of a file has been sent to a cluster via the http server,
-  the transfer interrupted, and another node is added to the cluster,
-  and the transfer of the file performed again, there is a failure
-  sending to the node that had an incomplete copy. It fails like this:
-
-         //home/joey/tmp/bench/c3/.git/annex/tmp/SHA256E-s1048576000--09d7e19983a65682138fa5944f135e4fc593330c2693c41d22cc7881443d6060: withBinaryFile: illegal operation
-       git-annex: transfer already in progress, or unable to take transfer lock
-       p2pstdio: 1 failed
-
-  When using ssh and not the http server, the node that had the incomplete
-  copy also doesn't get the file, altough no error is displayed.
+* release time
 
 ## items deferred until later for p2p protocol over http