From b4f1781d3097d70ae58caaa4b76b37b90a7c2e63 Mon Sep 17 00:00:00 2001 From: Travis Date: Thu, 2 Apr 2020 23:12:08 -0500 Subject: [PATCH] make sure frag.maxRow() call is lock-protected --- field.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/field.go b/field.go index f18c15918..daddbf010 100644 --- a/field.go +++ b/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 {