summaryrefslogtreecommitdiff
path: root/storage/xtradb/include/srv0srv.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-03 18:17:36 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-04 17:33:01 +0200
commit9f0dbb3120fdc0474d606dc9c48e5f5f7a2c8484 (patch)
tree2db6285db714a8818e9d4378d7dec8a2d81986ac /storage/xtradb/include/srv0srv.h
parente174d923d94bd183bef8ab6a1da3777ae738c945 (diff)
downloadmariadb-git-9f0dbb3120fdc0474d606dc9c48e5f5f7a2c8484.tar.gz
MDEV-11947 InnoDB purge workers fail to shut down
srv_release_threads(): Actually wait for the threads to resume from suspension. On CentOS 5 and possibly other platforms, os_event_set() may be lost. srv_resume_thread(): A counterpart of srv_suspend_thread(). Optionally wait for the event to be set, optionally with a timeout, and then release the thread from suspension. srv_free_slot(): Unconditionally suspend the thread. It is always in resumed state when this function is entered. srv_active_wake_master_thread_low(): Only call os_event_set(). srv_purge_coordinator_suspend(): Use srv_resume_thread() instead of the complicated logic.
Diffstat (limited to 'storage/xtradb/include/srv0srv.h')
-rw-r--r--storage/xtradb/include/srv0srv.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h
index 45c9cb80566..8f5ea21712c 100644
--- a/storage/xtradb/include/srv0srv.h
+++ b/storage/xtradb/include/srv0srv.h
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2013, 2017, MariaDB Corporation Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -968,17 +968,12 @@ ulint
srv_get_task_queue_length(void);
/*===========================*/
-/*********************************************************************//**
-Releases threads of the type given from suspension in the thread table.
-NOTE! The server mutex has to be reserved by the caller!
-@return number of threads released: this may be less than n if not
-enough threads were suspended at the moment */
-UNIV_INTERN
-ulint
-srv_release_threads(
-/*================*/
- enum srv_thread_type type, /*!< in: thread type */
- ulint n); /*!< in: number of threads to release */
+/** Ensure that a given number of threads of the type given are running
+(or are already terminated).
+@param[in] type thread type
+@param[in] n number of threads that have to run */
+void
+srv_release_threads(enum srv_thread_type type, ulint n);
/**********************************************************************//**
Check whether any background thread are active. If so print which thread
@@ -989,12 +984,10 @@ const char*
srv_any_background_threads_are_active(void);
/*=======================================*/
-/**********************************************************************//**
-Wakeup the purge threads. */
+/** Wake up the purge threads. */
UNIV_INTERN
void
-srv_purge_wakeup(void);
-/*==================*/
+srv_purge_wakeup();
/** Status variables to be passed to MySQL */
struct export_var_t{