From 7bdc7c2f81a19111df2bb7737cd3376ff63c9dc1 Mon Sep 17 00:00:00 2001 From: Jiaqiang Huang <96465211+River2000i@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:54:12 +0800 Subject: [PATCH] fix checker only with `LightningTableEmptyChecking` --- dm/checker/checker.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/dm/checker/checker.go b/dm/checker/checker.go index 530e1c5fdf3..55de71b22ed 100644 --- a/dm/checker/checker.go +++ b/dm/checker/checker.go @@ -438,9 +438,6 @@ func (c *Checker) Init(ctx context.Context) (err error) { } // Adjust will raise error when this field is empty, so we set any non empty value here. lCfg.Mydumper.SourceDir = "noop://" - if lightningCheckGroupOnlyTableEmpty(c.checkingItems) { - lCfg.TiDB.PdAddr = "noop:2379" - } err = lCfg.Adjust(ctx) if err != nil { return err @@ -550,16 +547,6 @@ func (c *Checker) Init(ctx context.Context) (err error) { return nil } -func lightningCheckGroupOnlyTableEmpty(checkingItems map[string]string) bool { - for _, item := range config.LightningPrechecks { - if _, ok := checkingItems[item]; ok && item != config.LightningTableEmptyChecking { - return false - } - } - _, ok := checkingItems[config.LightningTableEmptyChecking] - return ok -} - func (c *Checker) fetchSourceTargetDB( ctx context.Context, instance *mysqlInstance,