SlideShare a Scribd company logo
1 of 78
Download to read offline
How to Avoid Pitfalls in Schema Upgrade
with Percona XtraDB Cluster
Sveta Smirnova
Percona
Sveta Smirnova
• MySQL Support engineer
• Author of
• MySQL Troubleshooting
• JSON UDF functions
• FILTER clause for MySQL
• Speaker
• Percona Live, OOW, Fosdem,
DevConf, HighLoad... 2
Table of Contents
•TOI
•RSU
•pt-online-schema-change (pt-osc)
3
Introduction
• Galera Replication Library
• Provides synchronous replication for MySQL
4
Introduction
• Galera Replication Library
• Provides synchronous replication for MySQL
• Galera Clusters
Percona XtraDB Cluster
MariaDB Galera Cluster
Galera Cluster for MySQL
4
How Galera works
• Data modification happens on a node
• Optimistic locking control
5
How Galera works
• Data modification happens on a node
• Optimistic locking control
• While a transaction is in progress
• Writes are applied locally
• Same as for standalone server
5
How Galera works
• Data modification happens on a node
• Optimistic locking control
• While a transaction is in progress
• At the COMMIT time
• Broadcasts write set for the cluster
• Waits confirmation of the successful update
From all other nodes
Yes Commits transaction locally
No Rollbacks transaction
5
Data Updates
• Committed on all nodes or nowhere
• Safe
6
Challenges of DDL
• Replicated independently from storage engine
7
Challenges of DDL
• Replicated independently from storage engine
• Changes may affect query results
• Adding/removal of UNIQUE keys
• Adding/removal columns
• Changing column definition
7
Challenges of DDL
• Replicated independently from storage engine
• Changes may affect query results
• Modification can happen on any node
• The schema must be upgraded before DML
• There is no way to rollback schema upgrade
• MDLs are set only on one node
Not across the cluster
Not possible to rely on them for all nodes
Additional control required
7
TOI
Total Order Isolation (TOI)
• DDL changes are replicated in the same order
• Regarding other transactions
• All nodes are in the absolutely same state
• At any point of time
9
TOI: Illustration
• 3-nodes cluster
• Node A
• Node B
• Node C
10
TOI: Illustration
• Initial state
Node A
INSERT(103)
UPDATE(104)
ALTER(105)
Node B
UPDATE(101)
INSERT(102)
DELETE(108)
UPDATE(109)
Node C
SELECT(100)
INSERT(112)
SELECT(113)
UPDATE(114)
10
TOI: Illustration
• Queries status
Node A
INSERT(103)
UPDATE(104)
ALTER(105)
Node B
UPDATE(101)
INSERT(102)
DELETE(108)
UPDATE(109)
Node C
SELECT(100)
INSERT(112)
SELECT(113)
UPDATE(114)
10
TOI: Illustration
• ALTER in progress
Node A
ALTER(105)
Node B
DELETE(108)
UPDATE(109)
Node C
INSERT(112)
SELECT(113)
UPDATE(114)
10
TOI: Illustration
• ALTER finished
Node A Node B
DELETE(108)
UPDATE(109)
Node C
INSERT(112)
SELECT(113)
UPDATE(114)
10
PROCESSLIST: DML before ALTER
DML node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist WHERE DB=’sbtest’;
+--------+---------+------+---------------------------------------------------+-----------------------+
| DB | COMMAND | TIME | STATE | INFO |
+--------+---------+------+---------------------------------------------------+-----------------------+
| sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2886) | COMMIT |
| sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2888) | COMMIT |
| sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2884) | COMMIT |
| sbtest | Query | 1 | updating | DELETE FROM sbtest1.. |
| sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2887) | COMMIT |
| sbtest | Query | 0 | wsrep: initiating pre-commit for write set (2889) | COMMIT |
| sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2885) | COMMIT |
| sbtest | Query | 1 | wsrep: pre-commit/certification passed (2883) | COMMIT |
+--------+---------+------+---------------------------------------------------+-----------------------+
8 rows in set (0.00 sec)
11
PROCESSLIST: SELECT before ALTER
SELECT node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist
-> WHERE DB=’sbtest’;
+--------+---------+------+-------------------+---------------------------------------+
| DB | COMMAND | TIME | STATE | INFO |
+--------+---------+------+-------------------+---------------------------------------+
| sbtest | Query | 0 | statistics | SELECT pad FROM sbtest2 WHERE id=5009 |
| sbtest | Query | 0 | starting | SELECT pad FROM sbtest3 WHERE id=4951 |
| sbtest | Query | 0 | statistics | SELECT pad FROM sbtest4 WHERE id=4954 |
| sbtest | Query | 0 | System lock | SELECT pad FROM sbtest2 WHERE id=5351 |
| sbtest | Query | 0 | cleaning up | SELECT pad FROM sbtest2 WHERE id=4954 |
| sbtest | Sleep | 0 | | NULL |
| sbtest | Query | 0 | Sending to client | SELECT pad FROM sbtest1 WHERE id=4272 |
| sbtest | Query | 0 | closing tables | SELECT pad FROM sbtest4 WHERE id=4722 |
+--------+---------+------+-------------------+---------------------------------------+
8 rows in set (0.00 sec)
12
ALTER
DDL node> use ddltest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
DDL node> alter table sbtest1 add key k1(c, k, pad);
Query OK, 0 rows affected (3 min 53.73 sec)
Records: 0 Duplicates: 0 Warnings: 0
13
PROCESSLIST: DML during ALTER
DML node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist
-> WHERE DB in (’sbtest’,’ddltest’);
+---------+---------+------+---------------------------------------------------+----------------------+
| DB | COMMAND | TIME | STATE | |
+---------+---------+------+---------------------------------------------------+----------------------+
| sbtest | Query | 36 | wsrep: initiating pre-commit for write set (7886) | COMMIT |
| sbtest | Query | 37 | wsrep: initiating pre-commit for write set (7882) | COMMIT |
| sbtest | Query | 27 | wsrep: initiating pre-commit for write set (7887) | COMMIT |
| sbtest | Query | 27 | wsrep: initiating pre-commit for write set (7888) | COMMIT |
| sbtest | Query | 36 | wsrep: initiating pre-commit for write set (7885) | COMMIT |
| sbtest | Query | 37 | wsrep: initiating pre-commit for write set (7883) | COMMIT |
| sbtest | Query | 37 | wsrep: initiating pre-commit for write set (7884) | COMMIT |
| sbtest | Query | 10 | wsrep: initiating pre-commit for write set (7889) | COMMIT |
| ddltest | Sleep | 38 | altering table | alter table sbtest1. |
+---------+---------+------+---------------------------------------------------+----------------------+
9 rows in set (0.00 sec)
14
PROCESSLIST: SELECT during ALTER
SELECT node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist
-> WHERE DB in (’sbtest’,’ddltest’);
+---------+---------+------+-------------------+-------------------------------------------+
| DB | COMMAND | TIME | STATE | |
+---------+---------+------+-------------------+-------------------------------------------+
| sbtest | Sleep | 0 | | NULL |
| sbtest | Sleep | 0 | | NULL |
| sbtest | Query | 0 | Sending to client | SELECT pad FROM sbtest4 WHERE id=4989 |
| sbtest | Sleep | 0 | | NULL |
| sbtest | Query | 0 | query end | SELECT pad FROM sbtest2 WHERE id=4961 |
| sbtest | Sleep | 0 | | NULL |
| sbtest | Sleep | 0 | | NULL |
| sbtest | Sleep | 0 | | NULL |
| ddltest | Sleep | 39 | altering table | alter table sbtest1 add key k1(c, k, pad) |
+---------+---------+------+-------------------+-------------------------------------------+
9 rows in set (0.14 sec)
15
TOI Advantages
• Data always consistent
• DDL applied to all nodes at the same time
• No failure due to schema inconsistency
16
TOI Disadvantages
• The whole cluster blocked
• For the duration of the entire DDL operation
• Schema upgrades replicated as a statement
• There is no guarantee that the ALTER succeed!
17
How to Perform Upgrade with TOI
• Schedule maintenance window
• Run DDL
• Cluster won’t be accessible until DDL ends
• SELECTs can continue
• wsrep sync wait != 1
18
When to Use TOI
• Quick DDL operations
19
When to Use TOI
• Quick DDL operations
• Creating new database objects
• CREATE DATABASE
• CREATE TABLE
19
When to Use TOI
• Quick DDL operations
• Creating new database objects
• Online operations which modify metadata only
• RENAME INDEX
• RENAME TABLE
• DROP INDEX
• ALGORITHM=INSTANT
Full list
19
RSU
Rolling Schema Upgrade (RSU)
• Variable wsrep OSU method
• Puts node into de-sync state
• For the duration of DDL
• Pauses Galera provider
• Schema can get out of sync!
21
User Responsibility
• Run DDL on the each node of the cluster
• Block read-write access that depend on DDL
• Until all nodes are in sync
• Make sure no write is performed to the table
• Until upgrade finishes on all nodes
• Failure makes cluster unrecoverable!
22
RSU Workflow
• User Action
• SET SESSION wsrep OSU method = ’RSU’;
• DDL
• Any other statement
• Node Operation
• Nothing
• Is wsrep OSU method set to RSU?
Yes Performs DDL
• Nothing
23
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
Yes Wait for 5 milliseconds
• wsrep RSU commit timeout (PXC only)
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
Yes Wait for 5 milliseconds
• wsrep RSU commit timeout (PXC only)
Do transactions in the COMMIT mode still exist?
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
Yes Wait for 5 milliseconds
• wsrep RSU commit timeout (PXC only)
Do transactions in the COMMIT mode still exist?
Yes Abort DDL
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
No Put node into de-sync state
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
No Put node into de-sync state
Pause write-set application
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
No Put node into de-sync state
Pause write-set application
Execute DDL
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
No Put node into de-sync state
Pause write-set application
Execute DDL
Bring the node back to the cluster
24
How Node Internally Executes DDL in RSU Mode
Does node have transactions in COMMIT mode?
No Put node into de-sync state
Pause write-set application
Execute DDL
Bring the node back to the cluster
Synchronize
24
RSU: Locking
• Not avoidable
• Updates to all objects on the node in RSU mode
must finish before the operation
• Failure aborts DDL
25
RSU Advantages
• Cluster remains functional
• Schedule long-running ALTER
• In the best time possible
26
RSU Disadvantages
• No checks for data and schema consistency
• This is your responsibility!
27
RSU Disadvantages
• No checks for data and schema consistency
• All writes must be stopped on the affected node
• Otherwise DDL fails with an error
27
RSU Disadvantages
• No checks for data and schema consistency
• All writes must be stopped on the affected node
• gcache should be big enough to hold changes
• Made while DDL was running
• Failure will cause SST when node re-joins cluster
• All schema changes will be lost
27
RSU Disadvantages
• No checks for data and schema consistency
• All writes must be stopped on the affected node
• gcache should be big enough to hold changes
• Any error can make cluster dysfunctional
27
RSU Disadvantages
• No checks for data and schema consistency
• All writes must be stopped on the affected node
• gcache should be big enough to hold changes
• Any error can make cluster dysfunctional
• Affected table must be offline
• Until the schema upgrade is done on all nodes
• Unless this is schema-compatible change
27
How to Use RSU
• Make sure gcache is big enough
• Must hold all updates while DDL is in progress
28
How to Use RSU
• Make sure gcache is big enough
• Must hold all updates while DDL is in progress
• Block all writes to the table/schema
28
How to Use RSU
Choose an ”upgrading node”
28
How to Use RSU
Choose an ”upgrading node”
Block all write requests to this node
28
How to Use RSU
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
28
How to Use RSU
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
Perform DDL in the same session
28
How to Use RSU
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
Perform DDL in the same session
SET SESSION wsrep OSU method = ’TOI’;
28
How to Use RSU
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
Perform DDL in the same session
SET SESSION wsrep OSU method = ’TOI’;
Re-enable writes
28
How to Use RSU
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
Perform DDL in the same session
SET SESSION wsrep OSU method = ’TOI’;
Re-enable writes
Repeat for other nodes
28
pt-online-schema-change (pt-osc)
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• With TOI
30
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
30
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
• Creates triggers which will copy modified rows
30
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
• Creates triggers which will copy modified rows
• Starts copying data in chunks
• Absolutely under control
• Can be paused or stopped
–max-flow-ctl
30
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
• Creates triggers which will copy modified rows
• Starts copying data in chunks
• All rows already in the table are copied in chunks
• Newly modified rows are copied using triggers
30
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
• Creates triggers which will copy modified rows
• Starts copying data in chunks
• Once copy is complete, drops the table
30
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
• Creates triggers which will copy modified rows
• Starts copying data in chunks
• Once copy is complete, drops the table
• Renames the copy into the original table name
30
pt-osc Advantages
• DDL is safe and non-blocking
31
pt-osc Disadvantages
• Works only with InnoDB tables
• Increases IO load even for inplace operations
• Conflicts with already existing triggers
• Unless you use PXC >= 5.7
• Foreign keys updates are not effectively safe
32
How to Use pt-osc
• Study pt-osc options
• --max-flow-ctl
• Set appropriate limits
• Make sure wsrep OSU method is TOI
• Run pt-osc
33
Which Method to Use?
Will DDL be fast?
• CREATE DATABASE
• CREATE TABLE
• DROP INDEX
• Any ALTER on small tables
• Other
34
Which Method to Use?
Will DDL be fast?
Yes Use TOI
34
Which Method to Use?
Will DDL be fast?
Yes Use TOI
No Evaluate if you can use pt-osc
• Operation on the InnoDB table
• Table has no triggers or PXC >= 5.7
• Table is not referenced by a foreign key
• You can tolerate increased IO
34
Which Method to Use?
Will DDL be fast?
Yes Use TOI
No Evaluate if you can use pt-osc
Yes Use pt-osc
34
Which Method to Use?
Will DDL be fast?
Yes Use TOI
No Evaluate if you can use pt-osc
Yes Use pt-osc
No Use RSU
• Stop all write traffic on the node
• Stop all write traffic to the modified table
• Make sure to upgrade on all nodes
34
Conclusion
• Use TOI whenever possible
• Then use pt-osc
• RSU is a last resort
35
More information
Galera Cluster
Percona XtraDB Cluster
MariaDB Galera Cluster
pt-online-schema-change
36
Thank you!
www.slideshare.net/SvetaSmirnova
twitter.com/svetsmirnova
github.com/svetasmirnova
37

More Related Content

What's hot

MySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs AcademyMySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs Academythewebsacademy
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLJim Mlodgenski
 
De-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQLDe-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQLLætitia Avrot
 
Wildcard In database
Wildcard In databaseWildcard In database
Wildcard In databasejamilmalik19
 
Mapping Cardinalities
Mapping CardinalitiesMapping Cardinalities
Mapping CardinalitiesMegha Sharma
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsNirav Shah
 
‘go-to’ general-purpose sequential collections - from Java To Scala
‘go-to’ general-purpose sequential collections -from Java To Scala‘go-to’ general-purpose sequential collections -from Java To Scala
‘go-to’ general-purpose sequential collections - from Java To ScalaPhilip Schwarz
 
PROLOG: Recursion And Lists In Prolog
PROLOG: Recursion And Lists In PrologPROLOG: Recursion And Lists In Prolog
PROLOG: Recursion And Lists In PrologDataminingTools Inc
 
Tree data structure
Tree data structureTree data structure
Tree data structureDana dia
 
Regular Expression
Regular ExpressionRegular Expression
Regular Expressionvaluebound
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...Philip Schwarz
 

What's hot (20)

Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
MySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs AcademyMySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs Academy
 
Data structures
Data structuresData structures
Data structures
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
 
De-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQLDe-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQL
 
Stack and Queue
Stack and QueueStack and Queue
Stack and Queue
 
Wildcard In database
Wildcard In databaseWildcard In database
Wildcard In database
 
Mapping Cardinalities
Mapping CardinalitiesMapping Cardinalities
Mapping Cardinalities
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tips
 
String operation
String operationString operation
String operation
 
SOQL & SOSL for Admins
SOQL & SOSL for AdminsSOQL & SOSL for Admins
SOQL & SOSL for Admins
 
‘go-to’ general-purpose sequential collections - from Java To Scala
‘go-to’ general-purpose sequential collections -from Java To Scala‘go-to’ general-purpose sequential collections -from Java To Scala
‘go-to’ general-purpose sequential collections - from Java To Scala
 
PROLOG: Recursion And Lists In Prolog
PROLOG: Recursion And Lists In PrologPROLOG: Recursion And Lists In Prolog
PROLOG: Recursion And Lists In Prolog
 
Tree data structure
Tree data structureTree data structure
Tree data structure
 
Regular Expression
Regular ExpressionRegular Expression
Regular Expression
 
Projection Matrices
Projection MatricesProjection Matrices
Projection Matrices
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
Hashing PPT
Hashing PPTHashing PPT
Hashing PPT
 
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...
 
LISP: Data types in lisp
LISP: Data types in lispLISP: Data types in lisp
LISP: Data types in lisp
 

Similar to How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster

How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
Macy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-FlightMacy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-FlightDataStax Academy
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Continuent
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Sveta Smirnova
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527Saewoong Lee
 
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Continuent
 
Percona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningPercona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningSergey Petrunya
 
Strategic Autovacuum
Strategic AutovacuumStrategic Autovacuum
Strategic AutovacuumScott Mead
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenOSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenNETWAYS
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboardsDenis Ristic
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
 
Basic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsSveta Smirnova
 
Streaming ETL - from RDBMS to Dashboard with KSQL
Streaming ETL - from RDBMS to Dashboard with KSQLStreaming ETL - from RDBMS to Dashboard with KSQL
Streaming ETL - from RDBMS to Dashboard with KSQLBjoern Rost
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)Tesora
 

Similar to How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster (20)

How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with Galera
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
 
Macy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-FlightMacy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-Flight
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527
 
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
 
Percona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningPercona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuning
 
Strategic Autovacuum
Strategic AutovacuumStrategic Autovacuum
Strategic Autovacuum
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenOSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards
 
Mysql56 replication
Mysql56 replicationMysql56 replication
Mysql56 replication
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
 
Basic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database Administrators
 
Streaming ETL - from RDBMS to Dashboard with KSQL
Streaming ETL - from RDBMS to Dashboard with KSQLStreaming ETL - from RDBMS to Dashboard with KSQL
Streaming ETL - from RDBMS to Dashboard with KSQL
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
 
DPC Tutorial
DPC TutorialDPC Tutorial
DPC Tutorial
 

More from Sveta Smirnova

MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?Sveta Smirnova
 
Database in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and MonitoringDatabase in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and MonitoringSveta Smirnova
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveSveta Smirnova
 
MySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersMySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersSveta Smirnova
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
MySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации баговMySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации баговSveta Smirnova
 
MySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessMySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessSveta Smirnova
 
Introduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sIntroduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sSveta Smirnova
 
Производительность MySQL для DevOps
 Производительность MySQL для DevOps Производительность MySQL для DevOps
Производительность MySQL для DevOpsSveta Smirnova
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsSveta Smirnova
 
How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
 
Современному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaСовременному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaSveta Smirnova
 
How Safe is Asynchronous Master-Master Setup?
 How Safe is Asynchronous Master-Master Setup? How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
 
Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sSveta Smirnova
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Sveta Smirnova
 
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...Sveta Smirnova
 
Что нужно знать о трёх топовых фичах MySQL
Что нужно знать  о трёх топовых фичах  MySQLЧто нужно знать  о трёх топовых фичах  MySQL
Что нужно знать о трёх топовых фичах MySQLSveta Smirnova
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Sveta Smirnova
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 

More from Sveta Smirnova (20)

MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
 
Database in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and MonitoringDatabase in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and Monitoring
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to Have
 
MySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersMySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for Developers
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
MySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации баговMySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации багов
 
MySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessMySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your Business
 
Introduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sIntroduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]s
 
Производительность MySQL для DevOps
 Производительность MySQL для DevOps Производительность MySQL для DevOps
Производительность MySQL для DevOps
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tears
 
How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?
 
Современному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaСовременному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
 
How Safe is Asynchronous Master-Master Setup?
 How Safe is Asynchronous Master-Master Setup? How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?
 
Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]s
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?
 
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
 
Что нужно знать о трёх топовых фичах MySQL
Что нужно знать  о трёх топовых фичах  MySQLЧто нужно знать  о трёх топовых фичах  MySQL
Что нужно знать о трёх топовых фичах MySQL
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster

  • 1. How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster Sveta Smirnova Percona
  • 2. Sveta Smirnova • MySQL Support engineer • Author of • MySQL Troubleshooting • JSON UDF functions • FILTER clause for MySQL • Speaker • Percona Live, OOW, Fosdem, DevConf, HighLoad... 2
  • 4. Introduction • Galera Replication Library • Provides synchronous replication for MySQL 4
  • 5. Introduction • Galera Replication Library • Provides synchronous replication for MySQL • Galera Clusters Percona XtraDB Cluster MariaDB Galera Cluster Galera Cluster for MySQL 4
  • 6. How Galera works • Data modification happens on a node • Optimistic locking control 5
  • 7. How Galera works • Data modification happens on a node • Optimistic locking control • While a transaction is in progress • Writes are applied locally • Same as for standalone server 5
  • 8. How Galera works • Data modification happens on a node • Optimistic locking control • While a transaction is in progress • At the COMMIT time • Broadcasts write set for the cluster • Waits confirmation of the successful update From all other nodes Yes Commits transaction locally No Rollbacks transaction 5
  • 9. Data Updates • Committed on all nodes or nowhere • Safe 6
  • 10. Challenges of DDL • Replicated independently from storage engine 7
  • 11. Challenges of DDL • Replicated independently from storage engine • Changes may affect query results • Adding/removal of UNIQUE keys • Adding/removal columns • Changing column definition 7
  • 12. Challenges of DDL • Replicated independently from storage engine • Changes may affect query results • Modification can happen on any node • The schema must be upgraded before DML • There is no way to rollback schema upgrade • MDLs are set only on one node Not across the cluster Not possible to rely on them for all nodes Additional control required 7
  • 13. TOI
  • 14. Total Order Isolation (TOI) • DDL changes are replicated in the same order • Regarding other transactions • All nodes are in the absolutely same state • At any point of time 9
  • 15. TOI: Illustration • 3-nodes cluster • Node A • Node B • Node C 10
  • 16. TOI: Illustration • Initial state Node A INSERT(103) UPDATE(104) ALTER(105) Node B UPDATE(101) INSERT(102) DELETE(108) UPDATE(109) Node C SELECT(100) INSERT(112) SELECT(113) UPDATE(114) 10
  • 17. TOI: Illustration • Queries status Node A INSERT(103) UPDATE(104) ALTER(105) Node B UPDATE(101) INSERT(102) DELETE(108) UPDATE(109) Node C SELECT(100) INSERT(112) SELECT(113) UPDATE(114) 10
  • 18. TOI: Illustration • ALTER in progress Node A ALTER(105) Node B DELETE(108) UPDATE(109) Node C INSERT(112) SELECT(113) UPDATE(114) 10
  • 19. TOI: Illustration • ALTER finished Node A Node B DELETE(108) UPDATE(109) Node C INSERT(112) SELECT(113) UPDATE(114) 10
  • 20. PROCESSLIST: DML before ALTER DML node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist WHERE DB=’sbtest’; +--------+---------+------+---------------------------------------------------+-----------------------+ | DB | COMMAND | TIME | STATE | INFO | +--------+---------+------+---------------------------------------------------+-----------------------+ | sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2886) | COMMIT | | sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2888) | COMMIT | | sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2884) | COMMIT | | sbtest | Query | 1 | updating | DELETE FROM sbtest1.. | | sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2887) | COMMIT | | sbtest | Query | 0 | wsrep: initiating pre-commit for write set (2889) | COMMIT | | sbtest | Query | 1 | wsrep: initiating pre-commit for write set (2885) | COMMIT | | sbtest | Query | 1 | wsrep: pre-commit/certification passed (2883) | COMMIT | +--------+---------+------+---------------------------------------------------+-----------------------+ 8 rows in set (0.00 sec) 11
  • 21. PROCESSLIST: SELECT before ALTER SELECT node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist -> WHERE DB=’sbtest’; +--------+---------+------+-------------------+---------------------------------------+ | DB | COMMAND | TIME | STATE | INFO | +--------+---------+------+-------------------+---------------------------------------+ | sbtest | Query | 0 | statistics | SELECT pad FROM sbtest2 WHERE id=5009 | | sbtest | Query | 0 | starting | SELECT pad FROM sbtest3 WHERE id=4951 | | sbtest | Query | 0 | statistics | SELECT pad FROM sbtest4 WHERE id=4954 | | sbtest | Query | 0 | System lock | SELECT pad FROM sbtest2 WHERE id=5351 | | sbtest | Query | 0 | cleaning up | SELECT pad FROM sbtest2 WHERE id=4954 | | sbtest | Sleep | 0 | | NULL | | sbtest | Query | 0 | Sending to client | SELECT pad FROM sbtest1 WHERE id=4272 | | sbtest | Query | 0 | closing tables | SELECT pad FROM sbtest4 WHERE id=4722 | +--------+---------+------+-------------------+---------------------------------------+ 8 rows in set (0.00 sec) 12
  • 22. ALTER DDL node> use ddltest; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A DDL node> alter table sbtest1 add key k1(c, k, pad); Query OK, 0 rows affected (3 min 53.73 sec) Records: 0 Duplicates: 0 Warnings: 0 13
  • 23. PROCESSLIST: DML during ALTER DML node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist -> WHERE DB in (’sbtest’,’ddltest’); +---------+---------+------+---------------------------------------------------+----------------------+ | DB | COMMAND | TIME | STATE | | +---------+---------+------+---------------------------------------------------+----------------------+ | sbtest | Query | 36 | wsrep: initiating pre-commit for write set (7886) | COMMIT | | sbtest | Query | 37 | wsrep: initiating pre-commit for write set (7882) | COMMIT | | sbtest | Query | 27 | wsrep: initiating pre-commit for write set (7887) | COMMIT | | sbtest | Query | 27 | wsrep: initiating pre-commit for write set (7888) | COMMIT | | sbtest | Query | 36 | wsrep: initiating pre-commit for write set (7885) | COMMIT | | sbtest | Query | 37 | wsrep: initiating pre-commit for write set (7883) | COMMIT | | sbtest | Query | 37 | wsrep: initiating pre-commit for write set (7884) | COMMIT | | sbtest | Query | 10 | wsrep: initiating pre-commit for write set (7889) | COMMIT | | ddltest | Sleep | 38 | altering table | alter table sbtest1. | +---------+---------+------+---------------------------------------------------+----------------------+ 9 rows in set (0.00 sec) 14
  • 24. PROCESSLIST: SELECT during ALTER SELECT node> select DB, COMMAND, TIME, STATE, INFO from information_schema.processlist -> WHERE DB in (’sbtest’,’ddltest’); +---------+---------+------+-------------------+-------------------------------------------+ | DB | COMMAND | TIME | STATE | | +---------+---------+------+-------------------+-------------------------------------------+ | sbtest | Sleep | 0 | | NULL | | sbtest | Sleep | 0 | | NULL | | sbtest | Query | 0 | Sending to client | SELECT pad FROM sbtest4 WHERE id=4989 | | sbtest | Sleep | 0 | | NULL | | sbtest | Query | 0 | query end | SELECT pad FROM sbtest2 WHERE id=4961 | | sbtest | Sleep | 0 | | NULL | | sbtest | Sleep | 0 | | NULL | | sbtest | Sleep | 0 | | NULL | | ddltest | Sleep | 39 | altering table | alter table sbtest1 add key k1(c, k, pad) | +---------+---------+------+-------------------+-------------------------------------------+ 9 rows in set (0.14 sec) 15
  • 25. TOI Advantages • Data always consistent • DDL applied to all nodes at the same time • No failure due to schema inconsistency 16
  • 26. TOI Disadvantages • The whole cluster blocked • For the duration of the entire DDL operation • Schema upgrades replicated as a statement • There is no guarantee that the ALTER succeed! 17
  • 27. How to Perform Upgrade with TOI • Schedule maintenance window • Run DDL • Cluster won’t be accessible until DDL ends • SELECTs can continue • wsrep sync wait != 1 18
  • 28. When to Use TOI • Quick DDL operations 19
  • 29. When to Use TOI • Quick DDL operations • Creating new database objects • CREATE DATABASE • CREATE TABLE 19
  • 30. When to Use TOI • Quick DDL operations • Creating new database objects • Online operations which modify metadata only • RENAME INDEX • RENAME TABLE • DROP INDEX • ALGORITHM=INSTANT Full list 19
  • 31. RSU
  • 32. Rolling Schema Upgrade (RSU) • Variable wsrep OSU method • Puts node into de-sync state • For the duration of DDL • Pauses Galera provider • Schema can get out of sync! 21
  • 33. User Responsibility • Run DDL on the each node of the cluster • Block read-write access that depend on DDL • Until all nodes are in sync • Make sure no write is performed to the table • Until upgrade finishes on all nodes • Failure makes cluster unrecoverable! 22
  • 34. RSU Workflow • User Action • SET SESSION wsrep OSU method = ’RSU’; • DDL • Any other statement • Node Operation • Nothing • Is wsrep OSU method set to RSU? Yes Performs DDL • Nothing 23
  • 35. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? 24
  • 36. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? Yes Wait for 5 milliseconds • wsrep RSU commit timeout (PXC only) 24
  • 37. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? Yes Wait for 5 milliseconds • wsrep RSU commit timeout (PXC only) Do transactions in the COMMIT mode still exist? 24
  • 38. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? Yes Wait for 5 milliseconds • wsrep RSU commit timeout (PXC only) Do transactions in the COMMIT mode still exist? Yes Abort DDL 24
  • 39. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? No Put node into de-sync state 24
  • 40. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? No Put node into de-sync state Pause write-set application 24
  • 41. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? No Put node into de-sync state Pause write-set application Execute DDL 24
  • 42. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? No Put node into de-sync state Pause write-set application Execute DDL Bring the node back to the cluster 24
  • 43. How Node Internally Executes DDL in RSU Mode Does node have transactions in COMMIT mode? No Put node into de-sync state Pause write-set application Execute DDL Bring the node back to the cluster Synchronize 24
  • 44. RSU: Locking • Not avoidable • Updates to all objects on the node in RSU mode must finish before the operation • Failure aborts DDL 25
  • 45. RSU Advantages • Cluster remains functional • Schedule long-running ALTER • In the best time possible 26
  • 46. RSU Disadvantages • No checks for data and schema consistency • This is your responsibility! 27
  • 47. RSU Disadvantages • No checks for data and schema consistency • All writes must be stopped on the affected node • Otherwise DDL fails with an error 27
  • 48. RSU Disadvantages • No checks for data and schema consistency • All writes must be stopped on the affected node • gcache should be big enough to hold changes • Made while DDL was running • Failure will cause SST when node re-joins cluster • All schema changes will be lost 27
  • 49. RSU Disadvantages • No checks for data and schema consistency • All writes must be stopped on the affected node • gcache should be big enough to hold changes • Any error can make cluster dysfunctional 27
  • 50. RSU Disadvantages • No checks for data and schema consistency • All writes must be stopped on the affected node • gcache should be big enough to hold changes • Any error can make cluster dysfunctional • Affected table must be offline • Until the schema upgrade is done on all nodes • Unless this is schema-compatible change 27
  • 51. How to Use RSU • Make sure gcache is big enough • Must hold all updates while DDL is in progress 28
  • 52. How to Use RSU • Make sure gcache is big enough • Must hold all updates while DDL is in progress • Block all writes to the table/schema 28
  • 53. How to Use RSU Choose an ”upgrading node” 28
  • 54. How to Use RSU Choose an ”upgrading node” Block all write requests to this node 28
  • 55. How to Use RSU Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; 28
  • 56. How to Use RSU Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; Perform DDL in the same session 28
  • 57. How to Use RSU Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; Perform DDL in the same session SET SESSION wsrep OSU method = ’TOI’; 28
  • 58. How to Use RSU Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; Perform DDL in the same session SET SESSION wsrep OSU method = ’TOI’; Re-enable writes 28
  • 59. How to Use RSU Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; Perform DDL in the same session SET SESSION wsrep OSU method = ’TOI’; Re-enable writes Repeat for other nodes 28
  • 61. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • With TOI 30
  • 62. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition 30
  • 63. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition • Creates triggers which will copy modified rows 30
  • 64. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition • Creates triggers which will copy modified rows • Starts copying data in chunks • Absolutely under control • Can be paused or stopped –max-flow-ctl 30
  • 65. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition • Creates triggers which will copy modified rows • Starts copying data in chunks • All rows already in the table are copied in chunks • Newly modified rows are copied using triggers 30
  • 66. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition • Creates triggers which will copy modified rows • Starts copying data in chunks • Once copy is complete, drops the table 30
  • 67. pt-online-schema-change (pt-osc) • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition • Creates triggers which will copy modified rows • Starts copying data in chunks • Once copy is complete, drops the table • Renames the copy into the original table name 30
  • 68. pt-osc Advantages • DDL is safe and non-blocking 31
  • 69. pt-osc Disadvantages • Works only with InnoDB tables • Increases IO load even for inplace operations • Conflicts with already existing triggers • Unless you use PXC >= 5.7 • Foreign keys updates are not effectively safe 32
  • 70. How to Use pt-osc • Study pt-osc options • --max-flow-ctl • Set appropriate limits • Make sure wsrep OSU method is TOI • Run pt-osc 33
  • 71. Which Method to Use? Will DDL be fast? • CREATE DATABASE • CREATE TABLE • DROP INDEX • Any ALTER on small tables • Other 34
  • 72. Which Method to Use? Will DDL be fast? Yes Use TOI 34
  • 73. Which Method to Use? Will DDL be fast? Yes Use TOI No Evaluate if you can use pt-osc • Operation on the InnoDB table • Table has no triggers or PXC >= 5.7 • Table is not referenced by a foreign key • You can tolerate increased IO 34
  • 74. Which Method to Use? Will DDL be fast? Yes Use TOI No Evaluate if you can use pt-osc Yes Use pt-osc 34
  • 75. Which Method to Use? Will DDL be fast? Yes Use TOI No Evaluate if you can use pt-osc Yes Use pt-osc No Use RSU • Stop all write traffic on the node • Stop all write traffic to the modified table • Make sure to upgrade on all nodes 34
  • 76. Conclusion • Use TOI whenever possible • Then use pt-osc • RSU is a last resort 35
  • 77. More information Galera Cluster Percona XtraDB Cluster MariaDB Galera Cluster pt-online-schema-change 36