Commit 0c4b3501 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1a28466a
......@@ -1437,6 +1437,13 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// preparing and processing initial pins, also send pins for read
// blocks. If we don't, we can miss to send pin for a freshly read
// block which could have revision > w.at . XXX test
//
// 1 3 2 4
// -----.----x---o----x---x-----------------
// ↑
// w.at
//
//
// XXX locking
// XXX register only if watch was created anew, not updated?
f.watches[w] = struct{}{}
......@@ -1475,6 +1482,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
}
// XXX locking
// XXX do at the same time when registering ^^^, so that simultaneous READs see correct w.at
w.at = at
wg, ctx := errgroup.WithContext(ctx)
......
......@@ -893,8 +893,8 @@ class tSrvReq:
# pins as if all blocks @head were accesses - i.e. considering all file changes
# in (at, head] range.
#
# The caller has to take cached/not-cached effect into account on its own
# (see tDB._accessed & friends)
# The caller has to take accessed/not-accessed effect into account on its own
# (see tDB._accessed & friends) XXX rework?
@func(tDB)
def _pinAt(t, zf, at): # -> pin = {} blk -> rev
# XXX dup in _blkData
......@@ -1418,6 +1418,8 @@ def test_wcfs():
# XXX watch @at when file did not existed -> error
# XXX unpin to @head (δblk is there but not yet accessed) vs concurrent
# access to that blk which must pin blk (race ?)
# XXX watch for 2 files via single wlink
......
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