Skip to content

Commit aeb9043

Browse files
author
Shlomi Noach
authored
Merge pull request #289 from github/concurrent-rowcount-defaults-true
concurrent-rowcount defaults 'true'
2 parents 3435539 + 02e9287 commit aeb9043

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/command-line-flags.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ A `gh-ost` execution need to copy whatever rows you have in your existing table
7171
`gh-ost` also supports the `--exact-rowcount` flag. When this flag is given, two things happen:
7272
- An initial, authoritative `select count(*) from your_table`.
7373
This query may take a long time to complete, but is performed before we begin the massive operations.
74-
When `--concurrent-rowcount` is also specified, this runs in paralell to row copy.
74+
When `--concurrent-rowcount` is also specified, this runs in parallel to row copy.
75+
Note: `--concurrent-rowcount` now defaults to `true`.
7576
- A continuous update to the estimate as we make progress applying events.
7677
We heuristically update the number of rows based on the queries we process from the binlogs.
7778

go/cmd/gh-ost/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func main() {
5454
flag.StringVar(&migrationContext.OriginalTableName, "table", "", "table name (mandatory)")
5555
flag.StringVar(&migrationContext.AlterStatement, "alter", "", "alter statement (mandatory)")
5656
flag.BoolVar(&migrationContext.CountTableRows, "exact-rowcount", false, "actually count table rows as opposed to estimate them (results in more accurate progress estimation)")
57-
flag.BoolVar(&migrationContext.ConcurrentCountTableRows, "concurrent-rowcount", false, "(with --exact-rowcount), when true: count rows after row-copy begins, concurrently, and adjust row estimate later on; defaults false: first count rows, then start row copy")
57+
flag.BoolVar(&migrationContext.ConcurrentCountTableRows, "concurrent-rowcount", true, "(with --exact-rowcount), when true (default): count rows after row-copy begins, concurrently, and adjust row estimate later on; when false: first count rows, then start row copy")
5858
flag.BoolVar(&migrationContext.AllowedRunningOnMaster, "allow-on-master", false, "allow this migration to run directly on master. Preferably it would run on a replica")
5959
flag.BoolVar(&migrationContext.AllowedMasterMaster, "allow-master-master", false, "explicitly allow running in a master-master setup")
6060
flag.BoolVar(&migrationContext.NullableUniqueKeyAllowed, "allow-nullable-unique-key", false, "allow gh-ost to migrate based on a unique key with nullable columns. As long as no NULL values exist, this should be OK. If NULL values exist in chosen key, data may be corrupted. Use at your own risk!")

0 commit comments

Comments
 (0)