From 9ec3294b97211fca206ade1c2d99ccfc762f5a73 Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Mon, 25 Oct 2021 18:08:34 +0800 Subject: Add timestamp annotations in AOF (#9326) Add timestamp annotation in AOF, one part of #9325. Enabled with the new `aof-timestamp-enabled` config option. Timestamp annotation format is "#TS:${timestamp}\r\n"." TS" is short of timestamp and this method could save extra bytes in AOF. We can use timestamp annotation for some special functions. - know the executing time of commands - restore data to a specific point-in-time (by using redis-check-rdb to truncate the file) --- redis.conf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'redis.conf') diff --git a/redis.conf b/redis.conf index 368cf3a73..bcb5fa022 100644 --- a/redis.conf +++ b/redis.conf @@ -1412,6 +1412,11 @@ aof-load-truncated yes # tail. aof-use-rdb-preamble yes +# Redis supports recording timestamp annotations in the AOF to support restoring +# the data from a specific point-in-time. However, using this capability changes +# the AOF format in a way that may not be compatible with existing AOF parsers. +aof-timestamp-enabled no + ################################ LUA SCRIPTING ############################### # Max execution time of a Lua script in milliseconds. -- cgit v1.2.1