Add Repair operation to btree containers

This commit is contained in:
Richard Artoul 2018-11-30 19:25:54 -05:00
parent 71621e60ba
commit bb20f058ba

View file

@ -177,6 +177,15 @@ func (btc *bTreeContainers) Iterator(key uint64) (citer roaring.ContainerIterato
}, found
}
func (btc *bTreeContainers) Repair() {
e, _ := btc.tree.Seek(0)
_, c, err := e.Next()
for err != io.EOF {
c.Repair()
_, c, err = e.Next()
}
}
type btcIterator struct {
e *enumerator
key uint64