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
8a2e57c5
Commit
8a2e57c5
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
75777cca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+14
-3
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
8a2e57c5
...
...
@@ -421,13 +421,20 @@ func (δBtail *ΔBtail) track(path []zodb.Oid, keycov KeyRange) {
// XXX inline into _Update1 ?
func
(
δBtail
*
ΔBtail
)
rebuildAll
()
(
err
error
)
{
defer
xerr
.
Context
(
&
err
,
"ΔBtail rebuildAll"
)
// XXX locking
// XXX locking correct?
δBtail
.
mu
.
Lock
()
defer
δBtail
.
mu
.
Unlock
()
tracefΔBtail
(
"
\n
RebuildAll @%s..@%s trackNewRoots: %s
\n
"
,
δBtail
.
Tail
(),
δBtail
.
Head
(),
δBtail
.
trackNewRoots
)
for
root
:=
range
δBtail
.
trackNewRoots
{
delete
(
δBtail
.
trackNewRoots
,
root
)
δBtail
.
rebuild1
(
root
)
δTtail
:=
δBtail
.
byRoot
[
root
]
// must be there
err
=
δTtail
.
_runRebuildJob
(
root
,
δBtail
)
if
err
!=
nil
{
return
err
}
// delete(δBtail.trackNewRoots, root)
// δBtail.rebuild1(root) // XXX err
}
return
nil
...
...
@@ -532,6 +539,8 @@ func (δBtail *ΔBtail) vδTSnapForTracked(root zodb.Oid) (vδT []ΔTree, err er
//
// must be called with δBtail.mu locked.
// returns with δBtail.mu locked.
//
// XXX naming -> _rebuild1 ?
func
(
δTtail
*
_ΔTtail
)
_runRebuildJob
(
root
zodb
.
Oid
,
δBtail
*
ΔBtail
)
(
err
error
)
{
// XXX errctx
job
:=
&
_RebuildJob
{
ready
:
make
(
chan
struct
{})}
...
...
@@ -581,6 +590,7 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
return
err
}
/*
// rebuild1 rebuilds ΔBtail for single root.
// XXX inline into rebuildAll ?
func (δBtail *ΔBtail) rebuild1(root zodb.Oid) error {
...
...
@@ -599,6 +609,7 @@ func (δBtail *ΔBtail) rebuild1(root zodb.Oid) error {
δBtail._vδBroots_Update(root, δrevSet)
return nil
}
*/
// XXX move vδTBuild/vδTBuild1/Merge,Widen to after Update?
...
...
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