summaryrefslogtreecommitdiff
path: root/crawler.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-06-27 12:17:59 -0700
committerdormando <dormando@rydia.net>2019-09-17 02:37:15 -0700
commitb5ea90160579ba060b8e1d269595b3ec5d77d740 (patch)
tree96d5dc43912f32b4d48d6a19cf161052e9aaa137 /crawler.h
parent554b56687a19300a75ec24184746b5512580c819 (diff)
downloadmemcached-b5ea90160579ba060b8e1d269595b3ec5d77d740.tar.gz
restartable cache
"-e /path/to/tmpfsmnt/file" SIGUSR1 for graceful stop restart requires the same memory limit, slab sizes, and some other infrequently changed details. Most other options and features can change between restarts. Binary can be upgraded between restarts. Restart does some fixup work on start for every item in cache. Can take over a minute with more than a few hundred million items in cache. Keep in mind when a cache is down it may be missing invalidations, updates, and so on.
Diffstat (limited to 'crawler.h')
-rw-r--r--crawler.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawler.h b/crawler.h
index f7ebba2..e96c449 100644
--- a/crawler.h
+++ b/crawler.h
@@ -28,7 +28,9 @@ enum crawler_result_type {
CRAWLER_OK=0, CRAWLER_RUNNING, CRAWLER_BADCLASS, CRAWLER_NOTSTARTED, CRAWLER_ERROR
};
int start_item_crawler_thread(void);
-int stop_item_crawler_thread(void);
+#define CRAWLER_WAIT true
+#define CRAWLER_NOWAIT false
+int stop_item_crawler_thread(bool wait);
int init_lru_crawler(void *arg);
enum crawler_result_type lru_crawler_crawl(char *slabs, enum crawler_run_type,
void *c, const int sfd, unsigned int remaining);