Commit b039f763 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6cb0688e
......@@ -521,8 +521,11 @@ class tFile:
if w is not None and w.at < blkrev:
if cached == 1:
# XXX assert blk already pinned on that watch
pass
assert blk in w.pinned # XXX correct?
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
......@@ -949,7 +952,6 @@ def watch(twlink, zf, at, pinok=None): # XXX -> ?
twlink._watch(zf, at, pinok, "ok")
w.at = at
# XXX update pinned
# _watch sends watch request for zf@at, expects initial pins specified by pinok and final reply.
#
......@@ -1008,7 +1010,7 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None): # -> []event(str)
ev.append('pin ack pre') # XXX +details?
for p in pinv:
assert w.foid == p.foid
if p.at is None: # repin to @head
if p.at is None: # unpin to @head
assert p.blk in w.pinned # must have been pinned before XXX correct?
del w.pinned[p.blk]
else:
......@@ -1162,6 +1164,7 @@ def test_wcfs():
wl._closeTX()
wg.go(_)
wg.wait()
wl.close()
# invalid requests -> wcfs replies error
wl = t.openwatch()
......
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