Lock-Free SHOW SLAVE STATUS

The STOP SLAVE and SHOW SLAVE STATUS commands can conflict due to a global lock in the situation where one thread on a slave attempts to execute a STOP SLAVE command, while a second thread on the slave is already running a command that takes a long time to execute.

If a STOP SLAVE command is given in this situation, it will wait and not complete execution until the long-executing thread has completed its task. If another thread now executes a SHOW SLAVE STATUS command while the STOP SLAVE command is waiting to complete, the SHOW SLAVE STATUS command will not be able to execute while the STOP SLAVE command is waiting.

This features modifies the SHOW SLAVE STATUS syntax to allow:

SHOW SLAVE STATUS NONBLOCKING

This will display the slave’s status as if there were no lock, allowing the user to detect and understand the situation that is occurring.

Note

The information given when NONBLOCKING is used may be slightly inconsistent with the actual situation while the lock is being held.

Note

Percona Server originally used SHOW SLAVE STATUS NOLOCK syntax for this feature. As of 5.6.20-68.0 release, Percona Server implements SHOW SLAVE STATUS NONBLOCKING syntax, which comes from MySQL 5.7. The NOLOCK one has been deprecated and will be removed in Percona Server 5.7.

Version Specific Information

  • 5.6.11-60.3: Feature ported from Percona Server 5.5.
  • 5.6.20-68.0: Percona Server implemented the NONBLOCKING syntax from MySQL 5.7 and deprecated the NOLOCK syntax.
Percona Server
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

Handle Corrupted Tables

Next topic

Percona Toolkit UDFs

This Page



© Copyright Percona LLC and/or its affiliates 2009-2014.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
Created using Sphinx 1.1.3.
This documentation is developed in Launchpad as part of the Percona Server source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
]]>