diff options
author | antirez <antirez@gmail.com> | 2015-01-08 08:56:35 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-08 09:52:55 +0100 |
commit | 206cd219b63c2255c0238cb9c602b65f05e98120 (patch) | |
tree | dc88e6cf08bf7a747c0584e99af2372d065d5262 /src/rdb.h | |
parent | 1a30e7ded14f4cb2ea39e05d1b1e1fd0b4d20ad6 (diff) | |
download | redis-206cd219b63c2255c0238cb9c602b65f05e98120.tar.gz |
RDB AUX fields support.
This commit introduces a new RDB data type called 'aux'. It is used in
order to insert inside an RDB file key-value pairs that may serve
different needs, without breaking backward compatibility when new
informations are embedded inside an RDB file. The contract between Redis
versions is to ignore unknown aux fields when encountered.
Aux fields can be used in order to:
1. Augment the RDB file with info like version of Redis that created the
RDB file, creation time, used memory while the RDB was created, and so
forth.
2. Add state about Redis inside the RDB file that we need to reload
later: replication offset, previos master run ID, in order to improve
failovers safety and allow partial resynchronization after a slave
restart.
3. Anything that we may want to add to RDB files without breaking the
ability of past versions of Redis to load the file.
Diffstat (limited to 'src/rdb.h')
-rw-r--r-- | src/rdb.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -89,6 +89,7 @@ #define rdbIsObjectType(t) ((t >= 0 && t <= 4) || (t >= 9 && t <= 14)) /* Special RDB opcodes (saved/loaded with rdbSaveType/rdbLoadType). */ +#define REDIS_RDB_OPCODE_AUX 250 #define REDIS_RDB_OPCODE_RESIZEDB 251 #define REDIS_RDB_OPCODE_EXPIRETIME_MS 252 #define REDIS_RDB_OPCODE_EXPIRETIME 253 |