Commit ef3a09df authored by Kirill Smelkov's avatar Kirill Smelkov

.

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