Commit 66c5b4d4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0d366d6e
......@@ -878,12 +878,10 @@ def test_wcfs():
# >>> (@at3) commit again without changing zf size XXX write about b cache inval
f2 = t.open(zf, at=at2)
# t.change(zf, {2: '3c'})
t.change(zf, {1: '3b', 2: '3c'})
t.change(zf, {2: '3c'}) # FIXME + 3b after δbtree works (hole -> zblk)
at3 = t.commit()
# f.assertCache([1,1,0,1]) # XXX b must be uncached
f.assertCache([1,0,0,1])
f.assertCache([1,1,0,1]) # FIXME b must be invalidated (see 3b ^^^)
# f @head is opened again -> cache must not be lost
f_ = t.open(zf)
......
......@@ -129,7 +129,6 @@ type ΔTtail struct {
// ΔTree describes changes to one BTree in one revision.
type ΔTree struct {
Rev zodb.Tid
// Root *Tree // XXX ok to have here?
KV map[Key]Value
}
......@@ -162,7 +161,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
// Track adds tree path to tracked set.
//
// path[0] signifies a root.
// path[0] signifies tree root.
// All path elemens must be Tree except last one which must be Bucket.
//
// XXX δBtail is rebuild to also include keys corresponding to added nodes.
......@@ -211,13 +210,13 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) ΔB {
// {} root -> []oid changed under that root in tracked set
δZByRoot := map[*Tree][]zodb.Oid{} // XXX -> map[*Tree]SetOid ?
for _, δ := range δZ.Changev {
roots, ok := δBtail.trackIdx[δ]
for _, oid := range δZ.Changev {
roots, ok := δBtail.trackIdx[oid]
if !ok {
continue
}
for root := range roots {
δZByRoot[root] = append(δZByRoot[root], δ)
δZByRoot[root] = append(δZByRoot[root], oid)
}
}
......
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