diff --git a/checkout-pr-branch.sh b/checkout-pr-branch.sh index e888709847cb1..2f78588650a7d 100755 --- a/checkout-pr-branch.sh +++ b/checkout-pr-branch.sh @@ -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 diff --git a/cmd/explaintest/run-tests.sh b/cmd/explaintest/run-tests.sh index ed3c942432d7d..f195392a0402d 100755 --- a/cmd/explaintest/run-tests.sh +++ b/cmd/explaintest/run-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash TIDB_TEST_STORE_NAME=$TIDB_TEST_STORE_NAME TIKV_PATH=$TIKV_PATH diff --git a/hooks/pre-commit b/hooks/pre-commit index 8bc330c9af495..c7d8d2536c360 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -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 diff --git a/tidb-server/main.go b/tidb-server/main.go index ea7398b2d25fd..577e1c341df22 100644 --- a/tidb-server/main.go +++ b/tidb-server/main.go @@ -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" ) @@ -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() { diff --git a/tools/check/check_testSuite.sh b/tools/check/check_testSuite.sh index a426ce904c066..5ae8eceb44cdd 100755 --- a/tools/check/check_testSuite.sh +++ b/tools/check/check_testSuite.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail