From a549973f6b148256f093fdf3fdae0e35bd2d0670 Mon Sep 17 00:00:00 2001 From: Grant Ridder Date: Wed, 10 May 2017 00:34:15 -0700 Subject: [PATCH] Restrict aof-load-truncated to redis 3+ Closes https://github.com/brianbianco/redisio/issues/337 --- .travis.yml | 2 -- templates/default/redis.conf.erb | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89980776..7a3b4a1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,5 +53,3 @@ matrix: - env: CMD="kitchen verify" OPTIONS="redis-package-centos-6" # https://github.com/brianbianco/redisio/issues/336 - env: CMD="kitchen verify" OPTIONS="redis-package-debian-7" - # https://github.com/brianbianco/redisio/issues/337 - - env: CMD="kitchen verify" OPTIONS="redis-package-ubuntu-1404" diff --git a/templates/default/redis.conf.erb b/templates/default/redis.conf.erb index 5718dc4f..3be809a6 100644 --- a/templates/default/redis.conf.erb +++ b/templates/default/redis.conf.erb @@ -603,6 +603,7 @@ no-appendfsync-on-rewrite <%=@noappendfsynconrewrite%> auto-aof-rewrite-percentage <%=@aofrewritepercentage%> auto-aof-rewrite-min-size <%=@aofrewriteminsize%> +<% if @version[:major].to_i >= 3 %> # An AOF file may be found to be truncated at the end during the Redis # startup process, when the AOF data gets loaded back into memory. # This may happen when the system where Redis is running @@ -626,6 +627,7 @@ auto-aof-rewrite-min-size <%=@aofrewriteminsize%> # Redis will try to read more data from the AOF file but not enough bytes # will be found. aof-load-truncated <%= @aofloadtruncated %> +<% end %> ################################ LUA SCRIPTING ###############################