From: Zooko O'Whielacronx Date: Fri, 28 Oct 2011 22:03:49 +0000 (+0000) Subject: undo the effects of a patch I hadn't intended to commit, named "debugprint the values... X-Git-Tag: allmydata-tahoe-1.9.0~17 X-Git-Url: https://git.rkrishnan.org/webform_css?a=commitdiff_plain;h=d9c1064d42a322b58d3243923d95fd56235d7c89;p=tahoe-lafs%2Ftahoe-lafs.git undo the effects of a patch I hadn't intended to commit, named "debugprint the values of blocks and hashes thereof; make the test data and the seg size small in order to make the debugprints easy to look at" rolling back: Thu Sep 29 23:46:28 MDT 2011 zooko@zooko.com * debugprint the values of blocks and hashes thereof; make the test data and the seg size small in order to make the debugprints easy to look at M ./src/allmydata/mutable/publish.py -1 +2 M ./src/allmydata/mutable/retrieve.py +3 M ./src/allmydata/test/test_mutable.py -2 +2 --- diff --git a/src/allmydata/mutable/publish.py b/src/allmydata/mutable/publish.py index 5eb4206d..87854cba 100644 --- a/src/allmydata/mutable/publish.py +++ b/src/allmydata/mutable/publish.py @@ -25,7 +25,7 @@ from allmydata.mutable.layout import get_version_from_checkstring,\ SDMFSlotWriteProxy KiB = 1024 -DEFAULT_MAX_SEGMENT_SIZE = 64 +DEFAULT_MAX_SEGMENT_SIZE = 128 * KiB PUSHING_BLOCKS_STATE = 0 PUSHING_EVERYTHING_ELSE_STATE = 1 DONE_STATE = 2 @@ -763,7 +763,6 @@ class Publish: hashed = sharedata block_hash = hashutil.block_hash(hashed) self.blockhashes[shareid][segnum] = block_hash - log.msg("yyy 0 shareid: %s, segnum: %s, blockhash: %s, sharedata: %s, salt: %s" % (shareid, segnum, base32.b2a(block_hash), base32.b2a(sharedata), base32.b2a(salt),)) # find the writer for this share writer = self.writers[shareid] writer.put_block(sharedata, segnum, salt) diff --git a/src/allmydata/mutable/retrieve.py b/src/allmydata/mutable/retrieve.py index 9419ede6..0e507704 100644 --- a/src/allmydata/mutable/retrieve.py +++ b/src/allmydata/mutable/retrieve.py @@ -772,9 +772,6 @@ class Retrieve: sharehashes[1].keys()) bht = self._block_hash_trees[reader.shnum] - for bhk, bhv in blockhashes.iteritems(): - log.msg("xxx 0 blockhash: %s %s" % (bhk, base32.b2a(bhv),)) - if bht.needed_hashes(segnum, include_leaf=True): try: bht.set_hashes(blockhashes) diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py index 0facb7d8..980e8451 100644 --- a/src/allmydata/test/test_mutable.py +++ b/src/allmydata/test/test_mutable.py @@ -2872,7 +2872,7 @@ class Version(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin, \ self.set_up_grid() self.c = self.g.clients[0] self.nm = self.c.nodemaker - self.data = "test data" * 32 # about 900 KiB; MDMF + self.data = "test data" * 100000 # about 900 KiB; MDMF self.small_data = "test data" * 10 # about 90 B; SDMF @@ -3245,7 +3245,7 @@ class Update(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin): self.set_up_grid() self.c = self.g.clients[0] self.nm = self.c.nodemaker - self.data = "testdata " * 30 # about 900 KiB; MDMF + self.data = "testdata " * 100000 # about 900 KiB; MDMF self.small_data = "test data" * 10 # about 90 B; SDMF