From d5161c6a8920ebcd542e9f0cf84da6855477f0d3 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Thu, 1 Sep 2016 12:46:54 +0200 Subject: [PATCH] updating documentation following recent developments describing `--concurrent-rowcount` --- doc/cheatsheet.md | 3 +++ doc/command-line-flags.md | 5 +++++ doc/testing-on-replica.md | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index 77b2809..21bd2eb 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -37,6 +37,7 @@ gh-ost \ --allow-master-master \ --cut-over=default \ --exact-rowcount \ +--concurrent-rowcount \ --default-retries=120 \ --panic-flag-file=/tmp/ghost.panic.flag \ --postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \ @@ -72,6 +73,7 @@ gh-ost \ --allow-master-master \ --cut-over=default \ --exact-rowcount \ +--concurrent-rowcount \ --default-retries=120 \ --panic-flag-file=/tmp/ghost.panic.flag \ --postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \ @@ -105,6 +107,7 @@ gh-ost \ --chunk-size=2500 \ --cut-over=default \ --exact-rowcount \ + --concurrent-rowcount \ --serve-socket-file=/tmp/gh-ost.test.sock \ --panic-flag-file=/tmp/gh-ost.panic.flag \ --execute diff --git a/doc/command-line-flags.md b/doc/command-line-flags.md index 3ede1ff..83b0da0 100644 --- a/doc/command-line-flags.md +++ b/doc/command-line-flags.md @@ -32,6 +32,10 @@ user=gromit password=123456 ``` +### concurrent-rowcount + +See `exact-rowcount` + ### cut-over 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: - 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. + 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. We heuristically update the number of rows based on the queries we process from the binlogs. diff --git a/doc/testing-on-replica.md b/doc/testing-on-replica.md index cfc3c24..cd3cfd1 100644 --- a/doc/testing-on-replica.md +++ b/doc/testing-on-replica.md @@ -54,7 +54,7 @@ $ gh-osc --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample Elaborate: ```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. - Automatically switch to `RBR` if replica is configured as `SBR`. See also: [migrating with SBR](migrating-with-sbr.md)