From: Brian Warner Date: Wed, 18 Apr 2007 03:25:52 +0000 (-0700) Subject: comment out some verbose log messages, add commented-out new ones X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~74 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/frontends/%22doc.html?a=commitdiff_plain;h=76e28b34840bf08ab1f08fe086ff4f2f944b3902;p=tahoe-lafs%2Ftahoe-lafs.git comment out some verbose log messages, add commented-out new ones --- diff --git a/src/allmydata/download.py b/src/allmydata/download.py index e668dde8..44076caf 100644 --- a/src/allmydata/download.py +++ b/src/allmydata/download.py @@ -105,8 +105,22 @@ class ValidatedBucket: except (hashtree.BadHashError, hashtree.NotEnoughHashesError): # log.WEIRD: indicates undetected disk/network error, or more # likely a programming error - log.msg("hash failure in shnum=%d on %s" % (self.sharenum, - self.bucket)) + log.msg("hash failure in block=%d, shnum=%d on %s" % + (blocknum, self.sharenum, self.bucket)) + #log.msg(" block length: %d" % len(blockdata)) + #log.msg(" block hash: %s" % idlib.b2a_or_none(blockhash)) # not safe + #log.msg(" block data: %r" % (blockdata,)) + #log.msg(" root hash: %s" % idlib.b2a(self._roothash)) + #log.msg(" share hash tree:\n" + self.share_hash_tree.dump()) + #log.msg(" block hash tree:\n" + self.block_hash_tree.dump()) + #lines = [] + #for i,h in sorted(sharehashes): + # lines.append("%3d: %s" % (i, idlib.b2a_or_none(h))) + #log.msg(" sharehashes:\n" + "\n".join(lines) + "\n") + #lines = [] + #for i,h in enumerate(blockhashes): + # lines.append("%3d: %s" % (i, idlib.b2a_or_none(h))) + #log.msg(" blockhashes:\n" + "\n".join(lines) + "\n") raise # If we made it here, the block is good. If the hash trees didn't diff --git a/src/allmydata/upload.py b/src/allmydata/upload.py index ca5c72f5..62fd5d79 100644 --- a/src/allmydata/upload.py +++ b/src/allmydata/upload.py @@ -51,7 +51,7 @@ class PeerTracker: return d def _got_reply(self, (alreadygot, buckets)): - log.msg("%s._got_reply(%s)" % (self, (alreadygot, buckets))) + #log.msg("%s._got_reply(%s)" % (self, (alreadygot, buckets))) self.buckets.update(buckets) return (alreadygot, set(buckets.keys())) @@ -200,7 +200,7 @@ class FileUploader: # sets into sets.Set on us, even when we're using 2.4 alreadygot = set(alreadygot) allocated = set(allocated) - log.msg("%s._got_response(%s, %s, %s): self.unallocated_sharenums: %s, unhandled: %s" % (self, (alreadygot, allocated), peer, shares_we_requested, self.unallocated_sharenums, shares_we_requested - alreadygot - allocated)) + #log.msg("%s._got_response(%s, %s, %s): self.unallocated_sharenums: %s, unhandled: %s" % (self, (alreadygot, allocated), peer, shares_we_requested, self.unallocated_sharenums, shares_we_requested - alreadygot - allocated)) self.unallocated_sharenums -= alreadygot self.unallocated_sharenums -= allocated @@ -208,7 +208,7 @@ class FileUploader: self.used_peers.add(peer) if shares_we_requested - alreadygot - allocated: - log.msg("%s._got_response(%s, %s, %s): self.unallocated_sharenums: %s, unhandled: %s HE'S FULL" % (self, (alreadygot, allocated), peer, shares_we_requested, self.unallocated_sharenums, shares_we_requested - alreadygot - allocated)) + #log.msg("%s._got_response(%s, %s, %s): self.unallocated_sharenums: %s, unhandled: %s HE'S FULL" % (self, (alreadygot, allocated), peer, shares_we_requested, self.unallocated_sharenums, shares_we_requested - alreadygot - allocated)) # Then he didn't accept some of the shares, so he's full. self.usable_peers.remove(peer)