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
33abf5f4
Commit
33abf5f4
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b0b62edc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+13
-13
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
33abf5f4
...
...
@@ -202,7 +202,7 @@ type ΔTree struct {
}
// _RebuildJob represents currently in-progress
rebuilding job. XXX
// _RebuildJob represents currently in-progress
vδT rebuilding job.
// XXX place
type
_RebuildJob
struct
{
ready
chan
struct
{}
// closed when job completes
...
...
@@ -316,15 +316,6 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
//
// XXX put keycov back to come first?
func
(
δBtail
*
ΔBtail
)
Track
(
nodePath
[]
Node
,
keycov
KeyRange
)
{
/* XXX kill
if traceΔBtail {
pathv := []string{}
for _, node := range nodePath { pathv = append(pathv, vnode(node)) }
tracefΔBtail("\nTrack %s %s\n", keycov, strings.Join(pathv, " -> "))
tracefΔBtail("trackSet: %s\n", δBtail.trackSet) // XXX locking
}
*/
head
:=
δBtail
.
Head
()
for
_
,
node
:=
range
nodePath
{
nodeAt
:=
node
.
PJar
()
.
At
()
...
...
@@ -393,16 +384,24 @@ func (δBtail *ΔBtail) track(path []zodb.Oid, keycov KeyRange) {
}
return
}
// XXX also check if leaf ∈ trackNew ?
// XXX also check if keycov ∈ krebuildJobs
// queue path into trackNew
// queue path into trackNew
, if not there already
δTtail
,
ok
:=
δBtail
.
byRoot
[
root
]
if
!
ok
{
δTtail
=
newΔTtail
()
δBtail
.
byRoot
[
root
]
=
δTtail
}
if
δTtail
.
trackNew
.
Has
(
leaf
)
{
tracefΔBtail
(
"->T: nop
\n
"
)
path_
:=
δTtail
.
trackNew
.
Path
(
leaf
)
if
!
pathEqual
(
path
,
path_
)
{
panicf
(
"BUG: keyrange %s is already in trackNew via path=%v
\n
track requests path=%v"
,
keycov
,
path_
,
path
)
}
return
}
// XXX also check if keycov ∈ krebuildJobs
δBtail
.
trackNewRoots
.
Add
(
root
)
δTtail
.
trackNew
.
AddPath
(
path
)
δTtail
.
ktrackNew
.
AddRange
(
keycov
)
...
...
@@ -779,6 +778,7 @@ func vδTMerge1Inplace(pvδT *[]ΔTree, δT ΔTree) (newRevEntry bool) {
δv_
,
already
:=
δTcurr
.
KV
[
k
]
if
already
{
if
δv
!=
δv_
{
// TODO: return "conflict"
panicf
(
"[%v] inconsistent δv:
\n
δTcurr: %v
\n
δT: %v"
,
k
,
δTcurr
,
δT
)
}
}
else
{
...
...
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