MCPcopy Create free account
hub / github.com/MariaDB/server / wsrep_after_commit

Function wsrep_after_commit

sql/wsrep_trans_observer.h:392–411  ·  view source on GitHub ↗

Called after the transaction has been committed. Return zero on success, non-zero on failure. */

Source from the content-addressed store, hash-verified

390 Return zero on success, non-zero on failure.
391 */
392static inline int wsrep_after_commit(THD* thd, bool all)
393{
394 DBUG_ENTER("wsrep_after_commit");
395 WSREP_DEBUG("wsrep_after_commit: %d, %d, %lld, %d",
396 wsrep_is_real(thd, all),
397 wsrep_is_active(thd),
398 (long long)wsrep_thd_trx_seqno(thd),
399 wsrep_has_changes(thd));
400 DBUG_ASSERT(wsrep_run_commit_hook(thd, all));
401 if (thd->internal_transaction())
402 DBUG_RETURN(0);
403 int ret= 0;
404 if (thd->wsrep_trx().state() == wsrep::transaction::s_committing)
405 {
406 ret= thd->wsrep_cs().ordered_commit();
407 }
408 wsrep_unregister_from_group_commit(thd);
409 thd->wsrep_xid.null();
410 DBUG_RETURN(ret || thd->wsrep_cs().after_commit());
411}
412
413/*
414 Called before the transaction is rolled back.

Callers 1

ha_commit_transFunction · 0.85

Calls 9

wsrep_is_realFunction · 0.85
wsrep_is_activeFunction · 0.85
wsrep_has_changesFunction · 0.85
wsrep_run_commit_hookFunction · 0.85
internal_transactionMethod · 0.80
stateMethod · 0.80
wsrep_thd_trx_seqnoFunction · 0.70
nullMethod · 0.45

Tested by

no test coverage detected