Skip to content

Commit 0dc6475

Browse files
Merge branch 'master' into cathal/safer_cut_over
2 parents d3bf3cd + 8ab0a89 commit 0dc6475

File tree

6 files changed

+28
-5
lines changed

6 files changed

+28
-5
lines changed

RELEASE_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.1.1

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function build {
4040
builddir=$(setuptree)
4141
cp $buildpath/$target $builddir/gh-ost/usr/bin
4242
cd $buildpath
43-
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'shlomi-noach <[email protected]>' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t rpm .
43+
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'shlomi-noach <[email protected]>' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t rpm --rpm-rpmbuild-define "_build_id_links none" .
4444
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'shlomi-noach <[email protected]>' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t deb --deb-no-default-config-files .
4545
fi
4646
}

doc/command-line-flags.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ Optionally involve the process ID, for example: `--replica-server-id=$((10000000
181181
It's on you to choose a number that does not collide with another `gh-ost` or another running replica.
182182
See also: [`concurrent-migrations`](cheatsheet.md#concurrent-migrations) on the cheatsheet.
183183

184+
### serve-socket-file
185+
186+
Defaults to an auto-determined and advertised upon startup file. Defines Unix socket file to serve on.
184187
### skip-foreign-key-checks
185188

186189
By default `gh-ost` verifies no foreign keys exist on the migrated table. On servers with large number of tables this check can take a long time. If you're absolutely certain no foreign keys exist (table does not reference other table nor is referenced by other tables) and wish to save the check time, provide with `--skip-foreign-key-checks`.

doc/interactive-commands.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Both interfaces may serve at the same time. Both respond to simple text command,
1818
- `status`: returns a detailed status summary of migration progress and configuration
1919
- `sup`: returns a brief status summary of migration progress
2020
- `coordinates`: returns recent (though not exactly up to date) binary log coordinates of the inspected server
21+
- `applier`: returns the hostname of the applier
22+
- `inspector`: returns the hostname of the inspector
2123
- `chunk-size=<newsize>`: modify the `chunk-size`; applies on next running copy-iteration
2224
- `dml-batch-size=<newsize>`: modify the `dml-batch-size`; applies on next applying of binary log events
2325
- `max-lag-millis=<max-lag>`: modify the maximum replication lag threshold (milliseconds, minimum value is `100`, i.e. `0.1` second)

go/logic/inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ func (this *Inspector) CountTableRows() error {
528528

529529
this.migrationContext.Log.Infof("As instructed, I'm issuing a SELECT COUNT(*) on the table. This may take a while")
530530

531-
query := fmt.Sprintf(`select /* gh-ost */ count(*) as rows from %s.%s`, sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
531+
query := fmt.Sprintf(`select /* gh-ost */ count(*) as count_rows from %s.%s`, sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
532532
var rowsEstimate int64
533533
if err := this.db.QueryRow(query).Scan(&rowsEstimate); err != nil {
534534
return err

go/logic/server.go

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2016 GitHub Inc.
2+
Copyright 2021 GitHub Inc.
33
See https://github.com/github/gh-ost/blob/master/LICENSE
44
*/
55

@@ -146,7 +146,9 @@ func (this *Server) applyServerCommand(command string, writer *bufio.Writer) (pr
146146
fmt.Fprint(writer, `available commands:
147147
status # Print a detailed status message
148148
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
150152
chunk-size=<newsize> # Set a new chunk-size
151153
dml-batch-size=<newsize> # Set a new dml-batch-size
152154
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
177179
}
178180
return NoPrintStatusRule, fmt.Errorf("coordinates are read-only")
179181
}
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
180198
case "chunk-size":
181199
{
182200
if argIsQuestion {

0 commit comments

Comments
 (0)