Commit 555cc2ed authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 37a1acb4
......@@ -1435,7 +1435,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
return
}
fmt.Printf("S: read #%d -> pin watchers (#%d)\n", blk, len(f.watchTab))
// fmt.Printf("S: read #%d -> pin watchers (#%d)\n", blk, len(f.watchTab))
// update δFtail index
bfdir := f.head.bfdir
......@@ -1461,8 +1461,6 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
// make sure w.at stays unchanged while we prepare and pin the block
w.atMu.RLock()
fmt.Printf("S: read -> pin watchers: w @%s\n", w.at)
// the block is already covered by @w.at database view
if blkrev <= w.at {
w.atMu.RUnlock()
......@@ -1494,6 +1492,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
// revision to pin is the same on all clients, and so file cache is shared.
pinrev, _ := w.file.LastBlkRev(ctx, blk, w.at) // XXX move into go?
fmt.Printf("S: read #%d: watch @%s: pin -> @%s\n", blk, w.at, pinrev)
wg.Go(func() error {
defer w.atMu.RUnlock()
// XXX close watcher on any error
......
......@@ -1716,8 +1716,6 @@ class tMapping(object):
dataok += b'\0'*(f.blksize - len(dataok)) # trailing zeros
blkview = memoryview(t.mmap.mem[blk_inmmap*f.blksize:][:f.blksize])
print('aaa')
# XXX first access without GIL, so that e.g. if there is timeout on
# wcfs.py side, _abort_ontimeout could run and kill WCFS.
# FIXME also test with GIL locked, since wcfs.py pinner must be itself
......@@ -1725,7 +1723,6 @@ class tMapping(object):
_ = read_nogil(blkview[:1])
assert _ == dataok[0]
assert blkview.tobytes() == dataok
print('bbb')
# XXX assertData
......@@ -1754,13 +1751,12 @@ def test_wcfspy_virtmem():
#assertCache(m1, [0,0,0])
assert f.pinned == {}
print('000')
tm1.assertBlk(2, 'c1')
print('\n\n111')
assert f.pinned == {2:at1}
tm1.assertBlk(3, 'd1')
assert f.pinned == {2:at1}
tm1.assertBlk(4, 'x')
# XXX this (correctly) gets SIGBUS - virtmem should override pages after file.size
#tm1.assertBlk(4, '')
assert f.pinned == {2:at1}
#assertData (m1, ['c1','d1',''])
......
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