Skip to content

Commit c43b380

Browse files
committed
kvserver: return an assertion error instead of panic
1 parent f43db40 commit c43b380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kv/kvserver/kvstorage/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func IterateRangeDescriptorsFromDisk(
299299
// This case shouldn't happen in practice: we have a key that isn't
300300
// associated with any range descriptor.
301301
if buildutil.CrdbTestBuild {
302-
panic(errors.AssertionFailedf("range local key %s outside of a known range", key.Key))
302+
return errors.AssertionFailedf("range local key %s outside of a known range", key.Key)
303303
}
304304
iter.NextKey()
305305
}

0 commit comments

Comments
 (0)