Merge pull request #23 from openark/switch-to-rbr-only-on-replica
Only allow -switch-to-rbr when inspecting replica
This commit is contained in:
commit
28f7f19e08
@ -796,6 +796,9 @@ func (this *Migrator) initiateInspector() (err error) {
|
||||
} else if this.migrationContext.InspectorIsAlsoApplier() && !this.migrationContext.AllowedRunningOnMaster {
|
||||
return fmt.Errorf("It seems like this migration attempt to run directly on master. Preferably it would be executed on a replica (and this reduces load from the master). To proceed please provide --allow-on-master. Inspector config=%+v, applier config=%+v", this.migrationContext.InspectorConnectionConfig, this.migrationContext.ApplierConnectionConfig)
|
||||
}
|
||||
if this.migrationContext.InspectorIsAlsoApplier() && this.migrationContext.SwitchToRowBinlogFormat {
|
||||
return fmt.Errorf("--switch-to-rbr is only allowed when inspecting a replica. This migration seems to run on the primary %+v", *this.migrationContext.ApplierConnectionConfig.ImpliedKey)
|
||||
}
|
||||
if err := this.inspector.validateLogSlaveUpdates(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user