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
4d9005ee
Commit
4d9005ee
authored
Oct 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4f3bd5d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+16
-6
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
4d9005ee
...
...
@@ -53,12 +53,12 @@ package xbtree
// traversal also belongs to the set.
//
// A new Track request potentially grows tracked keys coverage. Due to this,
//
ΔBtail needs to recompute potentially whole vδT of the affected tree. This
//
recomputation is managed by "rebuild..." family of functions and uses the
//
same treediff algorithm, that Update is using, but modulo PPTreeSubSe
t
//
corresponding to δ key coverage. Update also potentially needs to rebuild
//
whole vδT history, not only append new δT, because a change to tracked tree
// nodes can result in growth of tracked key coverage.
//
on a query, ΔBtail needs to recompute potentially whole vδT of the affected
//
tree. This recomputation is managed by "vδTSnapForTracked*" and "_rebuild"
//
functions and uses the same treediff algorithm, that Update is using, bu
t
//
modulo PPTreeSubSet corresponding to δ key coverage. Update also potentially
//
needs to rebuild whole vδT history, not only append new δT, because a
//
change to tracked tree
nodes can result in growth of tracked key coverage.
//
// Queries are relatively straightforward code that work on vδT snapshot. The
// main complexity, besides BTree-diff algorithm, lies in recomputing vδT when
...
...
@@ -68,6 +68,16 @@ package xbtree
//
// Concurrency
//
// In order to allow multiple Track and queries requests to be served in
// parallel ΔBtail employs special organization of vδT rebuild process:
//
// 1. vδT is managed under read-copy-update (RCU) discipline: before making
// any vδT change the mutator atomically clones whole vδT and applies the
// change to the clone. This way a query, once it retrieves vδT snapshot,
// does not need to further synchronize with vδT mutators.
//
// 2.
//
// 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 ...
...
...
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