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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
2d9ed1c4
Commit
2d9ed1c4
authored
Jun 14, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
038ef9bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
wcfs/wcfs.go
wcfs/wcfs.go
+5
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-0
No files found.
wcfs/wcfs.go
View file @
2d9ed1c4
...
...
@@ -110,6 +110,9 @@
// The client can start to use mmapped data after it gets "ok".
// The server sends "error" reply if requested <at> is too far away back from
// head/at.
// XXX other errors are possible (e.g. "no such file", or error handling pin).
// XXX error handling pin -> then client is killed?
// XXX if not - specify that watch state is lost after error.
//
// Upon watch request, either initially, or after sending "ok", the server will be notifying the
// client about file blocks that client needs to pin in order to observe file's
...
...
@@ -1399,15 +1402,14 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
at
:
at
,
pinned
:
make
(
map
[
int64
]
zodb
.
Tid
),
}
}
// at=
InvalidTid
means "remove the watch"
// at=
"-" (InvalidTid)
means "remove the watch"
// XXX locking
if
at
==
zodb
.
InvalidTid
{
delete
(
wlink
.
byfile
,
foid
)
delete
(
w
.
file
.
watches
,
w
)
return
return
nil
}
...
...
wcfs/wcfs_test.py
View file @
2d9ed1c4
...
...
@@ -1338,6 +1338,7 @@ def test_wcfs():
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
5
:
at0
})
# XXX advance watch - receives new pins/unpins to @head
# XXX this is already tested ^^^ in at_i -> at_j -> ...
wl3
.
close
()
...
...
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