SlideShare a Scribd company logo
1 of 78
Download to read offline
How to Avoid Pitfalls in Schema Upgrade
with Galera
February 2, 2020
Sveta Smirnova
• MySQL Support engineer
• Author of
• MySQL Troubleshooting
• JSON UDF functions
• FILTER clause for MySQL
• Speaker
• Percona Live, OOW, Fosdem,
DevConf, HighLoad...
Sveta Smirnova
2
•TOI
•RSU
•pt-online-schema-change (pt-osc)
Table of Contents
3
• Galera Replication Library
•
Provides synchronous replication for MySQL
Introduction
4
• Galera Replication Library
•
Provides synchronous replication for MySQL
•
Galera Clusters
MariaDB Galera Cluster
Percona XtraDB Cluster
Galera Cluster for MySQL
Introduction
4
• Data modification happens on a node
• Optimistic locking control
How Galera works
5
• Data modification happens on a node
• Optimistic locking control
• 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
How Galera works
5
• Committed on all nodes or nowhere
• Safe
Data Updates
6
• Replicated independently from storage engine
Challenges of DDL
7
• Replicated independently from storage engine
• Changes may affect query results
•
Adding/removal of UNIQUE keys
•
Adding/removal columns
• Changing column definition
Challenges of DDL
7
• 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
Challenges of DDL
7
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
Total Order Isolation (TOI)
9
• 3-nodes cluster
•
Node A
• Node B
• Node C
TOI: Illustration
10
• 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)
TOI: Illustration
10
• 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)
TOI: Illustration
10
• ALTER in progress
Node A
ALTER(105)
Node B
DELETE(108)
UPDATE(109)
Node C
INSERT(112)
SELECT(113)
UPDATE(114)
TOI: Illustration
10
• ALTER finished
Node A Node B
DELETE(108)
UPDATE(109)
Node C
INSERT(112)
SELECT(113)
UPDATE(114)
TOI: Illustration
10
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)
PROCESSLIST: DML before ALTER
11
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)
PROCESSLIST: SELECT before ALTER
12
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
ALTER
13
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)
PROCESSLIST: DML during ALTER
14
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)
PROCESSLIST: SELECT during ALTER
15
• Data always consistent
• DDL applied to all nodes at the same time
• No failure due to schema inconsistency
TOI Advantages
16
• 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!
TOI Disadvantages
17
• Schedule maintenance window
• Run DDL
• Cluster won’t be accessible until DDL finishes
• SELECTs can continue
• wsrep sync wait != 1
How to Perform Upgrade with TOI
18
• Quick DDL operations
When to Use TOI
19
• Quick DDL operations
• Creating new database objects
• CREATE DATABASE
•
CREATE TABLE
When to Use TOI
19
• Quick DDL operations
• Creating new database objects
• Online operations which modify metadata only
•
RENAME INDEX
•
RENAME TABLE
• DROP INDEX
• ALGORITHM=INSTANT
Full list
When to Use TOI
19
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!
Rolling Schema Upgrade (RSU)
21
• 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!
User Responsibility
22
• 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
RSU Workflow
23
Does node have transactions in COMMIT mode?
How Node Internally Executes DDL in RSU Mode?
24
Does node have transactions in COMMIT mode?
Yes Wait for 5 milliseconds
How Node Internally Executes DDL in RSU Mode?
24
Does node have transactions in COMMIT mode?
Yes Wait for 5 milliseconds
Still transactions in the COMMIT mode exist?
How Node Internally Executes DDL in RSU Mode?
24
Does node have transactions in COMMIT mode?
Yes Wait for 5 milliseconds
Still transactions in the COMMIT mode exist?
Yes Abort DDL
How Node Internally Executes DDL in RSU Mode?
24
Does node have transactions in COMMIT mode?
No Put node into de-sync state
How Node Internally Executes DDL in RSU Mode?
24
Does node have transactions in COMMIT mode?
No Put node into de-sync state
Pause write-set application
How Node Internally Executes DDL in RSU Mode?
24
Does node have transactions in COMMIT mode?
No Put node into de-sync state
Pause write-set application
Execute DDL
How Node Internally Executes DDL in RSU Mode?
24
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
How Node Internally Executes DDL in RSU Mode?
24
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
How Node Internally Executes DDL in RSU Mode?
24
• Not avoidable
• Updates to all objects on the node in RSU
mode must finish before the operation
•
Failure aborts DDL
RSU: Locking
25
• Cluster remains functional
•
Schedule long-running ALTER
• In the best time possible
RSU Advantages
26
• No checks for data and schema consistency
•
This is your responsibility!
RSU Disadvantages
27
• No checks for data and schema consistency
• All writes must be stopped on the affected node
•
Otherwise DDL fails with an error
RSU Disadvantages
27
• 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
RSU Disadvantages
27
• 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
RSU Disadvantages
27
• 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
RSU Disadvantages
27
• Make sure gcache is big enough
•
Must hold all updates while DDL is in progress
How to Use RSU
28
• Make sure gcache is big enough
•
Must hold all updates while DDL is in progress
• Block all writes to the table/schema
How to Use RSU
28
Choose an ”upgrading node”
How to Use RSU
28
Choose an ”upgrading node”
Block all write requests to this node
How to Use RSU
28
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
How to Use RSU
28
Choose an ”upgrading node”
Block all write requests to this node
SET SESSION wsrep OSU method = ’RSU’;
Perform DDL in the same session
How to Use RSU
28
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’;
How to Use RSU
28
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
How to Use RSU
28
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
How to Use RSU
28
pt-online-schema-change (pt-osc)
• A tool, performing non-blocking upgrades
•
With TOI
pt-online-schema-change (pt-osc)
30
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
pt-online-schema-change (pt-osc)
30
• A tool, performing non-blocking upgrades
• Creates a copy of table with altered definition
• Creates triggers which will copy modified rows
pt-online-schema-change (pt-osc)
30
• 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
pt-online-schema-change (pt-osc)
30
• 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
pt-online-schema-change (pt-osc)
30
• 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
pt-online-schema-change (pt-osc)
30
• 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
pt-online-schema-change (pt-osc)
30
• DDL is safe and non-blocking
pt-osc Advantages
31
• Works only with InnoDB tables
• Increases IO load even for inplace operations
• Conflicts with already existing triggers
•
Unless you use MariaDB >= 10.2.3
• Foreign keys updates are not effectively safe
pt-osc Disadvantages
32
• Study pt-osc options
•
--max-flow-ctl
• Set appropriate limits
• Make sure wsrep OSU method is TOI
• Run pt-osc
How to Use pt-osc
33
Will DDL be fast?
•
CREATE DATABASE
• CREATE TABLE
• DROP INDEX
• Any ALTER on small tables
•
Other
Which Method to Use?
34
Will DDL be fast?
Yes Use TOI
Which Method to Use?
34
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 MariaDB >= 10.2.3
• Table is not referenced by a foreign key
• You can tolerate increased IO
Which Method to Use?
34
Will DDL be fast?
Yes Use TOI
No Evaluate if you can use pt-osc
Yes Use pt-osc
Which Method to Use?
34
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
Which Method to Use?
34
• Use TOI whenever possible
• Then use pt-osc
• RSU is a last resort
Conclusion
35
Galera Cluster
MariaDB Galera Cluster
pt-online-schema-change
More information
36
www.slideshare.net/SvetaSmirnova
twitter.com/svetsmirnova
github.com/svetasmirnova
Thank you!
37
DATABASE PERFORMANCE
MATTERS

More Related Content

What's hot

MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query TuningSveta Smirnova
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitSveta Smirnova
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demoSveta Smirnova
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerKyle Hailey
 
Why MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it BackWhy MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it BackSveta Smirnova
 
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Marco Tusa
 
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
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?Mydbops
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationmysqlops
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterI Goo Lee
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016Wagner Bianchi
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바NeoClova
 
Summary tables with flexviews
Summary tables with flexviewsSummary tables with flexviews
Summary tables with flexviewsJustin Swanhart
 
ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)YoungHeon (Roy) Kim
 

What's hot (20)

MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query Tuning
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona Toolkit
 
ProxySQL para mysql
ProxySQL para mysqlProxySQL para mysql
ProxySQL para mysql
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demo
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Why MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it BackWhy MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it Back
 
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
 
Oss4b - pxc introduction
Oss4b   - pxc introductionOss4b   - pxc introduction
Oss4b - pxc introduction
 
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
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바
 
Summary tables with flexviews
Summary tables with flexviewsSummary tables with flexviews
Summary tables with flexviews
 
ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)
 

Similar to How to Avoid Pitfalls in Schema Upgrade with Galera and RSU

Advanced Query Optimizer Tuning and Analysis
Advanced Query Optimizer Tuning and AnalysisAdvanced Query Optimizer Tuning and Analysis
Advanced Query Optimizer Tuning and AnalysisMYXPLAIN
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
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
 
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
 
Percona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningPercona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningSergey Petrunya
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11gfcamachob
 
DB Floripa - ProxySQL para MySQL
DB Floripa - ProxySQL para MySQLDB Floripa - ProxySQL para MySQL
DB Floripa - ProxySQL para MySQLMarcelo Altmann
 
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
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboardsDenis Ristic
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera clusterOlinData
 
Percona Live '18 Tutorial: The Accidental DBA
Percona Live '18 Tutorial: The Accidental DBAPercona Live '18 Tutorial: The Accidental DBA
Percona Live '18 Tutorial: The Accidental DBAJenni Snyder
 
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
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep diveMark Leith
 

Similar to How to Avoid Pitfalls in Schema Upgrade with Galera and RSU (20)

Advanced Query Optimizer Tuning and Analysis
Advanced Query Optimizer Tuning and AnalysisAdvanced Query Optimizer Tuning and Analysis
Advanced Query Optimizer Tuning and Analysis
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
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
 
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
 
Percona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningPercona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuning
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
DB Floripa - ProxySQL para MySQL
DB Floripa - ProxySQL para MySQLDB Floripa - ProxySQL para MySQL
DB Floripa - ProxySQL para MySQL
 
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
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
Mysql56 replication
Mysql56 replicationMysql56 replication
Mysql56 replication
 
1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster
 
MySQLinsanity
MySQLinsanityMySQLinsanity
MySQLinsanity
 
Curso de MySQL 5.7
Curso de MySQL 5.7Curso de MySQL 5.7
Curso de MySQL 5.7
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
Percona Live '18 Tutorial: The Accidental DBA
Percona Live '18 Tutorial: The Accidental DBAPercona Live '18 Tutorial: The Accidental DBA
Percona Live '18 Tutorial: The Accidental DBA
 
MySQL SQL Tutorial
MySQL SQL TutorialMySQL SQL Tutorial
MySQL SQL Tutorial
 
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...
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 

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
 
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
 
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
 
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
 
Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?Sveta 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
 

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
 
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...
 
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?
 
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
 
Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?
 
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?
 

Recently uploaded

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
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
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
 
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
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 

Recently uploaded (20)

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
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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
 
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)
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 

How to Avoid Pitfalls in Schema Upgrade with Galera and RSU

  • 1. How to Avoid Pitfalls in Schema Upgrade with Galera February 2, 2020 Sveta Smirnova
  • 2. • MySQL Support engineer • Author of • MySQL Troubleshooting • JSON UDF functions • FILTER clause for MySQL • Speaker • Percona Live, OOW, Fosdem, DevConf, HighLoad... Sveta Smirnova 2
  • 4. • Galera Replication Library • Provides synchronous replication for MySQL Introduction 4
  • 5. • Galera Replication Library • Provides synchronous replication for MySQL • Galera Clusters MariaDB Galera Cluster Percona XtraDB Cluster Galera Cluster for MySQL Introduction 4
  • 6. • Data modification happens on a node • Optimistic locking control How Galera works 5
  • 7. • Data modification happens on a node • Optimistic locking control • 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 How Galera works 5
  • 8. • Committed on all nodes or nowhere • Safe Data Updates 6
  • 9. • Replicated independently from storage engine Challenges of DDL 7
  • 10. • Replicated independently from storage engine • Changes may affect query results • Adding/removal of UNIQUE keys • Adding/removal columns • Changing column definition Challenges of DDL 7
  • 11. • 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 Challenges of DDL 7
  • 12. TOI
  • 13. • DDL changes are replicated in the same order regarding other transactions • All nodes are in the absolutely same state at any point of time Total Order Isolation (TOI) 9
  • 14. • 3-nodes cluster • Node A • Node B • Node C TOI: Illustration 10
  • 15. • 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) TOI: Illustration 10
  • 16. • 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) TOI: Illustration 10
  • 17. • ALTER in progress Node A ALTER(105) Node B DELETE(108) UPDATE(109) Node C INSERT(112) SELECT(113) UPDATE(114) TOI: Illustration 10
  • 18. • ALTER finished Node A Node B DELETE(108) UPDATE(109) Node C INSERT(112) SELECT(113) UPDATE(114) TOI: Illustration 10
  • 19. 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) PROCESSLIST: DML before ALTER 11
  • 20. 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) PROCESSLIST: SELECT before ALTER 12
  • 21. 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 ALTER 13
  • 22. 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) PROCESSLIST: DML during ALTER 14
  • 23. 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) PROCESSLIST: SELECT during ALTER 15
  • 24. • Data always consistent • DDL applied to all nodes at the same time • No failure due to schema inconsistency TOI Advantages 16
  • 25. • 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! TOI Disadvantages 17
  • 26. • Schedule maintenance window • Run DDL • Cluster won’t be accessible until DDL finishes • SELECTs can continue • wsrep sync wait != 1 How to Perform Upgrade with TOI 18
  • 27. • Quick DDL operations When to Use TOI 19
  • 28. • Quick DDL operations • Creating new database objects • CREATE DATABASE • CREATE TABLE When to Use TOI 19
  • 29. • Quick DDL operations • Creating new database objects • Online operations which modify metadata only • RENAME INDEX • RENAME TABLE • DROP INDEX • ALGORITHM=INSTANT Full list When to Use TOI 19
  • 30. RSU
  • 31. • Variable wsrep OSU method • Puts node into de-sync state • For the duration of DDL • Pauses Galera provider • Schema can get out of sync! Rolling Schema Upgrade (RSU) 21
  • 32. • 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! User Responsibility 22
  • 33. • 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 RSU Workflow 23
  • 34. Does node have transactions in COMMIT mode? How Node Internally Executes DDL in RSU Mode? 24
  • 35. Does node have transactions in COMMIT mode? Yes Wait for 5 milliseconds How Node Internally Executes DDL in RSU Mode? 24
  • 36. Does node have transactions in COMMIT mode? Yes Wait for 5 milliseconds Still transactions in the COMMIT mode exist? How Node Internally Executes DDL in RSU Mode? 24
  • 37. Does node have transactions in COMMIT mode? Yes Wait for 5 milliseconds Still transactions in the COMMIT mode exist? Yes Abort DDL How Node Internally Executes DDL in RSU Mode? 24
  • 38. Does node have transactions in COMMIT mode? No Put node into de-sync state How Node Internally Executes DDL in RSU Mode? 24
  • 39. Does node have transactions in COMMIT mode? No Put node into de-sync state Pause write-set application How Node Internally Executes DDL in RSU Mode? 24
  • 40. Does node have transactions in COMMIT mode? No Put node into de-sync state Pause write-set application Execute DDL How Node Internally Executes DDL in RSU Mode? 24
  • 41. 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 How Node Internally Executes DDL in RSU Mode? 24
  • 42. 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 How Node Internally Executes DDL in RSU Mode? 24
  • 43. • Not avoidable • Updates to all objects on the node in RSU mode must finish before the operation • Failure aborts DDL RSU: Locking 25
  • 44. • Cluster remains functional • Schedule long-running ALTER • In the best time possible RSU Advantages 26
  • 45. • No checks for data and schema consistency • This is your responsibility! RSU Disadvantages 27
  • 46. • No checks for data and schema consistency • All writes must be stopped on the affected node • Otherwise DDL fails with an error RSU Disadvantages 27
  • 47. • 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 RSU Disadvantages 27
  • 48. • 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 RSU Disadvantages 27
  • 49. • 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 RSU Disadvantages 27
  • 50. • Make sure gcache is big enough • Must hold all updates while DDL is in progress How to Use RSU 28
  • 51. • Make sure gcache is big enough • Must hold all updates while DDL is in progress • Block all writes to the table/schema How to Use RSU 28
  • 52. Choose an ”upgrading node” How to Use RSU 28
  • 53. Choose an ”upgrading node” Block all write requests to this node How to Use RSU 28
  • 54. Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; How to Use RSU 28
  • 55. Choose an ”upgrading node” Block all write requests to this node SET SESSION wsrep OSU method = ’RSU’; Perform DDL in the same session How to Use RSU 28
  • 56. 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’; How to Use RSU 28
  • 57. 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 How to Use RSU 28
  • 58. 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 How to Use RSU 28
  • 60. • A tool, performing non-blocking upgrades • With TOI pt-online-schema-change (pt-osc) 30
  • 61. • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition pt-online-schema-change (pt-osc) 30
  • 62. • A tool, performing non-blocking upgrades • Creates a copy of table with altered definition • Creates triggers which will copy modified rows pt-online-schema-change (pt-osc) 30
  • 63. • 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 pt-online-schema-change (pt-osc) 30
  • 64. • 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 pt-online-schema-change (pt-osc) 30
  • 65. • 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 pt-online-schema-change (pt-osc) 30
  • 66. • 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 pt-online-schema-change (pt-osc) 30
  • 67. • DDL is safe and non-blocking pt-osc Advantages 31
  • 68. • Works only with InnoDB tables • Increases IO load even for inplace operations • Conflicts with already existing triggers • Unless you use MariaDB >= 10.2.3 • Foreign keys updates are not effectively safe pt-osc Disadvantages 32
  • 69. • Study pt-osc options • --max-flow-ctl • Set appropriate limits • Make sure wsrep OSU method is TOI • Run pt-osc How to Use pt-osc 33
  • 70. Will DDL be fast? • CREATE DATABASE • CREATE TABLE • DROP INDEX • Any ALTER on small tables • Other Which Method to Use? 34
  • 71. Will DDL be fast? Yes Use TOI Which Method to Use? 34
  • 72. 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 MariaDB >= 10.2.3 • Table is not referenced by a foreign key • You can tolerate increased IO Which Method to Use? 34
  • 73. Will DDL be fast? Yes Use TOI No Evaluate if you can use pt-osc Yes Use pt-osc Which Method to Use? 34
  • 74. 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 Which Method to Use? 34
  • 75. • Use TOI whenever possible • Then use pt-osc • RSU is a last resort Conclusion 35
  • 76. Galera Cluster MariaDB Galera Cluster pt-online-schema-change More information 36