YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
int Wsrep_client_service::remove_fragments()
{
DBUG_ENTER("Wsrep_client_service::remove_fragments");
DEBUG_SYNC(m_thd, "wsrep_before_fragment_removal"); if (wsrep_schema->remove_fragments(m_thd,
Wsrep_server_state::instance().id(),
m_thd->wsrep_trx().id(),
m_thd->wsrep_sr().fragments()))
{
WSREP_DEBUG("Failed to remove fragments from SR storage for transaction " "%llu, %llu",
m_thd->thread_id, m_thd->wsrep_trx().id().get());
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
/* AllocateseparateTHDforreplayingtoavoidtampering originalTHDstateduringreplicationeventapplying.
*/
THD *replayer_thd= new THD(true, true); // Replace the security context of the replayer with the security context // of the original THD. Since security context class doesn't have proper // copy constructors, we need to store the original one and set it back // before destruction so that THD destruction doesn't cause double-free // on the replaced security context.
Security_context old_ctx = replayer_thd->main_security_ctx;
replayer_thd->main_security_ctx = m_thd->main_security_ctx;
replayer_thd->thread_stack= m_thd->thread_stack;
replayer_thd->real_id= pthread_self();
replayer_thd->prior_thr_create_utime=
replayer_thd->start_utime= microsecond_interval_timer();
replayer_thd->mark_connection_idle();
replayer_thd->reset_for_next_command(true);
// In Galera we allow only InnoDB sequences, thus // sequence table updates are in writeset. // Binlog cache needs reset so that binlog_close // does not write cache to binlog file yet.
binlog_reset_cache(m_thd);
void Wsrep_client_service::wait_for_replayers(wsrep::unique_lock<wsrep::mutex>& lock)
{
DBUG_ASSERT(m_thd == current_thd);
lock.unlock();
mysql_mutex_lock(&LOCK_wsrep_replaying); /* We need to check if the THD is BF aborted during condition wait. Becausetheaborterdoesnotknowwhichconditionthisthreadiswaiting,
use timed wait and check if the THD is BF aborted in the loop. */ while (wsrep_replaying > 0 && !wsrep_is_bf_aborted(m_thd))
{ struct timespec wait_time;
set_timespec_nsec(wait_time, 10000000L);
mysql_cond_timedwait(&COND_wsrep_replaying, &LOCK_wsrep_replaying,
&wait_time);
}
mysql_mutex_unlock(&LOCK_wsrep_replaying);
lock.lock();
}
/* If client is quitting all below will be done in THD::cleanup()
TODO: why we need this any other case? */ if (m_thd->wsrep_cs().state() != wsrep::client_state::s_quitting)
{ if (m_thd->locked_tables_mode && m_thd->lock)
{ if (m_thd->locked_tables_list.unlock_locked_tables(m_thd))
ret= 1;
m_thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
} if (m_thd->global_read_lock.is_acquired())
{
m_thd->global_read_lock.unlock_global_read_lock(m_thd);
}
m_thd->release_transactional_locks();
}
DBUG_RETURN(ret);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-10-08)
¤
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.