From: Brian Warner Date: Wed, 10 Sep 2008 00:30:10 +0000 (-0700) Subject: checker results: more tests, update interface docs X-Git-Url: https://git.rkrishnan.org/listings/pb3calculator.py?a=commitdiff_plain;h=84a57785078169357c59e194da57cd5f3c8c0d34;p=tahoe-lafs%2Ftahoe-lafs.git checker results: more tests, update interface docs --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index 90676948..16ce8689 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -1560,11 +1560,20 @@ class ICheckerResults(Interface): 'seq%d-%s-sh%d', containing the sequence number, the roothash, and the share number. - Mutable files will add the following keys:: - - count-wrong-shares: the number of shares for versions other than - the 'best' one (highest sequence number, highest - roothash). These are either old ... + The following keys are most relevant for mutable files, but immutable + files will provide sensible values too:: + + count-wrong-shares: the number of shares for versions other than the + 'best' one (which is defined as being the + recoverable version with the highest sequence + number, then the highest roothash). These are + either leftover shares from an older version + (perhaps on a server that was offline when an + update occurred), shares from an unrecoverable + newer version, or shares from an alternate + current version that results from an + uncoordinated write collision. For a healthy + file, this will equal 0. count-recoverable-versions: the number of recoverable versions of the file. For a healthy file, this will diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index aa85d397..20e07669 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -2043,6 +2043,9 @@ class DeepCheck(SystemTestMixin, unittest.TestCase): sorted([idlib.nodeid_b2a(c.nodeid) for c in self.clients]), where) #self.failUnless("sharemap" in d) + self.failUnlessEqual(d["count-wrong-shares"], 0, where) + self.failUnlessEqual(d["count-recoverable-versions"], 1, where) + self.failUnlessEqual(d["count-unrecoverable-versions"], 0, where) def check_and_repair_is_healthy(self, cr, where):