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
79308111
Commit
79308111
authored
Oct 21, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f9df7af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
wcfs/wcfs.go
wcfs/wcfs.go
+4
-5
No files found.
wcfs/wcfs.go
View file @
79308111
...
...
@@ -1496,7 +1496,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, blkrevMax zodb
panic
(
"BUG: readPinWatchers: called for file under @revX/"
)
}
//
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))
// make sure that file[blk] on clients side stays as of @w.at state.
...
...
@@ -1568,7 +1568,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, blkrevMax zodb
// setupWatch sets up or updates a Watch when client sends `watch <file> @<at>` request.
//
//
XXX sends "pin" notifications; final "ok
" must be sent by caller.
//
It sends "pin" notifications; final "ok" or "error
" must be sent by caller.
//
// XXX called synchronously - only 1 setupWatch call at a time?
func
(
wlink
*
WatchLink
)
setupWatch
(
ctx
context
.
Context
,
foid
zodb
.
Oid
,
at
zodb
.
Tid
)
(
err
error
)
{
...
...
@@ -1590,7 +1590,6 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
defer
head
.
zheadMu
.
RUnlock
()
headAt
:=
head
.
zconn
.
At
()
// // XXX δFtail locking? (or ForgetPast is called only with zheadMu.W ? - yes)
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
))
...
...
@@ -1705,7 +1704,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
OnlyExplicitlyTracked
:
true
,
})
if
err
!=
nil
{
panic
(
err
)
// XXX
return
err
}
for
_
,
δfile
:=
range
vδf
{
if
δfile
.
Epoch
{
...
...
@@ -1731,7 +1730,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
toPin
[
blk
],
_
,
err
=
δFtail
.
BlkRevAt
(
ctx
,
f
.
zfile
,
blk
,
at
)
if
err
!=
nil
{
panic
(
err
)
// XXX
return
err
}
}
}
...
...
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