Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
555cc2ed
Commit
555cc2ed
authored
Jul 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
37a1acb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
wcfs/wcfs.go
wcfs/wcfs.go
+2
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+2
-6
No files found.
wcfs/wcfs.go
View file @
555cc2ed
...
...
@@ -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
...
...
wcfs/wcfs_test.py
View file @
555cc2ed
...
...
@@ -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
\
n
111'
)
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',''])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment