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
8a5e3d10
Commit
8a5e3d10
authored
Jul 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
18cf8955
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
wcfs/wcfs.go
wcfs/wcfs.go
+6
-9
No files found.
wcfs/wcfs.go
View file @
8a5e3d10
...
...
@@ -1411,18 +1411,16 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
defer
head
.
zheadMu
.
RUnlock
()
headAt
:=
head
.
zconn
.
At
()
if
at
<
bfdir
.
δFtail
.
Tail
()
{
if
at
!=
zodb
.
InvalidTid
&&
at
<
bfdir
.
δFtail
.
Tail
()
{
return
fmt
.
Errorf
(
"too far away back from head/at (@%s); δt = %s"
,
headAt
,
headAt
.
Time
()
.
Sub
(
at
.
Time
()
.
Time
))
}
// XXX if watch was already established - we need to update it
// XXX locking (.byfile)
w
:=
wlink
.
byfile
[
foid
]
// if watch was already established - we need to update it
w
:=
wlink
.
byfile
[
foid
]
// XXX locking
if
w
==
nil
{
// watch was not previously established - set it up anew
// XXX locking (.fileTab)
f
:=
bfdir
.
fileTab
[
foid
]
f
:=
bfdir
.
fileTab
[
foid
]
// XXX locking
if
f
==
nil
{
// by "invalidation protocol" watch is setup after data file was opened
return
fmt
.
Errorf
(
"file not yet known to wcfs or is not a ZBigFile"
)
...
...
@@ -1437,10 +1435,9 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
}
// at="-" (InvalidTid) means "remove the watch"
// XXX locking
if
at
==
zodb
.
InvalidTid
{
delete
(
wlink
.
byfile
,
foid
)
delete
(
w
.
file
.
watchTab
,
w
)
delete
(
wlink
.
byfile
,
foid
)
// XXX locking
delete
(
w
.
file
.
watchTab
,
w
)
// XXX locking
return
nil
}
...
...
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