Opened at 2009-01-28T04:55:11Z
Closed at 2009-02-09T01:59:10Z
#596 closed enhancement (fixed)
storage servers should announce that they support over-read
Reported by: | zooko | Owned by: | zooko |
---|---|---|---|
Priority: | major | Milestone: | 1.3.0 |
Component: | code-storage | Version: | 1.2.0 |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
Since 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. This would enable clients to use over-reads on servers that had declared themselves as supporting it.
Change History (3)
comment:1 Changed at 2009-02-02T13:38:36Z by zooko
- Milestone changed from undecided to 1.3.0
comment:2 Changed at 2009-02-03T20:35:09Z by zooko
- Owner set to zooko
- Status changed from new to assigned
comment:3 Changed at 2009-02-09T01:59:10Z by warner
- Resolution set to fixed
- Status changed from assigned to closed
I'll grab this one. Patch is in 7cfc74bcc99d04be.
For future reference, 0eb6b324a4fcda2f (on 21-Nov-2008) added version-announcement to the storage server, and 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 0eb6b324a4fcda2f: False
- at or after 0eb6b324a4fcda2f, before 53b28c1650c74624: None
- at or after 53b28c1650c74624: True
I'm planning to do this for tahoe-1.3.0 if Brian (or someone) doesn't beat me to it.