diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-13 18:57:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-13 18:57:00 +0300 |
commit | 624dd71b9419555eca8baadc695e3376de72286f (patch) | |
tree | 31aaab8aeac43f921638407ab82190dd05a72793 /sql/wsrep_var.cc | |
parent | d4d865fcc8083782b6e4419c69bec372cd0b4142 (diff) | |
parent | e9c1701e11e2441435223cc7c00c467f58aaff19 (diff) | |
download | mariadb-git-624dd71b9419555eca8baadc695e3376de72286f.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r-- | sql/wsrep_var.cc | 18 |
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) |