Commit graph

33214 commits

Author SHA1 Message Date
Joey Hess
0f5e5703e5
update 2018-11-08 11:46:23 -04:00
Joey Hess
051dfcb3be
Revert "fix comment"
This reverts commit bac7d34e71.

The comment was right; ARG_MAX is the total length of all arguments.
2018-11-06 17:26:20 -04:00
Joey Hess
6ecd55a9fa
Fixed some other potential hangs in the P2P protocol
Finishes the start made in 983c9d5a53, by
handling the case where `transfer` fails for some other reason, and so the
ReadContent callback does not get run. I don't know of a case where
`transfer` does fail other than the locking dealt with in that commit, but
it's good to have a guarantee.

StoreContent and StoreContentTo had a similar problem.
Things like `getViaTmp` may decide not to run the transfer action.
And `transfer` could certianly fail, if another transfer of the same
object was in progress. (Or a different object when annex.pidlock is set.)

If the transfer action was not run, the content of the object would
not all get consumed, and so would get interpreted as protocol commands,
which would not go well.

My approach to fixing all of these things is to set a TVar only
once all the data in the transfer is known to have been read/written.
This way the internals of `transfer`, `getViaTmp` etc don't matter.

So in ReadContent, it checks if the transfer completed.
If not, as long as it didn't throw an exception, send empty and Invalid
data to the callback. On an exception the state of the protocol is unknown
so it has to raise ProtoFailureException and close the connection,
same as before.

In StoreContent, if the transfer did not complete
some portion of the DATA has been read, so the protocol is in an unknown
state and it has to close the conection as well.

(The ProtoFailureMessage used here matches the one in Annex.Transfer, which
is the most likely reason. Not ideal to duplicate it..)

StoreContent did not ever close the protocol connection before. So this is
a protocol change, but only in an exceptional circumstance, and it's not
going to break anything, because clients already need to deal with the
connection breaking at any point.

The way this new behavior looks (here origin has annex.pidlock = true so will
only accept one upload to it at a time):

git annex copy --to origin -J2
copy x (to origin...) ok
copy y (to origin...)
  Lost connection (fd:25: hGetChar: end of file)

This work is supported by the NIH-funded NICEMAN (ReproNim TR&D3) project.
2018-11-06 14:52:32 -04:00
Joey Hess
9adc0b3417
Merge branch 'master' of ssh://git-annex.branchable.com 2018-11-06 13:01:00 -04:00
Joey Hess
983c9d5a53
git-annex-shell: fix transfer hang
Fix hang when transferring the same objects to two different clients at the
same time. (Or when annex.pidlock is used, two different objects to the
same or different clients.)

Could also potentially occur if a client was downloading an object and
somehow lost connection but that git-annex-shell was still running and
holding the transfer lock.

This does not guarantee that, if `transfer` fails for some other reason,
a DATA response will be made.

This work is supported by the NIH-funded NICEMAN (ReproNim TR&D3) project.
2018-11-06 13:00:37 -04:00
metst13@1d16544ec52801db7efb2895d3dc7a4458b8eb45
7bca7542d6 Added a comment 2018-11-06 16:10:11 +00:00
Joey Hess
bac7d34e71
fix comment 2018-11-06 11:42:31 -04:00
metst13@1d16544ec52801db7efb2895d3dc7a4458b8eb45
1803ba1bcc Added a comment: clone to the server 2018-11-06 14:58:39 +00:00
yarikoptic
68adc08502 initial report on failing to get a file after it actually got to tmp/ fully 2018-11-06 03:43:40 +00:00
Joey Hess
0a0242224d
full analysis 2018-11-05 18:25:55 -04:00
Joey Hess
44769d9285
Merge branch 'master' of ssh://git-annex.branchable.com 2018-11-05 17:13:16 -04:00
Joey Hess
14075afbd7
updated analysis 2018-11-05 17:12:19 -04:00
yarikoptic
0f0a6336cd Added a comment 2018-11-05 21:01:35 +00:00
yarikoptic
2003b42efb Added a comment 2018-11-05 20:53:48 +00:00
spwhitton
4bb1a6060f report failure to build against stretch 2018-11-05 20:20:30 +00:00
Joey Hess
c31ea81ee9
pidlock 2018-11-05 15:37:46 -04:00
Joey Hess
bb14843e72
update thanks, listing code and other significant non-financial contributors 2018-11-05 15:07:14 -04:00
Joey Hess
3c50fa130c
Merge branch 'master' of ssh://git-annex.branchable.com 2018-11-05 14:39:18 -04:00
Joey Hess
3ef13f128f
followup on bug triage 2018-11-05 14:38:32 -04:00
Joey Hess
fd128e5a3f
code review and response 2018-11-05 14:28:02 -04:00
marvin@3296bf3c446430c3b2ebc32b5c784ee976620847
4d11214908 Added a comment 2018-11-05 18:22:49 +00:00
marvin@3296bf3c446430c3b2ebc32b5c784ee976620847
296c984c66 Added a comment 2018-11-05 18:21:54 +00:00
Joey Hess
d87ebf82a8
add news item for git-annex 7.20181105 2018-11-05 13:33:59 -04:00
Joey Hess
3016e94dbb
releasing package git-annex version 7.20181105 2018-11-05 13:33:36 -04:00
Joey Hess
695f822109
Merge branch 'master' of ssh://git-annex.branchable.com 2018-11-05 13:32:38 -04:00
Joey Hess
76a25fdcf0
Fix test suite failure when git-annex test is not run inside a git repository
Not the first time this kind of test suite breakage has happened..
It would be good to avoid somehow it looking up from .t and finding a git
repo. But just running the test suite from time to time outside of
git-annex would also let me notice these before the distribution packagers
do.

This commit was sponsored by mo on Patreon.
2018-11-05 13:31:49 -04:00
yarikoptic
aabfdca800 Added a comment 2018-11-05 17:31:46 +00:00
Joey Hess
5f213d45b1
Merge branch 'master' of ssh://git-annex.branchable.com 2018-11-05 12:34:54 -04:00
Joey Hess
0cb6d14383
followup 2018-11-05 12:34:27 -04:00
yarikoptic
13f9e79df1 removed 2018-11-05 16:03:47 +00:00
anarcat
6d954cc132 upload to the test collection, giving users an idea of how to change collections as well as forcing people to think before they upload 2018-11-05 16:02:23 +00:00
yarikoptic
02c74a0dfd Added a comment 2018-11-05 16:00:53 +00:00
yarikoptic
eb218d4e59 Added a comment 2018-11-05 15:57:17 +00:00
Joey Hess
42f1ea72de
followup 2018-11-05 11:47:58 -04:00
Joey Hess
cb69b77625
fix link 2018-11-05 11:39:04 -04:00
Joey Hess
11a37386df
Merge branch 'master' of ssh://git-annex.branchable.com 2018-11-05 11:37:39 -04:00
Yaroslav Halchenko
5483deecd5
debian: Current version breaks released versions of datalad 2018-11-05 11:36:47 -04:00
Joey Hess
6e86373d13
remove android stuff 2018-11-04 20:06:49 -04:00
Joey Hess
abe4b7ebd6
importfeed: Avoid erroring out when a feed has been repeatedly broken
That can leave other imported files not checked into git, because the git
command queue is not flushed when git-annex errors out. And since it only
happens once git-annex has concluded a feed is broken, it's an intermittent
bug, worst kind. Been seeing it for a while, only tracked down today.

Instead, by returning False, git-annex importfeed will cleanly shutdown and
still exit nonzero.

This commit was sponsored by Denis Dzyubenko on Patreon.
2018-11-04 17:41:49 -04:00
seantparsons
8570c07d49 2018-11-04 20:59:39 +00:00
anarcat
cb122b9d1e Added a comment: rsync can do this on its own 2018-11-04 19:29:19 +00:00
Joey Hess
7f15339162
update 2018-11-04 15:06:06 -04:00
anarcat
d621846ab8 Added a comment: workaround with youtube-dl 2018-11-03 20:52:49 +00:00
anarcat
16cbeb6aff Added a comment: oops 2018-11-03 19:52:48 +00:00
spwhitton
f09f846fea Added a comment 2018-11-03 19:41:32 +00:00
anarcat
4241de01c8 p2pstdio doesn't exist in stretch and buster doesn't degrade gracefully 2018-11-03 19:30:29 +00:00
admin
55fca72138 removed 2018-11-03 05:24:04 +00:00
andrew
0dc9e68cdb Added a comment 2018-11-02 22:03:15 +00:00
yarikoptic
c6cb372a9d Added a comment: tests fail - can't build to test the change 2018-11-02 21:51:16 +00:00
yarikoptic
4d24b712b0 Added a comment 2018-11-02 19:58:06 +00:00