summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--memcached.c4
-rw-r--r--memcached.h2
-rwxr-xr-xt/binary.t2
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) ? \
diff --git a/t/binary.t b/t/binary.t
index 3eb8e0b..bc9a24f 100755
--- a/t/binary.t
+++ b/t/binary.t
@@ -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;