Commit 05952f40 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b039f763
......@@ -520,15 +520,16 @@ class tFile:
w = wlink._watching.get(t.zf)
if w is not None and w.at < blkrev:
if cached == 1:
# XXX assert blk already pinned on that watch
assert blk in w.pinned # XXX correct?
# @head[blk].rev is after w.at - w[blk] must be already pinned
assert blk in w.pinned
assert w.pinned[blk] <= w.at
else:
assert cached == 0
assert blk not in w.pinned # cache is cleared only on invalidations
# XXX correct ^^^ ?
# XXX and watch not already pinned on the watch
pinok = {blk: t.tdb._blkRev(t.zf, blk, w.at)}
shouldPin = True
# even if @head[blk] is uncached, the block could be
# already pinned by setup watch
if blk not in w.pinned:
pinok = {blk: t.tdb._blkRev(t.zf, blk, w.at)}
shouldPin = True
wpin[wlink] = pinok
if pinokByWLink is not None:
......@@ -1144,7 +1145,7 @@ def test_wcfs():
# >>> XXX commit data to not yet accessed f part - nothing happens
# """
"""
# >>> invalidation protocol
print('\n\n inv. protocol \n\n')
......@@ -1210,7 +1211,7 @@ def test_wcfs():
for at in revv[1:]:
wl.watch(zf, at)
wl.close()
# """
"""
# XXX move before setup watch?
print('\n\n\n\nWATCH+COMMIT\n\n')
......
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