storage servers should announce that they support over-read #596

Closed
opened 2009-01-28 04:55:11 +00:00 by zooko · 2 comments
zooko commented 2009-01-28 04:55:11 +00:00
Owner

Since changeset:6c4019ec33e7a253, storage servers have responded to an over-read (a read past the end of the data) by returning the valid span (up to the end of the data). Before that they raised an exception on over-read. Clients could use over-read for faster and nicer immutable file download, and the code to do so is in place in download.py and was tested, but is currently disabled. This ticket is to make storage servers announce that they support over-read by adding a field to their version structure -- [src/allmydata/storage.py@3405#L957]source:src/allmydata/storage.py@20090110015222-e01fd-2a38c9d081c07fc2a33f95101e07ec8fb69d5c46#L957. This would enable clients to use over-reads on servers that had declared themselves as supporting it.

Since changeset:6c4019ec33e7a253, storage servers have responded to an over-read (a read past the end of the data) by returning the valid span (up to the end of the data). Before that they raised an exception on over-read. Clients could use over-read for faster and nicer immutable file download, and the code to do so is in place in download.py and was tested, but is currently disabled. This ticket is to make storage servers announce that they support over-read by adding a field to their version structure -- [src/allmydata/storage.py@3405#L957]source:src/allmydata/storage.py@20090110015222-e01fd-2a38c9d081c07fc2a33f95101e07ec8fb69d5c46#L957. This would enable clients to use over-reads on servers that had declared themselves as supporting it.
tahoe-lafs added the
code-storage
major
enhancement
1.2.0
labels 2009-01-28 04:55:11 +00:00
tahoe-lafs added this to the undecided milestone 2009-01-28 04:55:11 +00:00
tahoe-lafs modified the milestone from undecided to 1.3.0 2009-02-02 13:38:36 +00:00
zooko commented 2009-02-03 20:35:09 +00:00
Author
Owner

I'm planning to do this for tahoe-1.3.0 if Brian (or someone) doesn't beat me to it.

I'm planning to do this for tahoe-1.3.0 if Brian (or someone) doesn't beat me to it.
warner commented 2009-02-09 01:59:10 +00:00
Author
Owner

I'll grab this one. Patch is in changeset:7cfc74bcc99d04be.

For future reference, changeset:0eb6b324a4fcda2f (on 21-Nov-2008) added
version-announcement to the storage server, and changeset:53b28c1650c74624 (on 03-Jan-2009) added
the over-read tolerance.

The boolean flag I'm adding is named "tolerates-immutable-read-overrun", so
client code should do the following:

v1 = rref.version["http://allmydata.org/tahoe/protocols/storage/v1"]
if v1.get("tolerates-immutable-read-overrun", False):
    use_overrunning_reads()
else:
    avoid_overrunning_reads()

I've updated VERSION_DEFAULTS, so modern clients will see the following
values for get("tolerates-immutable-read-overrun"):

  • before changeset:0eb6b324a4fcda2f: False
  • at or after changeset:0eb6b324a4fcda2f, before changeset:53b28c1650c74624: None
  • at or after changeset:53b28c1650c74624: True
I'll grab this one. Patch is in changeset:7cfc74bcc99d04be. For future reference, changeset:0eb6b324a4fcda2f (on 21-Nov-2008) added version-announcement to the storage server, and changeset:53b28c1650c74624 (on 03-Jan-2009) added the over-read tolerance. The boolean flag I'm adding is named "tolerates-immutable-read-overrun", so client code should do the following: ``` v1 = rref.version["http://allmydata.org/tahoe/protocols/storage/v1"] if v1.get("tolerates-immutable-read-overrun", False): use_overrunning_reads() else: avoid_overrunning_reads() ``` I've updated VERSION_DEFAULTS, so modern clients will see the following values for `get("tolerates-immutable-read-overrun")`: * before changeset:0eb6b324a4fcda2f: False * at or after changeset:0eb6b324a4fcda2f, before changeset:53b28c1650c74624: None * at or after changeset:53b28c1650c74624: True
tahoe-lafs added the
fixed
label 2009-02-09 01:59:10 +00:00
warner closed this issue 2009-02-09 01:59:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#596
No description provided.