From fa80bae9daa126b7ae02f9a2987f9a6709ad871f Mon Sep 17 00:00:00 2001 From: BornChanger Date: Tue, 31 Jan 2023 15:50:35 +0800 Subject: [PATCH] *: fix issue #40854 Signed-off-by: BornChanger --- domain/domain_sysvars.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/domain/domain_sysvars.go b/domain/domain_sysvars.go index 6988cedcc9b52..982ca8f06af58 100644 --- a/domain/domain_sysvars.go +++ b/domain/domain_sysvars.go @@ -76,7 +76,10 @@ func (do *Domain) setGlobalResourceControl(enable bool) { } else { variable.DisableGlobalResourceControlFunc() } - logutil.BgLogger().Info("set resource control", zap.Bool("enable", enable)) + + if enable != variable.EnableResourceControl.Load() { + logutil.BgLogger().Info("set resource control", zap.Bool("enable", enable)) + } } // updatePDClient is used to set the dynamic option into the PD client.