Commit 6116d52a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f4ac3442
......@@ -101,6 +101,7 @@ type Key = int64
type ΔTail struct {
δBtail []ΔRevEntry // BTree changes; Covers keys ∈ tracket subset
δZtail *zodb.ΔTail // raw ZODB changes; Kept to rebuild δBtail after new Track
// head zodb.Tid // δBtail currently has coverage till head], δZtail can have more
// XXX or ask client provide db on every call?
db *zodb.DB // to open connections to load new/old tree|buckets
......@@ -135,7 +136,7 @@ func NewΔTail(at0 zodb.Tid) *ΔTail {
// Head is similar to zodb.ΔTail.Head . XXX ok?
func (δb *ΔTail) Head() zodb.Tid {
return δb.δZtail.Head()
return δb.head
}
// Tail is similar to zodb.ΔTail.Tail . XXX ok?
......@@ -174,6 +175,13 @@ func (δb *ΔTail) Track(path []Node) { // XXX Tree|Bucket; path[0] = root
func (δB *ΔTail) Update(δZ *zodb.EventCommit) {
/*
.δZtail += δZ
.update()
*/
// update brings .δBtail up to date by recomputing diff XXX and taking new
// entries in .δZtail into account.
func (δB *ΔTail) update() {
/*
δbZ = {}
for δ in δZ:
.rootIdx[δ]:
......
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