Rev 3808: Properly remove keys that are found in the page cache. And add some debugging. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/remap

John Arbash Meinel john at arbash-meinel.com
Wed Dec 24 16:52:24 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/brisbane/remap

------------------------------------------------------------
revno: 3808
revision-id: john at arbash-meinel.com-20081209231116-6lm0mt17pxieb18x
parent: john at arbash-meinel.com-20081209063920-y7dofjycpl6m946l
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: xml_cache
timestamp: Tue 2008-12-09 17:11:16 -0600
message:
  Properly remove keys that are found in the page cache. And add some debugging.
-------------- next part --------------
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py	2008-12-09 06:39:20 +0000
+++ b/bzrlib/chk_map.py	2008-12-09 23:11:16 +0000
@@ -462,7 +462,9 @@
             elements = line.split('\x00', width)
             items[tuple(elements[:-1])] = elements[-1]
         if len(items) != length:
-            raise AssertionError("item count mismatch")
+            import pdb; pdb.set_trace()
+            raise AssertionError("item count (%d) mismatch for key %s,"
+                " bytes %r" % (length, key, bytes))
         result._items = items
         result._len = length
         result._maximum_size = maximum_size
@@ -990,6 +992,7 @@
                 except KeyError:
                     continue
                 else:
+                    found_keys.add(chk)
                     node = _deserialise(bytes, chk)
                     self._items[prefix] = node
                     if isinstance(node, InternalNode):



More information about the bazaar-commits mailing list