Commit e7c831f2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

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