Commit fd3f9214 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5d106a33
...@@ -245,7 +245,9 @@ func (btail *ΔTail) GetAt(root *Tree, key Key, at zodb.Tid) (value Value, ok bo ...@@ -245,7 +245,9 @@ func (btail *ΔTail) GetAt(root *Tree, key Key, at zodb.Tid) (value Value, ok bo
// XXX key not tracked -> panic // XXX key not tracked -> panic
// XXX at not ∈ (tail, head] -> panic // XXX at not ∈ (tail, head] -> panic
// XXX -> index lastXXXOf(key) // XXX stub -> that only ZBlk.rev is used
// XXX -> index lastXXXOf(key) | linear scan ↓ looking for change <= at
δt := btail.byRoot[root] δt := btail.byRoot[root]
for i := len(δt.δTtail)-1; i >= 0; i-- { for i := len(δt.δTtail)-1; i >= 0; i-- {
δ := δt.δTtail[i] δ := δt.δTtail[i]
...@@ -272,17 +274,17 @@ func (btail *ΔTail) GetAt(root *Tree, key Key, at zodb.Tid) (value Value, ok bo ...@@ -272,17 +274,17 @@ func (btail *ΔTail) GetAt(root *Tree, key Key, at zodb.Tid) (value Value, ok bo
return return
} }
func (btail *ΔTail) LastRevOf(root *Tree, key Key, at zodb.Tid) (_ zodb.Tid, exact bool) {
/* /*
func (btail *ΔTail) LastRevOf(root *Tree, key Key, at zodb.Tid) (_ zodb.Tid, exact bool) {
lastRevOf = btail.lastRevOf[root] lastRevOf = btail.lastRevOf[root]
rev = lastRevOf[key] rev = lastRevOf[key]
while rev > at: while rev > at:
rev = scan btail.δBtail ↓ looking for change(key) # XXX linear scan rev = scan btail.δBtail ↓ looking for change(key) # XXX linear scan
return rev return rev
*/
return 0, false // XXX stub (saying take only ZBlk.rev into account) return 0, false // XXX stub (saying take only ZBlk.rev into account)
} }
*/
func (btail *ΔTail) ForgetPast(revCut zodb.Tid) { func (btail *ΔTail) ForgetPast(revCut zodb.Tid) {
btail.ΔZtail.ForgetPast(revCut) // XXX stub btail.ΔZtail.ForgetPast(revCut) // XXX stub
......
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