YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
int Wsrep_storage_service::update_fragment_meta(const wsrep::ws_meta& ws_meta)
{
DBUG_ENTER("Wsrep_storage_service::update_fragment_meta");
DBUG_ASSERT(m_thd == current_thd);
DBUG_PRINT("info", ("Wsrep_storage_service::update_fragment_meta(%llu, %p)",
m_thd->thread_id, m_thd)); int ret= wsrep_schema->update_fragment_meta(m_thd, ws_meta);
DBUG_RETURN(ret);
}
int Wsrep_storage_service::remove_fragments()
{
DBUG_ENTER("Wsrep_storage_service::remove_fragments");
DBUG_ASSERT(m_thd == current_thd);
int ret= wsrep_schema->remove_fragments(m_thd,
m_thd->wsrep_trx().server_id(),
m_thd->wsrep_trx().id(),
m_thd->wsrep_sr().fragments());
DBUG_RETURN(ret);
}
int Wsrep_storage_service::commit(const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta)
{
DBUG_ENTER("Wsrep_storage_service::commit");
DBUG_ASSERT(m_thd == current_thd);
DBUG_PRINT("info", ("Wsrep_storage_service::commit(%llu, %p)",
m_thd->thread_id, m_thd));
WSREP_DEBUG("Storage service commit: %llu, %lld",
ws_meta.transaction_id().get(), ws_meta.seqno().get()); int ret= 0; constbool is_ordered= !ws_meta.seqno().is_undefined();
if (is_ordered)
{
ret= m_thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true);
}
ret= ret || trans_commit(m_thd);
if (!is_ordered)
{ /* Wsrep commit was not ordered so it does not go through commit time hooksandremainsactive.Rollitbacktomakecleanuphappen
in after_applying() call. */
m_thd->wsrep_cs().before_rollback();
m_thd->wsrep_cs().after_rollback();
} elseif (ret)
{ /* Commit failed, this probably means that the parent SR transaction wasBFaborted.Rollbackoutoforder,theparent
transaction will release commit order after it has rolled back. */
m_thd->wsrep_cs().prepare_for_ordering(wsrep::ws_handle(),
wsrep::ws_meta(), false);
trans_rollback(m_thd);
}
m_thd->wsrep_cs().after_applying();
m_thd->release_transactional_locks();
DBUG_RETURN(ret);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.