mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 01:38:55 +00:00
copy the rest of David-Sarah's changes to make my tree match 1.8.0beta
This commit is contained in:
parent
20847dd876
commit
919938dd95
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user