Skip to content

Commit 23b761e

Browse files
committed
kvclient: remove no longer valid assertion about batch splitting
This commit removes a fatal assertion that batch with MaxSpanRequestKeys or TargetBytes set doesn't need to be split. This assertion has been in place for many years, but it no longer holds true in some cases with buffered writes (namely when we buffered some writes, but then they were disabled, so we need to flush the buffer together with the next batch: that next batch can fail the assertion). Release note: None
1 parent 580602a commit 23b761e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pkg/kv/kvclient/kvcoord/dist_sender.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,12 +1222,6 @@ func (ds *DistSender) Send(
12221222
splitET = true
12231223
}
12241224
parts := splitBatchAndCheckForRefreshSpans(ba, splitET)
1225-
if len(parts) > 1 && (ba.MaxSpanRequestKeys != 0 || ba.TargetBytes != 0) {
1226-
// We already verified above that the batch contains only scan requests of the same type.
1227-
// Such a batch should never need splitting.
1228-
log.Fatalf(ctx, "batch with MaxSpanRequestKeys=%d, TargetBytes=%d needs splitting",
1229-
redact.Safe(ba.MaxSpanRequestKeys), redact.Safe(ba.TargetBytes))
1230-
}
12311225
var singleRplChunk [1]*kvpb.BatchResponse
12321226
rplChunks := singleRplChunk[:0:1]
12331227

0 commit comments

Comments
 (0)