From 087a71d0cfe3b210d446568d9bf0f21f51576c2d Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Mon, 10 Jul 2023 12:20:41 +0800 Subject: [PATCH] use '%d' instead of '%q' for some int values in error message Signed-off-by: Chao Wang --- internal/locate/region_cache.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/locate/region_cache.go b/internal/locate/region_cache.go index 83ca629d3..3eddbef2f 100644 --- a/internal/locate/region_cache.go +++ b/internal/locate/region_cache.go @@ -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, ) }