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
c051c89b
Commit
c051c89b
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
644bcd6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+9
-17
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
c051c89b
...
@@ -432,21 +432,10 @@ func (δBtail *ΔBtail) rebuildAll() (err error) {
...
@@ -432,21 +432,10 @@ func (δBtail *ΔBtail) rebuildAll() (err error) {
return
nil
return
nil
}
}
/* XXX kill
// vδTSnapForTrackedKey returns vδT snapshot for root that takes into account
// rebuild1IfNeeded rebuilds ΔBtail for single root if that root needs rebuilding.
// at least all previous Track requests related to key.
func (δBtail *ΔBtail) rebuild1IfNeeded(root zodb.Oid) error {
//
// XXX locking
// vδT is rebuilt if there are such not-yet-handled Track requests.
_, ok := δBtail.trackNewRoots[root]
if !ok {
return nil
}
delete(δBtail.trackNewRoots, root)
return δBtail.rebuild1(root)
}
*/
// vδTSnapForTrackedKey returns vδT snapshot for root that takes into account at least all previous Track requests related to key.
func
(
δBtail
*
ΔBtail
)
vδTSnapForTrackedKey
(
root
zodb
.
Oid
,
key
Key
)
(
vδT
[]
ΔTree
,
err
error
)
{
func
(
δBtail
*
ΔBtail
)
vδTSnapForTrackedKey
(
root
zodb
.
Oid
,
key
Key
)
(
vδT
[]
ΔTree
,
err
error
)
{
// XXX δBtail.lock
// XXX δBtail.lock
δTtail
:=
δBtail
.
byRoot
[
root
]
// must be there
δTtail
:=
δBtail
.
byRoot
[
root
]
// must be there
...
@@ -478,7 +467,7 @@ func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []Δ
...
@@ -478,7 +467,7 @@ func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []Δ
}
}
// key ∈ ktrackNew -> this goroutine becomes responsible to start rebuilding vδT for it
// key ∈ ktrackNew -> this goroutine becomes responsible to start rebuilding vδT for it
// lauch rebuild job for all keys queued in ktrackNew so far
// lau
n
ch rebuild job for all keys queued in ktrackNew so far
err
=
δTtail
.
_runRebuildJob
(
root
,
δBtail
)
err
=
δTtail
.
_runRebuildJob
(
root
,
δBtail
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -491,7 +480,10 @@ func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []Δ
...
@@ -491,7 +480,10 @@ func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []Δ
return
vδT
,
nil
return
vδT
,
nil
}
}
// vδTSnapForTracked returns vδT snapshot for root that takes into account all previous Track requests.
// vδTSnapForTracked returns vδT snapshot for root that takes into account all
// previous Track requests.
//
// vδT is rebuilt if there are such not-yet-handled Track requests.
func
(
δBtail
*
ΔBtail
)
vδTSnapForTracked
(
root
zodb
.
Oid
)
(
vδT
[]
ΔTree
,
err
error
)
{
func
(
δBtail
*
ΔBtail
)
vδTSnapForTracked
(
root
zodb
.
Oid
)
(
vδT
[]
ΔTree
,
err
error
)
{
// XXX δBtail.lock
// XXX δBtail.lock
δTtail
:=
δBtail
.
byRoot
[
root
]
// must be there
δTtail
:=
δBtail
.
byRoot
[
root
]
// must be there
...
...
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