Commit 45383e25 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f7a26f7d
...@@ -686,6 +686,9 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid] ...@@ -686,6 +686,9 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
tracef(" diffT %s %s\n", xidOf(a), xidOf(b)) tracef(" diffT %s %s\n", xidOf(a), xidOf(b))
defer xerr.Contextf(&err, "diffT %s %s", xidOf(a), xidOf(b)) defer xerr.Contextf(&err, "diffT %s %s", xidOf(a), xidOf(b))
if a == nil { panic("a is nil") }
if b == nil { panic("b is nil") }
δ = map[Key]ΔValue{} δ = map[Key]ΔValue{}
defer tracef(" -> δ: %v\n", δ) defer tracef(" -> δ: %v\n", δ)
...@@ -696,15 +699,12 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid] ...@@ -696,15 +699,12 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
Adone := SetKey{} // "processed" keys on A Adone := SetKey{} // "processed" keys on A
Bdone := SetKey{} // "processed" keys on B Bdone := SetKey{} // "processed" keys on B
if b != nil { // XXX kill (always !nil) ?
// XXX precise range as for a ^^^ ? // XXX precise range as for a ^^^ ?
btop := &nodeInRange{lo: KeyMin, hi_: KeyMax, node: b} // [-∞, ∞) btop := &nodeInRange{lo: KeyMin, hi_: KeyMax, node: b} // [-∞, ∞)
bv = rangeSplit{btop} bv = rangeSplit{btop}
}
// initial phase: expand changed nodes in a till buckets; // initial phase: expand changed nodes in a till buckets;
// XXX changed buckets -> δ- // XXX changed buckets -> δ-
if a != nil { // XXX kill (always !nil) ?
// XXX maybe walk till a from root to get more precise initial range? // XXX maybe walk till a from root to get more precise initial range?
atop := &nodeInRange{lo: KeyMin, hi_: KeyMax, node: a} // [-∞, ∞) atop := &nodeInRange{lo: KeyMin, hi_: KeyMax, node: a} // [-∞, ∞)
av = rangeSplit{atop} av = rangeSplit{atop}
...@@ -789,7 +789,6 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid] ...@@ -789,7 +789,6 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
} }
} }
} }
}
tracef(" av: %s\n", av) tracef(" av: %s\n", av)
tracef(" bv: %s\n", bv) tracef(" bv: %s\n", bv)
......
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