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

This commit is contained in:
Brian Warner 2009-02-08 19:56:02 -07:00
parent 89683a3906
commit 0b29aae7cf
2 changed files with 6 additions and 2 deletions

View File

@ -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": { },

View File

@ -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