Commit 496019d6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 14317e58
// TODO implement btree checking a-la ztree._check + BTrees.check.check
package btree
...@@ -204,6 +204,8 @@ func (t *IOBTree) VGet(ctx context.Context, key int32, visit func(node IONode)) ...@@ -204,6 +204,8 @@ func (t *IOBTree) VGet(ctx context.Context, key int32, visit func(node IONode))
return nil, false, err return nil, false, err
} }
// XXX verify child keys are in valid range according to parent
if visit != nil { if visit != nil {
visit(child) visit(child)
} }
...@@ -278,6 +280,8 @@ func (t *IOBTree) VMinKey(ctx context.Context, visit func(node IONode)) (_ int32 ...@@ -278,6 +280,8 @@ func (t *IOBTree) VMinKey(ctx context.Context, visit func(node IONode)) (_ int32
visit(child) visit(child)
} }
// XXX verify child keys are in valid range according to parent
switch child := child.(type) { switch child := child.(type) {
case *IOBTree: case *IOBTree:
t = child t = child
...@@ -331,6 +335,8 @@ func (t *IOBTree) VMaxKey(ctx context.Context, visit func(node IONode)) (_ int32 ...@@ -331,6 +335,8 @@ func (t *IOBTree) VMaxKey(ctx context.Context, visit func(node IONode)) (_ int32
visit(child) visit(child)
} }
// XXX verify child keys are in valid range according to parent
switch child := child.(type) { switch child := child.(type) {
case *IOBTree: case *IOBTree:
t = child t = child
......
...@@ -204,6 +204,8 @@ func (t *LOBTree) VGet(ctx context.Context, key int64, visit func(node LONode)) ...@@ -204,6 +204,8 @@ func (t *LOBTree) VGet(ctx context.Context, key int64, visit func(node LONode))
return nil, false, err return nil, false, err
} }
// XXX verify child keys are in valid range according to parent
if visit != nil { if visit != nil {
visit(child) visit(child)
} }
...@@ -278,6 +280,8 @@ func (t *LOBTree) VMinKey(ctx context.Context, visit func(node LONode)) (_ int64 ...@@ -278,6 +280,8 @@ func (t *LOBTree) VMinKey(ctx context.Context, visit func(node LONode)) (_ int64
visit(child) visit(child)
} }
// XXX verify child keys are in valid range according to parent
switch child := child.(type) { switch child := child.(type) {
case *LOBTree: case *LOBTree:
t = child t = child
...@@ -331,6 +335,8 @@ func (t *LOBTree) VMaxKey(ctx context.Context, visit func(node LONode)) (_ int64 ...@@ -331,6 +335,8 @@ func (t *LOBTree) VMaxKey(ctx context.Context, visit func(node LONode)) (_ int64
visit(child) visit(child)
} }
// XXX verify child keys are in valid range according to parent
switch child := child.(type) { switch child := child.(type) {
case *LOBTree: case *LOBTree:
t = child t = child
......
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