summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-10-18 00:42:58 -0700
committerdormando <dormando@rydia.net>2017-11-28 14:18:05 -0800
commitcd2ce96754ef10926057dd76a203325c35384074 (patch)
treee2ff6c331a61887a43693a464b33601c56418e22 /items.c
parent603c1bb32304b107b468dae00ef083de1189762f (diff)
downloadmemcached-cd2ce96754ef10926057dd76a203325c35384074.tar.gz
extstore: configure and start time gating
./configure --enable-extstore to compile the feature in specify -o ext_path=/whatever to start.
Diffstat (limited to 'items.c')
-rw-r--r--items.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/items.c b/items.c
index f02ccb9..889c328 100644
--- a/items.c
+++ b/items.c
@@ -1553,13 +1553,15 @@ static void *lru_maintainer_thread(void *arg) {
int did_moves = lru_maintainer_juggle(i);
#ifdef EXTSTORE
// Deeper loop to speed up pushing to storage.
- for (x = 0; x < 500; x++) {
- int found;
- found = lru_maintainer_store(storage, i);
- if (found) {
- did_moves += found;
- } else {
- break;
+ if (storage) {
+ for (x = 0; x < 500; x++) {
+ int found;
+ found = lru_maintainer_store(storage, i);
+ if (found) {
+ did_moves += found;
+ } else {
+ break;
+ }
}
}
#endif