From: Brian Warner Date: Sun, 21 Jun 2009 04:12:09 +0000 (-0700) Subject: immutable/download: instrument do-you-have-block responses to investigate #732 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/%22doc.html/%3C?a=commitdiff_plain;h=a6caae9b5d366384dfc5578fd2965b0903ef333e;p=tahoe-lafs%2Ftahoe-lafs.git immutable/download: instrument do-you-have-block responses to investigate #732 --- diff --git a/src/allmydata/immutable/download.py b/src/allmydata/immutable/download.py index 39101c4c..1882a75e 100644 --- a/src/allmydata/immutable/download.py +++ b/src/allmydata/immutable/download.py @@ -5,7 +5,7 @@ from twisted.internet.interfaces import IPushProducer, IConsumer from twisted.application import service from foolscap.api import DeadReferenceError, RemoteException, eventually -from allmydata.util import base32, deferredutil, hashutil, log, mathutil +from allmydata.util import base32, deferredutil, hashutil, log, mathutil, idlib from allmydata.util.assertutil import _assert, precondition from allmydata import codec, hashtree, uri from allmydata.interfaces import IDownloadTarget, IDownloader, IFileURI, IVerifierURI, \ @@ -746,6 +746,9 @@ class CiphertextDownloader(log.PrefixingLogMixin): dl = [] sb = self._storage_broker for (peerid,ss) in sb.get_servers(self._storage_index): + self.log(format="sending DYHB to [%(peerid)s]", + peerid=idlib.shortnodeid_b2a(peerid), + level=log.NOISY, umid="rT03hg") d = ss.callRemote("get_buckets", self._storage_index) d.addCallbacks(self._got_response, self._got_error, callbackArgs=(peerid,)) @@ -759,6 +762,10 @@ class CiphertextDownloader(log.PrefixingLogMixin): return defer.DeferredList(dl) def _got_response(self, buckets, peerid): + self.log(format="got results from [%(peerid)s]: shnums %(shnums)s", + peerid=idlib.shortnodeid_b2a(peerid), + shnums=sorted(buckets.keys()), + level=log.NOISY, umid="o4uwFg") self._responses_received += 1 if self._results: elapsed = time.time() - self._started