From: Daira Hopwood Date: Thu, 5 Sep 2013 17:01:02 +0000 (+0100) Subject: Wed Dec 28 05:50:18 GMT 2011 Brian Warner X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/module-simplejson.decoder.html?a=commitdiff_plain;h=265c816e4ed418aefe9d4d539438586ace25f657;p=tahoe-lafs%2Ftahoe-lafs.git Wed Dec 28 05:50:18 GMT 2011 Brian Warner * mutable publish: fix not-enough-shares detection. Refs #1628. This should match the "fix-1628.darcs.2.patch" attachment on that ticket. --- diff --git a/src/allmydata/mutable/publish.py b/src/allmydata/mutable/publish.py index 392495c1..c611a6f9 100644 --- a/src/allmydata/mutable/publish.py +++ b/src/allmydata/mutable/publish.py @@ -622,10 +622,9 @@ class Publish: # Can we still successfully publish this file? # TODO: Keep track of outstanding queries before aborting the # process. - all_writers = [] - for shnum, writers in self.writers.iteritems(): - all_writers.extend(writers) - if len(all_writers) < self.required_shares or self.surprised: + all_shnums = filter(lambda sh: len(self.writers[sh]) > 0, + self.writers.iterkeys()) + if len(all_shnums) < self.required_shares or self.surprised: return self._failure() # Figure out what we need to do next. Each of these needs to