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
ba09bb73
Commit
ba09bb73
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c5969bd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
58 deletions
+1
-58
wcfs/δbtail.go
wcfs/δbtail.go
+1
-58
No files found.
wcfs/δbtail.go
View file @
ba09bb73
...
@@ -288,16 +288,9 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -288,16 +288,9 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
if
l
==
0
{
if
l
==
0
{
panic
(
"empty path"
)
panic
(
"empty path"
)
}
}
treeRoot
:=
path
[
0
]
.
(
*
Tree
)
/*
var leafBucket *Bucket
if l := len(path); l > 1 {
leafBucket = path[l-1].(*Bucket)
}
*/
// XXX assert Tree Tree ... Tree Bucket
// XXX assert Tree Tree ... Tree Bucket
root
:=
treeRoot
.
POid
()
root
:=
path
[
0
]
.
(
*
Tree
)
.
POid
()
pathv
:=
[]
string
{}
pathv
:=
[]
string
{}
for
_
,
node
:=
range
path
{
pathv
=
append
(
pathv
,
vnode
(
node
))
}
for
_
,
node
:=
range
path
{
pathv
=
append
(
pathv
,
vnode
(
node
))
}
...
@@ -326,58 +319,8 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -326,58 +319,8 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
// remember missing keys in track of leaf node (bucket or top-level ø tree)
// remember missing keys in track of leaf node (bucket or top-level ø tree)
if
!
keyPresent
{
if
!
keyPresent
{
track
.
holes
.
Add
(
key
)
track
.
holes
.
Add
(
key
)
/*
if leafBucket != nil {
track.holes.Add(key)
} else {
// empty tree
rootTrack := δBtail.trackIdx[root] // must succeed
rootTrack.holes.Add(key)
}
*/
}
}
/* XXX kill
// tracked += all keys of leaf bucket for every node up to the root
fmt.Printf(" oldTrack: %v leafBucket: %v\n", oldTrack, leafBucket)
if !oldTrack && leafBucket != nil {
// activate leaf node to get access to its data
if leafBucket.POid() != zodb.InvalidOid {
// normal bucket
err := leafBucket.PActivate(ctx)
if err != nil {
return err
}
defer leafBucket.PDeactivate()
} else {
// bucket embedded into tree
// XXX assert len(path) == 2
err := treeRoot.PActivate(ctx)
if err != nil {
return err
}
defer treeRoot.PDeactivate()
// XXX assert len(treeRoot.Entryv()) == 1
// XXX assert [0] is Bucket && POid == zodb.InvalidOid
leafBucket = treeRoot.Entryv()[0].Child().(*Bucket) // because it is recreated
}
bkeys := SetKey{}
for _, __ := range leafBucket.Entryv() {
bkeys.Add(__.Key())
}
fmt.Printf(" bkeys: %s\n", bkeys)
for {
track.trackedKeys.Update(bkeys)
if track.parent == zodb.InvalidOid {
break
}
track = δBtail.trackIdx[track.parent]
}
}
*/
_
,
ok
:=
δBtail
.
byRoot
[
root
]
_
,
ok
:=
δBtail
.
byRoot
[
root
]
if
!
ok
{
if
!
ok
{
...
...
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