~axino/redis/+git/trunk:rdbchanges

Last commit made on 2015-01-08
Get this branch:
git clone -b rdbchanges https://git.launchpad.net/~axino/redis/+git/trunk

Branch merges

Branch information

Name:
rdbchanges
Repository:
lp:~axino/redis/+git/trunk

Recent commits

bfbfd0d... by antirez <email address hidden>

A few more AUX info fields added to RDB.

dee2318... by antirez <email address hidden>

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.

734480b... by antirez <email address hidden>

rdbLoad() refactoring to make it simpler to follow.

f50fa6d... by antirez <email address hidden>

New RDB v7 opcode: RESIZEDB.

The new opcode is an hint about the size of the dataset (keys and number
of expires) we are going to load for a given Redis database inside the
RDB file. Since hash tables are resized accordingly ASAP, useless
rehashing is avoided, speeding up load times significantly, in the order
of ~ 20% or more for larger data sets.

Related issue: #1719

f562990... by antirez <email address hidden>

sdsnative() removed: New rdb.c API can load native strings.

0760c1f... by antirez <email address hidden>

Use RDB_LOAD_PLAIN to load quicklists and encoded types.

Before we needed to create a string object with an embedded SDS, adn
basically duplicate the SDS part into a plain zmalloc() allocation.

88b4830... by antirez <email address hidden>

RDB refactored to load plain strings from RDB.

0b37730... by Matt Stancliff

Upgrade LZF to 3.6 (2011) from 3.5 (2009)

This is lzf_c and lzf_d from
http://dist.schmorp.de/liblzf/liblzf-3.6.tar.gz

8842de1... by Matt Stancliff

Set optional 'static' for Quicklist+Redis

This also defines REDIS_STATIC='' for building everything
inside src/ and everything inside deps/lua/.

32266be... by Matt Stancliff

Add more quicklist info to DEBUG OBJECT

Adds: ql_compressed (boolean, 1 if compression enabled for list, 0
otherwise)
Adds: ql_uncompressed_size (actual uncompressed size of all quicklistNodes)
Adds: ql_ziplist_max (quicklist max ziplist fill factor)

Compression ratio of the list is then ql_uncompressed_size / serializedlength

We report ql_uncompressed_size for all quicklists because serializedlength
is a _compressed_ representation anyway.

Sample output from a large list:
127.0.0.1:6379> llen abc
(integer) 38370061
127.0.0.1:6379> debug object abc
Value at:0x7ff97b51d140 refcount:1 encoding:quicklist serializedlength:19878335 lru:9718164 lru_seconds_idle:5 ql_nodes:21945 ql_avg_node:1748.46 ql_ziplist_max:-2 ql_compressed:0 ql_uncompressed_size:1643187761
(1.36s)

The 1.36s result time is because rdbSavedObjectLen() is serializing the
object, not because of any new stats reporting.

If we run DEBUG OBJECT on a compressed list, DEBUG OBJECT takes almost *zero*
time because rdbSavedObjectLen() reuses already-compressed ziplists:
127.0.0.1:6379> debug object abc
Value at:0x7fe5c5800040 refcount:1 encoding:quicklist serializedlength:19878335 lru:9718109 lru_seconds_idle:5 ql_nodes:21945 ql_avg_node:1748.46 ql_ziplist_max:-2 ql_compressed:1 ql_uncompressed_size:1643187761