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
7c96cf5a
Commit
7c96cf5a
authored
Jun 18, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f58945b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
wcfs/wcfs.go
wcfs/wcfs.go
+18
-1
No files found.
wcfs/wcfs.go
View file @
7c96cf5a
...
@@ -1389,6 +1389,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1389,6 +1389,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
bfdir
:=
head
.
bfdir
bfdir
:=
head
.
bfdir
// XXX locking
// XXX locking
// XXX head.zconnMu.RLock() + defer unlock (see vvv for unpin vs pin and locked head)
// XXX if watch was already established - we need to update it
// XXX if watch was already established - we need to update it
w
:=
wlink
.
byfile
[
foid
]
w
:=
wlink
.
byfile
[
foid
]
...
@@ -1442,7 +1443,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1442,7 +1443,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// block which could have revision > w.at: XXX test
// block which could have revision > w.at: XXX test
//
//
// 1 3 2 4
// 1 3 2 4
// -----.----x---o----x---x------
.
----------
// -----.----x---o----x---x------
]
----------
// ↑ ↑
// ↑ ↑
// w.at head
// w.at head
//
//
...
@@ -1454,6 +1455,22 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1454,6 +1455,22 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// f.watches; if w ∉ f.watches at that moment, w will miss to receive
// f.watches; if w ∉ f.watches at that moment, w will miss to receive
// pin for #3.
// pin for #3.
//
//
// NOTE for `unpin blk` head we can be sure there won't be simultaneous
// `pin blk` request, because:
//
// - unpin means blk was previously pinned,
// - blk was pinned means it is tracked by δFtail,
// - if blk is tracked and δFtail says there is no δblk ∈ (at, head],
// there is indeed no blk change in that region,
// - which means that δblk with rev > w.at might be only > head,
// - but such δblk are processed with zhead wlocked and we keep zhead
// rlocked during pin setup. XXX rlock zhead
//
// δ δ
// ----x----.------------]----x----
// ↑ ↑
// w.at head
//
// 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
{}{}
...
...
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