Commit 06b6d9c6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f1d2aae6
......@@ -237,6 +237,7 @@ func (btail *ΔTail) Update(δZ *zodb.EventCommit) []ΔTree {
// XXX only tracked set?
//
// XXX at must ∈ (tail, head] XXX [tail ?
// XXX key must be tracked?
func (btail *ΔTail) GetAt(root *Tree, key Key, at zodb.Tid) (value Value, ok bool, rev zodb.Tid, revExact bool) {
panic("TODO")
}
......
......@@ -749,7 +749,7 @@ retry:
default:
continue // object not related to any bigfile
// XXX kill Tree/Bucket here
// XXX kill Tree/Bucket here (-> ΔFtail)
case *btree.LOBTree:
btreeChangev = append(btreeChangev, obj.POid())
......@@ -1288,7 +1288,7 @@ func (w *Watch) pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
return nil
}
// pinIfNewer make sure that file[blk] on client side stays as of @w.at state.
// pinIfNewer makes sure that file[blk] on client side stays as of @w.at state.
//
// rev is blk revision as of head. If rev > w.at the block is pinned on client side.
func (w *Watch) pinIfNewer(ctx context.Context, blk int64, rev zodb.Tid) error {
......@@ -1349,14 +1349,10 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
toPin := map[int64]zodb.Tid{} // blk -> @rev
/* XXX reenable
// XXX f.δtail.Head() not neccessarily = head.At()
// (if f was not changed by a txn, f.δtail stays not updated) XXX correct?
//
// FIXME (!!!) since f.δtail does not have all changes to f, here we
// can be missing some pins we should be sending. (see wcfs_test.py for details)
//
// XXX at can be > f.δtail.Head due to ^^^ (and then SliceByRev panics)
for _, δ := range f.δtail.SliceByRev(at, f.δtail.Head()) {
for _, δ := range δFtail.SliceByRev(f, at, f.δtail.Head()) {
for _, blk := range δ.Changev {
_, already := toPin[blk]
if already {
......
......@@ -120,6 +120,7 @@ func (δf *ΔFTail) LastRevOf(file *BigFile, blk int64, at zodb.Tid) (_ zodb.Tid
// if exact=False - what is returned is only an upper bound for last block revision.
//
// at must ∈ (tail, head] XXX [tail ?
// XXX blk must be tracked?
func (f *BigFile) LastBlkRev(blk int64, at zodb.Tid) (_ zodb.Tid, exact bool) {
δf := f.head.bfdir.δFtail
......
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