Skip to content

Commit dea3594

Browse files
committed
db: panic on error inside initRangeKeyIter
1 parent 26e9e35 commit dea3594

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

batch.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,10 @@ func (b *Batch) initRangeKeyIter(_ *IterOptions, iter *keyspan.Iter, batchSnapsh
14521452
iter: b.rangeKeyIndex.NewIter(nil, nil),
14531453
snapshot: batchSnapshot,
14541454
}
1455-
_ = fragmentRangeKeys(frag, it, int(b.countRangeKeys))
1455+
if err := fragmentRangeKeys(frag, it, int(b.countRangeKeys)); err != nil {
1456+
panic(errors.Wrap(err, "cannot init range key iter"))
1457+
}
1458+
14561459
iter.Init(b.comparer.Compare, rangeKeys)
14571460

14581461
// If we just read all the range keys in the batch (eg, batchSnapshot was

0 commit comments

Comments
 (0)