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
75777cca
Commit
75777cca
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f0e33f8b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+15
-16
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
75777cca
...
...
@@ -69,9 +69,12 @@ package xbtree
//
// trackSet, ktrackNew, krebuildJobs + explain rebuild algo (query lock, check ktrackNew, krebuildJob, go/merge/...)
//
// XXX queries work on vδT snapshot. When updated, vδT is modified via RCU ...
//
// This locking organization allows non-overlapping queries/track-requests to
// run simultaneously. Without this property WCFS would not be able to serve
// several non-overlapping READ requests to one file in parallel.
// run simultaneously. This property is essential to WCFS because otherwise WCFS
// would not be able to serve several non-overlapping READ requests to one file
// in parallel.
//
// --------
//
...
...
@@ -188,6 +191,12 @@ type _ΔTtail struct {
krebuildJobs
_RangedMap_RebuildJob
// {} keycov -> job
}
// _RebuildJob represents currently in-progress vδT rebuilding job.
type
_RebuildJob
struct
{
ready
chan
struct
{}
// closed when job completes
err
error
}
// _ΔBroots represents roots-only part of ΔB.
//
// It describes which trees were changed, but does not provide δkv details for changed trees.
...
...
@@ -209,14 +218,6 @@ type ΔTree struct {
}
// _RebuildJob represents currently in-progress vδT rebuilding job.
// XXX place
type
_RebuildJob
struct
{
ready
chan
struct
{}
// closed when job completes
err
error
}
// NewΔBtail creates new empty ΔBtail object.
//
// Initial tracked set is empty.
...
...
@@ -470,14 +471,12 @@ 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
// run rebuild job for all keys queued in ktrackNew so far
err
=
δTtail
.
_runRebuildJob
(
root
,
δBtail
)
if
err
!=
nil
{
return
nil
,
err
}
if
err
==
nil
{
vδT
=
δTtail
.
vδT
}
δBtail
.
mu
.
Unlock
()
return
vδT
,
nil
return
vδT
,
err
}
// vδTSnapForTracked returns vδT snapshot for root that takes into account all
...
...
@@ -579,7 +578,7 @@ func (δTtail *_ΔTtail) _runRebuildJob(root zodb.Oid, δBtail *ΔBtail) (err er
// we are done
job
.
err
=
err
close
(
job
.
ready
)
return
job
.
err
return
err
}
// rebuild1 rebuilds ΔBtail for single root.
...
...
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