diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2019-01-22 22:45:26 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2019-01-28 17:39:08 +0400 |
commit | 9824ec81aaade5173e59574e2b76bbead9ef9591 (patch) | |
tree | 1c44cf0586ba9388d9e34bb7ed0433a458123e3c /sql/wsrep_mysqld.cc | |
parent | 3503fbbebf90cb0fe63993a66dad9bf97fb74c0a (diff) | |
download | mariadb-git-9824ec81aaade5173e59574e2b76bbead9ef9591.tar.gz |
Removed redundant service_thread_count
In contrast to thread_count, which is decremented by THD destructor,
this one was most probably intended to be decremented after all THD
destructors are done.
THD_count class was added to achieve similar effect with thread_count.
Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
Part of MDEV-15135.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index b33687afdbc..e7458927a96 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -2311,13 +2311,15 @@ void wsrep_close_client_connections(my_bool wait_to_end, THD* except_caller_thd) */ server_threads.iterate(kill_remaining_threads, except_caller_thd); - DBUG_PRINT("quit",("Waiting for threads to die (count=%u)",thread_count)); - WSREP_DEBUG("waiting for client connections to close: %u", thread_count); + DBUG_PRINT("quit", ("Waiting for threads to die (count=%u)", + uint32_t(thread_count))); + WSREP_DEBUG("waiting for client connections to close: %u", + uint32_t(thread_count)); while (wait_to_end && server_threads.iterate(have_client_connections)) { mysql_cond_wait(&COND_thread_count, &LOCK_thread_count); - DBUG_PRINT("quit",("One thread died (count=%u)", thread_count)); + DBUG_PRINT("quit",("One thread died (count=%u)", uint32_t(thread_count))); } kill_cached_threads= kill_cached_threads_saved; @@ -2371,7 +2373,7 @@ void wsrep_wait_appliers_close(THD *thd) } else mysql_cond_wait(&COND_thread_count,&LOCK_thread_count); - DBUG_PRINT("quit",("One applier died (count=%u)",thread_count)); + DBUG_PRINT("quit",("One applier died (count=%u)", uint32_t(thread_count))); } mysql_mutex_unlock(&LOCK_thread_count); /* Now kill remaining wsrep threads: rollbacker */ @@ -2388,7 +2390,7 @@ void wsrep_wait_appliers_close(THD *thd) } else mysql_cond_wait(&COND_thread_count,&LOCK_thread_count); - DBUG_PRINT("quit",("One thread died (count=%u)",thread_count)); + DBUG_PRINT("quit",("One thread died (count=%u)", uint32_t(thread_count))); } mysql_mutex_unlock(&LOCK_thread_count); |