Learning MySQL Internals via bug reports

One technique that I use to understand MySQL Internals (and ZFS internals in the past) is to look at bug reports. They have lots of useful information in them.

One example is Bug#32149 Long semaphore wait for adaptive hash latch. The bug synopsis could very well have been Why are global locks in a storage engine such a BAD idea. There is lots of useful information about this and the workaround MySQL server uses to work with storage engines that do.. Interesting!

Do you know of any other interesting bugs that document MySQL internals?

Comments:

Thanks for the reminder. That bug is still open as only one of places where a long lock wait may occur has been fixed.

Posted by Mark Callaghan on September 23, 2008 at 03:19 PM PDT #

As is fixing bugs.

I attended a talk by Andrew Morton a while back and he pointed out that fixing bugs was a GREAT way to learn about the kernel.

You have a small task to perform but you can dive into various parts of the kernel and grok their internals.

I actually thought it was a great way to start learning about complex apps like Linux, MySQL, InnoDB , etc.

Posted by Kevin Burton on September 24, 2008 at 09:15 AM PDT #

Mark,
The side effect of not releasing the [global] adaptive hash lock is that other threads are prevented from using the hash impacting performance.

However, I still think it is better for the storage engine not to rely on release_temporary_latches being called -- there are always going to be new places that can take time. Moreover where do you draw the line between "short" hold times and long "hold" times :-) These can change from platform to platform, query to query, release to release..

Posted by neel on September 24, 2008 at 02:13 PM PDT #

Kevin,
Yes! _fixing_ bugs is even better :-) Thanks for chiming in.

Posted by neel on September 24, 2008 at 02:14 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

realneel

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today