Commit graph

45321 commits

Author SHA1 Message Date
Joey Hess
d5eaf0f567
improve clientKeepLocked 2024-07-22 16:56:44 -04:00
Joey Hess
10682eb882
variable name 2024-07-22 16:50:11 -04:00
Joey Hess
8a48d08abd
refactor 2024-07-22 16:49:05 -04:00
Joey Hess
8d36e597f1
finished clientGet validity checking 2024-07-22 16:31:39 -04:00
Joey Hess
48eb6671e4
improve clientGet types 2024-07-22 16:23:08 -04:00
Joey Hess
b697c6b9da
fix TMVar left full crash affecting servePutOffset
Problem is that whatever is reading from the TMVar may not have read
from it yet before the client writes the next thing to it.
2024-07-22 15:48:46 -04:00
Joey Hess
3069e28dd8
implemented servePutOffset and clientPutOffset
But, it's buggy: the server hangs without processing the VALIDITY,
and I can't seem to work out why. As far as I can see, storefile
is getting as far as running the validitycheck, which is supposed to
read that, but never does.

This is especially strange because what seems like the same protocol
doesn't hang when servePut runs it. This made me think that it needed
to use inAnnexWorker to be more like servePut, but that didn't help.

Another small problem with this is that it does create an empty
.git/annex/tmp/ file for the key. Since this will usually be used in
combination with servePut, that doesn't seem worth worrying about much.
2024-07-22 15:04:10 -04:00
Joey Hess
c36b9cd1fc
fix crash in servePut when client sends from too high offset
Have to consume all the content from the client, but force an Invalid
result, so it will just get discarded.
2024-07-22 13:12:15 -04:00
Joey Hess
b240a11b79
clientPut seeking to offset 2024-07-22 12:50:21 -04:00
Joey Hess
a01426b713
avoid padding in servePut
This means that when the client sends a truncated data to indicate
invalidity, DATA is not passed the full expected data. That leaves the
P2P connection in a state where it cannot be reused. While so far, they
are not reused, they will be later when proxies are supported. So, have
to close the P2P connection in this situation.
2024-07-22 12:30:30 -04:00
Joey Hess
efa0efdc44
avoid padding in clientPut
Instead truncate when necessary to indicate invalid content was sent.
Very similar to how serveGet handles it.
2024-07-22 11:47:24 -04:00
Joey Hess
726c815a7f
fix releasing of p2p connection 2024-07-22 11:26:22 -04:00
Joey Hess
72d0769ca5
avoid padding content in serveGet
Always truncate instead. The padding risked something not noticing the
content was bad and getting a file that was corrupted in a novel way
with the padding "X" at the end. A truncated file is better.
2024-07-22 11:19:52 -04:00
Joey Hess
4826a3745d
servePut and clientPut implementation
Made the data-length header required even for v0. This simplifies the
implementation, and doesn't preclude extra verification being done for
v0.

The connectionWaitVar is an ugly hack. In servePut, nothing waits
on the waitvar, and I could not find a good way to make anything wait on
it.
2024-07-22 10:27:44 -04:00
adehnert
8eadd02b52 Added a comment: git-annex for managing music 2024-07-21 19:08:45 +00:00
adehnert
12bc3ca2a7 2024-07-21 18:17:25 +00:00
adehnert
2b96f62ada 2024-07-21 18:17:11 +00:00
adehnert
264366f45d 2024-07-21 18:15:11 +00:00
adehnert
024b331a4b 2024-07-21 18:14:28 +00:00
adehnert
40c930a381 2024-07-21 18:14:03 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
1ee30b29ee Added a comment 2024-07-21 12:38:12 +00:00
adehnert
b143cb686d Added a comment: git annex sync --ff-only 2024-07-21 01:04:44 +00:00
nobodyinperson
b920655acd Added a comment: Also Serveo.net 2024-07-19 15:21:19 +00:00
kdm9
8a7fc275cb Added a comment 2024-07-19 13:11:05 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
2878343354 2024-07-19 12:12:56 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
a2ab2f70ea Added a comment 2024-07-19 08:26:31 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
b1db5115e0 Added a comment 2024-07-17 14:07:32 +00:00
yarikoptic
ba4d545776 reporting FTBFS on windows 2024-07-16 15:58:50 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
1287e4590f 2024-07-16 15:42:54 +00:00
mih
5bc00a55dd 2024-07-16 15:02:46 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
3590a17f9e Added a comment 2024-07-16 09:21:54 +00:00
nobodyinperson
a79176341d Added a comment 2024-07-15 18:32:36 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
cce86415b1 Added a comment 2024-07-15 15:18:28 +00:00
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92
8ec34ea2a1 2024-07-15 14:57:26 +00:00
xentac
8102bf5fe2 Added a comment 2024-07-12 23:49:33 +00:00
xentac
df97c82c44 2024-07-12 23:37:36 +00:00
ashton@37fa3fec6d2eef022a3491c85362a34141fbf0db
af4d90eea8 2024-07-12 08:11:56 +00:00
ashton@37fa3fec6d2eef022a3491c85362a34141fbf0db
60eae008d8 2024-07-12 08:11:30 +00:00
ashton@37fa3fec6d2eef022a3491c85362a34141fbf0db
ed11ce6fcb 2024-07-12 08:08:22 +00:00
Joey Hess
eb4fb388bd
only base64 non-utf8 2024-07-11 15:47:16 -04:00
Joey Hess
b290a72025
update deps 2024-07-11 14:51:45 -04:00
Joey Hess
97a2d0e4fb
use worker pool in withLocalP2PConnections
This allows multiple clients to be handled at the same time.
2024-07-11 14:37:52 -04:00
Joey Hess
68227154fb
switch HTTP P2P protocol to base64url
Base64 can include '/', and with UUIDs and keys both used in routes,
the encoding needs to avoid that. Use base64url everywhere in the HTTP
protocol for consistency.
2024-07-11 12:31:41 -04:00
Joey Hess
fc90270ba0
roughed in servePut 2024-07-11 12:20:07 -04:00
Joey Hess
1cff4c9f5b
oops, 2 datalength headers for put route 2024-07-11 12:12:33 -04:00
Joey Hess
3a55f0eec3
use DataLength 2024-07-11 11:57:55 -04:00
Joey Hess
14e0f778b7
simplify 2024-07-11 11:50:44 -04:00
Joey Hess
2228d56db3
serveGet invalidation 2024-07-11 11:42:32 -04:00
Joey Hess
80d2ffc79a
implement generic get server 2024-07-11 11:26:03 -04:00
Joey Hess
a7383b5c59
move serveruuid into routes
In particular the generic get route needs it, so that when a single http
server is serving multiple repositories, it knows what repository to
use.
2024-07-11 11:19:20 -04:00