Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
03ac448d
Commit
03ac448d
authored
May 14, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
13d92f95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+11
-18
No files found.
wcfs/internal/xbtree.py
View file @
03ac448d
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment