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
cd9db582
Commit
cd9db582
authored
Jul 15, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
caa0240f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+17
-12
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
cd9db582
...
...
@@ -305,21 +305,26 @@ func (δBtail *ΔBtail) rebuildAll() (err error) {
defer
xerr
.
Context
(
&
err
,
"ΔBtail rebuildAll"
)
// XXX locking
trac
kNewRoots
:=
δBtail
.
trackNewRoots
trac
efΔBtail
(
"
\n
RebuildAll @%s..@%s trackNewRoots: %s
\n
"
,
δBtail
.
Tail
(),
δBtail
.
Head
(),
δBtail
.
trackNewRoots
)
tracefΔBtail
(
"
\n
RebuildAll @%s..@%s trackNewRoots: %s
\n
"
,
δBtail
.
Tail
(),
δBtail
.
Head
(),
trackNewRoots
)
for
root
:=
range
trackNewRoots
{
δTtail
:=
δBtail
.
vδTbyRoot
[
root
]
// must be there
δtrackSet
,
δrevSet
,
err
:=
δTtail
.
rebuild
(
root
,
δBtail
.
δZtail
,
δBtail
.
db
)
if
err
!=
nil
{
return
err
}
δBtail
.
trackSet
.
UnionInplace
(
δtrackSet
)
δBtail
.
vδBroots_Update
(
root
,
δrevSet
)
for
root
:=
range
δBtail
.
trackNewRoots
{
δBtail
.
rebuild1
(
root
)
}
δBtail
.
trackNewRoots
=
setOid
{}
return
nil
}
// rebuild1 rebuilds ΔBtail for single root.
func
(
δBtail
*
ΔBtail
)
rebuild1
(
root
zodb
.
Oid
)
error
{
// XXX locking
delete
(
δBtail
.
trackNewRoots
,
root
)
δTtail
:=
δBtail
.
vδTbyRoot
[
root
]
// must be there
δtrackSet
,
δrevSet
,
err
:=
δTtail
.
rebuild
(
root
,
δBtail
.
δZtail
,
δBtail
.
db
)
if
err
!=
nil
{
return
err
}
δBtail
.
trackSet
.
UnionInplace
(
δtrackSet
)
δBtail
.
vδBroots_Update
(
root
,
δrevSet
)
return
nil
}
...
...
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