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
599a72f3
Commit
599a72f3
authored
Apr 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5f3946bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
wcfs/wcfs.go
wcfs/wcfs.go
+7
-11
No files found.
wcfs/wcfs.go
View file @
599a72f3
...
...
@@ -1346,14 +1346,15 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// watch was not previously established - set it up anew
// XXX locking
bfdir
:=
wlink
.
head
.
bfdir
head
:=
wlink
.
head
bfdir
:=
head
.
bfdir
f
:=
bfdir
.
fileTab
[
foid
]
if
f
==
nil
{
// by "invalidation protocol" watch is setup after data file was opened
return
fmt
.
Errorf
(
"file not yet known or is not a ZBigFile"
)
}
// XXX wait
wlink.
head.zconn.At() ≥ at
// XXX wait head.zconn.At() ≥ at
// XXX <~> f.δtail.Head() ≥ at (?)
if
at
<
bfdir
.
δFtail
.
Tail
()
{
...
...
@@ -1367,22 +1368,17 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
bfdir
.
δFmu
.
RLock
()
defer
bfdir
.
δFmu
.
RUnlock
()
/* XXX reenable
// FIXME (!!!) since f.δtail does not have all changes to f, here we
// can be missing some pins we should be sending. (see wcfs_test.py for details)
for _, δ := range δFtail.SliceByRev(f, at, f.δtail.Head()) {
for _, blk := range δ.Changev {
// pin all tracked file blocks that were changed (at, head] range
for
_
,
δfile
:=
range
bfdir
.
δFtail
.
SliceByFileRev
(
f
,
at
,
head
.
zconn
.
At
())
{
for
_
,
blk
:=
range
δfile
.
Change
{
_
,
already
:=
toPin
[
blk
]
if
already
{
continue
}
// FIXME (!!!) again f.δtail can miss some entries
toPin[blk], _ = f.LastBlkRev(blk, at)
toPin
[
blk
],
_
=
f
.
LastBlkRev
(
ctx
,
blk
,
at
)
}
}
*/
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
for
blk
,
rev
:=
range
toPin
{
...
...
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