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
41a21d20
Commit
41a21d20
authored
Mar 31, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0c3f0e6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
wcfs/wcfs.go
wcfs/wcfs.go
+27
-4
No files found.
wcfs/wcfs.go
View file @
41a21d20
...
...
@@ -1307,16 +1307,39 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
return
fmt
.
Errorf
(
"at is too far away back from head/at"
)
}
toPin
:=
SetI64
{}
// f's blocks that have been changed after at
toPin
:=
map
[
int64
]
zodb
.
Tid
// blk -> @rev
// XXX f.δtail.Head() not neccessarily = head.At()
// (if f was not changed by a txn, f.δtail stays not updated) XXX correct?
f
.
δtail
.
SliceByRev
(
at
,
f
.
δtail
.
Head
())
//
// 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
f
.
δtail
.
SliceByRev
(
at
,
f
.
δtail
.
Head
())
{
for
_
,
blk
:=
range
δ
.
Changev
{
_
,
already
:=
toPin
[
blk
]
if
already
{
continue
}
// FIXME (!!!) again f.δtail can miss some entries
toPin
[
blk
],
_
=
f
.
δtail
.
LastRevOf
(
blk
,
at
)
}
}
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
for
blk
,
rev
:=
range
toPin
{
blk
:=
blk
rev
:=
rev
wg
.
Go
(
func
()
error
{
return
wlink
.
pin
(
ctx
,
blk
,
rev
)
})
}
err
=
wg
.
Wait
()
if
err
!=
nil
{
panic
(
err
)
// XXX
}
panic
(
"TODO"
)
// XXX something else?
}
// Open serves /head/watch opens.
...
...
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