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
b71c111b
Commit
b71c111b
authored
Jun 19, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9f354dc7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
wcfs/δbtail.go
wcfs/δbtail.go
+5
-2
No files found.
wcfs/δbtail.go
View file @
b71c111b
...
@@ -227,6 +227,7 @@ const (
...
@@ -227,6 +227,7 @@ const (
// XXX TrackMinKey (we don't need it in WCFS)
// XXX TrackMinKey (we don't need it in WCFS)
)
)
// XXX kill keyPresent
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
keyPresent
bool
,
path
[]
Node
,
flags
TrackFlags
)
{
// XXX Tree|Bucket; path[0] = root
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
keyPresent
bool
,
path
[]
Node
,
flags
TrackFlags
)
{
// XXX Tree|Bucket; path[0] = root
l
:=
len
(
path
)
l
:=
len
(
path
)
if
l
==
0
{
if
l
==
0
{
...
@@ -243,7 +244,7 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
...
@@ -243,7 +244,7 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
oidv
:=
[]
Oid
{}
oidv
:=
[]
Oid
{}
for
_
,
node
:=
range
path
{
oidv
=
append
(
oidv
,
node
.
POid
())
}
for
_
,
node
:=
range
path
{
oidv
=
append
(
oidv
,
node
.
POid
())
}
fmt
.
Printf
(
"Track %v
\n
"
,
oidv
)
fmt
.
Printf
(
"Track %v
%v
\n
"
,
key
,
oidv
)
parent
:=
zodb
.
InvalidOid
parent
:=
zodb
.
InvalidOid
var
track
nodeTrack
var
track
nodeTrack
...
@@ -269,11 +270,13 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
...
@@ -269,11 +270,13 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
}
}
// tracked += all keys of leaf bucket for every node up to the root
// 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
{
if
!
oldTrack
&&
leafBucket
!=
nil
{
bkeys
:=
SetKey
{}
bkeys
:=
SetKey
{}
for
_
,
__
:=
range
leafBucket
.
Entryv
()
{
for
_
,
__
:=
range
leafBucket
.
Entryv
()
{
// XXX activate
bkeys
.
Add
(
__
.
Key
())
bkeys
.
Add
(
__
.
Key
())
}
}
fmt
.
Printf
(
" bkeys: %s
\n
"
,
bkeys
)
for
{
for
{
track
.
trackedKeys
.
Update
(
bkeys
)
track
.
trackedKeys
.
Update
(
bkeys
)
...
...
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