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
7d530bbc
Commit
7d530bbc
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c09ba806
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+10
-9
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
7d530bbc
...
...
@@ -566,7 +566,7 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
δTtail
.
vδT
=
vδTClone
(
δTtail
.
vδT
)
δrevSet
:=
vδTMergeInplace
(
&
δTtail
.
vδT
,
vδTnew
)
δBtail
.
trackSet
.
UnionInplace
(
δtrackSet
)
δBtail
.
vδBroots_Update
(
root
,
δrevSet
)
δBtail
.
_
vδBroots_Update
(
root
,
δrevSet
)
}
// we are done
...
...
@@ -590,7 +590,7 @@ func (δBtail *ΔBtail) rebuild1(root zodb.Oid) error {
δTtail
.
vδT
=
vδTClone
(
δTtail
.
vδT
)
δrevSet
:=
vδTMergeInplace
(
&
δTtail
.
vδT
,
vδTnew
)
δBtail
.
trackSet
.
UnionInplace
(
δtrackSet
)
δBtail
.
vδBroots_Update
(
root
,
δrevSet
)
δBtail
.
_
vδBroots_Update
(
root
,
δrevSet
)
return
nil
}
...
...
@@ -878,7 +878,7 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
δTtail
.
vδT
=
vδTClone
(
δTtail
.
vδT
)
δrevSet
:=
vδTMergeInplace
(
&
δTtail
.
vδT
,
vδTnew
)
δBtail
.
trackSet
.
UnionInplace
(
δtrackSet
)
δBtail
.
vδBroots_Update
(
root
,
δrevSet
)
δBtail
.
_
vδBroots_Update
(
root
,
δrevSet
)
}
// build δB. Even if δT=ø after _Update1, but δtkeycov1 != ø, above
...
...
@@ -895,7 +895,7 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
// vδBroots += δB (δB.Rev could be already there added by ^^^ rebuild)
for
root
:=
range
δB
.
ByRoot
{
δBtail
.
vδBroots_Update1
(
root
,
δB
.
Rev
)
δBtail
.
_
vδBroots_Update1
(
root
,
δB
.
Rev
)
}
return
δB
,
err
...
...
@@ -979,17 +979,18 @@ func (δBtail *ΔBtail) _Update1(δZ *zodb.EventCommit) (δB1 _ΔBUpdate1, err e
return
δB1
,
nil
}
// vδBroots_Update updates .vδBroots to remember that _ΔTtail for root has
//
_
vδBroots_Update updates .vδBroots to remember that _ΔTtail for root has
// changed entries with δrevSet revisions.
func
(
δBtail
*
ΔBtail
)
vδBroots_Update
(
root
zodb
.
Oid
,
δrevSet
setTid
)
{
// XXX locking
//
// must be called with δBtail.mu locked.
func
(
δBtail
*
ΔBtail
)
_vδBroots_Update
(
root
zodb
.
Oid
,
δrevSet
setTid
)
{
// TODO δrevSet -> []rev↑ and merge them in one go
for
rev
:=
range
δrevSet
{
δBtail
.
vδBroots_Update1
(
root
,
rev
)
δBtail
.
_
vδBroots_Update1
(
root
,
rev
)
}
}
func
(
δBtail
*
ΔBtail
)
vδBroots_Update1
(
root
zodb
.
Oid
,
rev
zodb
.
Tid
)
{
func
(
δBtail
*
ΔBtail
)
_
vδBroots_Update1
(
root
zodb
.
Oid
,
rev
zodb
.
Tid
)
{
l
:=
len
(
δBtail
.
vδBroots
)
j
:=
sort
.
Search
(
l
,
func
(
k
int
)
bool
{
return
rev
<=
δBtail
.
vδBroots
[
k
]
.
Rev
...
...
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