EmergencyEMERGENCY? Get 24/7 Help Now!

MyRocks and LOCK IN SHARE MODE

 | May 11, 2017 |  Posted In: MyRocks, MySQL, Technical Webinars

PREVIOUS POST
NEXT POST

LOCK IN SHARE MODEIn this blog post, we’ll look at MyRocks and the LOCK IN SHARE MODE.

Those who attended the March 30th webinar “MyRocks Troubleshooting” might remember our discussion with Yoshinori on  LOCK IN SHARE MODE.

I did more tests, and I can confirm that his words are true: LOCK IN SHARE MODE works in MyRocks.

This quick example demonstrates this. The initial setup:

In session 1:

In session 2:

However, in the webinar I wanted to remind everyone about the differences between LOCK IN SHARE MODE  and FOR UPDATE. To do so, I added the former to my “session 2” test for the webinar. Once I did, it ignores the lock set in “session 1”. I can update a row and commit:

I reported this behavior here, and also at Percona Jira bugs database: MYR-107. In Facebook, this bug is already fixed.

This test clearly demonstrates that it is fixed in Facebook. In “session 1”:

And now in another session:

If you want to test the fix with the Facebook MySQL build, you need to update submodules to download the patch: git submodule update.

PREVIOUS POST
NEXT POST
Sveta Smirnova

Sveta joined Percona in 2015. Her main professional interests are problem solving, working with tricky issues, bugs, finding patterns that can solve typical issues quicker and teaching others how to deal with MySQL issues, bugs and gotchas effectively. Before joining Percona Sveta worked as a Support Engineer in the MySQL Bugs Analysis Support Group in MySQL AB-Sun-Oracle. She is the author of the book "MySQL Troubleshooting" and JSON UDF functions for MySQL.

Leave a Reply