Commit graph

2804 commits

Author SHA1 Message Date
lykos@d125a37d89b1cfac20829f12911656c40cb70018
ab1a78115a removed 2019-01-15 15:47:58 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
91c7936ca7 Added a comment: PREPARE-LOCAL 2019-01-15 15:47:39 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
59269fdd59 Added a comment: PREPARE-LOCAL 2019-01-15 15:46:07 +00:00
Joey Hess
4148548084
roadmap update 2019-01-11 17:25:37 -04:00
Joey Hess
3a9a6bc56b
response 2018-12-03 12:59:42 -04:00
anarcat
14213c0e42 Added a comment: how about for regular key/value storage? 2018-12-01 17:42:18 +00:00
Joey Hess
44c0a08429
add back deltas
also switch all urls to https
2018-12-01 12:13:46 -04:00
Joey Hess
82aad90d33
update roadmap 2018-11-08 15:42:53 -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
3beab402e6
response 2018-10-29 15:40:52 -04:00
Ilya_Shlyakhter
97aaf38a3c Added a comment 2018-10-19 15:52:22 +00:00
Joey Hess
72ffb4a2da
response 2018-10-04 14:21:37 -04:00
Ilya_Shlyakhter
2c0300c8b9 Added a comment: question about special remote protocol 2018-09-26 17:16:13 +00:00
Joey Hess
b4abdda121
response 2018-09-24 11:40:34 -04:00
Ilya_Shlyakhter
7310a30dd5 Added a comment 2018-09-19 18:19:22 +00:00
Ilya_Shlyakhter
7ca7f8aee4 Added a comment 2018-09-19 11:01:31 +00:00
Joey Hess
0f87c92cc6
close this old poll
I suspect votes by spambots..
2018-09-11 13:29:19 -04:00
83.175.76.211
41baab276e poll vote (/sdcard/annex) 2018-08-30 05:03:01 +00:00
77.119.239.37
587e0983ac poll vote (/sdcard/annex) 2018-08-29 13:38:24 +00:00
77.119.239.37
661f603a62 poll vote (/sdcard/annex) 2018-08-29 13:38:17 +00:00
77.119.239.37
0f37b9c7ec poll vote (/sdcard/annex) 2018-08-29 13:38:10 +00:00
77.119.239.37
db0f98a619 poll vote (/sdcard/annex) 2018-08-29 13:38:03 +00:00
Joey Hess
c3c28f7617
add GETINFO to external protocol (for ronnypfa)
External special remotes can now add info to `git annex info $remote`, by
replying to the GETINFO message.

Had to generalize some helpers to allow consuming multiple messages from
the remote.

The code added to Remote/* here is AGPL licensed, thus changed the license
of the files.

This commit was sponsored by Jake Vosloo on Patreon.
2018-06-08 11:56:24 -04:00
ypid
951b3375bd Fix spelling in doc/design/iabackup.mdwn 2018-06-03 12:28:26 +00:00
Joey Hess
31e1adc005
deal with unlocked files
P2P protocol version 1 adds VALID|INVALID after DATA; INVALID means the
file was detected to change content while it was being sent and so we
may not have received the valid content of the file.

Added new MustVerify constructor for Verification, which forces
verification even when annex.verify=false etc. This is used when INVALID
and in protocol version 0.

As well as changing git-annex-shell p2psdio, this makes git-annex tor
remotes always force verification, since they don't yet use protocol
version 1. Previously, annex.verify=false could skip verification when
using tor remotes, and let bad data into the repository.

This commit was sponsored by Jack Hill on Patreon.
2018-03-13 14:27:14 -04:00
Joey Hess
85450f94d6
response 2018-03-12 18:32:58 -04:00
Joey Hess
ad13b56c86
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-12 17:33:37 -04:00
Joey Hess
e36ceb7448
open todo for p2p protocol flag days 2018-03-12 16:28:54 -04:00
Joey Hess
28589c92d2
no protocol 1 yet 2018-03-12 15:42:15 -04:00
Joey Hess
c81768d425
version the P2P protocol
Unfortunately ReceiveMessage didn't handle unknown messages the way it
was documented to; client sending VERSION would cause the server to
return an ERROR and hang up. Fixed that, but old releases of git-annex
use the P2P protocol for tor and will still have that behavior.

So, version is not negotiated for Remote.P2P connections, only for
Remote.Git connections, which will support VERSION from their first
release. There will need to be a later flag day to change Remote.P2P;
left a commented out line that is the only thing that will need to be
changed then.

Version 1 of the P2P protocol is not implemented yet, but updated
the docs for the DATA change that will be allowed by that version.

This commit was sponsored by Jeff Goeke-Smith on Patreon.
2018-03-12 14:36:35 -04:00
anarcat
d66fab83da Added a comment: late to the party 2018-03-12 13:50:33 +00:00
Joey Hess
164d74de0f
wording 2018-03-07 16:22:39 -04:00
Joey Hess
6ddfa9807b
implemented git-annex-shell p2pstdio
Not yet used by git-annex, but this will allow faster transfers etc than
using individual ssh connections and rsync.

Not called git-annex-shell p2p, because git-annex p2p does something
else and I don't want two subcommands with the same name between the two
for sanity reasons.

This commit was sponsored by Øyvind Andersen Holm.
2018-03-07 15:38:01 -04:00
Joey Hess
fa5b19f0ff
add formal description of the P2P protocol
This commit was sponsored by Fernando Jimenez on Patreon.
2018-03-07 15:14:16 -04:00
Joey Hess
ef342dad79
remove spam 2018-02-22 12:14:53 -04:00
avdhusingh6497@d72e8319bb7c179778775a8b096b120fc219fbad
2259089eb9 Added a comment: iTunes Error 56 Apple 2018-02-22 11:51:41 +00:00
avdhusingh6497@d72e8319bb7c179778775a8b096b120fc219fbad
5bc1755971 Added a comment: iTunes Error 56 Apple 2018-02-22 11:48:40 +00:00
Joey Hess
7f7929939b
Merge branch 'master' of ssh://git-annex.branchable.com 2018-02-07 16:18:14 -04:00
Joey Hess
ed3b03184f
Merge branch 'EXTENSIONS' 2018-02-07 16:14:07 -04:00
yarikoptic
6b56cd1fcc Added a comment 2018-02-07 20:01:53 +00:00
Joey Hess
1f696ac30c
comment 2018-02-07 15:13:11 -04:00
Joey Hess
d884e5b6fe
Added EXTENSIONS to external special remote protocol.
Allows using new special remote messages when git-annex supports them,
and avoiding using them when git-annex is too old. The new INFO is one
such message.

There's also the possibility, currently unused, for the special remote's
reply to include some kind of extensions of its own.

Merging this is blocked by https://github.com/datalad/datalad/issues/2124
since it seems it will break datalad. I checked all the other special
remotes and they will be ok.

This commit was supported by the NSF-funded DataLad project.
2018-02-07 15:02:12 -04:00
yarikoptic
4abf473b52 Added a comment 2018-02-07 18:31:45 +00:00
Joey Hess
9a35831ac3
response 2018-02-07 12:47:07 -04:00
yarikoptic
08a41730bc Added a comment: protocol message 2018-02-06 20:03:27 +00:00
Joey Hess
6cdcb953be
reviewed all external special remotes for change feasability 2018-02-06 14:05:12 -04:00
Joey Hess
7d9f0e0fbe
Added INFO to external special remote protocol.
It's left up to the special remote to detect when git-annex is new enough
to support the message; an old git-annex will blow up.

This commit was supported by the NSF-funded DataLad project.
2018-02-06 13:03:55 -04:00
50.1.201.252
4e721af391 poll vote (DCIM directory (photos and videos only)) 2017-12-30 00:28:21 +00:00
85.144.94.148
7e563243ff poll vote (/sdcard/annex) 2017-10-16 21:50:31 +00:00
Joey Hess
6336caae3b
update 2017-09-18 14:51:32 -04:00