Commit e7c831f2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b1a9a71a
......@@ -273,9 +273,10 @@ type nodeTrack struct {
//
// Only complete result of applying all
//
// - xfixup(-1, δnchildNonLeafs)
// - δ.Del,
// - δ.Add, and
// - fixup(δnchildNonLeafs)
// - xfixup(+1, δnchildNonLeafs)
//
// produce correctly PP-connected set.
//
......@@ -841,7 +842,7 @@ func (tidx trackIndex) AddPath(path []zodb.Oid) {
}
}
// rebuild rebuilds ΔBtail taking trackNew requests into account. XXX
// rebuild rebuilds ΔBtail taking trackNew requests into account.
// XXX place
func (δBtail *ΔBtail) rebuild() (err error) {
defer xerr.Context(&err, "ΔBtail rebuild")
......@@ -850,6 +851,10 @@ func (δBtail *ΔBtail) rebuild() (err error) {
trackNew := δBtail.trackNew
δBtail.trackNew = trackIndex{}
if len(trackNew) == 0 {
return
}
// go backwards and merge vδT <- treediff(lo..hi/trackNew)
vδZ := δBtail.δZtail.Data()
for i := len(vδZ)-1; i>=0; i-- {
......@@ -936,7 +941,6 @@ func (δBtail *ΔBtail) rebuild() (err error) {
// XXX update .KVAtTail, .lastRevOf
}
}
// merge trackNew into .trackIdx
......
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