Commit e6ce8953 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f459bda0
...@@ -186,6 +186,7 @@ def _pinner(wconn, ctx): ...@@ -186,6 +186,7 @@ def _pinner(wconn, ctx):
defer(_) defer(_)
def trace(msg): def trace(msg):
return
print('pinner: %s' % msg) print('pinner: %s' % msg)
trace('start') trace('start')
while 1: while 1:
...@@ -211,6 +212,7 @@ def _pin1(wconn, req): ...@@ -211,6 +212,7 @@ def _pin1(wconn, req):
defer(_) defer(_)
def trace(msg): def trace(msg):
return
print('pin1: %s' % msg) print('pin1: %s' % msg)
trace('lock _filemu ...') trace('lock _filemu ...')
......
...@@ -1758,22 +1758,26 @@ def test_wcfspy_virtmem(): ...@@ -1758,22 +1758,26 @@ def test_wcfspy_virtmem():
tm1.assertBlk(4, '') tm1.assertBlk(4, '')
assert f.pinned == {2:at1} assert f.pinned == {2:at1}
at3 = t.commit(zf, {3:'d3'}) at3 = t.commit(zf, {3:'d3', 4:'e3'})
assert f.pinned == {2:at1} assert f.pinned == {2:at1}
tm1.assertBlk(3, 'd1') tm1.assertBlk(3, 'd1')
assert f.pinned == {2:at1, 3:at1} assert f.pinned == {2:at1, 3:at1}
tm1.assertBlk(4, '')
assert f.pinned == {2:at1, 3:at1}
# resync at1 -> at2: #2 must unpin to @head # resync at1 -> at2: #2 must unpin to @head
wconn.resync(at2) wconn.resync(at2)
assert f.pinned == {3:at1} assert f.pinned == {3:at1}
tm1.assertBlk(2, 'c2') tm1.assertBlk(2, 'c2')
tm1.assertBlk(3, 'd1') tm1.assertBlk(3, 'd1')
tm1.assertBlk(3, '')
# resync at2 -> at3: #3 must unpin to @head # resync at2 -> at3: #3 must unpin to @head; #4 - start to read with data
wconn.resync(at3) wconn.resync(at3)
assert f.pinned == {} assert f.pinned == {}
tm1.assertBlk(2, 'c2') tm1.assertBlk(2, 'c2')
tm1.assertBlk(3, 'd3') tm1.assertBlk(3, 'd3')
tm1.assertBlk(4, 'e3')
# XXX resync ↓ ? # XXX resync ↓ ?
......
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