From: Brian Warner Date: Wed, 27 Aug 2008 00:37:29 +0000 (-0700) Subject: servermap: don't log late arrivals, and don't log DeadReferenceError at log.WEIRD X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/sitemap.html?a=commitdiff_plain;h=3b06aa6a79dd26cc44a4004e84929b690eafd7d3;p=tahoe-lafs%2Ftahoe-lafs.git servermap: don't log late arrivals, and don't log DeadReferenceError at log.WEIRD --- diff --git a/src/allmydata/mutable/servermap.py b/src/allmydata/mutable/servermap.py index 30642c74..3f18b12b 100644 --- a/src/allmydata/mutable/servermap.py +++ b/src/allmydata/mutable/servermap.py @@ -4,6 +4,7 @@ from zope.interface import implements from itertools import count from twisted.internet import defer from twisted.python import failure +from foolscap import DeadReferenceError from foolscap.eventual import eventually from allmydata.util import base32, hashutil, idlib, log from allmydata import storage @@ -695,11 +696,14 @@ class ServermapUpdater: def _query_failed(self, f, peerid): - self.log(format="error during query: %(f_value)s", - f_value=str(f.value), failure=f, - level=log.WEIRD, umid="IHXuQg") if not self._running: return + level = log.WEIRD + if f.check(DeadReferenceError): + level = log.UNUSUAL + self.log(format="error during query: %(f_value)s", + f_value=str(f.value), failure=f, + level=level, umid="IHXuQg") self._must_query.discard(peerid) self._queries_outstanding.discard(peerid) self._bad_peers.add(peerid) @@ -725,12 +729,14 @@ class ServermapUpdater: def _privkey_query_failed(self, f, peerid, shnum, lp): self._queries_outstanding.discard(peerid) - self.log(format="error during privkey query: %(f_value)s", - f_value=str(f.value), failure=f, - parent=lp, level=log.WEIRD, umid="McoJ5w") if not self._running: return - self._queries_outstanding.discard(peerid) + level = log.WEIRD + if f.check(DeadReferenceError): + level = log.UNUSUAL + self.log(format="error during privkey query: %(f_value)s", + f_value=str(f.value), failure=f, + parent=lp, level=level, umid="McoJ5w") self._servermap.problems.append(f) self._last_failure = f