Commit ef3a09df authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 22226d99
......@@ -110,9 +110,6 @@ type _ΔTtail struct {
// which vδT was not yet rebuilt
trackNew blib.PPTreeSubSet
// XXX + trackNewKeys RangedKeySet (concurrency)
// index for GetAt queries
lastRevOf map[Key]zodb.Tid // {} key -> last revision
}
// _ΔBroots represents roots-only part of ΔB.
......@@ -158,7 +155,6 @@ func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail {
func newΔTtail() *_ΔTtail {
return &_ΔTtail{
trackNew: blib.PPTreeSubSet{},
lastRevOf: make(map[Key]zodb.Tid),
}
}
......@@ -200,10 +196,6 @@ func (orig *_ΔTtail) Clone() *_ΔTtail {
klon := &_ΔTtail{}
klon.vδT = vδTClone(orig.vδT)
klon.trackNew = orig.trackNew.Clone()
klon.lastRevOf = make(map[Key]zodb.Tid, len(orig.lastRevOf))
for k, rev := range orig.lastRevOf {
klon.lastRevOf[k] = rev
}
return klon
}
......@@ -389,8 +381,6 @@ func (δTtail *_ΔTtail) rebuild(root zodb.Oid, δZtail *zodb.ΔTail, db *zodb.D
if newRevEntry {
δrevSet.Add(δZ.Rev)
}
// XXX update .lastRevOf
}
// an iteration closer to tail may turn out to add a key to the tracking set.
......@@ -547,7 +537,6 @@ func (δTtail *_ΔTtail) rebuild1(atPrev zodb.Tid, δZ zodb.ΔRevEntry, trackNew
}
}
// XXX update .lastRevOf (here?)
return δtrack, δtkeycov, newRevEntry, nil
}
......@@ -601,8 +590,6 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
δB.ByRoot[root] = δT.KV
}
}
// XXX rebuild lastRevOf
}
// vδBroots += δB (δB.Rev could be already there added by ^^^ rebuild)
......@@ -744,7 +731,6 @@ func (δBtail *ΔBtail) ForgetPast(revCut zodb.Tid) {
func (δTtail *_ΔTtail) forgetPast(revCut zodb.Tid) {
// XXX locking
// XXX lastRevOf
icut := 0
for ; icut < len(δTtail.vδT); icut++ {
......
......@@ -1519,7 +1519,6 @@ func _KAdj(t1, t2 *xbtreetest.Commit, keysv ...setKey) (kadj KAdjMatrix) {
// it also verifies that δbtail.vδBroots matches ΔTtail data.
func assertΔTtail(t *testing.T, subj string, δbtail *ΔBtail, tj *xbtreetest.Commit, treeRoot zodb.Oid, vδTok ...map[Key]Δstring) {
t.Helper()
// XXX +lastRevOf
T := tj.T // XXX better require t to be xbtreetest.T instead?
......
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