Skip to content

Commit bbd8a5a

Browse files
committed
Remove extra logs + set default store liveness to 1s
1 parent 4bc8b2b commit bbd8a5a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

internal/client/client_batch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,8 @@ func sendBatchRequest(
783783
return tikvrpc.FromBatchCommandsResponse(res)
784784
case <-ctx.Done():
785785
atomic.StoreInt32(&entry.canceled, 1)
786-
logutil.BgLogger().Warn("wait response is cancelled",
787-
zap.String("to", addr), zap.String("cause", ctx.Err().Error()))
786+
// logutil.BgLogger().Warn("wait response is cancelled",
787+
// zap.String("to", addr), zap.String("cause", ctx.Err().Error()))
788788
return nil, errors.Trace(ctx.Err())
789789
case <-timer.C:
790790
atomic.StoreInt32(&entry.canceled, 1)

internal/locate/region_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ func (c *RegionCache) markRegionNeedBeRefill(s *Store, storeIdx int, rs *regionS
829829
// invalidate regions in store.
830830
epoch := rs.storeEpochs[storeIdx]
831831
if atomic.CompareAndSwapUint32(&s.epoch, epoch, epoch+1) {
832-
logutil.BgLogger().Info("mark store's regions need be refill", zap.String("store", s.addr))
832+
// logutil.BgLogger().Info("mark store's regions need be refill", zap.String("store", s.addr))
833833
incEpochStoreIdx = storeIdx
834834
metrics.RegionCacheCounterWithInvalidateStoreRegionsOK.Inc()
835835
}
@@ -2111,7 +2111,7 @@ type livenessState uint32
21112111
var (
21122112
livenessSf singleflight.Group
21132113
// storeLivenessTimeout is the max duration of resolving liveness of a TiKV instance.
2114-
storeLivenessTimeout time.Duration
2114+
storeLivenessTimeout = 1 * time.Second
21152115
)
21162116

21172117
// SetStoreLivenessTimeout sets storeLivenessTimeout to t.

internal/locate/region_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func (s *replicaSelector) onSendFailure(bo *retry.Backoffer, err error) {
341341
store := replica.store
342342
// invalidate regions in store.
343343
if atomic.CompareAndSwapUint32(&store.epoch, replica.epoch, replica.epoch+1) {
344-
logutil.BgLogger().Info("mark store's regions need be refill", zap.Uint64("id", store.storeID), zap.String("addr", store.addr), zap.Error(err))
344+
// logutil.BgLogger().Info("mark store's regions need be refill", zap.Uint64("id", store.storeID), zap.String("addr", store.addr), zap.Error(err))
345345
metrics.RegionCacheCounterWithInvalidateStoreRegionsOK.Inc()
346346
// schedule a store addr resolve.
347347
store.markNeedCheck(s.regionCache.notifyCheckCh)

0 commit comments

Comments
 (0)