Commit 63daf19e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8403564c
......@@ -40,6 +40,8 @@ type Tree = btree.LOBTree
type Bucket = btree.LOBucket
type Node = btree.LONode
type BucketEntry = btree.LOBucketEntry
type Key = int64
const KeyMax Key = math.MaxInt64
type Value = zodb.Oid // assumes key points to IPersistent
......@@ -498,16 +500,22 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) {
// XXX a/b = nil - means del/add -> handle
var av []BucketEntry
var bv []BucketEntry
if a != nil {
err = a.PActivate(ctx); if err != nil { return nil, err }
defer a.PDeactivate()
av = a.Entryv() // key↑
}
if b != nil {
err = b.PActivate(ctx); if err != nil { return nil, err }
defer b.PDeactivate()
bv = b.Entryv() // key↑
}
//fmt.Println("> diffB", a.POid())
//defer fmt.Println("< diffB")
av := a.Entryv() // key↑
bv := b.Entryv() // key↑
δ = map[Key]Value{}
//fmt.Println("av:", av)
//fmt.Println("bv:", bv)
......
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