]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
checker results: more tests, update interface docs
authorBrian Warner <warner@allmydata.com>
Wed, 10 Sep 2008 00:30:10 +0000 (17:30 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 10 Sep 2008 00:30:10 +0000 (17:30 -0700)
src/allmydata/interfaces.py
src/allmydata/test/test_system.py

index 9067694896fce3ac9660f51db82dbdb6c5aceb2a..16ce8689b080f11406b59f2832b9cc601e591117 100644 (file)
@@ -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
index aa85d397407d6cab70e533161ea924c4ca755f55..20e076695c9e562b36feb1000fae2160c9dd7bc5 100644 (file)
@@ -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):