Commit f30826a6 authored by Kirill Smelkov's avatar Kirill Smelkov

X another bug in δtkeyconv computation

=== RUN   TestΔBTail/Update/T7/B1:a,2:b-B8:c,9:d→T3/T-T/B1:a,2:b-B8:c,9:d
    δbtail_test.go:832: 2: trackSet:
                have: map[000000000000000c:{pffffffffffffffff c2} 0000000000000041:{p0000000000000043 c0} 0000000000000042:{p0000000000000044 c0} 0000000000000043:{p000000000000000c c1} 0000000000000044:{p000000000000000c c1}]
                want: map[000000000000000c:{pffffffffffffffff c1} 0000000000000041:{p0000000000000043 c0} 0000000000000043:{p000000000000000c c1}]
    δbtail_test.go:708: T7/B1:a,2:b-B8:c,9:d -> T3/T-T/B1:a,2:b-B8:c,9:d  ; tracked={1} :

        d12:  map[]
        δTok: map[]
        δT:   map[]

        δZ:               {000000000000000c 0000000000000043 0000000000000044}
        Tracked^δZ:       {}
        kadj[Tracked^δZ]: {}
        kadj: map[1:{1 2 8 9 9223372036854775807} 2:{1 2 8 9 9223372036854775807} 8:{1 2 8 9 9223372036854775807} 9:{1 2 8 9 9223372036854775807} 9223372036854775807:{1 2 8 9 9223372036854775807}]

        δtkeycov wrong:
        have: {[7,∞)}
        want: {}
parent a17fd280
...@@ -376,6 +376,7 @@ func (δTtail *ΔTtail) rebuild(root zodb.Oid, δZtail *zodb.ΔTail, db *zodb.DB ...@@ -376,6 +376,7 @@ func (δTtail *ΔTtail) rebuild(root zodb.Oid, δZtail *zodb.ΔTail, db *zodb.DB
} }
// widenTrackNew widens trackNew to cover δtkeycov. // widenTrackNew widens trackNew to cover δtkeycov.
// XXX -> widenTrackSet?
func widenTrackNew(trackNew PPTreeSubSet, δtkeycov *RangedKeySet, root zodb.Oid, at zodb.Tid, db *zodb.DB) error { func widenTrackNew(trackNew PPTreeSubSet, δtkeycov *RangedKeySet, root zodb.Oid, at zodb.Tid, db *zodb.DB) error {
// XXX errctx, debug // XXX errctx, debug
......
...@@ -804,7 +804,7 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod ...@@ -804,7 +804,7 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
// also call _Update1 directly to verify δtkeycov return from treediff // also call _Update1 directly to verify δtkeycov return from treediff
// the result of Update and _Update1 should be the same since δbtail is initially empty. // the result of Update and _Update1 should be the same since δbtail is initially empty.
δbtail_ := δbtail.Clone() δbtail_ := δbtail.Clone()
δB1, err := δbtail_._Update1(δZ); X(err) δB1, err := δbtail_._Update1(δZ); X(err) // XXX don't compute treediff twice
// assert δtkeycov == δ(tkeyCov1, tkeyCov2) // assert δtkeycov == δ(tkeyCov1, tkeyCov2)
δtkeycovOK := tkeyCov2.Difference(tkeyCov1) δtkeycovOK := tkeyCov2.Difference(tkeyCov1)
...@@ -1684,6 +1684,11 @@ func TestΔBTail(t *testing.T) { ...@@ -1684,6 +1684,11 @@ func TestΔBTail(t *testing.T) {
"T3/B1:a,2:b-B8:c,9:d", "T3/B1:a,2:b-B8:c,9:d",
"T7/B1:a,2:b-B8:c,9:d", "T7/B1:a,2:b-B8:c,9:d",
// ----//---- depth=2
"T3/T-T/B1:a,2:b-B8:c,9:d",
"T7/T-T/B1:a,2:b-B8:c,9:d",
// "T/T/T/B1:a,2:b", // "T/T/T/B1:a,2:b",
// "T/T/B1:a", // "T/T/B1:a",
......
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