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
ef3a09df
Commit
ef3a09df
authored
Sep 21, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
22226d99
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
15 deletions
+0
-15
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+0
-14
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+0
-1
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
ef3a09df
...
@@ -110,9 +110,6 @@ type _ΔTtail struct {
...
@@ -110,9 +110,6 @@ type _ΔTtail struct {
// which vδT was not yet rebuilt
// which vδT was not yet rebuilt
trackNew
blib
.
PPTreeSubSet
trackNew
blib
.
PPTreeSubSet
// XXX + trackNewKeys RangedKeySet (concurrency)
// XXX + trackNewKeys RangedKeySet (concurrency)
// index for GetAt queries
lastRevOf
map
[
Key
]
zodb
.
Tid
// {} key -> last revision
}
}
// _ΔBroots represents roots-only part of ΔB.
// _ΔBroots represents roots-only part of ΔB.
...
@@ -158,7 +155,6 @@ func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail {
...
@@ -158,7 +155,6 @@ func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail {
func
newΔTtail
()
*
_ΔTtail
{
func
newΔTtail
()
*
_ΔTtail
{
return
&
_ΔTtail
{
return
&
_ΔTtail
{
trackNew
:
blib
.
PPTreeSubSet
{},
trackNew
:
blib
.
PPTreeSubSet
{},
lastRevOf
:
make
(
map
[
Key
]
zodb
.
Tid
),
}
}
}
}
...
@@ -200,10 +196,6 @@ func (orig *_ΔTtail) Clone() *_ΔTtail {
...
@@ -200,10 +196,6 @@ func (orig *_ΔTtail) Clone() *_ΔTtail {
klon
:=
&
_ΔTtail
{}
klon
:=
&
_ΔTtail
{}
klon
.
vδT
=
vδTClone
(
orig
.
vδT
)
klon
.
vδT
=
vδTClone
(
orig
.
vδT
)
klon
.
trackNew
=
orig
.
trackNew
.
Clone
()
klon
.
trackNew
=
orig
.
trackNew
.
Clone
()
klon
.
lastRevOf
=
make
(
map
[
Key
]
zodb
.
Tid
,
len
(
orig
.
lastRevOf
))
for
k
,
rev
:=
range
orig
.
lastRevOf
{
klon
.
lastRevOf
[
k
]
=
rev
}
return
klon
return
klon
}
}
...
@@ -389,8 +381,6 @@ func (δTtail *_ΔTtail) rebuild(root zodb.Oid, δZtail *zodb.ΔTail, db *zodb.D
...
@@ -389,8 +381,6 @@ func (δTtail *_ΔTtail) rebuild(root zodb.Oid, δZtail *zodb.ΔTail, db *zodb.D
if
newRevEntry
{
if
newRevEntry
{
δrevSet
.
Add
(
δZ
.
Rev
)
δrevSet
.
Add
(
δZ
.
Rev
)
}
}
// XXX update .lastRevOf
}
}
// an iteration closer to tail may turn out to add a key to the tracking set.
// an iteration closer to tail may turn out to add a key to the tracking set.
...
@@ -547,7 +537,6 @@ func (δTtail *_ΔTtail) rebuild1(atPrev zodb.Tid, δZ zodb.ΔRevEntry, trackNew
...
@@ -547,7 +537,6 @@ func (δTtail *_ΔTtail) rebuild1(atPrev zodb.Tid, δZ zodb.ΔRevEntry, trackNew
}
}
}
}
// XXX update .lastRevOf (here?)
return
δtrack
,
δtkeycov
,
newRevEntry
,
nil
return
δtrack
,
δtkeycov
,
newRevEntry
,
nil
}
}
...
@@ -601,8 +590,6 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -601,8 +590,6 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
δB
.
ByRoot
[
root
]
=
δT
.
KV
δB
.
ByRoot
[
root
]
=
δT
.
KV
}
}
}
}
// XXX rebuild lastRevOf
}
}
// vδBroots += δB (δB.Rev could be already there added by ^^^ rebuild)
// vδBroots += δB (δB.Rev could be already there added by ^^^ rebuild)
...
@@ -744,7 +731,6 @@ func (δBtail *ΔBtail) ForgetPast(revCut zodb.Tid) {
...
@@ -744,7 +731,6 @@ func (δBtail *ΔBtail) ForgetPast(revCut zodb.Tid) {
func
(
δTtail
*
_ΔTtail
)
forgetPast
(
revCut
zodb
.
Tid
)
{
func
(
δTtail
*
_ΔTtail
)
forgetPast
(
revCut
zodb
.
Tid
)
{
// XXX locking
// XXX locking
// XXX lastRevOf
icut
:=
0
icut
:=
0
for
;
icut
<
len
(
δTtail
.
vδT
);
icut
++
{
for
;
icut
<
len
(
δTtail
.
vδT
);
icut
++
{
...
...
wcfs/internal/xbtree/δbtail_test.go
View file @
ef3a09df
...
@@ -1519,7 +1519,6 @@ func _KAdj(t1, t2 *xbtreetest.Commit, keysv ...setKey) (kadj KAdjMatrix) {
...
@@ -1519,7 +1519,6 @@ func _KAdj(t1, t2 *xbtreetest.Commit, keysv ...setKey) (kadj KAdjMatrix) {
// it also verifies that δbtail.vδBroots matches ΔTtail data.
// it also verifies that δbtail.vδBroots matches ΔTtail data.
func
assertΔTtail
(
t
*
testing
.
T
,
subj
string
,
δbtail
*
ΔBtail
,
tj
*
xbtreetest
.
Commit
,
treeRoot
zodb
.
Oid
,
vδTok
...
map
[
Key
]
Δstring
)
{
func
assertΔTtail
(
t
*
testing
.
T
,
subj
string
,
δbtail
*
ΔBtail
,
tj
*
xbtreetest
.
Commit
,
treeRoot
zodb
.
Oid
,
vδTok
...
map
[
Key
]
Δstring
)
{
t
.
Helper
()
t
.
Helper
()
// XXX +lastRevOf
T
:=
tj
.
T
// XXX better require t to be xbtreetest.T instead?
T
:=
tj
.
T
// XXX better require t to be xbtreetest.T instead?
...
...
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