Skip to content

Commit

Permalink
config: make tidb_enable_ddl controlling the ddl owner
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Sep 10, 2024
1 parent e5aad02 commit 4114295
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2391,9 +2391,11 @@ func (do *Domain) newOwnerManager(prompt, ownerKey string) owner.Manager {
statsOwner = owner.NewOwnerManager(context.Background(), do.etcdClient, prompt, id, ownerKey)
}
// TODO: Need to do something when err is not nil.
err := statsOwner.CampaignOwner()
if err != nil {
logutil.BgLogger().Warn("campaign owner failed", zap.Error(err))
if ownerKey == handle.StatsOwnerKey && config.GetGlobalConfig().Instance.TiDBEnableDDL.Load() {
err := statsOwner.CampaignOwner()
if err != nil {
logutil.BgLogger().Warn("campaign owner failed", zap.Error(err))
}
}
return statsOwner
}
Expand Down

0 comments on commit 4114295

Please sign in to comment.