summaryrefslogtreecommitdiff
path: root/sql/wsrep_var.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-07-25 18:42:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-07-25 18:42:06 +0300
commite9c1701e11e2441435223cc7c00c467f58aaff19 (patch)
tree6be7d0e8fe87272e1abb2704fdb9859481d8acc2 /sql/wsrep_var.cc
parent17794fb9aac9ca4fcb0b1e5904671a025a1b6b74 (diff)
parentf3eb82f048d342c11fc3869eca2e6faed9a4835d (diff)
downloadmariadb-git-e9c1701e11e2441435223cc7c00c467f58aaff19.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r--sql/wsrep_var.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index de558af6abb..315cfe2c53e 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -485,6 +485,8 @@ bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type)
if (wsrep_start_replication())
{
wsrep_create_rollbacker();
+ WSREP_DEBUG("Cluster address update creating %ld applier threads running %lu",
+ wsrep_slave_threads, wsrep_running_applier_threads);
wsrep_create_appliers(wsrep_slave_threads);
}
/* locking order to be enforced is:
@@ -585,9 +587,9 @@ void wsrep_node_address_init (const char* value)
static void wsrep_slave_count_change_update ()
{
- wsrep_slave_count_change= (wsrep_slave_threads - wsrep_running_threads + 2);
- WSREP_DEBUG("Change on slave threads: New %lu old %lu difference %d",
- wsrep_slave_threads, wsrep_running_threads, wsrep_slave_count_change);
+ wsrep_slave_count_change = (wsrep_slave_threads - wsrep_running_applier_threads);
+ WSREP_DEBUG("Change on slave threads: New %ld old %lu difference %d",
+ wsrep_slave_threads, wsrep_running_applier_threads, wsrep_slave_count_change);
}
bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
@@ -595,8 +597,10 @@ bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
wsrep_slave_count_change_update();
if (wsrep_slave_count_change > 0)
{
+ WSREP_DEBUG("Creating %d applier threads, total %ld", wsrep_slave_count_change, wsrep_slave_threads);
wsrep_create_appliers(wsrep_slave_count_change);
- wsrep_slave_count_change= 0;
+ WSREP_DEBUG("Running %lu applier threads", wsrep_running_applier_threads);
+ wsrep_slave_count_change = 0;
}
return false;
}
@@ -758,8 +762,10 @@ static SHOW_VAR wsrep_status_vars[]=
{"provider_name", (char*) &wsrep_provider_name, SHOW_CHAR_PTR},
{"provider_version", (char*) &wsrep_provider_version, SHOW_CHAR_PTR},
{"provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR},
- {"wsrep_provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
- {"thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH}
+ {"provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
+ {"thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH},
+ {"applier_thread_count", (char*)&wsrep_running_applier_threads, SHOW_LONG_NOFLUSH},
+ {"rollbacker_thread_count", (char *)&wsrep_running_rollbacker_threads, SHOW_LONG_NOFLUSH},
};
static int show_var_cmp(const void *var1, const void *var2)