Commit 0de6c175 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 17d96e82
...@@ -381,9 +381,14 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) { ...@@ -381,9 +381,14 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) {
} }
defer b.PDeactivate() defer b.PDeactivate()
//fmt.Println("> diffB", a.POid())
//defer fmt.Println("< diffB")
av := a.Entryv() // key↑ av := a.Entryv() // key↑
bv := b.Entryv() // key↑ bv := b.Entryv() // key↑
δ = map[Key]Value{} δ = map[Key]Value{}
//fmt.Println("av:", av)
//fmt.Println("bv:", bv)
for len(av) > 0 || len(bv) > 0 { for len(av) > 0 || len(bv) > 0 {
ka, va := KeyMax, VDEL ka, va := KeyMax, VDEL
...@@ -414,10 +419,12 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) { ...@@ -414,10 +419,12 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) {
δ[kb] = vb δ[kb] = vb
// ka == kb // va->vb // ka == kb // va->vb
case va != vb: default:
av = av[1:] av = av[1:]
bv = bv[1:] bv = bv[1:]
δ[ka] = vb if va != vb {
δ[ka] = vb
}
} }
} }
......
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