diff options
-rw-r--r-- | sql/wsrep_binlog.cc | 4 | ||||
-rw-r--r-- | sql/wsrep_high_priority_service.cc | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc index 787ebc042ae..d04d9989e99 100644 --- a/sql/wsrep_binlog.cc +++ b/sql/wsrep_binlog.cc @@ -358,7 +358,7 @@ void wsrep_register_for_group_commit(THD *thd) DBUG_VOID_RETURN; } - DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_committing); + DBUG_ASSERT(thd->wsrep_trx().ordered()); wait_for_commit *wfc= thd->wait_for_commit_ptr= &thd->wsrep_wfc; @@ -381,7 +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); + DBUG_ASSERT(thd->wsrep_trx().ordered()); wait_for_commit *wfc= thd->wait_for_commit_ptr; if (wfc) diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc index 341c409b4f2..1adbb312ac0 100644 --- a/sql/wsrep_high_priority_service.cc +++ b/sql/wsrep_high_priority_service.cc @@ -443,8 +443,24 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_ cs.before_rollback(); cs.after_rollback(); } + + 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); + m_thd->wait_for_prior_commit(); + } + wsrep_set_SE_checkpoint(ws_meta.gtid()); - ret= ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err); + + if (!WSREP_EMULATE_BINLOG(m_thd)) + { + wsrep_unregister_from_group_commit(m_thd); + } + else + { + ret= ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err); + } cs.after_applying(); } DBUG_RETURN(ret); |