mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
comment out some verbose log messages, add commented-out new ones
This commit is contained in:
parent
008e418523
commit
76e28b3484
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user