mysql 5.5 replication enhancements – an overview (fosdem 2011)
DESCRIPTION
TRANSCRIPT
![Page 1: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/1.jpg)
![Page 2: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/2.jpg)
<Insert Picture Here>
MySQL 5.5 Replication Enhancements – An Overview
Lenz GrimmerMySQL Community Relations Specialist
![Page 3: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/3.jpg)
Semi-synchronous Replication
• Improves replication resilience and failover reliability
• Designed as a plugin• COMMITs on the master node are
acknowledged only when at least one slave has logged the event in the relay log
• Data is not lost in case of failover
![Page 4: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/4.jpg)
Replication Heartbeat
• Message sent at regular intervals from master node to slave nodes
• Avoids spurious relay log rotation when master node is idle
• Heartbeats are sent only if there are no more unsent events in the binlog file
• If message is not received, slave knows that master node has failed
![Page 5: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/5.jpg)
Replication Slave fsync() Options
• Fine tune relay logs and {master|relay-log}.info fsync operations
• Reduces potential file corruption when slave crashes
• Three new parameters to configure how often IO and SQL threads will issue file sync
![Page 6: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/6.jpg)
Automatic Relay Log Recovery
• Ensures master/slave consistency on restart• Slave automatically discard its own
unprocessed relay logs• Recovers pending transactions from the
originating master
![Page 7: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/7.jpg)
Per-master Event Filtering
• MySQL slave can discard events coming from a specific master
• 'CHANGE MASTER' now supports 'IGNORE_SERVER_IDS = ...' to configure which events should be discarded
• Useful in circular replication topologies
![Page 8: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/8.jpg)
Replication Slave Side Type Conversions
• Row-based replication between columns with different types was limited
• Type promotion and demotion is now supported
• Examples:– Replicate seamlessly from TINYINT column on master
to INT column on the slave– Or CHAR(10) column to a VARCHAR(20) column– Or even from TEXT column to VARCHAR(20) column
![Page 9: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/9.jpg)
Individual Log Flushing
• Users can now selectively flush server logs with 'FLUSH LOGS'
• Before, every time users wanted to flush such logs, other server logs would flush as well
• Now users can specify which individual log to flush by providing the log type as an argument to the 'FLUSH LOGS' command
![Page 10: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/10.jpg)
SHOW RELAYLOG EVENTS
• You can now show relay log contents, as you would do for the binlogs
• Useful for comparing events on the master binlog against the slave relay log
• Easier to inspect the binary and relay logs on servers that act both as master and slave in chained replication topologies
• May also be used to diagnose relay log corruption
![Page 11: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/11.jpg)
Give it a spin!
• Download MySQL 5.5 from the usual place:http://dev.mysql.com/downloads/mysql/
• Send us feedback and bug reports:http://bugs.mysql.com/
• Questions? Use the Forums or Mailing Lists:http://forums.mysql.com|http://lists.mysql.com
• Blog about your experiences:http://planet.mysql.com
![Page 12: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/12.jpg)
Discussion / Q & A
![Page 14: MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)](https://reader036.vdocument.in/reader036/viewer/2022081811/5405611e8d7f729b768b4ca2/html5/thumbnails/14.jpg)