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
cb2fae27
Commit
cb2fae27
authored
Jun 21, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b221b0b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
17 deletions
+7
-17
wcfs/internal/xbtree/pptreesubset.go
wcfs/internal/xbtree/pptreesubset.go
+3
-13
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+3
-3
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+1
-1
No files found.
wcfs/internal/xbtree/pptreesubset.go
View file @
cb2fae27
...
@@ -100,21 +100,11 @@ func (S PPTreeSubSet) AddPath(path []zodb.Oid) {
...
@@ -100,21 +100,11 @@ func (S PPTreeSubSet) AddPath(path []zodb.Oid) {
panic
(
"empty path"
)
panic
(
"empty path"
)
}
}
// normalize path: remove embedded bucket and check whether it was an
// artificial empty tree.
path
=
normPath
(
path
)
path
=
normPath
(
path
)
/*
// don't keep track of artificial empty tree
if l == 1 && path[0] == zodb.InvalidOid {
return
}
// don't explicitly keep track of embedded buckets - they all have
// InvalidOid, and thus, if kept in S, e.g. T/B1:a and another
// T/B2:b would lead to InvalidOid having multiple parents.
if l == 2 && path[1] == zodb.InvalidOid {
path = path[:1]
}
*/
// go through path and add nodes to the set
parent
:=
zodb
.
InvalidOid
parent
:=
zodb
.
InvalidOid
var
pt
*
nodeInTree
=
nil
var
pt
*
nodeInTree
=
nil
for
_
,
oid
:=
range
path
{
for
_
,
oid
:=
range
path
{
...
...
wcfs/internal/xbtree/δbtail.go
View file @
cb2fae27
...
@@ -37,7 +37,7 @@ import (
...
@@ -37,7 +37,7 @@ import (
// TODO kill this after rebuild is finished
// TODO kill this after rebuild is finished
const
XXX_killWhenRebuildWorks
=
true
const
XXX_killWhenRebuildWorks
=
true
const
traceΔBtail
=
tru
e
const
traceΔBtail
=
fals
e
const
debugΔBtail
=
false
const
debugΔBtail
=
false
...
@@ -177,8 +177,8 @@ func newΔTtail() *ΔTtail {
...
@@ -177,8 +177,8 @@ func newΔTtail() *ΔTtail {
}
}
}
}
//
xverifyΔBTail_rebuild needs ΔBTree.clone because otherwise it is too slow to run that test
.
//
Clone returns copy of ΔBtail
.
func
(
orig
*
ΔBtail
)
c
lone
()
*
ΔBtail
{
func
(
orig
*
ΔBtail
)
C
lone
()
*
ΔBtail
{
klon
:=
&
ΔBtail
{
db
:
orig
.
db
}
klon
:=
&
ΔBtail
{
db
:
orig
.
db
}
// δZtail
// δZtail
...
...
wcfs/internal/xbtree/δbtail_test.go
View file @
cb2fae27
...
@@ -1062,7 +1062,7 @@ func xverifyΔBTail_rebuild(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, t0, t1
...
@@ -1062,7 +1062,7 @@ func xverifyΔBTail_rebuild(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, t0, t1
// t.Run is expensive at this level of nest
// t.Run is expensive at this level of nest
// t.Run(" T"+keys2.String()+";R", func(t *testing.T) {
// t.Run(" T"+keys2.String()+";R", func(t *testing.T) {
δbtail_
:=
δbtail
.
c
lone
()
δbtail_
:=
δbtail
.
C
lone
()
xverifyΔBTail_rebuild_TR
(
t
,
db
,
δbtail_
,
t2
,
treeRoot
,
xat
,
xverifyΔBTail_rebuild_TR
(
t
,
db
,
δbtail_
,
t2
,
treeRoot
,
xat
,
// after Track(keys2)
// after Track(keys2)
keys2
,
keys2
,
...
...
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