summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-09-08 09:23:55 +0200
committerantirez <antirez@gmail.com>2014-09-08 10:56:52 +0200
commit31f79a46ffbf04d372cfc0ebfcc5578daf39c532 (patch)
treee661a4f97457db73b71cad209251cb1fc683ee99 /redis.conf
parentde663966c64e9f27e667ad6a0dacf66aaa8ad32e (diff)
downloadredis-31f79a46ffbf04d372cfc0ebfcc5578daf39c532.tar.gz
Make aof-load-truncated option actually configurable.
Diffstat (limited to 'redis.conf')
-rw-r--r--redis.conf24
1 files changed, 24 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf
index ae774d6fe..0aa2dc9fd 100644
--- a/redis.conf
+++ b/redis.conf
@@ -532,6 +532,30 @@ no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
+# 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
+# crashes, especially when an ext4 filesystem is mounted without the
+# data=ordered option (however this can't happen when Redis itself
+# crashes or aborts but the operating system still works correctly).
+#
+# Redis can either exit with an error when this happens, or load as much
+# data as possible (the default now) and start if the AOF file is found
+# to be truncated at the end. The following option controls this behavior.
+#
+# If aof-load-truncated is set to yes, a truncated AOF file is loaded and
+# the Redis server starts emitting a log to inform the user of the event.
+# Otherwise if the option is set to no, the server aborts with an error
+# and refuses to start. When the option is set to no, the user requires
+# to fix the AOF file using the "redis-check-aof" utility before to restart
+# the server.
+#
+# Note that if the AOF file will be found to be corrupted in the middle
+# the server will still exit with an error. This option only applies when
+# Redis will try to read more data from the AOF file but not enough bytes
+# will be found.
+aof-load-truncated yes
+
################################ LUA SCRIPTING ###############################
# Max execution time of a Lua script in milliseconds.