From: Brian Warner Date: Mon, 9 Feb 2009 02:56:02 +0000 (-0700) Subject: storage #596: announce 'tolerates-immutable-read-overrun' to the version announcement... X-Git-Tag: allmydata-tahoe-1.3.0~61 X-Git-Url: https://git.rkrishnan.org/listings/pb1server.py?a=commitdiff_plain;h=0b29aae7cf29ea6c97fde45c9174c1a3ada1ce2f;p=tahoe-lafs%2Ftahoe-lafs.git storage #596: announce 'tolerates-immutable-read-overrun' to the version announcement, to indicate that a read() on an immutable share where offset+length is beyond the end of the file will return a truncated string instead of raising an exception --- diff --git a/src/allmydata/introducer/client.py b/src/allmydata/introducer/client.py index 7c7e8959..dac8bbd5 100644 --- a/src/allmydata/introducer/client.py +++ b/src/allmydata/introducer/client.py @@ -32,7 +32,9 @@ class RemoteServiceConnector: VERSION_DEFAULTS = { "storage": { "http://allmydata.org/tahoe/protocols/storage/v1" : - { "maximum-immutable-share-size": 2**32 }, + { "maximum-immutable-share-size": 2**32, + "tolerates-immutable-read-overrun": False, + }, "application-version": "unknown: no get_version()", }, "stub_client": { }, diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py index 0a15a123..8de5be3d 100644 --- a/src/allmydata/storage.py +++ b/src/allmydata/storage.py @@ -961,7 +961,9 @@ class StorageServer(service.MultiService, Referenceable): # guess. remaining_space = 2**64 version = { "http://allmydata.org/tahoe/protocols/storage/v1" : - { "maximum-immutable-share-size": remaining_space }, + { "maximum-immutable-share-size": remaining_space, + "tolerates-immutable-read-overrun": True, + }, "application-version": str(allmydata.__version__), } return version