mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Change repair functions to specify they are bitmap only
This commit is contained in:
parent
25eae0204d
commit
feb19c62b9
2 changed files with 5 additions and 4 deletions
|
|
@ -156,7 +156,7 @@ func (sc *sliceContainers) Iterator(key uint64) (citer ContainerIterator, found
|
|||
return &sliceIterator{e: sc, i: i}, found
|
||||
}
|
||||
|
||||
func (sc *sliceContainers) Repair() {
|
||||
func (sc *sliceContainers) RepairBitmaps() {
|
||||
for _, c := range sc.containers {
|
||||
if c.isBitmap() {
|
||||
c.bitmapRepair()
|
||||
|
|
|
|||
|
|
@ -98,8 +98,9 @@ type Containers interface {
|
|||
|
||||
Count() uint64
|
||||
|
||||
// Repair will n values after in-place operations.
|
||||
Repair()
|
||||
// RepairBitmaps will repair cardinality(n) values on bitmap containers after
|
||||
// in-place operations.
|
||||
RepairBitmaps()
|
||||
|
||||
//Reset will clear the containers collection to allow for recycling during snapshot
|
||||
Reset()
|
||||
|
|
@ -672,7 +673,7 @@ func (b *Bitmap) unionIntoTarget(target *Bitmap, others ...*Bitmap) {
|
|||
// n (container cardinality) to fall out of sync, and then at the very end we perform
|
||||
// a "Repair" to recalculate all the container values. That way we never popcount()
|
||||
// an entire bitmap container more than once per bulk union operation.
|
||||
target.Containers.Repair()
|
||||
target.Containers.RepairBitmaps()
|
||||
}
|
||||
|
||||
// Difference returns the difference of b and other.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue