diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-03-27 09:28:49 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-03-28 07:40:03 +0200 |
commit | 21b2fada7ab7f35c898c02d2f918461409cc9c8e (patch) | |
tree | a452ffc68182c8350a61f5bb2d0b51ecbd3ae877 /include | |
parent | deff3f757289bd5b98b1b44d857e7508c4be07eb (diff) | |
download | mariadb-git-21b2fada7ab7f35c898c02d2f918461409cc9c8e.tar.gz |
MDEV-18464: Port kill_one_trx fixes from 10.4 to 10.1
Pushed the decision for innodb transaction and system
locking down to lock0lock.cc level. With this,
we can avoid releasing these mutexes for executions
where these mutexes were acquired upfront.
This patch will also fix BF aborting of native threads, e.g.
threads which have declared wsrep_on=OFF. Earlier, we have
used, for innodb trx locks, was_chosen_as_deadlock_victim
flag, for marking inodb transactions, which are victims for
wsrep BF abort. With native threads (wsrep_on==OFF), re-using
was_chosen_as_deadlock_victim flag may lead to inteference
with real deadlock, and to deal with this, the patch has added new
flag for marking wsrep BF aborts only: victim=true
Similar way if replication decides to abort one of the threads
we mark victim by: victim=true
innobase_kill_query
Remove lock sys and trx mutex handling.
wsrep_innobase_kill_one_trx
Mark victim trx with victim=true
trx0trx.h
Remove trx_abort_t type and abort type variable from
trx struct. Add victim variable to trx.
wsrep_kill_victim
Remove abort_type
lock_report_waiters_to_mysql
Take also trx mutex and mark trx as a victim for
replication abort.
lock_trx_handle_wait_low
New low level function to check whether the transaction
has already been rolled back because it was selected as
a deadlock victim, or if it has to wait then cancel
the wait lock.
lock_trx_handle_wait
If transaction is not marked as victim take lock sys
and trx mutex before calling lock_trx_handle_wait_low
and release them after that.
row_search_for_mysql
Remove lock sys and trx mutex taking and releasing.
trx_rollback_to_savepoint_for_mysql_low
trx_commit_in_memory
Clean up victim variable.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions