mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
make sure frag.maxRow() call is lock-protected
This commit is contained in:
parent
632f6856ab
commit
b4f1781d30
1 changed files with 2 additions and 0 deletions
2
field.go
2
field.go
|
|
@ -1843,8 +1843,10 @@ func (f *Field) importRoaringOverwrite(ctx context.Context, data []byte, shard u
|
|||
// and bsiGroup.BitDepth based on the imported data.
|
||||
switch f.Options().Type {
|
||||
case FieldTypeInt, FieldTypeDecimal:
|
||||
frag.mu.Lock()
|
||||
frag.calculateMaxRowID()
|
||||
maxRowID, _ := frag.maxRow(nil)
|
||||
frag.mu.Unlock()
|
||||
|
||||
var bitDepth uint
|
||||
if maxRowID+1 > bsiOffsetBit {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue