From bffe5e4e5638b45984b36cfdb8842af48afd3f80 Mon Sep 17 00:00:00 2001 From: nolouch Date: Wed, 8 Jan 2025 16:28:35 +0800 Subject: [PATCH] fix Signed-off-by: nolouch --- server/config/config.go | 2 +- tools/pd-ctl/tests/config/config_test.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/config/config.go b/server/config/config.go index a6c565ef68a..8353af56c0c 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -577,7 +577,7 @@ func (c *PDServerConfig) adjust(meta *configutil.ConfigMetaData) error { func migrateConfigurationFromFile(meta *configutil.ConfigMetaData) error { oldName, newName := "trace-region-flow", "flow-round-by-digit" - defineOld, _ := meta.IsDefined(oldName), meta.IsDefined(newName) + defineOld := meta.IsDefined(oldName) switch { case defineOld: return errors.Errorf("config item %s and %s(deprecated) are conflict", newName, oldName) diff --git a/tools/pd-ctl/tests/config/config_test.go b/tools/pd-ctl/tests/config/config_test.go index 39820a6c7b7..22a2d7d7a12 100644 --- a/tools/pd-ctl/tests/config/config_test.go +++ b/tools/pd-ctl/tests/config/config_test.go @@ -150,7 +150,6 @@ func (suite *configTestSuite) checkConfig(cluster *pdTests.TestCluster) { args = []string{"-u", pdAddr, "config", "set", "trace-region-flow", "false"} _, err = tests.ExecuteCommand(cmd, args...) re.NoError(err) - re.False(svr.GetPDServerConfig().TraceRegionFlow) origin := svr.GetPDServerConfig().FlowRoundByDigit args = []string{"-u", pdAddr, "config", "set", "flow-round-by-digit", "10"}