diff options
author | dormando <dormando@rydia.net> | 2013-12-08 18:14:15 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2013-12-08 18:14:15 -0800 |
commit | 5ce6a38bc162de8dbbdfb5d453998d0544fe0d6c (patch) | |
tree | 9ae424b2ebf62e5f8849020ca0fdceefe7af7651 | |
parent | 058af0d85b2fb95319f9512fa4a99c2e8a412899 (diff) | |
download | memcached-5ce6a38bc162de8dbbdfb5d453998d0544fe0d6c.tar.gz |
Some tail_repair_time adjustments
fix t/binary.t test.
Default of 3 hours is super overkill. 1 hour is still way too much but within
realm of reason.
Bail if someone sets it really low (10s or negative)
-rw-r--r-- | memcached.c | 4 | ||||
-rw-r--r-- | memcached.h | 2 | ||||
-rwxr-xr-x | t/binary.t | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/memcached.c b/memcached.c index cc89a12..06c2efc 100644 --- a/memcached.c +++ b/memcached.c @@ -5046,6 +5046,10 @@ int main (int argc, char **argv) { return 1; } settings.tail_repair_time = atoi(subopts_value); + if (settings.tail_repair_time < 10) { + fprintf(stderr, "Cannot set tail_repair_time to less than 10 seconds\n"); + return 1; + } break; default: printf("Illegal suboption \"%s\"\n", subopts_value); diff --git a/memcached.h b/memcached.h index 9308db9..2bb9100 100644 --- a/memcached.h +++ b/memcached.h @@ -76,7 +76,7 @@ /** How long an object can reasonably be assumed to be locked before harvesting it on a low memory condition. */ -#define TAIL_REPAIR_TIME_DEFAULT (3 * 3600) +#define TAIL_REPAIR_TIME_DEFAULT (1 * 3600) /* warning: don't use these macros with a function, as it evals its arg twice */ #define ITEM_get_cas(i) (((i)->it_flags & ITEM_CAS) ? \ @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 3549; +use Test::More tests => 3552; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; |