diff options
author | antirez <antirez@gmail.com> | 2015-01-08 09:08:55 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-08 09:08:55 +0100 |
commit | bfbfd0dda75eddc1242720eb1e8a6bdad57f7fe7 (patch) | |
tree | a367f3076d0d3db4c6af546bc01100c5ba3faaa0 | |
parent | dee2318469e0de308a0a3b0e475bbeab47c40fcb (diff) | |
download | redis-rdbchanges.tar.gz |
A few more AUX info fields added to RDB.rdbchanges
-rw-r--r-- | src/rdb.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -705,8 +705,13 @@ int rdbSaveAuxFieldStrInt(rio *rdb, char *key, long long val) { /* Save a few default AUX fields with information about the RDB generated. */ int rdbSaveInfoAuxFields(rio *rdb) { + int redis_bits = (sizeof(void*) == 8) ? 64 : 32; + + /* Add a few fiels about the state when the RDB was created. */ if (rdbSaveAuxFieldStrStr(rdb,"redis-ver",REDIS_VERSION) == -1) return -1; + if (rdbSaveAuxFieldStrInt(rdb,"redis-bits",redis_bits) == -1) return -1; if (rdbSaveAuxFieldStrInt(rdb,"ctime",time(NULL)) == -1) return -1; + if (rdbSaveAuxFieldStrInt(rdb,"used-mem",zmalloc_used_memory()) == -1) return -1; return 1; } |