Skip to content

Commit

Permalink
use '%d' instead of '%q' for some int values in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
lcwangchao committed Jul 10, 2023
1 parent 178f6fa commit 0522a32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/locate/region_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -1705,11 +1705,11 @@ func (c *RegionCache) scanRegions(bo *retry.Backoffer, startKey, endKey []byte,
metrics.LoadRegionCacheHistogramWithRegions.Observe(time.Since(start).Seconds())
if err != nil {
if apicodec.IsDecodeError(err) {
return nil, errors.Errorf("failed to decode region range key, startKey: %q, limit: %q, err: %v", util.HexRegionKeyStr(startKey), limit, err)
return nil, errors.Errorf("failed to decode region range key, startKey: %q, limit: %d, err: %v", util.HexRegionKeyStr(startKey), limit, err)
}
metrics.RegionCacheCounterWithScanRegionsError.Inc()
backoffErr = errors.Errorf(
"scanRegion from PD failed, startKey: %q, limit: %q, err: %v",
"scanRegion from PD failed, startKey: %q, limit: %d, err: %v",
startKey,
limit,
err)
Expand All @@ -1720,7 +1720,7 @@ func (c *RegionCache) scanRegions(bo *retry.Backoffer, startKey, endKey []byte,

if len(regionsInfo) == 0 {
return nil, errors.Errorf(
"PD returned no region, startKey: %q, endKey: %q, limit: %q",
"PD returned no region, startKey: %q, endKey: %q, limit: %d",
startKey, endKey, limit,
)
}
Expand Down

0 comments on commit 0522a32

Please sign in to comment.