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
06b6d9c6
Commit
06b6d9c6
authored
Apr 14, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f1d2aae6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+1
-0
wcfs/wcfs.go
wcfs/wcfs.go
+4
-8
wcfs/δftail.go
wcfs/δftail.go
+1
-0
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
06b6d9c6
...
...
@@ -237,6 +237,7 @@ func (btail *ΔTail) Update(δZ *zodb.EventCommit) []ΔTree {
// XXX only tracked set?
//
// XXX at must ∈ (tail, head] XXX [tail ?
// XXX key must be tracked?
func
(
btail
*
ΔTail
)
GetAt
(
root
*
Tree
,
key
Key
,
at
zodb
.
Tid
)
(
value
Value
,
ok
bool
,
rev
zodb
.
Tid
,
revExact
bool
)
{
panic
(
"TODO"
)
}
...
...
wcfs/wcfs.go
View file @
06b6d9c6
...
...
@@ -749,7 +749,7 @@ retry:
default
:
continue
// object not related to any bigfile
// XXX kill Tree/Bucket here
// XXX kill Tree/Bucket here
(-> ΔFtail)
case
*
btree
.
LOBTree
:
btreeChangev
=
append
(
btreeChangev
,
obj
.
POid
())
...
...
@@ -1288,7 +1288,7 @@ func (w *Watch) pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
return
nil
}
// pinIfNewer make sure that file[blk] on client side stays as of @w.at state.
// pinIfNewer make
s
sure that file[blk] on client side stays as of @w.at state.
//
// rev is blk revision as of head. If rev > w.at the block is pinned on client side.
func
(
w
*
Watch
)
pinIfNewer
(
ctx
context
.
Context
,
blk
int64
,
rev
zodb
.
Tid
)
error
{
...
...
@@ -1349,14 +1349,10 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
toPin
:=
map
[
int64
]
zodb
.
Tid
{}
// blk -> @rev
/* XXX reenable
// XXX f.δtail.Head() not neccessarily = head.At()
// (if f was not changed by a txn, f.δtail stays not updated) XXX correct?
//
// 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)
//
// XXX at can be > f.δtail.Head due to ^^^ (and then SliceByRev panics)
for _, δ := range f.δtail.SliceByRev(at, f.δtail.Head()) {
for _, δ := range δFtail.SliceByRev(f, at, f.δtail.Head()) {
for _, blk := range δ.Changev {
_, already := toPin[blk]
if already {
...
...
wcfs/δftail.go
View file @
06b6d9c6
...
...
@@ -120,6 +120,7 @@ func (δf *ΔFTail) LastRevOf(file *BigFile, blk int64, at zodb.Tid) (_ zodb.Tid
// if exact=False - what is returned is only an upper bound for last block revision.
//
// at must ∈ (tail, head] XXX [tail ?
// XXX blk must be tracked?
func
(
f
*
BigFile
)
LastBlkRev
(
blk
int64
,
at
zodb
.
Tid
)
(
_
zodb
.
Tid
,
exact
bool
)
{
δf
:=
f
.
head
.
bfdir
.
δFtail
...
...
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