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
a1490e33
Commit
a1490e33
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
124d15b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+13
-6
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
a1490e33
...
...
@@ -537,13 +537,13 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
// XXX errctx
job
:=
&
_RebuildJob
{
ready
:
make
(
chan
struct
{})}
trackNew
:=
δTtail
.
trackNew
rebuildKeys
:=
δTtail
.
ktrackNew
trackNew
:=
δTtail
.
trackNew
ktrackNew
:=
δTtail
.
ktrackNew
δTtail
.
trackNew
=
blib
.
PPTreeSubSet
{}
δTtail
.
ktrackNew
=
blib
.
RangedKeySet
{}
// krebuildJobs +=
rebuildKeys
for
_
,
r
:=
range
rebuildKeys
.
AllRanges
()
{
// krebuildJobs +=
ktrackNew
for
_
,
r
:=
range
ktrackNew
.
AllRanges
()
{
// XXX assert !krebuildJobs.IntersectsRange(e.KeyRange)
δTtail
.
krebuildJobs
.
SetRange
(
r
,
job
)
}
...
...
@@ -554,8 +554,8 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
vδTnew
,
δtrackSet
,
err
:=
vδTBuild
(
root
,
trackNew
,
δBtail
.
δZtail
,
δBtail
.
db
)
δBtail
.
mu
.
Lock
()
// krebuildJobs -=
rebuildKeys
for
_
,
r
:=
range
rebuildKeys
.
AllRanges
()
{
// krebuildJobs -=
ktrackNew
for
_
,
r
:=
range
ktrackNew
.
AllRanges
()
{
// XXX assert krebuildJobs[r] == job
δTtail
.
krebuildJobs
.
DelRange
(
r
)
}
...
...
@@ -567,6 +567,13 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
δrevSet
:=
vδTMergeInplace
(
&
δTtail
.
vδT
,
vδTnew
)
δBtail
.
trackSet
.
UnionInplace
(
δtrackSet
)
δBtail
.
_vδBroots_Update
(
root
,
δrevSet
)
}
else
{
// reinstate trackNew and ktrackNew back, so that data for those
// keys are tried to be rebuilt next time, not silently remain
// missing in vδT, i.e. corrupted.
δTtail
.
trackNew
.
UnionInplace
(
trackNew
)
δTtail
.
ktrackNew
.
UnionInplace
(
&
ktrackNew
)
δBtail
.
trackNewRoots
.
Add
(
root
)
}
// we are done
...
...
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