updating documentation following recent developments

describing `--concurrent-rowcount`
This commit is contained in:
Shlomi Noach 2016-09-01 12:46:54 +02:00
parent dfde634cf6
commit d5161c6a89
3 changed files with 9 additions and 1 deletions

View File

@ -37,6 +37,7 @@ gh-ost \
--allow-master-master \ --allow-master-master \
--cut-over=default \ --cut-over=default \
--exact-rowcount \ --exact-rowcount \
--concurrent-rowcount \
--default-retries=120 \ --default-retries=120 \
--panic-flag-file=/tmp/ghost.panic.flag \ --panic-flag-file=/tmp/ghost.panic.flag \
--postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \ --postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \
@ -72,6 +73,7 @@ gh-ost \
--allow-master-master \ --allow-master-master \
--cut-over=default \ --cut-over=default \
--exact-rowcount \ --exact-rowcount \
--concurrent-rowcount \
--default-retries=120 \ --default-retries=120 \
--panic-flag-file=/tmp/ghost.panic.flag \ --panic-flag-file=/tmp/ghost.panic.flag \
--postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \ --postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \
@ -105,6 +107,7 @@ gh-ost \
--chunk-size=2500 \ --chunk-size=2500 \
--cut-over=default \ --cut-over=default \
--exact-rowcount \ --exact-rowcount \
--concurrent-rowcount \
--serve-socket-file=/tmp/gh-ost.test.sock \ --serve-socket-file=/tmp/gh-ost.test.sock \
--panic-flag-file=/tmp/gh-ost.panic.flag \ --panic-flag-file=/tmp/gh-ost.panic.flag \
--execute --execute

View File

@ -32,6 +32,10 @@ user=gromit
password=123456 password=123456
``` ```
### concurrent-rowcount
See `exact-rowcount`
### cut-over ### cut-over
Optional. Default is `safe`. See more discussion in [cut-over](cut-over.md) Optional. Default is `safe`. See more discussion in [cut-over](cut-over.md)
@ -44,6 +48,7 @@ A `gh-ost` execution need to copy whatever rows you have in your existing table
`gh-ost` also supports the `--exact-rowcount` flag. When this flag is given, two things happen: `gh-ost` also supports the `--exact-rowcount` flag. When this flag is given, two things happen:
- An initial, authoritative `select count(*) from your_table`. - An initial, authoritative `select count(*) from your_table`.
This query may take a long time to complete, but is performed before we begin the massive operations. This query may take a long time to complete, but is performed before we begin the massive operations.
When `--concurrent-rowcount` is also specified, this runs in paralell to row copy.
- A continuous update to the estimate as we make progress applying events. - A continuous update to the estimate as we make progress applying events.
We heuristically update the number of rows based on the queries we process from the binlogs. We heuristically update the number of rows based on the queries we process from the binlogs.

View File

@ -54,7 +54,7 @@ $ gh-osc --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample
Elaborate: Elaborate:
```shell ```shell
$ gh-osc --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample_table --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --switch-to-rbr --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --postpone-cut-over-flag-file=/tmp/ghost-postpone.flag --exact-rowcount --allow-nullable-unique-key --verbose --execute $ gh-osc --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample_table --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --switch-to-rbr --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --postpone-cut-over-flag-file=/tmp/ghost-postpone.flag --exact-rowcount --concurrent-rowcount --allow-nullable-unique-key --verbose --execute
``` ```
- Count exact number of rows (makes ETA estimation very good). This goes at the expense of paying the time for issuing a `SELECT COUNT(*)` on your table. We use this lovingly. - Count exact number of rows (makes ETA estimation very good). This goes at the expense of paying the time for issuing a `SELECT COUNT(*)` on your table. We use this lovingly.
- Automatically switch to `RBR` if replica is configured as `SBR`. See also: [migrating with SBR](migrating-with-sbr.md) - Automatically switch to `RBR` if replica is configured as `SBR`. See also: [migrating with SBR](migrating-with-sbr.md)