Commit 899dbc2c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fcbc604b
......@@ -228,6 +228,18 @@ func (btail *ΔTail) Update(δZ *zodb.EventCommit) []ΔTree {
// func (btail *ΔTail) update()
// XXX -> Get(root, key, at) -> (valueOid, rev) ?
// GetAt returns root[key] as of @at database state plus revision that changed it.
//
// if revExact=False - rev is upper estimate for the revision.
//
// XXX only tracked set?
//
// XXX at must ∈ (tail, head] XXX [tail ?
func (btail *ΔTail) GetAt(root *Tree, key Key, at zodb.Tid) (value Value, ok bool, rev zodb.Tid, revExact bool) {
panic("TODO")
}
func (btail *ΔTail) LastRevOf(root *Tree, key Key, at zodb.Tid) (_ zodb.Tid, exact bool) {
/*
lastRevOf = btail.lastRevOf[root]
......
......@@ -114,7 +114,6 @@ func (δf *ΔFTail) LastRevOf(file *BigFile, blk int64, at zodb.Tid) (_ zodb.Tid
}
*/
// XXX δB.GetAt(root, key, at) at ∈ (tail, head]
// LastBlkRev returns last revision that changed file[blk] as of @at database state.
//
......@@ -130,6 +129,7 @@ func (f *BigFile) LastBlkRev(blk int64, at zodb.Tid) (_ zodb.Tid, exact bool) {
zblkOid, ok, tabRev, tabRevExact := δf.ΔTail.GetAt(f.zfile.blktab, blk, at)
// block was removed
// XXX or not in tracked set?
if !ok {
return tabRev, tabRevExact
}
......
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