Skip to content

Commit

Permalink
fix checker only with LightningTableEmptyChecking
Browse files Browse the repository at this point in the history
  • Loading branch information
River2000i committed Dec 27, 2024
1 parent 8633039 commit 7bdc7c2
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions dm/checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7bdc7c2

Please sign in to comment.