mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-18 14:02:16 +03:00
The changes:
* Now the rollback of InnoDB SR transactions is not always skipped. Now most galera_sr MTR tests succeed, including galera_sr.GCF-900.
This commit is contained in:
@ -144,8 +144,14 @@ namespace wsrep
|
||||
*
|
||||
* @return Zero in case of success, non-zero in case of failure
|
||||
*/
|
||||
#ifdef WITH_WSREP_SR_SPEEDUP
|
||||
virtual int rollback(const wsrep::ws_handle& ws_handle,
|
||||
const wsrep::ws_meta& ws_meta,
|
||||
bool skip_rollback = false) = 0;
|
||||
#else
|
||||
virtual int rollback(const wsrep::ws_handle& ws_handle,
|
||||
const wsrep::ws_meta& ws_meta) = 0;
|
||||
#endif /* WITH_WSREP_SR_SPEEDUP */
|
||||
|
||||
/**
|
||||
* Apply a TOI operation.
|
||||
|
@ -1577,6 +1577,9 @@ void wsrep::server_state::close_orphaned_sr_transactions(
|
||||
void wsrep::server_state::close_transactions_at_disconnect(
|
||||
wsrep::high_priority_service& high_priority_service)
|
||||
{
|
||||
#ifdef DEBUG_SR_SPEEDUP
|
||||
wsrep::log_info() << __FUNCTION__ << "(" << __LINE__ << ")";
|
||||
#endif /* DEBUG_SR_SPEEDUP */
|
||||
// Close streaming applier without removing fragments
|
||||
// from fragment storage. When the server is started again,
|
||||
// it must be able to recover ongoing streaming transactions.
|
||||
@ -1587,9 +1590,19 @@ void wsrep::server_state::close_transactions_at_disconnect(
|
||||
{
|
||||
wsrep::high_priority_switch sw(high_priority_service,
|
||||
*streaming_applier);
|
||||
streaming_applier->rollback(
|
||||
wsrep::ws_handle(), wsrep::ws_meta());
|
||||
streaming_applier->after_apply();
|
||||
#ifdef DEBUG_SR_SPEEDUP
|
||||
wsrep::log_info() << __FUNCTION__ << "(" << __LINE__
|
||||
<< ") skipped rollback for wsrep::trx = "
|
||||
<< streaming_applier->transaction().id();
|
||||
#endif /* DEBUG_SR_SPEEDUP */
|
||||
#ifdef WITH_WSREP_SR_SPEEDUP
|
||||
streaming_applier->rollback(
|
||||
wsrep::ws_handle(), wsrep::ws_meta(), true);
|
||||
#else
|
||||
streaming_applier->rollback(
|
||||
wsrep::ws_handle(), wsrep::ws_meta());
|
||||
#endif /* WITH_WSREP_SR_SPEEDUP */
|
||||
streaming_applier->after_apply();
|
||||
}
|
||||
streaming_appliers_.erase(i++);
|
||||
server_service_.release_high_priority_service(streaming_applier);
|
||||
|
Reference in New Issue
Block a user