From 7643eb39a27bda6a3c5f360adcded5dc7fc4b1a4 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Sat, 16 Jul 2016 05:18:45 -0600 Subject: [PATCH] more documentation - what if? - requirements and limitations - more abotu variables - logo --- doc/command-line-flags.md | 36 ++++++++++++++++++++++------ doc/images/gh-ost-logo-dark-320.png | Bin 0 -> 8619 bytes doc/requirements-and-limitations.md | 23 ++++++++++++++++++ doc/what-if.md | 32 +++++++++++++++++++++++++ doc/why-triggerless.md | 1 - 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 doc/images/gh-ost-logo-dark-320.png create mode 100644 doc/requirements-and-limitations.md create mode 100644 doc/what-if.md diff --git a/doc/command-line-flags.md b/doc/command-line-flags.md index d5171be..c030fed 100644 --- a/doc/command-line-flags.md +++ b/doc/command-line-flags.md @@ -2,7 +2,21 @@ A more in-depth discussion of various `gh-ost` command line flags: implementation, implication, use cases. -##### conf +#### allow-on-master + +By default, `gh-ost` would like you to connect to a replica, from where it figures out the master by itself. This wiring is required should your master execute using `binlog_format=STATEMENT`. + +If, for some reason, you do not wish `gh-ost` to connect to a replica, you may connect it directly to the master and approve this via `--allow-on-master`. + +#### approve-renamed-columns + +When your migration issues a column rename (`change column old_name new_name ...`) `gh-ost` analyzes the statement to try an associate the old column name with new column name. Otherwise the new structure may also look like some column was dropped and another was added. + +`gh-ost` will print out what it thinks the _rename_ implied, but will not issue the migration unless you provide with `--approve-renamed-columns`. + +If you think `gh-ost` is mistaken and that there's actually no _rename_ involved, you may pass `--skip-renamed-columns` instead. This will cause `gh-ost` to disassociate the column values; data will not be copied between those columns. + +#### conf `--conf=/path/to/my.cnf`: file where credentials are specified. Should be in (or contain) the following format: @@ -12,11 +26,11 @@ user=gromit password=123456 ``` -##### cut-over +#### cut-over Optional. Default is `safe`. See more discussion in [cut-over](cut-over.md) -##### exact-rowcount +#### exact-rowcount A `gh-ost` execution need to copy whatever rows you have in your existing table onto the ghost table. This can, and often be, a large number. Exactly what that number is? `gh-ost` initially estimates the number of rows in your table by issuing an `explain select * from your_table`. This will use statistics on your table and return with a rough estimate. How rough? It might go as low as half or as high as double the actual number of rows in your table. This is the same method as used in [`pt-online-schema-change`](https://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html). @@ -29,20 +43,28 @@ A `gh-ost` execution need to copy whatever rows you have in your existing table While the ongoing estimated number of rows is still heuristic, it's almost exact, such that the reported [ETA](understanding-output.md) or percentage progress is typically accurate to the second throughout a multiple-hour operation. -##### execute +#### execute Without this parameter, migration is a _noop_: testing table creation and validity of migration, but not touching data. -##### initially-drop-ghost-table +#### initially-drop-ghost-table `gh-ost` maintains two tables while migrating: the _ghost_ table (which is synced from your original table and finally replaces it) and a changelog table, which is used internally for bookkeeping. By default, it panics and aborts if it sees those tables upon startup. Provide `--initially-drop-ghost-table` and `--initially-drop-old-table` to let `gh-ost` know it's OK to drop them beforehand. We think `gh-ost` should not take chances or make assumptions about the user's tables. Dropping tables can be a dangerous, locking operation. We let the user explicitly approve such operations. -##### initially-drop-old-table +#### initially-drop-old-table See #initially-drop-ghost-table -##### test-on-replica +#### migrate-on-replica + +Typically `gh-ost` is used to migrate tables on a master. If you wish to only perform the migration in full on a replica, connect `gh-ost` to said replica and pass `--migrate-on-replica`. `gh-ost` will briefly connect to the master but other issue no changes on the master. Migration will be fully executed on the replica, while making sure to maintain a small replication lag. + +#### skip-renamed-columns + +See `approve-renamed-columns` + +#### test-on-replica Issue the migration on a replica; do not modify data on master. Useful for validating, testing and benchmarking. See [test-on-replica](test-on-replica.md) diff --git a/doc/images/gh-ost-logo-dark-320.png b/doc/images/gh-ost-logo-dark-320.png new file mode 100644 index 0000000000000000000000000000000000000000..d14945bccfc1f6508ea2715217f02d8519a9baa4 GIT binary patch literal 8619 zcmb7~by!n>`1eP5!x)_clA|Y`DpC&V?v{?x4H6E4uXG3sA}QTD5p{HnATdH3r2BXL z>-k;JU(a)GJKN5#v+JDubI1FB-6!$6&J!|XMq&^MM5ggnO%DXZ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S2T=|PQxUf8auKGo3>@}J!5yut1~?(5Wa?2`VSXHbFu;>{ee ztKGXQVlC|b?2#hcw+>vTz#ir{*uSz0c0|It0UOUdg#4!I+77o5v&Oja77W>w5^Ha@ z$lfWb=Zj{?s)}_h<>MFTyIgPX2gWJ@Ig9QG-Mnq47G!vTczPt7S2(||r0~uLGCS1% z+H-nBAWKN3C-TP@p-)uewz{jSOl$vyw8iXrjdrEa9*!Ou5aD)D$fPH2015!WUVAKR z;6hISg{F^>NcN!g`L1oVM@9Zc+tFWfyYY?qouOIcU2^w@`V9O$b}a4+dSHmCSamnt zII`fuP&8T)|9erUZ_Cf3p00O&!O;Z14Cs;_FB(JP!q>{TAvtfk4U=Ov4k8GX)l2$# zTuJpiO`ZT#*yNrY{J@3zS%Hy9M~b?uao+Fij%#tbS+$iN&rIg_0)Po?U%g;IN(HC` zfWTKhZvE=)i}HUiS?xu`f}-s?S2T?UoUB|FTN(SQz7;?giNRVSOu(QIO8VYwQw&`2 zt4Vz`;AI~jPbGLyt!yjqEv|Z=Yt~afCkTFhiFN=ZcD@!iLBtG0uJnZU{Ab`UMqWG)emzI}@NQqT2}l zizn0KnGCe2oWfF!<7rfcBraZXMv|C@O?+zcc;L1I!GHGx_`LDGlhe~F?7ve@oa=UC zLw+plb8LEZNClXGm{u8XU&p(`9&jKFGB79xdmzJ(qy(7J!Nfm^ua}~vH~|S6UvtK|-Yf literal 0 HcmV?d00001 diff --git a/doc/requirements-and-limitations.md b/doc/requirements-and-limitations.md new file mode 100644 index 0000000..54820a4 --- /dev/null +++ b/doc/requirements-and-limitations.md @@ -0,0 +1,23 @@ +# Requirements and limitations + +### Requirements + +- You will need to have one server serving Row Based Replication (RBR) format binary logs. `gh-ost` prefers to work with replicas. You may [still have your master configured with Statement Based Replication](migrating-with-sbr) (SBR). + +- `gh-ost` requires an account with these privileges: + + - `ALTER, CREATE, DELETE, DROP, INDEX, INSERT, LOCK TABLES, SELECT, TRIGGER, UPDATE` on the database (schema) where your migrated table is, or of course on `*.*` + - `SUPER, REPLICATION SLAVE` on `*.*` + +### Limitations + +- Foreign keys not supported. They may be supported in the future, to some extent. +- Triggers are not supported. they may be supported in the future. +- The two _before_ & _after_ tables must share some `UNIQUE KEY`. Such key would be used by `gh-ost` to iterate the table. + - As an example, if your table has a single `UNIQUE KEY` and no `PRIMARY KEY`, and you wish to replace it with a `PRIMARY KEY`, you will need two migrations: one to add the `PRIMARY KEY` (this migration will use the existing `UNIQUE KEY`), another to drop the now redundant `UNIQUE KEY` (this migration will use the `PRIMARY KEY`). +- The chosen migration key must not include columns with `NULL` values. + - `gh-ost` will do its best to pick a migration key with non-nullable columns. It will by default refuse a migration where the only possible `UNIQUE KEY` includes nullable-columns. You may override this refusal via `--allow-nullable-unique-key` but **you must** be sure there are no actual `NULL` values in those columns. Such `NULL` values would cause a data integrity problem and potentially a corrupted migration. +- It is not allowed to migrate a table where another table exists with same name and different upper/lower case. + - For example, you may not migrate `MyTable` if another table called `MYtable` exists in the same schema. +- Amazon `RDS` is probably not supported (due to `SUPER` requirement) +- Multisource is not supported when migrating via replica. It _should_ work (but never tested) when connecting directly to master (`--allow-on-master`) diff --git a/doc/what-if.md b/doc/what-if.md new file mode 100644 index 0000000..c457fab --- /dev/null +++ b/doc/what-if.md @@ -0,0 +1,32 @@ +# What if? + +Technical questions and answers. This document will be updated as we go + +### What if I'm using Statement Based Replication? + +You can still migrate tables with `gh-ost`. We do that. What you will need is a replica configured with: + +- `log_bin` +- `log_slave_updates` +- `binlog_format=ROW` + +Thus, the replica will transform the master's SBR binlogs into RBR binlogs. `gh-ost` is happy to read the binary logs from the replica. [Read more](migrating-with-sbr.md) + +### What if gh-ost crashes halfway through, or I kill it? + +Unlike trigger-based solutions, there's nothing urgent to clean up in the event `gh-ost` bails out or gets killed. There are the two tables creates by `gh-ost`: + +- The _ghost_ table: `_yourtablename_gho` +- The _changelog_ table: `_yourtablename_ghc` + +You may instruct `gh-ost` to drop these tables upon startup; or better yet, you drop them. + +### What if the cut-over (table switch) is unable to proceed due to locks/timeout? + +There is a `lock_wait_timeout` explicitly associated with the cut-over operation. If your table suddenly suffers from a long running query, the cut-over (involving `LOCK` and `RENAME` statements) may be unable to proceed. There's a finite number of retries, and if none of these succeeds, `gh-ost` bails out. + +### What if the migration is causing a high load on my master? + +This is where `gh-ost` shines. There is no need to kill it as you may be used to with other tools. You can reconfigure `gh-ost` [on the fly](https://github.com/github/gh-ost/blob/master/doc/interactive-commands.md) to be nicer. + +You're always able to actively begin [throttling](throttle.md). Just touch the `throttle-file` or `echo throttle` into `gh-ost`. Otherwise, reconfigure your `max-load`, the `nice-ratio`, the `throttle-query` to gain better thresholds that would suit your needs. diff --git a/doc/why-triggerless.md b/doc/why-triggerless.md index 7908402..50153b9 100644 --- a/doc/why-triggerless.md +++ b/doc/why-triggerless.md @@ -12,7 +12,6 @@ are all using [triggers](http://dev.mysql.com/doc/refman/5.6/en/triggers.html) t Use of triggers simplifies a lot of the flow in doing a live table migration, but also poses some limitations or difficulties. Here are reasons why we choose to [design a triggerless solution](triggerless-design.md) to schema migrations. - ## Overview Triggers are stored routines which are invoked on a per-row operation upon `INSERT`, `DELETE`, `UPDATE` on a table.