Skip to content

Commit

Permalink
Disable automaxprocs log (pingcap#13800)
Browse files Browse the repository at this point in the history
  • Loading branch information
tennix authored and XiaTianliang committed Dec 21, 2019
1 parent 2fb6b03 commit 27d0365
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion checkout-pr-branch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This script is used to checkout a TiDB PR branch in a forked repo.
if test -z $1; then
Expand Down
2 changes: 1 addition & 1 deletion cmd/explaintest/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

TIDB_TEST_STORE_NAME=$TIDB_TEST_STORE_NAME
TIKV_PATH=$TIKV_PATH
Expand Down
2 changes: 1 addition & 1 deletion hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This file modified from k8s
# https://github.com/kubernetes/kubernetes/blob/master/hooks/pre-commit
# Now It's removed, The Reason is https://github.com/kubernetes/community/issues/729
Expand Down
6 changes: 5 additions & 1 deletion tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/push"
"github.com/struCoder/pidusage"
_ "go.uber.org/automaxprocs"
"go.uber.org/automaxprocs/maxprocs"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -569,6 +569,10 @@ func setupLog() {

err = logutil.InitLogger(cfg.Log.ToLogConfig())
terror.MustNil(err)
// Disable automaxprocs log
nopLog := func(string, ...interface{}) {}
_, err = maxprocs.Set(maxprocs.Logger(nopLog))
terror.MustNil(err)
}

func printInfo() {
Expand Down
2 changes: 1 addition & 1 deletion tools/check/check_testSuite.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down

0 comments on commit 27d0365

Please sign in to comment.