Skip to content

Commit

Permalink
store: add limit = -1 for GetRegionsInfoByRange function
Browse files Browse the repository at this point in the history
  • Loading branch information
Defined2014 committed Jul 25, 2023
1 parent 56610b1 commit 7c0b9f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ func (h *Helper) GetRegionInfoByID(regionID uint64) (*RegionInfo, error) {
// GetRegionsInfoByRange scans region by key range
func (h *Helper) GetRegionsInfoByRange(sk, ek []byte) (*RegionsInfo, error) {
var regionsInfo RegionsInfo
err := h.requestPD("GetRegionByRange", "GET", fmt.Sprintf("%v?key=%s&end_key=%s", pdapi.ScanRegions,
err := h.requestPD("GetRegionByRange", "GET", fmt.Sprintf("%v?key=%s&end_key=%s&limit=-1", pdapi.ScanRegions,

Check warning on line 811 in store/helper/helper.go

View check run for this annotation

Codecov / codecov/patch

store/helper/helper.go#L811

Added line #L811 was not covered by tests
url.QueryEscape(string(sk)), url.QueryEscape(string(ek))), nil, &regionsInfo)
return &regionsInfo, err
}
Expand Down

0 comments on commit 7c0b9f2

Please sign in to comment.