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
7a7c9756
Commit
7a7c9756
authored
Jun 23, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0917380e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
wcfs/internal/xbtree/treediff.go
wcfs/internal/xbtree/treediff.go
+23
-13
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+3
-2
No files found.
wcfs/internal/xbtree/treediff.go
View file @
7a7c9756
...
...
@@ -580,7 +580,8 @@ ABcov:
// by default a node contributes to δ-
// a node ac does not contribute to δ- and can be skipped, if:
// - ac is not tracked, or
// - ac ∉ δZTC && ∃ bc from B: ac.oid == bc.oid (ac+ac.children were not changed, and ac stays in the tree)
// - ac ∉ δZTC && ∃ bc from B: ac.oid == bc.oid && ac.keyrange == bc.keyrange
// (ac+ac.children were not changed, ac stays in the tree with the same key range coverage)
Aq
:=
[]
*
nodeInRange
{
atop
}
// queue for A nodes that contribute to δ-
for
len
(
Aq
)
>
0
{
debugfDiff
(
"
\n
"
)
...
...
@@ -667,7 +668,10 @@ ABcov:
}
}
if
found
{
// ac can be skipped
// ac can be skipped if key coverage stays the same
ar
:=
KeyRange
{
ac
.
lo
,
ac
.
hi_
}
br
:=
KeyRange
{
bc
.
lo
,
bc
.
hi_
}
if
ar
==
br
{
// adjust trackSet since path to the node could have changed
apath
:=
ac
.
Path
()
bpath
:=
bc
.
Path
()
...
...
@@ -680,17 +684,23 @@ ABcov:
}
}
continue
}
/*
// adjust δtkeycov only if it was leaf bucket
if nc := at.nchild; nc == 0 {
ar := KeyRange{ac.lo, ac.hi_}
br := KeyRange{bc.lo, bc.hi_}
δtkeycovADel.AddRange(ar)
δtkeycovBAdd
.
AddRange
(
br
)
//δtkeycovBAdd.AddRange(br)
// XXX remove KKK vvv
debugfDiff(" δtrack - %s %v KKK\n", ar, apath)
debugfDiff(" δtrack + %s %v KKK\n", br, bpath)
}
*/
continue
//
continue
}
}
...
...
wcfs/internal/xbtree/δbtail_test.go
View file @
7a7c9756
...
...
@@ -741,7 +741,8 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
}
}
TrackedδZ
=
SetKey
{}
// Tracked ^ δZ
// TrackedδZ = Tracked ^ δZ (i.e. a tracked node has changed, or its coverage was changed)
TrackedδZ
=
SetKey
{}
for
k
:=
range
initialTrackedKeys
{
leaf1
:=
xkv1
.
Get
(
k
)
oid1
:=
leaf1
.
oid
...
...
@@ -753,7 +754,7 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
if
oid2
==
zodb
.
InvalidOid
{
// embedded bucket
oid2
=
leaf2
.
parent
.
oid
}
if
δZset
.
Has
(
oid1
)
||
δZset
.
Has
(
oid2
)
{
if
δZset
.
Has
(
oid1
)
||
δZset
.
Has
(
oid2
)
||
(
KeyRange
{
leaf1
.
lo
,
leaf1
.
hi_
}
!=
KeyRange
{
leaf2
.
lo
,
leaf2
.
hi_
})
{
TrackedδZ
.
Add
(
k
)
}
}
...
...
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