Skip to content

Commit

Permalink
Merge pull request #96913 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…22.2-96834

release-22.2: kv: return error on invalid batch, don't fatal
  • Loading branch information
nvanbenschoten authored Mar 7, 2023
2 parents ce79347 + b293b90 commit 100ff45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (ls *Stores) SendWithWriteBytes(
ctx context.Context, ba roachpb.BatchRequest,
) (*roachpb.BatchResponse, *kvadmission.StoreWriteBytes, *roachpb.Error) {
if err := ba.ValidateForEvaluation(); err != nil {
log.Fatalf(ctx, "invalid batch (%s): %s", ba, err)
return nil, nil, roachpb.NewError(errors.Wrapf(err, "invalid batch (%s)", ba))
}

store, err := ls.GetStore(ba.Replica.StoreID)
Expand Down

0 comments on commit 100ff45

Please sign in to comment.