Sujatha
410e3c1a9a
MDEV-17515: GTID Replication in optimistic mode deadlock
...
Problem:
=======
In slave_parallel_mode=optimistic configuration, when admin commands and
DML operation on the same table are scheduled simultaneously for execution,
it results in lock conflict and slave server either hangs due to
deadlock or goes down with an assert.
Analysis:
========
Admin commands OPTIMIZE, REPAIR and ANALYZE are written to binary log as
ordinary transactions. When 'slave_parallel_mode' is 'optimistic' DMLs are
allowed to run in parallel. But these locks are not detected by parallel
replication deadlock detection-and-handling mechanism. At times they result
in deadlock or assertion.
Fix:
===
Flag admin commands as DDL in Gtid_log_event at the time of writing to
binary log. Add a new bit EXECUTED_TABLE_ADMIN_CMD to
'm_unsafe_rollback_flags'. During 'mysql_admin_table' command execution it
accepts a list of tables to be processed and executes them in a loop. Upon
successful execution enable 'EXECUTED_TABLE_ADMIN_CMD' bit in
thd->transaction.stmt_unsafe_rollback_flags. Gtid_log_event constructor
will notice this flag and mark the current transaction with 'FL_DDL' flag.
Gtid_log_events marked as FL_DDL will not be scheduled parallel execution,
on the slave. They will execute in isolation to prevent deadlocks.
Note: Removed the call to 'trans_commit_implicit' from 'mysql_admin_table'
function as 'mysql_execute_command' will take care of invoking
'trans_commit_implicit'.
2021-05-17 16:38:58 +05:30
..
2017-07-02 19:47:30 +03:00
2020-03-23 10:57:21 +01:00
2016-03-31 10:11:16 +04:00
2014-02-05 19:01:59 +02:00
2014-02-05 19:01:59 +02:00
2014-02-05 19:01:59 +02:00
2014-02-05 19:01:59 +02:00
2014-02-05 19:01:59 +02:00
2014-02-05 19:01:59 +02:00
2019-07-25 11:38:45 +05:30
2015-07-26 14:32:45 +03:00
2016-03-31 10:11:16 +04:00
2014-07-23 12:01:05 +02:00
2016-03-22 10:53:28 +01:00
2014-07-23 19:36:15 +02:00
2020-01-15 18:06:24 +01:00
2013-08-27 19:18:04 +03:00
2013-08-27 19:18:04 +03:00
2019-07-10 11:51:43 +05:30
2019-09-04 17:52:43 +05:30
2014-12-15 11:16:33 +02:00
2014-12-15 11:16:33 +02:00
2015-11-16 12:39:56 -05:00
2018-05-22 23:05:48 +03:00
2018-07-18 20:58:59 +05:30
2018-10-17 10:46:20 +05:30
2018-10-29 21:44:38 +01:00
2014-03-18 16:26:02 +02:00
2015-06-15 08:13:40 +02:00
2017-09-20 18:17:50 +02:00
2015-07-17 00:06:27 +03:00
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2015-12-01 15:38:11 +05:30
2017-09-22 02:27:00 +02:00
2016-10-19 20:20:47 +02:00
2020-07-01 17:43:44 +03:00
2019-05-14 16:06:55 +05:30
2016-12-05 20:19:01 +02:00
2015-09-04 10:33:56 +02:00
2020-09-07 17:23:45 +05:30
2020-01-09 12:45:05 +05:30
2014-10-11 18:53:06 +02:00
2019-05-29 15:18:52 +05:30
2019-05-29 15:18:52 +05:30
2019-06-12 10:30:01 +03:00
2019-05-29 15:18:52 +05:30
2016-03-31 10:11:16 +04:00
2020-01-15 18:06:24 +01:00
2014-03-24 20:01:45 +01:00
2020-01-15 18:06:24 +01:00
2017-09-20 18:17:50 +02:00
2021-02-03 12:18:29 +05:30
2016-03-31 10:11:16 +04:00
2016-12-05 20:19:01 +02:00
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2014-10-11 18:53:06 +02:00
2017-09-22 02:27:00 +02:00
2020-04-30 17:36:41 +02:00
2014-03-24 20:01:45 +01:00
2016-12-05 20:19:01 +02:00
2014-12-10 08:19:19 +04:00
2015-02-27 13:34:18 +04:00
2014-12-15 17:41:15 +04:00
2016-03-31 10:11:16 +04:00
2014-12-15 17:41:15 +04:00
2015-01-13 11:50:33 +04:00
2015-03-04 09:52:01 +04:00
2014-12-16 15:31:25 +04:00
2015-01-13 11:50:33 +04:00
2014-12-10 11:06:36 +04:00
2014-01-29 15:37:17 +02:00
2019-08-05 14:34:31 +05:30
2014-01-22 15:29:36 +01:00
2018-01-03 01:01:53 +02:00
2016-03-31 10:11:16 +04:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2016-06-30 11:43:02 +02:00
2016-10-14 23:15:59 +02:00
2016-10-14 23:15:59 +02:00
2016-10-14 23:15:59 +02:00
2014-10-11 18:53:06 +02:00
2018-06-21 10:15:27 +02:00
2020-03-23 10:57:21 +01:00
2020-01-21 11:22:47 +01:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2015-06-28 18:51:40 +02:00
2016-10-21 22:37:51 +02:00
2016-03-31 10:11:16 +04:00
2020-07-23 12:54:40 +05:30
2014-10-11 18:53:06 +02:00
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2020-05-20 11:13:40 +03:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2020-09-03 09:10:03 +03:00
2016-03-31 10:11:16 +04:00
2020-09-03 09:10:03 +03:00
2017-09-20 18:17:50 +02:00
2018-09-04 09:49:53 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2020-01-15 18:06:24 +01:00
2017-09-22 02:27:00 +02:00
2016-12-29 13:23:18 +01:00
2013-11-21 14:42:25 +01:00
2013-11-21 14:42:25 +01:00
2015-01-15 15:55:09 +01:00
2020-09-22 15:21:43 +03:00
2020-11-04 13:23:06 +01:00
2017-09-18 10:12:23 +02:00
2017-03-31 19:28:58 +02:00
2019-03-28 20:35:39 +05:30
2014-02-10 12:53:04 +01:00
2013-05-15 19:52:21 +02:00
2014-07-21 13:16:08 +04:00
2013-05-03 11:27:29 +02:00
2013-05-22 17:36:48 +02:00
2013-05-22 17:36:48 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2013-05-29 11:41:25 +02:00
2014-02-11 14:06:03 +01:00
2015-09-22 13:35:23 +02:00
2015-11-18 02:11:20 -05:00
2015-11-23 16:23:10 -05:00
2015-03-04 13:36:29 +01:00
2014-02-07 20:24:39 +01:00
2020-01-21 11:22:47 +01:00
2015-02-27 23:33:22 -05:00
2014-02-10 15:12:17 +01:00
2013-04-09 11:46:38 +02:00
2020-08-21 14:48:53 +03:00
2020-03-23 10:57:21 +01:00
2015-04-09 10:03:59 +02:00
2016-03-31 10:11:16 +04:00
2017-03-03 01:37:54 +02:00
2020-01-15 18:06:24 +01:00
2018-12-30 18:30:29 +01:00
2021-03-10 09:12:57 +01:00
2021-03-10 09:12:57 +01:00
2016-06-30 16:38:05 +02:00
2017-09-20 18:17:50 +02:00
2021-04-30 20:34:31 +05:30
2017-09-20 18:17:50 +02:00
2015-09-22 14:01:54 +04:00
2015-09-26 02:48:55 +03:00
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2017-09-20 18:17:50 +02:00
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2017-02-01 13:09:07 -08:00
2019-08-09 19:36:56 +05:30
2018-10-17 10:46:20 +05:30
2018-10-17 10:46:20 +05:30
2013-05-03 01:54:47 +03:00
2013-03-27 11:59:40 +05:30
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2016-12-05 20:19:01 +02:00
2016-12-05 20:19:01 +02:00
2014-10-11 18:53:06 +02:00
2014-01-22 15:29:36 +01:00
2017-12-27 23:17:28 +01:00
2020-01-21 11:22:47 +01:00
2021-05-17 16:38:58 +05:30
2021-03-10 09:12:57 +01:00
2014-02-01 00:54:03 +01:00
2020-08-21 14:48:53 +03:00
2016-08-22 10:16:00 +03:00
2014-06-27 13:34:29 +02:00
2017-02-20 01:48:26 +02:00
2017-09-20 18:17:50 +02:00
2016-11-04 12:33:42 +01:00
2019-08-09 19:36:56 +05:30
2017-05-19 13:02:45 +05:30
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2014-01-22 15:29:36 +01:00
2015-11-27 02:06:58 +02:00
2017-09-20 18:17:50 +02:00
2017-09-20 18:17:50 +02:00
2015-09-22 14:01:54 +04:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2020-10-08 07:41:55 +11:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2017-09-20 18:17:50 +02:00
2017-09-20 18:17:50 +02:00
2015-06-09 12:05:06 +04:00
2018-11-06 21:11:49 +02:00
2014-10-11 18:53:06 +02:00
2017-09-20 18:17:50 +02:00
2020-08-04 11:28:26 +05:30
2014-04-23 16:06:06 +02:00
2016-09-01 21:11:47 +03:00
2016-09-01 21:11:47 +03:00
2019-09-30 13:22:37 +05:30
2015-03-04 13:36:04 +01:00
2015-04-13 14:08:57 +02:00
2015-04-13 14:08:57 +02:00
2014-12-06 08:49:50 +01:00
2015-02-07 09:42:58 +01:00
2014-01-06 16:05:52 +01:00
2014-02-10 12:53:04 +01:00
2018-10-01 15:15:34 +05:30
2017-02-10 06:30:42 -05:00
2020-05-26 18:49:43 +03:00
2020-01-21 11:22:47 +01:00
2020-08-21 14:48:53 +03:00
2020-12-18 19:31:51 +01:00
2016-12-05 20:19:01 +02:00
2014-07-02 12:51:45 +02:00
2015-04-21 10:31:39 +02:00
2016-12-05 20:19:01 +02:00
2013-09-27 16:58:49 +04:00
2013-09-27 16:58:49 +04:00
2013-09-27 16:58:49 +04:00
2013-09-27 16:58:49 +04:00
2013-09-27 16:58:49 +04:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2014-06-24 14:43:08 +02:00
2014-06-24 14:43:08 +02:00
2017-09-20 18:17:50 +02:00
2021-01-21 13:00:02 +05:30
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2016-12-05 20:19:01 +02:00
2016-06-10 18:39:43 -04:00
2016-10-05 01:11:07 +03:00
2017-09-20 18:17:50 +02:00
2017-02-28 10:00:51 +05:30
2019-03-22 12:13:24 +05:30
2019-03-27 12:26:11 +02:00
2015-02-10 10:21:16 +01:00
2013-12-09 12:37:45 +01:00
2014-10-11 18:53:06 +02:00
2017-02-10 06:30:42 -05:00
2017-02-10 06:30:42 -05:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2020-01-15 18:06:24 +01:00
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2020-03-23 10:57:21 +01:00
2017-02-10 06:30:42 -05:00
2021-01-13 16:16:13 +07:00
2014-10-11 18:53:06 +02:00
2019-07-25 12:14:27 +03:00
2016-03-31 10:11:16 +04:00
2020-01-15 18:06:24 +01:00
2017-09-20 18:17:50 +02:00
2021-01-13 16:16:13 +07:00
2014-10-11 18:53:06 +02:00
2017-02-10 06:30:42 -05:00
2015-06-30 14:30:38 +03:00
2015-06-30 14:30:38 +03:00
2015-06-30 14:44:33 +03:00
2015-06-30 14:44:33 +03:00
2015-06-30 14:44:33 +03:00
2015-06-30 14:44:33 +03:00
2015-06-30 14:44:33 +03:00
2017-09-20 18:17:50 +02:00
2020-01-15 18:06:24 +01:00
2016-03-31 10:11:16 +04:00
2018-10-17 10:46:20 +05:30
2018-10-17 10:46:20 +05:30
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2017-09-20 18:17:50 +02:00
2019-05-14 13:03:06 +05:30
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2018-08-04 01:39:35 +05:30
2021-04-11 02:26:59 +02:00
2015-10-08 10:16:35 +03:00
2015-10-08 10:16:35 +03:00
2015-10-08 10:16:35 +03:00
2021-03-10 09:12:57 +01:00
2014-10-11 18:53:06 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2019-08-27 13:05:04 +05:30
2014-03-24 20:01:45 +01:00
2017-02-10 06:30:42 -05:00
2021-03-10 09:12:57 +01:00
2017-09-22 02:27:00 +02:00
2014-03-24 20:01:45 +01:00
2014-10-11 18:53:06 +02:00
2021-01-04 15:06:12 +05:30
2014-10-11 18:53:06 +02:00
2020-07-31 17:32:29 +10:00
2017-09-20 18:17:50 +02:00
2017-09-22 02:27:00 +02:00
2021-02-15 13:41:44 +01:00
2021-02-15 13:41:44 +01:00
2014-12-23 14:16:32 +01:00
2021-02-15 13:41:44 +01:00
2013-04-09 23:28:21 +02:00
2019-11-10 16:16:37 +02:00
2020-01-15 18:06:24 +01:00
2019-07-09 13:22:22 +03:00
2014-12-23 14:16:32 +01:00
2014-12-23 14:16:32 +01:00
2016-12-05 20:19:01 +02:00
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2015-03-12 09:47:36 +01:00
2015-09-04 10:33:56 +02:00
2014-10-29 14:44:40 +01:00
2020-01-15 18:06:24 +01:00
2015-02-10 10:21:15 +01:00
2017-09-22 02:27:00 +02:00
2014-06-18 11:03:08 +02:00
2015-02-10 10:21:15 +01:00
2017-09-22 02:27:00 +02:00
2017-09-20 18:17:50 +02:00
2020-10-29 09:35:39 +01:00
2019-03-27 12:34:03 +05:30
2020-01-15 18:06:24 +01:00
2013-05-03 01:54:47 +03:00
2021-05-14 11:49:26 +01:00
2021-05-14 11:50:12 +01:00
2017-09-22 02:27:00 +02:00
2016-03-31 10:11:16 +04:00
2013-08-13 13:35:36 +02:00
2017-09-21 22:02:21 +02:00
2017-02-10 06:30:42 -05:00
2017-09-15 12:25:06 +04:00
2021-03-10 09:12:57 +01:00
2021-01-22 09:17:00 +01:00
2015-04-27 21:04:06 +02:00
2017-01-06 17:09:59 +02:00
2016-12-05 20:19:01 +02:00
2015-09-04 10:33:56 +02:00
2016-12-05 20:19:01 +02:00
2020-10-14 18:16:57 +02:00
2018-07-25 12:54:37 +05:30
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2017-09-20 18:17:50 +02:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2018-10-17 10:46:20 +05:30
2020-01-21 11:22:47 +01:00
2014-10-11 18:53:06 +02:00
2017-09-21 22:02:21 +02:00
2014-02-05 19:01:59 +02:00
2017-09-20 18:17:50 +02:00
2014-03-24 20:01:45 +01:00
2017-09-20 18:17:50 +02:00
2014-03-24 20:01:45 +01:00
2016-03-31 10:11:16 +04:00
2017-09-22 02:27:00 +02:00
2016-10-26 18:44:34 +02:00
2017-03-31 19:28:58 +02:00
2020-01-15 18:06:24 +01:00
2017-01-17 15:32:41 +04:00
2016-12-21 13:18:45 +04:00
2019-08-07 12:35:04 +05:30
2017-09-20 18:17:50 +02:00
2021-01-11 21:54:47 +01:00
2017-09-22 02:27:00 +02:00
2015-04-20 12:59:46 +02:00
2016-12-05 20:19:01 +02:00
2014-11-03 21:45:06 +04:00
2017-09-21 22:03:21 +02:00
2014-11-03 21:45:06 +04:00
2014-11-03 21:45:06 +04:00
2014-11-03 21:45:06 +04:00
2014-11-03 21:45:06 +04:00
2014-11-03 21:45:06 +04:00
2013-07-10 11:49:17 +04:00
2017-02-10 06:30:42 -05:00
2017-09-22 02:27:00 +02:00
2017-02-10 06:30:42 -05:00
2017-02-10 06:30:42 -05:00
2016-04-20 15:25:55 +02:00
2016-02-26 09:01:49 +05:30
2016-10-05 01:11:07 +03:00
2014-10-11 18:53:06 +02:00
2014-10-11 18:53:06 +02:00
2016-12-05 20:19:01 +02:00
2019-08-09 19:36:56 +05:30
2017-01-11 09:18:35 +02:00
2016-06-08 14:17:23 +03:00
2019-01-13 20:59:45 +05:30
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2020-01-15 18:06:24 +01:00
2016-03-31 10:11:16 +04:00
2016-03-31 10:11:16 +04:00
2017-09-20 18:17:50 +02:00
2015-11-27 02:06:58 +02:00
2013-04-09 23:28:21 +02:00
2020-09-22 15:21:43 +03:00
2016-02-23 10:46:16 +01:00
2016-02-23 10:46:16 +01:00
2016-02-23 10:46:16 +01:00