summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/wsrep_high_priority_service.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc
index c396a9eeae5..96269481559 100644
--- a/sql/wsrep_high_priority_service.cc
+++ b/sql/wsrep_high_priority_service.cc
@@ -472,7 +472,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();
}
@@ -482,10 +488,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);