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
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
...
@@ -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
// watch was not previously established - set it up anew
// XXX locking
// XXX locking
bfdir
:=
wlink
.
head
.
bfdir
head
:=
wlink
.
head
bfdir
:=
head
.
bfdir
f
:=
bfdir
.
fileTab
[
foid
]
f
:=
bfdir
.
fileTab
[
foid
]
if
f
==
nil
{
if
f
==
nil
{
// by "invalidation protocol" watch is setup after data file was opened
// by "invalidation protocol" watch is setup after data file was opened
return
fmt
.
Errorf
(
"file not yet known or is not a ZBigFile"
)
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 (?)
// XXX <~> f.δtail.Head() ≥ at (?)
if
at
<
bfdir
.
δFtail
.
Tail
()
{
if
at
<
bfdir
.
δFtail
.
Tail
()
{
...
@@ -1367,22 +1368,17 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1367,22 +1368,17 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
bfdir
.
δFmu
.
RLock
()
bfdir
.
δFmu
.
RLock
()
defer
bfdir
.
δFmu
.
RUnlock
()
defer
bfdir
.
δFmu
.
RUnlock
()
/* XXX reenable
// pin all tracked file blocks that were changed (at, head] range
for
_
,
δfile
:=
range
bfdir
.
δFtail
.
SliceByFileRev
(
f
,
at
,
head
.
zconn
.
At
())
{
// FIXME (!!!) since f.δtail does not have all changes to f, here we
for
_
,
blk
:=
range
δfile
.
Change
{
// 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 {
_
,
already
:=
toPin
[
blk
]
_
,
already
:=
toPin
[
blk
]
if
already
{
if
already
{
continue
continue
}
}
// FIXME (!!!) again f.δtail can miss some entries
toPin
[
blk
],
_
=
f
.
LastBlkRev
(
ctx
,
blk
,
at
)
toPin[blk], _ = f.LastBlkRev(blk, at)
}
}
}
}
*/
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
for
blk
,
rev
:=
range
toPin
{
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