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
Copy file name to clipboardExpand all lines: doc/command-line-flags.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,14 @@ See `approve-renamed-columns`
131
131
132
132
Issue the migration on a replica; do not modify data on master. Useful for validating, testing and benchmarking. See [testing-on-replica](testing-on-replica.md)
133
133
134
+
### throttle-control-replicas
135
+
136
+
Provide a command delimited list of replicas; `gh-ost` will throttle when any of the given replicas lag beyond `--max-lag-millis`. The list can be queried and updated dynamically via [interactive commands](interactive-commands.md)
137
+
138
+
### throttle-http
139
+
140
+
Provide a HTTP endpoint; `gh-ost` will issue `HEAD` requests on given URL and throttle whenever response status code is not `200`. The URL can be queried and updated dynamically via [interactive commands](interactive-commands.md). Empty URL disables the HTTP check.
141
+
134
142
### timestamp-old-table
135
143
136
144
Makes the _old_ table include a timestamp value. The _old_ table is what the original table is renamed to at the end of a successful migration. For example, if the table is `gh_ost_test`, then the _old_ table would normally be `_gh_ost_test_del`. With `--timestamp-old-table` it would be, for example, `_gh_ost_test_20170221103147_del`.
Copy file name to clipboardExpand all lines: doc/interactive-commands.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ Both interfaces may serve at the same time. Both respond to simple text command,
31
31
-`nice-ratio=0.5` will cause `gh-ost` to sleep for `50ms` immediately following.
32
32
-`nice-ratio=1` will cause `gh-ost` to sleep for `100ms`, effectively doubling runtime
33
33
- value of `2` will effectively triple the runtime; etc.
34
+
-`throttle-http`: change throttle HTTP endpoint
34
35
-`throttle-query`: change throttle query
35
36
-`throttle-control-replicas='replica1,replica2'`: change list of throttle-control replicas, these are replicas `gh-ost` will check. This takes a comma separated list of replica's to check and replaces the previous list.
Copy file name to clipboardExpand all lines: go/cmd/gh-ost/main.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,7 @@ func main() {
93
93
replicationLagQuery:=flag.String("replication-lag-query", "", "Deprecated. gh-ost uses an internal, subsecond resolution query")
94
94
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")
95
95
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")
96
+
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")
96
97
heartbeatIntervalMillis:=flag.Int64("heartbeat-interval-millis", 100, "how frequently would gh-ost inject a heartbeat value")
97
98
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")
98
99
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")
0 commit comments