1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-25114: Crash: WSREP: invalid state ROLLED_BACK (FATAL)

Revert "MDEV-23328 Server hang due to Galera lock conflict resolution"

This reverts commit eac8341df4.
This commit is contained in:
Jan Lindström
2021-10-22 09:50:11 +03:00
parent e10838268e
commit aa7ca987db
11 changed files with 102 additions and 191 deletions

View File

@ -41,7 +41,6 @@ static void init_service_thd(THD* thd, char* thread_stack)
thd->prior_thr_create_utime= thd->start_utime= microsecond_interval_timer();
thd->set_command(COM_SLEEP);
thd->reset_for_next_command(true);
server_threads.insert(thd); // as wsrep_innobase_kill_one_trx() uses find_thread_by_id()
}
Wsrep_storage_service*
@ -81,7 +80,6 @@ void Wsrep_server_service::release_storage_service(
static_cast<Wsrep_storage_service*>(storage_service);
THD* thd= ss->m_thd;
wsrep_reset_threadvars(thd);
server_threads.erase(thd);
delete ss;
delete thd;
}
@ -95,8 +93,7 @@ wsrep_create_streaming_applier(THD *orig_thd, const char *ctx)
streaming transaction is BF aborted and streaming applier
is created from BF aborter context. */
Wsrep_threadvars saved_threadvars(wsrep_save_threadvars());
if (saved_threadvars.cur_thd)
wsrep_reset_threadvars(saved_threadvars.cur_thd);
wsrep_reset_threadvars(saved_threadvars.cur_thd);
THD *thd= 0;
Wsrep_applier_service *ret= 0;
if (!wsrep_create_threadvars() &&
@ -113,8 +110,7 @@ wsrep_create_streaming_applier(THD *orig_thd, const char *ctx)
}
/* Restore original thread local storage state before returning. */
wsrep_restore_threadvars(saved_threadvars);
if (saved_threadvars.cur_thd)
wsrep_store_threadvars(saved_threadvars.cur_thd);
wsrep_store_threadvars(saved_threadvars.cur_thd);
return ret;
}
@ -143,7 +139,6 @@ void Wsrep_server_service::release_high_priority_service(wsrep::high_priority_se
THD* thd= hps->m_thd;
delete hps;
wsrep_store_threadvars(thd);
server_threads.erase(thd);
delete thd;
wsrep_delete_threadvars();
}