Commit ca508686 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent dbc57c35
......@@ -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 []ΔTreeEntry // 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.
......
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