Commit Graph

371 Commits

Author SHA1 Message Date
Shlomi Noach
9890e66755 Merge pull request #491 from zmoazeni/enable-extra-port
Allow gh-ost to modify the server using extra port
2017-10-02 14:26:59 +03:00
dcadevil
351bfe1a24 Correct spelling for initiateStreaming() comment. 2017-09-21 11:36:27 +08:00
Zach Moazeni
df27c5b76f Allow gh-ost to modify the server using extra port
Both Percona and Maria allow MySQL to be configured to listen on an extra port when their thread pool is enable.

* https://www.percona.com/doc/percona-server/5.7/performance/threadpool.html
* https://mariadb.com/kb/en/the-mariadb-library/thread-pool-in-mariadb-51-53/

This is valuable because if the table has a lot of traffic (read or write load), gh-ost can end up starving the thread pool as incomming connections are immediately blocked.

By using gh-ost on the extra port, MySQL locking will still behave the same, but MySQL will keep a dedicated thread for each gh-ost connection.

When doing this, it's important to inspect the extra-max-connections variable. Both Percona and Maria default to 1, so gh-ost may easily exceed with its threads.

An example local run using this

```
$ mysql -S /tmp/mysql_sandbox20393.sock -e "select @@global.port, @@global.extra_port"
+---------------+---------------------+
| @@global.port | @@global.extra_port |
+---------------+---------------------+
|         20393 |               30393 |
+---------------+---------------------+

./bin/gh-ost \
--initially-drop-ghost-table \
--initially-drop-old-table \
--assume-rbr \
--port="20395" \
--assume-master-host="127.0.0.1:30393" \
--max-load=Threads_running=25 \
--critical-load=Threads_running=1000 \
--chunk-size=1000 \
--max-lag-millis=1500 \
--user="gh-ost" \
--password="gh-ost" \
--database="test" \
--table="mytable" \
--verbose \
--alter="ADD mynewcol decimal(11,2) DEFAULT 0.0 NOT NULL" \
--exact-rowcount \
--concurrent-rowcount \
--default-retries=120 \
--panic-flag-file=/tmp/ghost.panic.flag \
--postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \
--execute
```
2017-09-20 16:05:20 -04:00
Shlomi Noach
6362dbe51a Clearer error message on config file read error 2017-09-10 08:20:01 +03:00
Shlomi Noach
8940649a32 Merge branch 'master' into checking-thresholds 2017-09-06 15:14:17 +03:00
Peng Sung
113e115c49 Update the main.go word spelling error 2017-09-06 15:12:09 +08:00
Shlomi Noach
78c1e0432f Merge branch 'master' into checking-thresholds 2017-09-06 08:07:35 +03:00
Shlomi Noach
e2171e0162 Validating password length 2017-09-03 10:27:04 +03:00
Shlomi Noach
3437cf44c4 Validating shared key column types 2017-09-03 09:57:26 +03:00
Shlomi Noach
f2cd598376 Merge branch 'master' into autocommit 2017-09-03 07:55:13 +03:00
Christian Joudrey
2646a0a997
Remove unused acceptSignals in migrator 2017-09-02 21:59:09 -04:00
Shlomi Noach
a3ee81e116 Merge branch 'master' into autocommit 2017-08-30 11:40:56 +03:00
Shlomi Noach
10cafb71c0 gh-ost uses autocommit=1 for all connections 2017-08-30 11:38:22 +03:00
Shlomi Noach
c9f2da82f0 Merge branch 'master' into json-57-test 2017-08-27 08:01:02 +03:00
Shlomi Noach
2174588ebf Supporting JSON types 2017-08-22 11:51:20 +03:00
Shlomi Noach
79e4f1cdbe detect range end based on OFFSET 2017-08-21 08:12:41 +03:00
Shlomi Noach
d6f1675f1b Merge branch 'master' into interpolate-params 2017-07-26 10:01:41 +03:00
Shlomi Noach
d9a23a2212 interpolateParams=true: client side prepared statements 2017-07-25 09:21:30 +03:00
Arthur Neves
02359b2a79
Dont share the same context in the table name tests 2017-07-24 06:26:31 -04:00
Arthur Neves
843c74f960
Add a force-table-names command flag
usage example:
```
gh-ost  ...  --force-table-names=migration_tbl
```

The force-table-names flag will receive a table name and use that name
when creating the _del, _gho, _ghc tables.
For instance for that example above, the tables would be:

_migration_tbl_del
_migration_tbl_gho
_migration_tbl_ghc

[fixes #399]
2017-07-21 15:37:57 -04:00
Shlomi Noach
e2c14f5aba Merge branch 'master' into dynamic-dml-batch-size 2017-07-20 16:47:22 +03:00
Shlomi Noach
260374aeb9 Merge branch 'master' into long-table-names 2017-07-20 16:46:41 +03:00
Shlomi Noach
de0ebcbbb0 documentation 2017-07-19 16:48:22 +03:00
Shlomi Noach
6da0b8af3d Dynamic DML batch size; apadting buffer size to match 2017-07-19 16:44:18 +03:00
Shlomi Noach
39e73e37d0 testing context.TimestampOldTable 2017-07-19 15:22:46 +03:00
Shlomi Noach
168676bd9d ghost/changelog/del table names support max characters limit 2017-07-19 15:14:03 +03:00
Shlomi Noach
4a3a5a1ce1 Merge branch 'master' into case-insensitive-columns 2017-07-16 06:51:39 +03:00
Shlomi Noach
effae08fbf supporting change of column name-case 2017-07-12 12:33:32 +03:00
Shlomi Noach
e6dd2c90d2 responding to errors in rowcopy 2017-07-11 13:39:11 +03:00
Shlomi Noach
81403699b7 Merge branch 'master' into throttle-http-freno-aware 2017-07-05 10:16:56 +03:00
Shlomi Noach
a8932ee1b8 freno-aware http-throttler 2017-07-04 10:28:09 +03:00
Shlomi Noach
f9788a61ed Merge branch 'master' into dml-batch-size-cap 2017-07-04 08:54:49 +03:00
Shlomi Noach
095863b774 dml-batch-size capped at 1000 2017-07-04 08:50:25 +03:00
Shlomi Noach
36bcc031ce Merge branch 'master' into fix-variables-spelling 2017-06-29 20:53:49 +03:00
Shlomi Noach
e8b384e43c supporting greater batch size 2017-06-28 19:35:55 +03:00
Shlomi Noach
8da0f60582 fixed critical-load check for hibernation 2017-05-24 10:53:00 +03:00
Shlomi Noach
ad47f7c147 throttling just prior to leaving hibernation, so as to allow re-throttle checks to apply 2017-05-24 10:42:47 +03:00
Shlomi Noach
3955a6d67f hibernate on critical-load 2017-05-24 08:32:13 +03:00
Shlomi Noach
eaa3489fe0 Merge branch 'master' into server-report-coordinates 2017-05-01 07:50:13 +03:00
Shlomi Noach
79cee99f57 support for 'coordinates' command 2017-04-28 15:50:51 -07:00
Jacob Bednarz
0243e76b33
s/applyEnvironmentVairables/applyEnvironmentVariables 2017-04-24 07:45:21 +10:00
Shlomi Noach
e2a6b857d0 Merge branch 'master' into drop-add-same-column 2017-04-23 20:26:31 +03:00
Shlomi Noach
8a0f1413eb dropped columns are not 'shared' and no data copy attempted for such columns 2017-04-23 08:38:35 +03:00
Shlomi Noach
85c498511e parser recognizes DROP COLUMN tokens 2017-04-23 08:23:56 +03:00
Shlomi Noach
3092e9c5c0 error and nil checks on socket connection 2017-04-13 08:27:42 +03:00
Shlomi Noach
8405b0c3b8 Merge branch 'master' into close-sync-with-err 2017-03-28 08:01:18 +03:00
Shlomi Noach
7a3912da80 fixing binlog syncer double-close() 2017-03-27 08:33:06 +03:00
Shlomi Noach
c413d508cc HEAD instead of GET 2017-03-26 13:12:56 +03:00
Shlomi Noach
23ce390d69 supporting throttle-http 2017-03-26 13:10:34 +03:00
Shlomi Noach
7517238bd3 Merge branch 'master' into fix-infinite-cutover-loop 2017-03-06 21:50:26 +02:00