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
f34f301b
Commit
f34f301b
authored
Jun 15, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
77b87664
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+17
-6
No files found.
wcfs/δbtail_test.go
View file @
f34f301b
...
@@ -529,13 +529,13 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
...
@@ -529,13 +529,13 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
keys
.
Add
(
allKeyv
[
idx
])
keys
.
Add
(
allKeyv
[
idx
])
}
}
xverifyΔBTail1
(
t
,
subj
,
db
,
treeRoot
,
at1
,
at2
,
d12
,
maxKey
,
δZ
,
keys
)
xverifyΔBTail1
(
t
,
subj
,
db
,
treeRoot
,
at1
,
at2
,
d12
,
maxKey
,
δZ
,
keys
,
kadj
)
}
}
}
}
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// tracked state defined by initialTrackedKeys.
// tracked state defined by initialTrackedKeys.
func
xverifyΔBTail1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
d12
map
[
Key
]
string
,
maxKey
Key
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
SetKey
)
{
func
xverifyΔBTail1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
d12
map
[
Key
]
string
,
maxKey
Key
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
SetKey
,
kadj
map
[
Key
]
SetKey
)
{
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
assert
:=
require
.
New
(
t
)
assert
:=
require
.
New
(
t
)
...
@@ -605,6 +605,8 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
...
@@ -605,6 +605,8 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
// - outside tracked set -> may be present in δT
// - outside tracked set -> may be present in δT
// - maxkey -> must be present in δT if trackingMaxKey
// - maxkey -> must be present in δT if trackingMaxKey
// XXX use kadj - check exactly whether k is present in δT or not present
// δT is subset of d12
// δT is subset of d12
for
k
:=
range
δT
{
for
k
:=
range
δT
{
_
,
ind12
:=
d12
[
k
]
_
,
ind12
:=
d12
[
k
]
...
@@ -721,7 +723,6 @@ func TestΔBTail(t *testing.T) {
...
@@ -721,7 +723,6 @@ func TestΔBTail(t *testing.T) {
for
_
,
k
:=
range
keyv
{
ks
.
Add
(
k
)
}
for
_
,
k
:=
range
keyv
{
ks
.
Add
(
k
)
}
return
ks
return
ks
}
}
_
=
K
// oo is shorthand for kInf
// oo is shorthand for kInf
const
oo
=
kInf
const
oo
=
kInf
// A is shorthand for map[Key]SetKey
// A is shorthand for map[Key]SetKey
...
@@ -773,12 +774,22 @@ _ = K
...
@@ -773,12 +774,22 @@ _ = K
// bucket split; +3 in new bucket
// bucket split; +3 in new bucket
"T/B1:a,2:b"
,
"T/B1:a,2:b"
,
"T2/B1:a-B2:b,3:c"
,
Δ
(
"T2/B1:a-B2:b,3:c"
,
A
{
1
:
K
(
1
,
2
),
// no 3
2
:
K
(
1
,
2
,
3
),
3
:
K
(
1
,
2
,
3
),
oo
:
K
(
2
,
3
)}),
// no 1 XXX correct?
// bucket split; +3 in new bucket; +4 +5 in another new bucket
// bucket split; +3 in new bucket; +4 +5 in another new bucket
// which remain not tracked
(XXX unless TrackMaxKey TODO verify)
// which remain not tracked
if 4 and 5 were not previously accessed.
"T/B1:a,2:b"
,
"T/B1:a,2:b"
,
"T2,4/B1:a-B2:b,3:c-B4:d,5:e"
,
Δ
(
"T2,4/B1:a-B2:b,3:c-B4:d,5:e"
,
A
{
1
:
K
(
1
,
2
),
2
:
K
(
1
,
2
,
3
),
3
:
K
(
1
,
2
,
3
),
4
:
K
(
1
,
2
,
4
,
5
),
5
:
K
(
1
,
2
,
4
,
5
),
oo
:
K
(
2
,
4
,
5
)}),
// XXX correct?
// depth=2; bucket split; +3 in new bucket; left T remain
// depth=2; bucket split; +3 in new bucket; left T remain
// _unchanged_ even though B under it is modified; right arm is
// _unchanged_ even though B under it is modified; right arm is
...
...
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