use '%d' instead of '%q' for some int values in error message (#875)

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
This commit is contained in:
王超 2023-07-10 12:30:33 +08:00 committed by GitHub
parent 178f6fa01a
commit 32eb2b0f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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)
@ -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,
)
}