diff options
author | sjaakola <seppo.jaakola@iki.fi> | 2021-01-28 16:12:35 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-29 12:14:08 +0200 |
commit | a2eb974b50f1a2912717d765bbd48aa69cfcc8f1 (patch) | |
tree | f0e5e0f33fb91e3c106937b07c1bd25f17aa9604 | |
parent | 85130c5a4ff4cc3854192bf7945cb10087d860a2 (diff) | |
download | mariadb-git-a2eb974b50f1a2912717d765bbd48aa69cfcc8f1.tar.gz |
MDEV-24721 galera.mysql-wsrep-bugs-607 test failure
The implementation for MDEV-17048 apperas to be direct copy from mysql version.
The group commit works differently in mariadb and the assert in wsrep_unregister_from_group_commit() is too strict.
The reason is that in: Wsrep_high_priority_service::log_dummy_write_set(), the transaction will undergo full rollback:
{
cs.before_rollback();
cs.after_rollback();
}
After that, the client's transaction state is set to be: wsrep::transaction::s_aborted.
The execution then continues execution by:
...
wsrep_register_for_group_commit(m_thd);
...
wsrep_unregister_from_group_commit(m_thd);
The bogus assert in wsrep_unregister_from_group_commit() allows only transactions states of :s_ordered_commit or s_aborting.
As the fix, I brought back the same assert as is present in MariaDB 10.4 version.
-rw-r--r-- | sql/wsrep_binlog.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc index 5595f263fa5..3fe0792d83e 100644 --- a/sql/wsrep_binlog.cc +++ b/sql/wsrep_binlog.cc @@ -381,9 +381,7 @@ void wsrep_register_for_group_commit(THD *thd) void wsrep_unregister_from_group_commit(THD *thd) { - DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_ordered_commit|| - // ordered_commit() failure results in s_aborting state - thd->wsrep_trx().state() == wsrep::transaction::s_aborting); + DBUG_ASSERT(thd->wsrep_trx().ordered()); wait_for_commit *wfc= thd->wait_for_commit_ptr; if (wfc) |