mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 08:10:50 +00:00
[FB-1587] crash would occur if missing nil-entry in batch (#2145)
* crash would occur if missing nilentry in batch * Update client/batch.go Co-authored-by: reesporte <45641995+reesporte@users.noreply.github.com> Co-authored-by: reesporte <45641995+reesporte@users.noreply.github.com>
This commit is contained in:
parent
6c0c8ffe09
commit
e9fce90e26
1 changed files with 9 additions and 1 deletions
|
|
@ -1250,7 +1250,15 @@ func (b *Batch) makeFragments(frags, clearFrags fragments) (fragments, fragments
|
|||
var curBM *roaring.Bitmap
|
||||
var clearBM *roaring.Bitmap
|
||||
for j := range b.ids {
|
||||
col, row := b.ids[j], rowIDs[j]
|
||||
col := b.ids[j]
|
||||
row := nilSentinel
|
||||
if len(rowIDs) > j {
|
||||
// this is to protect against what i believe is a bug in the idk.DeleteSentinel logic in handling nil entries
|
||||
// this will prevent a crash by assuming missing entries are nil entries which i think is ok
|
||||
// TODO (twg) find where the nil entry was not added on the idk side ~ingest.go batchFromSchema method
|
||||
row = rowIDs[j]
|
||||
}
|
||||
|
||||
if col/shardWidth != curShard {
|
||||
curShard = col / shardWidth
|
||||
curBM = frags.GetOrCreate(curShard, field.Name(), "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue