Metadata locking in MySQL 5.5

3,073 views

Published on

User Conference 2011 presentation

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,073
On SlideShare
0
From Embeds
0
Number of Embeds
91
Actions
Shares
0
Downloads
28
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Metadata locking in MySQL 5.5

  1. 1. Metadata locking in MySQL 5.5 Konstantin Osipov Engineer @ Mail.Rukostja.osipov@gmail.com These slides released under the Creative Commons  Attribution­Noncommercial­Share Alike License
  2. 2. Mastering a 25-foot saw
  3. 3. DDL vs. DML: an illustration
  4. 4. What if... a transactional catalog
  5. 5. Locking agents
  6. 6. Define the problem (2)Four groups of bugs:- ALTER, DROP violate ACID- … or ... break replication- deadlocks in LOCK TABLES, FLUSH, SET GLOBAL read_only and ALTER- DML doesnt scale or THANK YOU LOCK_open
  7. 7. Define the problem (3)
  8. 8. In come metadata locks
  9. 9. Deadlock detectionHow does a typical wait-for grpah look like?
  10. 10. How to plug inEngines need to plug-in to avoid cross-storage-engine deadlocks.- its safe to #include “mdl.h”, no extra deps- subclass MDL_waitfor_subgraph to accept- MDL_waitfor_graph_visitor- let us know when youre waiting, by calilng- MDL_context::will_wait_for()
  11. 11. Performance impact
  12. 12. The roadmap - help us add cross-storage-engine deadlockdetection!- thr_lock.c and handler::store_lock() need not bemandatory any more- consistent DDL across all NDB cluster- shard MDL_set (performance++)- instrumentation
  13. 13. Performance impact
  14. 14. Thats it. Thank you for coming! Further reading: WL#3873, WL#3726, WL#4284 Mdl.pdf is available in MySQL internals manual.

×