Commit 03ac448d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 13d92f95
......@@ -828,27 +828,20 @@ def _zclassify(znode): # -> _ZNodeType
# _bcheck performs full consistency checks on ztree provided by ZODB.
#
# The checks are what is provided by BTree.check and node._check().
#class _ZChecker(zbcheck.Checker):
# def visit_btree(self, obj, *argv):
# #super(_ZChecker, self).visit_btree(obj, *argv) zbcheck.Checker is old-style class
# zbcheck.Checker.visit_btree(self, obj, *argv)
# obj._check() # also check internal C-level pointers consistency
#
# # no need to amend visit_bucket - there is no Bucket._check
# """
# def visit_bucket(self, obj, *argv):
# #super(_ZChecker, self).visit_bucket(obj, *argv)
# zbcheck.Checker.visit_bucket(self, obj, *argv)
# obj._check() # ----//-----
# """
def _bcheck(ztree):
#_ZChecker(ztree).check()
# verify internal C-level pointers consistency (valid to call only on root node)
# verify internal C-level pointers consistency.
#
# Only valid to be called on root node and verifies whole tree.
# If called on a non-root node will lead to assert "Bucket next pointer is
# damaged" since it calls BTree_check_inner(ztree, next_bucket=nil)
# assuming ztree is a root tree node, and its rightmost bucket should
# indeed have ->next=nil. If ztree is not root, there can be right-adjacent
# part of the tree, to which ztree's rightmost bucket must be linking to
# via its ->next.
ztree._check()
zbcheck.check(ztree) # verify nodes values consistency
# verify nodes values consistency
zbcheck.check(ztree)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment