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
ca508686
Commit
ca508686
authored
Apr 14, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
dbc57c35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+11
-17
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
ca508686
...
...
@@ -66,11 +66,11 @@ type Value = zodb.Oid // XXX assumes key points to IPersistent
// XXX incremental; not full coverage
// XXX see also zodb.ΔTail .
//
// ΔTail is not safe for concurrent access.
// ΔTail is not safe for concurrent access.
XXX -> is safe to use from multiple goroutines simultaneously.
type
ΔTail
struct
{
δZtail
*
zodb
.
ΔTail
// raw ZODB changes; Kept to rebuild δBtail/byRoot after new Track
δ
Btail
[]
ΔRevEntry
// which BTree were changed; Noted only by keys ∈ tracket subset
δ
root
[]
ΔRoots
// which BTree were changed; Noted only by keys ∈ tracket subset
byRoot
map
[
*
Tree
]
*
ΔTreeTail
// root -> k/v change history; only for keys ∈ tracket subset
// XXX or ask client provide db on every call?
...
...
@@ -86,34 +86,28 @@ type ΔTail struct {
lastRevOf
map
[
zodb
.
Oid
]
map
[
Key
]
zodb
.
Tid
// {} root -> {} key -> last
}
// ΔRoots describes which BTrees were change in one revision.
type
ΔRoots
struct
{
Rev
zodb
.
Tid
Changev
[]
Tree
// root XXX -> Oid? XXX -> SetTree?
}
// ΔTreeTail represent tail of revisional changes to one BTree.
//
// See ΔTail documentation for details.
type
ΔTreeTail
struct
{
δTtail
[]
ΔTree
Entry
// changes to tree keys; covers keys ∈ tracket subset
δTtail
[]
ΔTree
// changes to tree keys; covers keys ∈ tracket subset
// {}k/v @tail for keys that are changed in (tail, head].
atTail
map
[
*
Tree
]
map
[
Key
]
Value
}
// ΔRevEntry describes which BTrees were change in one revision.
type
ΔRevEntry
struct
{
Rev
zodb
.
Tid
Changev
[]
Tree
// root XXX -> Oid?
}
// ΔTreeEntry describes BTree changes due to one revision.
type
ΔTreeEntry
struct
{
// ΔTree describes changes to one BTree in one revision.
type
ΔTree
struct
{
Rev
zodb
.
Tid
Change
map
[
Key
]
Value
}
// ΔTree represents changes to one tree.
type
ΔTree
struct
{
Root
*
Tree
// XXX -> Oid?
Keyv
[]
Key
}
// NewΔTail creats new empty ΔTail object.
//
// Initial tracked set is empty.
...
...
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