|
1 | 1 | /*
|
2 |
| - Copyright 2016 GitHub Inc. |
| 2 | + Copyright 2021 GitHub Inc. |
3 | 3 | See https://github.com/github/gh-ost/blob/master/LICENSE
|
4 | 4 | */
|
5 | 5 |
|
@@ -146,7 +146,9 @@ func (this *Server) applyServerCommand(command string, writer *bufio.Writer) (pr
|
146 | 146 | fmt.Fprint(writer, `available commands:
|
147 | 147 | status # Print a detailed status message
|
148 | 148 | sup # Print a short status message
|
149 |
| -coordinates # Print the currently inspected coordinates |
| 149 | +coordinates # Print the currently inspected coordinates |
| 150 | +applier # Print the hostname of the applier |
| 151 | +inspector # Print the hostname of the inspector |
150 | 152 | chunk-size=<newsize> # Set a new chunk-size
|
151 | 153 | dml-batch-size=<newsize> # Set a new dml-batch-size
|
152 | 154 | nice-ratio=<ratio> # Set a new nice-ratio, immediate sleep after each row-copy operation, float (examples: 0 is aggressive, 0.7 adds 70% runtime, 1.0 doubles runtime, 2.0 triples runtime, ...)
|
@@ -177,6 +179,22 @@ help # This message
|
177 | 179 | }
|
178 | 180 | return NoPrintStatusRule, fmt.Errorf("coordinates are read-only")
|
179 | 181 | }
|
| 182 | + case "applier": |
| 183 | + if this.migrationContext.ApplierConnectionConfig != nil && this.migrationContext.ApplierConnectionConfig.ImpliedKey != nil { |
| 184 | + fmt.Fprintf(writer, "Host: %s, Version: %s\n", |
| 185 | + this.migrationContext.ApplierConnectionConfig.ImpliedKey.String(), |
| 186 | + this.migrationContext.ApplierMySQLVersion, |
| 187 | + ) |
| 188 | + } |
| 189 | + return NoPrintStatusRule, nil |
| 190 | + case "inspector": |
| 191 | + if this.migrationContext.InspectorConnectionConfig != nil && this.migrationContext.InspectorConnectionConfig.ImpliedKey != nil { |
| 192 | + fmt.Fprintf(writer, "Host: %s, Version: %s\n", |
| 193 | + this.migrationContext.InspectorConnectionConfig.ImpliedKey.String(), |
| 194 | + this.migrationContext.InspectorMySQLVersion, |
| 195 | + ) |
| 196 | + } |
| 197 | + return NoPrintStatusRule, nil |
180 | 198 | case "chunk-size":
|
181 | 199 | {
|
182 | 200 | if argIsQuestion {
|
|
0 commit comments