You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Infof("rotate to next log from %s:%d to %s", this.currentCoordinates.LogFile, int64(ev.Header.LogPos), rotateEvent.NextLogName)
151
+
this.migrationContext.Log.Infof("rotate to next log from %s:%d to %s", this.currentCoordinates.LogFile, int64(ev.Header.LogPos), rotateEvent.NextLogName)
151
152
} elseifrowsEvent, ok:=ev.Event.(*replication.RowsEvent); ok {
throttleControlReplicas:=flag.String("throttle-control-replicas", "", "List of replicas on which to check for lag; comma delimited. Example: myhost1.com:3306,myhost2.com,myhost3.com:3307")
107
107
throttleQuery:=flag.String("throttle-query", "", "when given, issued (every second) to check if operation should throttle. Expecting to return zero for no-throttle, >0 for throttle. Query is issued on the migrated server. Make sure this query is lightweight")
108
108
throttleHTTP:=flag.String("throttle-http", "", "when given, gh-ost checks given URL via HEAD request; any response code other than 200 (OK) causes throttling; make sure it has low latency response")
109
+
ignoreHTTPErrors:=flag.Bool("ignore-http-errors", false, "ignore HTTP connection errors during throttle check")
109
110
heartbeatIntervalMillis:=flag.Int64("heartbeat-interval-millis", 100, "how frequently would gh-ost inject a heartbeat value")
110
111
flag.StringVar(&migrationContext.ThrottleFlagFile, "throttle-flag-file", "", "operation pauses when this file exists; hint: use a file that is specific to the table being altered")
111
112
flag.StringVar(&migrationContext.ThrottleAdditionalFlagFile, "throttle-additional-flag-file", "/tmp/gh-ost.throttle", "operation pauses when this file exists; hint: keep default, use for throttling multiple gh-ost operations")
@@ -156,69 +157,69 @@ func main() {
156
157
return
157
158
}
158
159
159
-
log.SetLevel(log.ERROR)
160
+
migrationContext.Log.SetLevel(log.ERROR)
160
161
if*verbose {
161
-
log.SetLevel(log.INFO)
162
+
migrationContext.Log.SetLevel(log.INFO)
162
163
}
163
164
if*debug {
164
-
log.SetLevel(log.DEBUG)
165
+
migrationContext.Log.SetLevel(log.DEBUG)
165
166
}
166
167
if*stack {
167
-
log.SetPrintStackTrace(*stack)
168
+
migrationContext.Log.SetPrintStackTrace(*stack)
168
169
}
169
170
if*quiet {
170
171
// Override!!
171
-
log.SetLevel(log.ERROR)
172
+
migrationContext.Log.SetLevel(log.ERROR)
172
173
}
173
174
174
175
ifmigrationContext.DatabaseName=="" {
175
-
log.Fatalf("--database must be provided and database name must not be empty")
176
+
migrationContext.Log.Fatalf("--database must be provided and database name must not be empty")
176
177
}
177
178
ifmigrationContext.OriginalTableName=="" {
178
-
log.Fatalf("--table must be provided and table name must not be empty")
179
+
migrationContext.Log.Fatalf("--table must be provided and table name must not be empty")
179
180
}
180
181
ifmigrationContext.AlterStatement=="" {
181
-
log.Fatalf("--alter must be provided and statement must not be empty")
182
+
migrationContext.Log.Fatalf("--alter must be provided and statement must not be empty")
log.Fatalf("--switch-to-rbr and --assume-rbr are mutually exclusive")
195
+
migrationContext.Log.Fatalf("--switch-to-rbr and --assume-rbr are mutually exclusive")
195
196
}
196
197
ifmigrationContext.TestOnReplicaSkipReplicaStop {
197
198
if!migrationContext.TestOnReplica {
198
-
log.Fatalf("--test-on-replica-skip-replica-stop requires --test-on-replica to be enabled")
199
+
migrationContext.Log.Fatalf("--test-on-replica-skip-replica-stop requires --test-on-replica to be enabled")
199
200
}
200
-
log.Warning("--test-on-replica-skip-replica-stop enabled. We will not stop replication before cut-over. Ensure you have a plugin that does this.")
201
+
migrationContext.Log.Warning("--test-on-replica-skip-replica-stop enabled. We will not stop replication before cut-over. Ensure you have a plugin that does this.")
0 commit comments