From: Brian Warner Date: Wed, 4 Aug 2010 07:27:52 +0000 (-0700) Subject: copy the rest of David-Sarah's changes to make my tree match 1.8.0beta X-Git-Tag: allmydata-tahoe-1.8.0b2~16 X-Git-Url: https://git.rkrishnan.org/frontends/specifications/something?a=commitdiff_plain;h=919938dd95ded529e77ad3dd34059c19f6dc2ebc;p=tahoe-lafs%2Ftahoe-lafs.git copy the rest of David-Sarah's changes to make my tree match 1.8.0beta --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index 3a7fa7fa..bf10a35a 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -15,6 +15,8 @@ URI = StringConstraint(300) # kind of arbitrary MAX_BUCKETS = 256 # per peer -- zfec offers at most 256 shares per file +DEFAULT_MAX_SEGMENT_SIZE = 128*1024 + ShareData = StringConstraint(None) URIExtensionData = StringConstraint(1000) Number = IntegerConstraint(8) # 2**(8*8) == 16EiB ~= 18e18 ~= 18 exabytes @@ -24,9 +26,6 @@ WriteEnablerSecret = Hash # used to protect mutable bucket modifications LeaseRenewSecret = Hash # used to protect bucket lease renewal requests LeaseCancelSecret = Hash # used to protect bucket lease cancellation requests -KiB = 1024 -DEFAULT_MAX_SEGMENT_SIZE = 128*KiB - class RIStubClient(RemoteInterface): """Each client publishes a service announcement for a dummy object called the StubClient. This object doesn't actually offer any services, but the diff --git a/src/allmydata/test/test_hung_server.py b/src/allmydata/test/test_hung_server.py index 8856ce22..4ef4d20d 100644 --- a/src/allmydata/test/test_hung_server.py +++ b/src/allmydata/test/test_hung_server.py @@ -9,7 +9,7 @@ from allmydata.immutable import upload from allmydata.mutable.common import UnrecoverableFileError from allmydata.storage.common import storage_index_to_dir from allmydata.test.no_network import GridTestMixin -from allmydata.test.common import ShouldFailMixin, _corrupt_share_data +from allmydata.test.common import ShouldFailMixin from allmydata.util.pollmixin import PollMixin from allmydata.interfaces import NotEnoughSharesError @@ -20,7 +20,8 @@ class HungServerDownloadTest(GridTestMixin, ShouldFailMixin, PollMixin, unittest.TestCase): # Many of these tests take around 60 seconds on François's ARM buildslave: # http://tahoe-lafs.org/buildbot/builders/FranXois%20lenny-armv5tel - # allmydata.test.test_hung_server.HungServerDownloadTest.test_2_good_8_broken_duplicate_share_fail once ERRORed after 197 seconds on Midnight Magic's NetBSD buildslave: + # allmydata.test.test_hung_server.HungServerDownloadTest.test_2_good_8_broken_duplicate_share_fail + # once ERRORed after 197 seconds on Midnight Magic's NetBSD buildslave: # http://tahoe-lafs.org/buildbot/builders/MM%20netbsd4%20i386%20warp # MM's buildslave varies a lot in how long it takes to run tests. diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py index 48d4711d..0f973363 100644 --- a/src/allmydata/test/test_util.py +++ b/src/allmydata/test/test_util.py @@ -1894,7 +1894,7 @@ class SimpleDataSpans: self.add(start, data) def __len__(self): - return len(self.missing.translate(None, "1")) + return len(self.missing.replace("1", "")) def _dump(self): return [i for (i,c) in enumerate(self.missing) if c == "0"] def _have(self, start, length): diff --git a/src/allmydata/util/spans.py b/src/allmydata/util/spans.py index 2a199f07..b09244c8 100755 --- a/src/allmydata/util/spans.py +++ b/src/allmydata/util/spans.py @@ -314,7 +314,7 @@ class DataSpans: # A). We handle E by replacing the middle and terminating. if start < s_start: # case A: insert a new span, then loop with the remainder - #print " insert new psan" + #print " insert new span" s_len = s_start-start self.spans.insert(i, (start, data[:s_len])) i += 1 diff --git a/src/allmydata/web/status.py b/src/allmydata/web/status.py index c3a55d7e..636a2db9 100644 --- a/src/allmydata/web/status.py +++ b/src/allmydata/web/status.py @@ -427,7 +427,7 @@ class DownloadStatusPage(DownloadResultsRendererMixin, rend.Page): T.td["speed"]]] for r_ev in self.download_status.read_events: (start, length, requesttime, finishtime, bytes, decrypt, paused) = r_ev - print r_ev + #print r_ev if finishtime is not None: rtt = finishtime - requesttime - paused speed = self.render_rate(None, 1.0 * bytes / rtt)