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
b0b62edc
Commit
b0b62edc
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c051c89b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+5
-10
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
b0b62edc
...
...
@@ -78,7 +78,6 @@ package xbtree
// (*) implemented in treediff.go
// (+) full database scan
////go:generate ./blib/gen-rangemap _RangedMap_Path []zodbOid zrangemap_path.go
//go:generate ./blib/gen-rangemap _RangedMap_RebuildJob *_RebuildJob zrangemap_rebuildjob.go
import
(
...
...
@@ -96,7 +95,6 @@ import (
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xtail"
)
//type zodbOid = zodb.Oid XXX kill
const
traceΔBtail
=
false
const
debugΔBtail
=
false
...
...
@@ -173,15 +171,11 @@ type _ΔTtail struct {
// want to change data that is already returned to user.
vδT
[]
ΔTree
// changes to tree keys; rev↑. covers keys ∈ tracked subset
// // set of keys(nodes) that were requested to be tracked in this tree,
// // but for which vδT rebuild was not yet started
// ktrackNew _RangedMap_Path // {} keycov -> path
// set of keys that were requested to be tracked in this tree,
// but for which vδT rebuild was not yet started
ktrackNew
blib
.
RangedKeySet
// {keycov}
// set of nodes corresponding to ktrackNew
trackNew
blib
.
PPTreeSubSet
trackNew
blib
.
PPTreeSubSet
// PP{nodes}
// set of keys(nodes) for which rebuild is in progress
krebuildJobs
_RangedMap_RebuildJob
// {} keycov -> job
...
...
@@ -574,6 +568,7 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
}
// rebuild1 rebuilds ΔBtail for single root.
// XXX inline into rebuildAll ?
func
(
δBtail
*
ΔBtail
)
rebuild1
(
root
zodb
.
Oid
)
error
{
// XXX locking
δTtail
:=
δBtail
.
byRoot
[
root
]
// must be there
...
...
@@ -930,7 +925,7 @@ func (δBtail *ΔBtail) _Update1(δZ *zodb.EventCommit) (δB1 _ΔBUpdate1, err e
δBtail
.
δZtail
.
Append
(
δZ
.
Tid
,
δZ
.
Changev
)
// NOTE: keep vvv in sync with
ΔTtail.r
ebuild1
// NOTE: keep vvv in sync with
vδTR
ebuild1
δZTC
,
δtopsByRoot
:=
δZConnectTracked
(
δZ
.
Changev
,
δBtail
.
trackSet
)
...
...
@@ -1110,7 +1105,7 @@ func (δBtail *ΔBtail) GetAt(root zodb.Oid, key Key, at zodb.Tid) (value Value,
rev
=
tail
revExact
=
false
// retrieve vδT snapshot that is rebuilt to take Track(key) requests
// retrieve vδT snapshot that is rebuilt to take Track(key) requests
into account
vδT
,
err
:=
δBtail
.
vδTSnapForTrackedKey
(
root
,
key
)
if
err
!=
nil
{
return
value
,
rev
,
valueExact
,
revExact
,
err
...
...
@@ -1162,7 +1157,7 @@ func (δBtail *ΔBtail) SliceByRootRev(root zodb.Oid, lo, hi zodb.Tid) (/*readon
}()
}
// retrieve vδT snapshot that is rebuilt to take all previous Track requests
// retrieve vδT snapshot that is rebuilt to take all previous Track requests
into account
vδT
,
err
:=
δBtail
.
vδTSnapForTracked
(
root
)
if
err
!=
nil
{
panic
(
err
)
// XXX
...
...
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