Commit 688a7527 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fc5deb55
...@@ -167,6 +167,7 @@ func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail { ...@@ -167,6 +167,7 @@ func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail {
δZtail: zodb.NewΔTail(at0), δZtail: zodb.NewΔTail(at0),
byRoot: make(map[zodb.Oid]*ΔTtail), byRoot: make(map[zodb.Oid]*ΔTtail),
trackIdx: make(map[zodb.Oid]SetOid), trackIdx: make(map[zodb.Oid]SetOid),
tkdel: SetKey{},
db: db, db: db,
} }
} }
...@@ -236,6 +237,14 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track ...@@ -236,6 +237,14 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
δBtail.byRoot[root] = newΔTtail() δBtail.byRoot[root] = newΔTtail()
} }
if !keyPresent {
δBtail.tkdel.Add(key)
} else {
if δBtail.tkdel.Has(key) {
panicf("[%v] was previously tracked as ø", key)
}
}
// XXX update diff XXX here? or as separate step? // XXX update diff XXX here? or as separate step?
// XXX update lastRevOf // XXX update lastRevOf
} }
......
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