Commit 873e336e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c319d650
......@@ -264,14 +264,14 @@ func (btail *ΔTail) ForgetPast(revCut zodb.Tid) {
//
// XXX at must ∈ (tail, head] XXX [tail ?
// XXX key must be tracked
func (btail *ΔTail) Get(root *Tree, key Key, at zodb.Tid) (value Value, ok bool, rev zodb.Tid, revExact bool) {
func (δΒtail *ΔTail) Get(root *Tree, key Key, at zodb.Tid) (value Value, ok bool, rev zodb.Tid, revExact bool) {
// XXX key not tracked -> panic
// XXX at not ∈ (tail, head] -> panic
// XXX stub -> that only ZBlk.rev is used
// XXX -> index lastXXXOf(key) | linear scan ↓ looking for change <= at
δt := btail.byRoot[root]
δt := δΒtail.byRoot[root]
for i := len(δt.δTtail)-1; i >= 0; i-- {
δ := δt.δTtail[i]
if at < δ.Rev {
......@@ -292,7 +292,7 @@ func (btail *ΔTail) Get(root *Tree, key Key, at zodb.Tid) (value Value, ok bool
// key not in history tail
value, ok = δt.KVAtTail[key]
rev = btail.Tail()
rev = δΒtail.Tail()
revExact = false
return
}
......
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