Commit c267c969 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c0b25b92
...@@ -171,23 +171,13 @@ func δZConnectTracked(δZv []zodb.Oid, T blib.PPTreeSubSet) (δZTC setOid, δto ...@@ -171,23 +171,13 @@ func δZConnectTracked(δZv []zodb.Oid, T blib.PPTreeSubSet) (δZTC setOid, δto
// XXX place // XXX place
// nodeInRange represents a Node coming under [lo, hi_] key range in its tree. // nodeInRange represents a Node coming under [lo, hi_] key range in its tree.
type nodeInRange struct { type nodeInRange struct {
prefix []zodb.Oid // path to this node goes via this objects prefix []zodb.Oid // path to this node goes via this objects
keycov blib.KeyRange keycov blib.KeyRange // key coverage
node Node node Node
done bool // whether this node was already taken into account while computing diff done bool // whether this node was already taken into account while computing diff
} }
// XXX place, doc // XXX place, doc
/*
func (n *nodeInRange) NodePath() []Node {
path := []Node{}
for n != nil {
path = append([]Node{n.node}, path...)
n = n.parent
}
return path
}
*/
func (n *nodeInRange) Path() []zodb.Oid { func (n *nodeInRange) Path() []zodb.Oid {
// return full copy - else .prefix can become aliased in between children of a node // return full copy - else .prefix can become aliased in between children of a node
return append([]zodb.Oid{}, append(n.prefix, n.node.POid())...) return append([]zodb.Oid{}, append(n.prefix, n.node.POid())...)
...@@ -275,7 +265,6 @@ func (prs *rangeSplit) Expand(rnode *nodeInRange) (children rangeSplit) { ...@@ -275,7 +265,6 @@ func (prs *rangeSplit) Expand(rnode *nodeInRange) (children rangeSplit) {
// GetToLeaf expands step-by-step every tree through which it has to traverse to next depth level. // GetToLeaf expands step-by-step every tree through which it has to traverse to next depth level.
// //
// GetToLeaf panics if k is not covered. // GetToLeaf panics if k is not covered.
// XXX also return path?
func (prs *rangeSplit) GetToLeaf(ctx context.Context, k Key) (*nodeInRange, error) { func (prs *rangeSplit) GetToLeaf(ctx context.Context, k Key) (*nodeInRange, error) {
rnode, ok, err := prs.GetToLeaf_(ctx, k) rnode, ok, err := prs.GetToLeaf_(ctx, k)
if err == nil && !ok { if err == nil && !ok {
......
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