Skip to content

Commit

Permalink
Merge branch 'master' into feat/diff-in-gtid-info
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizic authored Jun 25, 2024
2 parents 890c8a4 + eff3563 commit 5415176
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,11 @@ func (app *App) stateManager() appState {
app.logger.Errorf("failed to update active nodes in dcs: %v", err)
}

err = app.updateReplMonTS(master)
if err != nil {
app.logger.Errorf("failed to update repl_mon timestamp: %v", err)
if app.config.ReplMon {
err = app.updateReplMonTS(master)
if err != nil {
app.logger.Errorf("failed to update repl_mon timestamp: %v", err)
}
}

return stateManager
Expand Down
3 changes: 3 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,8 @@ func (cfg *Config) Validate() error {
if cfg.SemiSync && cfg.ASync {
return fmt.Errorf("can't run in both semisync and async mode")
}
if cfg.ASync && !cfg.ReplMon {
return fmt.Errorf("repl mon must be enabled to run mysync in async mode")
}
return nil
}

0 comments on commit 5415176

Please sign in to comment.