summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorSachin <sachinsetia1001@gmail.com>2020-07-16 14:24:30 +0530
committerSachin <sachinsetia1001@gmail.com>2020-08-03 17:07:16 +0530
commit706a7101bfacd29f4f5728034be92240e82df583 (patch)
tree1c9a1f0ca7bfec04e3196f6d6d45f53b22f874aa /sql/item.cc
parent9840bb21ef683afd59a30a79ebc5bd5ad33a7c1a (diff)
downloadmariadb-git-706a7101bfacd29f4f5728034be92240e82df583.tar.gz
MDEV-23089 rpl_parallel2 fails in 10.5
Problem:- rpl_parallel2 was failing non-deterministically Analysis:- When FLUSH TABLES WITH READ LOCK is executed, it will allow all worker threads to complete their ongoing transactions and then it will pause them. At this state FTWRL will proceed to acquire global read lock. FTWRL first blocks threads from starting new commits, then upgrades the lock to block commit of existing transactions. Step1: FLUSH TABLES WITH READ LOCK - Blocks new commits Step2: * STOP SLAVE command enables 'force_abort=1' which unblocks workers, they continue to execute events. * T1: Waits in 'record_gtid' call to update 'gtid_slave_pos' table with its current GTID, but it is blocked becuase of Step1. * T2: Holds COMMIT lock and waits for T1 to commit. Step3: FLUSH TABLES WITH READ LOCK - Waiting to get BLOCK_COMMIT. This results in deadlock. When STOP SLAVE command allows paused workers to proceed, workers should skip the execution of all further events, similar to 'conservative' parallel mode. Solution:- We will assign 1 to skip_event_group when we are aborted in do_ftwrl_wait. rpl_parallel_entry->pause_sub_id is only reset when force_abort is off in rpl_pause_after_ftwrl.
Diffstat (limited to 'sql/item.cc')
0 files changed, 0 insertions, 0 deletions