Граф коммитов

59 Коммитов

Автор SHA1 Сообщение Дата
teejae 7329452df3 Add strong warning against production use to example init_db.sql file (#4815)
* Add strong warning against production use to example init_db.sql file

Signed-off-by: Toliver Jue <toliver@planetscale.com>
2019-04-16 22:12:37 -07:00
Sugu Sougoumarane b383d0051c
Merge pull request #4727 from planetscale/ds-vt-dbname
Allow multiple databases in one mysql instance
2019-04-16 12:42:09 -07:00
Deepthi Sigireddi f3bfe8b414
Merge pull request #4695 from planetscale/ds-xtrabackup
xtrabackup implementation with testcases
2019-04-11 10:27:42 -07:00
deepthi 0985ddd80f add db_name to _vt.local_metadata and _vt.shard_metadata
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-04-09 16:41:29 -07:00
deepthi 595448a530 add auth config, add MySQL80 flavor handling in mysqld
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-04-08 15:19:25 -07:00
deepthi a3b7b04f08 MySQL 8.0 should be started with mysqlx=0
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-04-08 15:19:25 -07:00
deepthi a434720576 xtrabackup implementation with testcases
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-04-08 10:17:00 -07:00
Dan Kozlowski a9cf065995 Adding in SQL commands to prepare an instance to join an existing shard
Signed-off-by: Dan Kozlowski <koz@planetscale.com>
2019-01-15 14:27:39 -08:00
Derek Perkins 1a50a4dbf6 config: rm secure_file_priv & innodb_support_xa
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2018-12-04 08:33:34 -07:00
DK 5084a4c3c0 Updating configurations and dependency versions
This commit updates all fixed dependencies to their latest version and
mades changes to the default configs to.

1. Increase the defaults for a few key values
2. Move some settings to new files to support MariaDB 10.3
3. Add a sample production configuration to allow easy deployment

Signed-off-by: DK <dk@planetscale.com>
2018-12-03 15:04:01 -08:00
deepthi 970555bd40 fix cancelVerticalResharding so that Master is back in serving state
Signed-off-by: deepthi <deepthi@planetscale.com>
2018-10-31 16:10:54 -07:00
Derek Perkins 5a72a94049 init_db.sql: add explicit CREATE USER statements
MySQL 8 no longer allows implicitly creating users with a GRANT clause

Signed-off-by: Derek Perkins <derek@derekperkins.com>
2018-10-21 13:58:56 -06:00
Derek Perkins bd086322bf config: set secure_file_priv = NULL to disable
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2018-10-18 17:55:13 -06:00
Derek Perkins d45cc89a4a config: remove query_cache_size for MySQL 8 compat
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2018-10-18 17:51:08 -06:00
Dan Kozlowski 0d54495736 Adding in support for MariaDB 10.3
Signed-off-by: Dan Kozlowski <koz@planetscale.com>
2018-09-10 09:50:04 -07:00
Sugu Sougoumarane 8b4b765e90 flakyness: vtgatev2_test
The test was flaky because frequent restarts of mysql were
causing the relay log to go corrupt. Changed the my.cnf settings
to be more crash-safe.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2018-07-29 21:27:19 -07:00
Rafael Chacon 24b3f65f5b Do not send to bin log init.db DDL's
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Co-authored-by: Ameet Kotian <akotian@slack-corp.com>
2018-04-13 13:28:37 -07:00
Derek Perkins fe3e72129f Disable query cache in default.cnf 2018-01-02 18:02:56 -07:00
Sugu Sougoumarane 3a7ef0e697 mysqlctl: remove lower_case_table_names setting
Issue #3158
The current value of 0 is definitely incorrect because vitess
treats table names as case-sensitive. It's better we don't set
this variable at all. Let the users decide what it should be.
2017-11-13 17:14:51 -08:00
Rafael Chacon 9d33252ee1 Add appDebugUsername to local examples
* This will show how to set up an special debug user when configuring vtgates
  and vttablets.
2017-08-15 17:25:59 -07:00
Daniël van Eeden ed4d04b70a Orchestrator upstream moved to github 2017-05-07 09:34:42 -07:00
Alain Jobart f4a97f6986 Adding a rbr version of vertical_split.py.
Extra bonus: it actually passes.
2017-03-15 08:42:50 -07:00
Martin Fris e855c40083 RELOAD privilege added for orchestrator mysql user (#2167)
Fix for `Access denied; you need (at least one of) the RELOAD
privilege(s) for this operation` during master failover process,
which happens when Orchestrator tries to execute RESET SLAVE.
2016-10-19 17:41:10 -07:00
Pavel Ivanov db9e4c5643 Add support for Vitess 'allprivs' user.
This adds support for an 'allprivs' user which is supposed to have more
privileges than 'app' user, but unlike 'dba' user 'allprivs' won't have SUPER
privilege. New method ExecuteFetchAsAllPrivs() is added to TabletManager
service to be able to execute queries as this new 'allprivs' user.

'allprivs' user will be used for administrative tasks done by Vitess, such as
changes in metadata tables that schema swap process will be doing. 'allprivs'
user shouldn't have SUPER privilege so that schema swap could safely change
replicated metadata on the master without risk to commit the changes when
master has been already demoted to be a slave.
2016-09-26 17:47:12 -07:00
Joshua Thompson dba9c6d992 Merge remote-tracking branch 'upstream/master' into webdriver2 2016-08-18 14:05:15 -07:00
Pavel Ivanov cb2b1fdf7b Introduce _vt.shard_metadata table.
This table will contain a per-shard metadata information similarly to how
_vt.local_metadata contains local per-tablet metadata information. It will be
used later by online schema swap process. This table will be replicated and
changed only on the master. As an exception to that rule creation of the table
is added to the vttablet startup code to make sure that it's created during
vttablet version update.

Copying of the contents of _vt.shard_metadata table is added to horizontal
resharding procedure to make sure that the contents of the table is consistent
across all shards of a single keyspace in cases when we are resharding only part
of the source keyspace leaving another part intact. The check for existence of
_vt.shard_metadata is still added to CopySchemaShard e.g. for a case when new
vtworker code will work with older vttablet code.

I've modified init_db.sql to create both _vt.shard_metadata and
_vt.local_metadata tables because it's just logically correct to have them both
in the tests since they will exist both in production. Tests are also adjusted
to not clobber the _vt database when not needed since resharding code now
depends on _vt.shard_metadata table existence.
2016-08-16 13:25:41 -07:00
Joshua Thompson ddca7db497 Add webdriver support for new vtctld2 UI 2016-08-16 11:26:41 -07:00
Anthony Yeh ad829c401c Disable Native AIO for MySQL 5.6+ flavor.
It causes startup problems for tests that run a lot of mysqld instances.
2016-06-15 13:19:30 -07:00
Anthony Yeh 0076796992 Populate _vt.local_metadata table.
This can be used to propagate Vitess identity info to tools that work at
the MySQL level.
2016-06-06 14:16:11 -07:00
Anthony Yeh 7ada2ca24e Add MySQL user for connections from Orchestrator. 2016-05-31 14:19:54 -07:00
Anthony Yeh 12f29bc5a1 Enable relay_log_recovery for MySQL 5.6+.
This causes mysqld to ignore relay logs on disk at startup,
and instead start replicating from the master wherever the SQL thread
left off.

This is generally recommended for safer crash recovery.
We also do it to avoid problems caused by spurious Previous-GTIDs lists
in relay logs that occur when we restart mysqld in integration tests.
2016-05-20 17:59:37 -07:00
Anthony Yeh b230519386 Remove my.cnf options that were deprecated in MySQL 5.6.
These options were removed entirely in MySQL 5.7.
2016-05-20 17:59:37 -07:00
Anthony Yeh ebcb5b386e healthcheck: Try to heal replication automatically.
This allows tablets (consisting of vttablet+mysqld) to be restarted
without having to manually re-point slaves at the master and tell them
to start replicating again. This is important for rollout flows, where
each slave is restarted in turn.

We can't just check at vttablet startup, because then we'd miss the case
when only mysqld is restarted. Instead, we check at each healthcheck
interval so replication becomes self-healing. The replication lag check
had to be moved from mysqlctl to tabletmanager and integrated with this
healing, to make sure the healing attempt is synchronized with the slave
status check.

This is also needed for Orchestrator integration, because we are responsible
for giving the slave a master in the first place so Orchestrator knows which
replication tree the slave belongs to.
2016-05-17 12:37:22 -07:00
Anthony Yeh a3efb4ebd2 Support semi-sync without async fallback.
When using semi-sync with rpl_semi_sync_master_wait_no_slave=1 and
rpl_semi_sync_master_timeout=[effectively infinite], it's necessary to
toggle master-side semi-sync at the proper times to prevent slaves from
getting stuck (since they have no slaves of their own to ACK).

This commit adds a new vttablet flag -enable_semi_sync, which causes the
replication-management features of Vitess (e.g. InitShardMaster and
various reparent operations) to automatically manage semi-sync settings.

With these settings, it becomes (reasonably) safe to reparent away from
an unresponsive master, as long as the following can be verified:

* All semi-sync slaves have stopped replicating from the old master.
* The chosen new master is the farthest ahead in replication.

Currently we only allow slaves marked in Vitess terms as "replica"
tablets to be semi-sync slaves (i.e. to send ACKs). Vitess slaves marked as
"rdonly" will NOT ACK, because they are not eligible to become masters,
so we never want them to be the only slave with the latest update.
This means when using semi-sync, every shard must have at least 2 live
"replica" type tablets (including the master) in order to accept writes.
2016-02-24 10:12:47 -08:00
Anthony Yeh b89d988e30 Make MySQL users and privileges configurable.
This gets rid of the opaque mysql-db-dir.tbz archive, replacing it with
a .sql file. The .sql file approach makes it clear what state the DB is
initialized with, and also makes it easy to customize.
2015-11-10 11:41:24 -08:00
Alain Jobart 2fc3c2713d Now mysql port is a int32, to be consistent with other places.
Also fixing all linter issues.
2015-08-11 18:21:54 -07:00
Anthony Yeh c935f5ca06 Add extra_my_cnf for MySQL 5.6. 2015-05-05 15:30:56 -07:00
Anthony Yeh cc21f69afd Rename table_cache -> table_open_cache.
This option was renamed in MySQL 5.5, so it has been silently ignored
since we moved to MariaDB 10.0. I found out it was wrong because MySQL
5.6 quits if it sees an unknown option.
2015-04-22 15:15:23 -07:00
Anand Henry 2a63866797 Benchmark config: lower innodb_buffer_pool_size 2015-04-12 17:48:22 -07:00
Anand Henry 35cc6418ec Benchmarking: disable sync_binlog and increase open_files_limit 2015-03-30 16:44:33 -07:00
Anand Henry 418339daf8 Remove Mariadb specific configs from benchmark.cnf 2015-03-30 10:09:41 -07:00
Anand Henry 4e97e99181 MySQL configs for benchmarking 2015-03-28 19:05:48 -07:00
Alain Jobart dc70ca6174 Removing support for Google MySQL 5.1. 2015-02-19 13:03:12 -08:00
Anand Henry 593534912d Travis: Fix flaky tests
Make min rdonly instances configurable for vtworker tasks
Remove unnecessary tablets wherever possible
Use lower buffer pool size in MySQL to save memory
Track performance using New Relic
2014-12-22 14:39:01 -08:00
Veres Lajos 18fb59b104 typofixes - https://github.com/vlajos/misspell_fixer 2014-12-04 22:33:57 +00:00
Anthony Yeh dcc2205a32 Make new DB data dir and config file for MariaDB. 2014-08-20 21:11:49 -07:00
Alain Jobart 8302b2ae94 First pass at MariaDB support.
test/tabletmanager.py passes!
It's enabled by setting MYSQL_FLAVOR=MariaDB before anything.
2014-04-02 14:52:07 -07:00
shrutip ac5bc8b290 Pruned the deprecated variables from replica.cnf. 2014-01-10 17:05:40 -08:00
Alain Jobart 8bfe64a326 Disable super_to_set_timestamp during rep only.
When we start a player, we enable it. When we stop
all players, we disable it. Much cleaner.
2013-08-26 13:55:28 -07:00
Alain Jobart 2741e62ecd Changing filtered replication to non-SUPER user.
This now works as we allow regular users to set
timestamps.
2013-08-26 11:23:25 -07:00