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
3f898826
Commit
3f898826
authored
Apr 12, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7783ecf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
11 deletions
+30
-11
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+27
-11
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+3
-0
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
3f898826
...
...
@@ -89,13 +89,14 @@ type Value = zodb.Oid // XXX assumes key points to IPersistent
// It covers changes to keys from tracked subset of BTrees parts and
// semantically consists of
//
// # k/v change history ; rev ∈ (tail, head]
// [](rev↑,
// [](root,
// {}(key, value)))
// # trees changed by a revision
// [](rev↑, []root) ; rev ∈ (tail, head]
//
// # set of k/v @tail for keys that are not changed in (tail, head].
// {} root ->
// # k/v change history ; rev ∈ (tail, head]
// [](rev↑, {}(key, value))
//
// # set of k/v @tail for keys changed in (tail, head].
// {}(key, value)
//
// A tree nodes become tracked via Track(path) request.
...
...
@@ -111,11 +112,10 @@ type Value = zodb.Oid // XXX assumes key points to IPersistent
//
// ΔTail is not safe for concurrent access.
type
ΔTail
struct
{
δBtail
[]
ΔRevEntry
// BTree changes; Covers keys ∈ tracket subset
δZtail
*
zodb
.
ΔTail
// raw ZODB changes; Kept to rebuild δBtail after new Track
δZtail
*
zodb
.
ΔTail
// raw ZODB changes; Kept to rebuild δBtail (XXX) after new Track
// {} root -> {}k/v @tail for keys that are not changed in (tail, head].
atTail
map
[
*
Tree
]
map
[
Key
]
Value
δBtail
[]
ΔRevEntry
// which BTree were changed; Noted only by keys ∈ tracket subset
byRoot
map
[
*
Tree
]
*
ΔTreeTail
// XXX or ask client provide db on every call?
db
*
zodb
.
DB
// to open connections to load new/old tree|buckets
...
...
@@ -130,10 +130,26 @@ type ΔTail struct {
lastRevOf
map
[
zodb
.
Oid
]
map
[
Key
]
zodb
.
Tid
// {} root -> {} key -> last
}
// ΔRevEntry represents information about BTrees changes in one revision.
// ΔTreeTail represent tail of revisional changes to one BTree.
//
// See ΔTail documentation for details.
type
ΔTreeTail
struct
{
δTtail
[]
ΔTreeEntry
// 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
Changev
[]
Tree
// root XXX -> Oid?
}
// ΔTreeEntry describes BTree changes due to one revision.
type
ΔTreeEntry
struct
{
Rev
zodb
.
Tid
Change
map
[
Key
]
Value
}
// ΔTree represents changes to one tree.
...
...
wcfs/wcfs_test.py
View file @
3f898826
...
...
@@ -648,6 +648,9 @@ def test_wcfs():
# XXX pin message when blk data only first appeared after > w.at - pin
# needs to pin to zero.
# XXX ZBlk copied from blk1 -> blk2 ; for the same file and for file1 -> file2
# XXX ZBlk moved from blk1 -> blk2 ; for the same file and for file1 -> file2
def
test_wcfs_invproto
():
...
...
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