From: Brian Warner Date: Thu, 17 Apr 2008 00:55:17 +0000 (-0700) Subject: mutable WIP: publish status doesn't know its size early enough to update the stats_pr... X-Git-Tag: allmydata-tahoe-1.1.0~237 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/class-simplejson.JSONDecoder-index.html?a=commitdiff_plain;h=f35f20e10b396af2aea812034ada88b78b5a4fd2;p=tahoe-lafs%2Ftahoe-lafs.git mutable WIP: publish status doesn't know its size early enough to update the stats_provider --- diff --git a/src/allmydata/mutable/node.py b/src/allmydata/mutable/node.py index c19e0396..31ae0136 100644 --- a/src/allmydata/mutable/node.py +++ b/src/allmydata/mutable/node.py @@ -342,7 +342,11 @@ class MutableWatcher(service.MultiService): self._recent_publish_status.append(p) if self.stats_provider: self.stats_provider.count('mutable.files_published', 1) - self.stats_provider.count('mutable.bytes_published', p.get_size()) + # bytes_published can't be handled here, because the + # publish_status does not yet know how much data it will be asked + # to send. TODO: figure out a clean way to do this that doesn't + # make MDMF harder. + #self.stats_provider.count('mutable.bytes_published', p.get_size()) while len(self._recent_publish_status) > self.MAX_PUBLISH_STATUSES: self._recent_publish_status.pop(0)