[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3915: Size passed to IStorageServer.allocate_bytes is bigger than actual share size
Tahoe-LAFS
trac at tahoe-lafs.org
Mon Aug 15 18:41:28 UTC 2022
#3915: Size passed to IStorageServer.allocate_bytes is bigger than actual share
size
----------------------+---------------------------------------
Reporter: itamarst | Owner:
Type: defect | Status: new
Priority: normal | Milestone: HTTP Storage Protocol
Component: unknown | Version: n/a
Keywords: | Launchpad Bug:
----------------------+---------------------------------------
`immutable/layout.py` calculates share size using the _maximum_ possible
URI extension size. The actual share has a specific, typically smaller URI
extension size (as generated in `immutable/encode.py`). So
`IBucketWriter.close()` is called after sending fewer bytes than were
claimed in `allocate_buckets()`.
For Foolscap this works, however ugly it is. For current HTTP storage
protocol, this does not.
Instead of fixing the HTTP protocol to have a notion of "closing early",
seems better to just fix the size calculation so it uses the actual size
of the URI extension.
Note that there may be additional sources of discrepancy :(
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3915>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list