Skip to content

Commit 3d66e9b

Browse files
tennixngaut
authored andcommitted
Disable automaxprocs log (pingcap#13800)
1 parent e0f5f22 commit 3d66e9b

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

checkout-pr-branch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This script is used to checkout a TiDB PR branch in a forked repo.
44
if test -z $1; then

cmd/explaintest/run-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
TIDB_TEST_STORE_NAME=$TIDB_TEST_STORE_NAME
44
TIKV_PATH=$TIKV_PATH

hooks/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This file modified from k8s
33
# https://github.com/kubernetes/kubernetes/blob/master/hooks/pre-commit
44
# Now It's removed, The Reason is https://github.com/kubernetes/community/issues/729

tidb-server/main.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import (
6060
"github.com/prometheus/client_golang/prometheus"
6161
"github.com/prometheus/client_golang/prometheus/push"
6262
"github.com/struCoder/pidusage"
63-
_ "go.uber.org/automaxprocs"
63+
"go.uber.org/automaxprocs/maxprocs"
6464
"go.uber.org/zap"
6565
)
6666

@@ -569,6 +569,10 @@ func setupLog() {
569569

570570
err = logutil.InitLogger(cfg.Log.ToLogConfig())
571571
terror.MustNil(err)
572+
// Disable automaxprocs log
573+
nopLog := func(string, ...interface{}) {}
574+
_, err = maxprocs.Set(maxprocs.Logger(nopLog))
575+
terror.MustNil(err)
572576
}
573577

574578
func printInfo() {

tools/check/check_testSuite.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -euo pipefail
44

0 commit comments

Comments
 (0)