From: David-Sarah Hopwood Date: Sat, 23 Mar 2013 03:10:50 +0000 (+0000) Subject: Correct off-by-one in maximum-immutable-share-size for old servers. fixes #1781 X-Git-Tag: allmydata-tahoe-1.10a2~3 X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=68b7f9e979158dcb9f2fbc1bea74183c6897d46e;p=tahoe-lafs%2Ftahoe-lafs.git Correct off-by-one in maximum-immutable-share-size for old servers. fixes #1781 Signed-off-by: David-Sarah Hopwood --- diff --git a/src/allmydata/storage_client.py b/src/allmydata/storage_client.py index a0cd7dda..39753e0c 100644 --- a/src/allmydata/storage_client.py +++ b/src/allmydata/storage_client.py @@ -178,7 +178,7 @@ class NativeStorageServer: VERSION_DEFAULTS = { "http://allmydata.org/tahoe/protocols/storage/v1" : - { "maximum-immutable-share-size": 2**32, + { "maximum-immutable-share-size": 2**32 - 1, "maximum-mutable-share-size": 2*1000*1000*1000, # maximum prior to v1.9.2 "tolerates-immutable-read-overrun": False, "delete-mutable-shares-with-zero-length-writev": False, diff --git a/src/allmydata/test/test_upload.py b/src/allmydata/test/test_upload.py index 20524ef0..7d65926c 100644 --- a/src/allmydata/test/test_upload.py +++ b/src/allmydata/test/test_upload.py @@ -106,7 +106,7 @@ class FakeStorageServer: self.allocated = [] self.queries = 0 self.version = { "http://allmydata.org/tahoe/protocols/storage/v1" : - { "maximum-immutable-share-size": 2**32 }, + { "maximum-immutable-share-size": 2**32 - 1 }, "application-version": str(allmydata.__full_version__), } if mode == "small":