← Back to team overview

enterprise-support team mailing list archive

[Bug 1272310] [NEW] main_connection keep an useless transaction opened and permit infinite metadata table lock

 

Public bug reported:

This bug is opened after a long issue solving process with SkySQL
(https://support.skysql.com/view.php?id=7290).

The patch is simple (2 lines added, 1 removed).

Context :
========

mydumper.c create a main mysql connection used to scan databases, and
tables in order to fillup threads job queue. For that, this main
connection does a START TRANSACTION WITH CONSISTENT SNAPSHOST.

When the main process has finished, he wait for the UNLOCK TABLES to be
needed (after backing up the non innodb tables).

After that, he wait for the thread to finished. This step can take some
hours.

And finally, the main connection is closed.


Bug : 
====

if the replication slave process on the sql server, try a truncate/alter
table after that the main connection is created, but before each threads
has begun to backup this table, so the replication process enter a
"Waiting for metadata table lock", and, when the backups thread begin to
backup this table, they also enter in "Waiting for metadata table lock".

We can manually solve that by killing the mysql connection now useless
(the one created with create_main_connection). So, the truncate table
and the selects can be unlocked.


Solution :
========

As minimal solution, COMMIT just after waiting (if needed) the UNLOCK TABLES;
But, as the main mysql connection is useless after the UNLOCK TABLES and the COMMIT, i decide to close it here, and not after the potential hours of backups.

Thanks for your time, and ready to explain anything needed. (Sorry for
my bad english).

** Affects: mydumper
     Importance: Undecided
         Status: New

** Patch added: "mydumper-0.6.0_metadata-table-lock.patch"
   https://bugs.launchpad.net/bugs/1272310/+attachment/3955879/+files/mydumper-0.6.0_metadata-table-lock.patch

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1272310

Title:
  main_connection keep an useless transaction opened and permit infinite
  metadata table lock

To manage notifications about this bug go to:
https://bugs.launchpad.net/mydumper/+bug/1272310/+subscriptions


Follow ups

References