Uploading a 20MB mutable fails in HTTP, but succeeds in Foolscap #3956
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#3956
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To reproduce: use benchmarks/upload_download.py from https://github.com/tahoe-lafs/tahoe-lafs/tree/3952-benchmarks, with a 20MB file. It'll run with Foolscap, but in HTTP:
That is, we're hitting a hard-coded size limit in the client code which presumably shouldn't be enforced given this works for Foolscap?
Mutable uploads get sent as CBOR, and we limit CBOR messages to 1MB cause we don't have streaming parsing or streaming validation at the moment.
Solutions might be:
cbor2
can parse from file, at least.In theory one could do terrible things with
mmap()
such that the Rust CDDL (which requiers a byte slice) can validate a file.But first... does the very flexible Foolscap mutable writing API actually use all that flexibility? If not, we might be able to simplify the HTTP protocol a lot.
The test vectors are "check strings", there's only one, and it looks like check strings are always short. But it's hard to be quite sure :( But plausibly saying "validation checks need to fit in an HTTP header" is actually a reasonable thing to try.
Digging deeper:
slot_testv_and_readv_and_writev
(as opposed) to proxying are two styles of mutable in mutable/layout.py.So: seems like moving all the test vectors and read vectors into a HTTP header would work just fine. And then the body can be just the new data, and does not need to be CBOR validated... assuming there is only ever one write in the write vector. So next will look into that.
MDMF has multiple entries in the write vector. So options are:
Next I will look into coalescing.
Coalescing is mostly OK, except! It's possible to do a write at an offset. So there will be holes, and when first creating a file a hole means null bytes (zeros), but later on it means "don't overwrite".
Given all the above, best bet is just:
In 7ef1c020/trunk: