Skip to content

Commit

Permalink
domain: set etcdClient loglevel to error (pingcap#15645) (pingcap#15683)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored Mar 26, 2020
1 parent 8c1cde1 commit 979f756
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,12 @@ func (do *Domain) Init(ddlLease time.Duration, sysFactory func(*Domain) (pools.R
if ebd, ok := do.store.(tikv.EtcdBackend); ok {
if addrs := ebd.EtcdAddrs(); addrs != nil {
cfg := config.GetGlobalConfig()
// silence etcd warn log, when domain closed, it won't randomly print warn log
// see details at the issue https://github.com/pingcap/tidb/issues/15479
etcdLogCfg := zap.NewProductionConfig()
etcdLogCfg.Level = zap.NewAtomicLevelAt(zap.ErrorLevel)
cli, err := clientv3.New(clientv3.Config{
LogConfig: &etcdLogCfg,
Endpoints: addrs,
AutoSyncInterval: 30 * time.Second,
DialTimeout: 5 * time.Second,
Expand Down

0 comments on commit 979f756

Please sign in to comment.