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
cd78fa30
Commit
cd78fa30
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
912fa765
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
wcfs/δbtail.go
wcfs/δbtail.go
+7
-5
No files found.
wcfs/δbtail.go
View file @
cd78fa30
...
...
@@ -177,7 +177,7 @@ type ΔBtail struct {
trackNew
SetOid
// tracked nodes index: node -> parent +
keys tracked
under this node
// tracked nodes index: node -> parent +
accessed holes
under this node
trackIdx
map
[
zodb
.
Oid
]
nodeTrack
}
...
...
@@ -185,8 +185,7 @@ type ΔBtail struct {
// nodeTrack represents tracking information about a node.
type
nodeTrack
struct
{
parent
zodb
.
Oid
// parent node | InvalidOid for root
holes
SetKey
// missing keys tracked under this node XXX nil for root(?) XXX only !empty root
// trackedKeys SetKey // XXX kill
holes
SetKey
// missing keys tracked under this node; nil for !leaf
}
// ΔB represents a change in BTrees space.
...
...
@@ -295,12 +294,15 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
parent
:=
zodb
.
InvalidOid
var
track
nodeTrack
var
oldTrack
bool
for
_
,
node
:=
range
path
{
for
i
,
node
:=
range
path
{
oid
:=
node
.
POid
()
// XXX check for InvalidOid (e.g. T/B1:a with bucket not having its own oid.
track
,
oldTrack
=
δBtail
.
trackIdx
[
oid
]
if
!
oldTrack
{
track
=
nodeTrack
{
parent
:
parent
,
holes
:
SetKey
{}}
track
=
nodeTrack
{
parent
:
parent
}
if
i
==
l
-
1
{
// leaf
track
.
holes
=
SetKey
{}
}
δBtail
.
trackIdx
[
oid
]
=
track
// XXX .trackNew += oid
}
...
...
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