mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-15 16:51:03 +00:00
Add Repair operation to btree containers
This commit is contained in:
parent
71621e60ba
commit
bb20f058ba
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue