Skip to content

Commit eca8dc6

Browse files
committed
kvclient: remove ReturnOnRangeBoundary request option
This was added in #70763 with the intention of using it for the ExportRequests sent by backup processors. In #114268 we went with a different approach and this feature has not seen subsequent use. BatchRequest options that may result in partial batch results require special thinking/handling at multiple points in dist_sender, so it seems sensible to remove this option if it is unused. Epic: none Release note: None
1 parent 464489b commit eca8dc6

File tree

3 files changed

+167
-478
lines changed

3 files changed

+167
-478
lines changed

pkg/kv/kvclient/kvcoord/dist_sender.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,6 @@ func (ds *DistSender) divideAndSendBatchToRanges(
19011901
}()
19021902

19031903
canParallelize := ba.Header.MaxSpanRequestKeys == 0 && ba.Header.TargetBytes == 0 &&
1904-
!ba.Header.ReturnOnRangeBoundary &&
19051904
!ba.Header.ReturnElasticCPUResumeSpans
19061905
if ba.IsSingleCheckConsistencyRequest() {
19071906
// Don't parallelize full checksum requests as they have to touch the
@@ -2006,7 +2005,7 @@ func (ds *DistSender) divideAndSendBatchToRanges(
20062005
ba.UpdateTxn(resp.reply.Txn)
20072006
}
20082007

2009-
mightStopEarly := ba.MaxSpanRequestKeys > 0 || ba.TargetBytes > 0 || ba.ReturnOnRangeBoundary || ba.ReturnElasticCPUResumeSpans
2008+
mightStopEarly := ba.MaxSpanRequestKeys > 0 || ba.TargetBytes > 0 || ba.ReturnElasticCPUResumeSpans
20102009
// Check whether we've received enough responses to exit query loop.
20112010
if mightStopEarly {
20122011
var replyKeys int64
@@ -2040,13 +2039,6 @@ func (ds *DistSender) divideAndSendBatchToRanges(
20402039
return
20412040
}
20422041
}
2043-
// If we hit a range boundary, return a partial result if requested. We
2044-
// do this after checking the limits, so that they take precedence.
2045-
if ba.Header.ReturnOnRangeBoundary && replyKeys > 0 && !lastRange {
2046-
couldHaveSkippedResponses = true
2047-
resumeReason = kvpb.RESUME_RANGE_BOUNDARY
2048-
return
2049-
}
20502042
}
20512043
}
20522044

0 commit comments

Comments
 (0)