Commit 8aa84821 authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-8057: Galera conflicts with InnoDB buffer pool dump

Avoid creating innodb buffer pool dump/load thread if mysqld is started
with wsrep recovery mode (--wsrep-recover).

(Merged fix for lp:1305955 from lp:percona-xtradb-cluster)
parent 44b44dd1
......@@ -168,6 +168,10 @@ UNIV_INTERN mysql_pfs_key_t srv_master_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key;
#endif /* UNIV_PFS_THREAD */
#ifdef WITH_WSREP
extern my_bool wsrep_recovery;
#endif /* WITH_WSREP */
/*********************************************************************//**
Convert a numeric string that optionally ends in G or M or K, to a number
containing megabytes.
......@@ -2879,10 +2883,21 @@ files_checked:
}
if (!srv_read_only_mode) {
#ifdef WITH_WSREP
/* Create the dump/load thread only when not running with
--wsrep-recover */
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
/* Create the buffer pool dump/load thread */
buf_dump_thread_handle = os_thread_create(buf_dump_thread, NULL, NULL);
buf_dump_thread_started = true;
#ifdef WITH_WSREP
} else {
ib_logf(IB_LOG_LEVEL_WARN,
"Skipping buffer pool dump/restore during wsrep "
"recovery.");
}
#endif /* WITH_WSREP */
/* Create the dict stats gathering thread */
dict_stats_thread_handle = os_thread_create(dict_stats_thread, NULL, NULL);
dict_stats_thread_started = true;
......
......@@ -186,6 +186,10 @@ UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_log_tracking_thread_key;
#endif /* UNIV_PFS_THREAD */
#ifdef WITH_WSREP
extern my_bool wsrep_recovery;
#endif /* WITH_WSREP */
/*********************************************************************//**
Convert a numeric string that optionally ends in G or M or K, to a number
containing megabytes.
......@@ -2980,10 +2984,21 @@ files_checked:
}
if (!srv_read_only_mode) {
#ifdef WITH_WSREP
/* Create the dump/load thread only when not running with
--wsrep-recover */
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
/* Create the buffer pool dump/load thread */
buf_dump_thread_handle = os_thread_create(buf_dump_thread, NULL, NULL);
buf_dump_thread_started = true;
#ifdef WITH_WSREP
} else {
ib_logf(IB_LOG_LEVEL_WARN,
"Skipping buffer pool dump/restore during wsrep "
"recovery.");
}
#endif /* WITH_WSREP */
/* Create the dict stats gathering thread */
dict_stats_thread_handle = os_thread_create(dict_stats_thread, NULL, NULL);
dict_stats_thread_started = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment