summaryrefslogtreecommitdiff
path: root/sql/wsrep_high_priority_service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_high_priority_service.cc')
-rw-r--r--sql/wsrep_high_priority_service.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc
index 7d8296a75a1..53ef20f3e78 100644
--- a/sql/wsrep_high_priority_service.cc
+++ b/sql/wsrep_high_priority_service.cc
@@ -391,8 +391,6 @@ int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle,
m_thd->killed);
m_thd->release_transactional_locks();
- mysql_ull_cleanup(m_thd);
- m_thd->mdl_context.release_explicit_locks();
free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC));
@@ -502,7 +500,13 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_
if (!WSREP_EMULATE_BINLOG(m_thd))
{
wsrep_register_for_group_commit(m_thd);
- ret = ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err);
+ /* wait_for_prior_commit() ensures that all preceding transactions
+ have been committed and seqno has been synced into
+ storage engine. We don't release commit order here yet to
+ avoid following transactions to sync seqno before
+ wsrep_set_SE_checkpoint() below returns. This effectively pauses
+ group commit for the checkpoint operation, but is the only way to
+ ensure proper ordering. */
m_thd->wait_for_prior_commit();
}
@@ -512,10 +516,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_
{
wsrep_unregister_from_group_commit(m_thd);
}
- else
- {
- ret= ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err);
- }
+ ret= ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err);
cs.after_applying();
}
DBUG_RETURN(ret);