Commit 3f898826 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7783ecf4
......@@ -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.
......
......@@ -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():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment