Skip to content

Commit 4c0e892

Browse files
committed
A few more AUX info fields added to RDB.
1 parent 206cd21 commit 4c0e892

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/rdb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,13 @@ int rdbSaveAuxFieldStrInt(rio *rdb, char *key, long long val) {
705705

706706
/* Save a few default AUX fields with information about the RDB generated. */
707707
int rdbSaveInfoAuxFields(rio *rdb) {
708+
int redis_bits = (sizeof(void*) == 8) ? 64 : 32;
709+
710+
/* Add a few fiels about the state when the RDB was created. */
708711
if (rdbSaveAuxFieldStrStr(rdb,"redis-ver",REDIS_VERSION) == -1) return -1;
712+
if (rdbSaveAuxFieldStrInt(rdb,"redis-bits",redis_bits) == -1) return -1;
709713
if (rdbSaveAuxFieldStrInt(rdb,"ctime",time(NULL)) == -1) return -1;
714+
if (rdbSaveAuxFieldStrInt(rdb,"used-mem",zmalloc_used_memory()) == -1) return -1;
710715
return 1;
711716
}
712717

0 commit comments

Comments
 (0)