diff options
author | dormando <dormando@rydia.net> | 2017-10-16 16:08:37 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-11-28 14:18:05 -0800 |
commit | 76d0a13a1e49caf5bbaea4e6165a3568090b5366 (patch) | |
tree | dac031d46c0792994c856e893d86b3bc500a293e /thread.c | |
parent | 2c4528697f404cdbfc9bfe319d7e2ed22c291a31 (diff) | |
download | memcached-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.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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; |