summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-10-16 16:08:37 -0700
committerdormando <dormando@rydia.net>2017-11-28 14:18:05 -0800
commit76d0a13a1e49caf5bbaea4e6165a3568090b5366 (patch)
treedac031d46c0792994c856e893d86b3bc500a293e /thread.c
parent2c4528697f404cdbfc9bfe319d7e2ed22c291a31 (diff)
downloadmemcached-76d0a13a1e49caf5bbaea4e6165a3568090b5366.tar.gz
extstore: pause compaction thread with hash expand
could potentially cause weirdness when the hash table is swapped.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index e9f40a6..df05d5f 100644
--- a/thread.c
+++ b/thread.c
@@ -3,6 +3,9 @@
* Thread management for memcached.
*/
#include "memcached.h"
+#ifdef EXTSTORE
+#include "storage.h"
+#endif
#include <assert.h>
#include <stdio.h>
#include <errno.h>
@@ -139,6 +142,9 @@ void pause_threads(enum pause_thread_types type) {
lru_maintainer_pause();
slabs_rebalancer_pause();
lru_crawler_pause();
+#ifdef EXTSTORE
+ storage_compact_pause();
+#endif
case PAUSE_WORKER_THREADS:
buf[0] = 'p';
pthread_mutex_lock(&worker_hang_lock);
@@ -147,6 +153,9 @@ void pause_threads(enum pause_thread_types type) {
lru_maintainer_resume();
slabs_rebalancer_resume();
lru_crawler_resume();
+#ifdef EXTSTORE
+ storage_compact_resume();
+#endif
case RESUME_WORKER_THREADS:
pthread_mutex_unlock(&worker_hang_lock);
break;