From 68b7f9e979158dcb9f2fbc1bea74183c6897d46e Mon Sep 17 00:00:00 2001 From: David-Sarah Hopwood Date: Sat, 23 Mar 2013 03:10:50 +0000 Subject: [PATCH] Correct off-by-one in maximum-immutable-share-size for old servers. fixes #1781 Signed-off-by: David-Sarah Hopwood --- src/allmydata/storage_client.py | 2 +- src/allmydata/test/test_upload.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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": -- 2.45.2