Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

M|18 Deep Dive: InnoDB Transactions and Replication

121 views

Published on

M|18 Deep Dive: InnoDB Transactions and Replication

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

M|18 Deep Dive: InnoDB Transactions and Replication

  1. 1. Deep Dive: Replication From basics into subtleties of binary logging and multi-threaded applier Andrei Elkin, Senior MariaDB developer
  2. 2. Why to dive deep? Designed in MySQL even before transaction. Serves a number of critical missions including: ● Backup and point-in-time recovery ● Load balancer ● Auditing ● Error case analysis
  3. 3. Replication conceptually is 2PC
  4. 4. Transaction state transaction
  5. 5. Binary logging
  6. 6. Binlog group commit
  7. 7. Binlog Group Commit ordered
  8. 8. binary logging: event group
  9. 9. event group: example
  10. 10. Events shipping: Dump thread
  11. 11. Events receiving: IO thread
  12. 12. No failover without ...
  13. 13. GTID idea
  14. 14. GTID: required in Multi-Source replication
  15. 15. GTID definition
  16. 16. GTID and Multi-Sourced Replication Transactions from different domains are executed independently
  17. 17. Events execution on slave: single-threaded mode
  18. 18. Events execution: parallel scheduling
  19. 19. Events execution: ordered commit
  20. 20. GTID execution: gtid_slave_pos table
  21. 21. Recovery: committed data may be lost
  22. 22. Recovery without Binlog_checkpoint
  23. 23. Recovery: server crash
  24. 24. Recovery: post-restart decisions
  25. 25. Ongoing and perspective projects 1) XA replication MDEV-7974 2) Eager replication as follow-up XA replication 3) Parallel slave group commit 4) Relay-log-less slave 5) Committed GTID tracker by engine 6) Binlog-less “relay” slave in chain replication 7) Consensus protocol on membership in replication configuration 8) E.g Paxos-like mode semi-sync
  26. 26. Ongoing: XA replication MDEV-7974
  27. 27. Follow-ups: active replication
  28. 28. Improvement ideas: slave group commit
  29. 29. References: https://mariadb.com/kb/en/library/replication-overview/ https://kristiannielsen.livejournal.com/16826.html https://kristiannielsen.livejournal.com/16382.html MariaDB for Advanced DBAs. MariaDB Training, MariaDB (c) Database replication techniques: a three parameter classification M. Wiesmann ; F. Pedone ; A. Schiper ; B. Kemme ; G. Alonso

×