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
0c4b3501
Commit
0c4b3501
authored
Jun 18, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1a28466a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
wcfs/wcfs.go
wcfs/wcfs.go
+8
-0
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+4
-2
No files found.
wcfs/wcfs.go
View file @
0c4b3501
...
@@ -1437,6 +1437,13 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1437,6 +1437,13 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// preparing and processing initial pins, also send pins for read
// preparing and processing initial pins, also send pins for read
// blocks. If we don't, we can miss to send pin for a freshly read
// blocks. If we don't, we can miss to send pin for a freshly read
// block which could have revision > w.at . XXX test
// block which could have revision > w.at . XXX test
//
// 1 3 2 4
// -----.----x---o----x---x-----------------
// ↑
// w.at
//
//
// XXX locking
// XXX locking
// XXX register only if watch was created anew, not updated?
// XXX register only if watch was created anew, not updated?
f
.
watches
[
w
]
=
struct
{}{}
f
.
watches
[
w
]
=
struct
{}{}
...
@@ -1475,6 +1482,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1475,6 +1482,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
}
}
// XXX locking
// XXX locking
// XXX do at the same time when registering ^^^, so that simultaneous READs see correct w.at
w
.
at
=
at
w
.
at
=
at
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
...
...
wcfs/wcfs_test.py
View file @
0c4b3501
...
@@ -893,8 +893,8 @@ class tSrvReq:
...
@@ -893,8 +893,8 @@ class tSrvReq:
# pins as if all blocks @head were accesses - i.e. considering all file changes
# pins as if all blocks @head were accesses - i.e. considering all file changes
# in (at, head] range.
# in (at, head] range.
#
#
# The caller has to take
cached/not-cach
ed effect into account on its own
# The caller has to take
accessed/not-access
ed effect into account on its own
# (see tDB._accessed & friends)
# (see tDB._accessed & friends)
XXX rework?
@
func
(
tDB
)
@
func
(
tDB
)
def
_pinAt
(
t
,
zf
,
at
):
# -> pin = {} blk -> rev
def
_pinAt
(
t
,
zf
,
at
):
# -> pin = {} blk -> rev
# XXX dup in _blkData
# XXX dup in _blkData
...
@@ -1418,6 +1418,8 @@ def test_wcfs():
...
@@ -1418,6 +1418,8 @@ def test_wcfs():
# XXX watch @at when file did not existed -> error
# XXX watch @at when file did not existed -> error
# XXX unpin to @head (δblk is there but not yet accessed) vs concurrent
# access to that blk which must pin blk (race ?)
# XXX watch for 2 files via single wlink
# XXX watch for 2 files via single wlink
...
...
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