From f5f0ce2477b68e7f9717808826934807ee31a3e3 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Mon, 9 Nov 2020 13:41:03 -0500 Subject: [PATCH] Re-enable sorting. --- src/allmydata/mutable/checker.py | 2 +- src/allmydata/mutable/publish.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/mutable/checker.py b/src/allmydata/mutable/checker.py index 536bc68f1..56b8fb2cc 100644 --- a/src/allmydata/mutable/checker.py +++ b/src/allmydata/mutable/checker.py @@ -187,7 +187,7 @@ class MutableChecker(object): if self.bad_shares: report.append("Corrupt Shares:") summary.append("Corrupt Shares:") - for (server, shnum, f) in self.bad_shares: + for (server, shnum, f) in sorted(self.bad_shares, key=id): serverid = server.get_serverid() locator = (server, self._storage_index, shnum) corrupt_share_locators.append(locator) diff --git a/src/allmydata/mutable/publish.py b/src/allmydata/mutable/publish.py index 4ba675e56..187aa98bd 100644 --- a/src/allmydata/mutable/publish.py +++ b/src/allmydata/mutable/publish.py @@ -901,7 +901,7 @@ class Publish(object): def log_goal(self, goal, message=""): logmsg = [message] - for (shnum, server) in [(s,p) for (p,s) in goal]: + for (shnum, server) in sorted([(s,p) for (p,s) in goal]): logmsg.append("sh%d to [%s]" % (shnum, server.get_name())) self.log("current goal: %s" % (", ".join(logmsg)), level=log.NOISY) self.log("we are planning to push new seqnum=#%d" % self._new_seqnum,