diff --git a/TODO b/TODO index cdd50f7a00cb5e95248a2f40e290d1d3043538ac..9addd6e62bc1c33a6333bdd8a296f496ab0a2e1e 100644 --- a/TODO +++ b/TODO @@ -29,6 +29,7 @@ AFTER 1.0 stable release side the type also takes an hash table with key->score mapping, so that when there is an update we lookup the current score and can traverse the tree. * BITMAP type + * LRANGE 4 0 should return the same elements as LRANGE 0 4 but in reverse order FUTURE HINTS diff --git a/redis.c b/redis.c index 2761541c95236c388cff19e8a0181a4769e078e3..b925b551b826d0ae3c8334d08fb0f79ad09bef2c 100644 --- a/redis.c +++ b/redis.c @@ -1046,6 +1046,11 @@ static void loadServerConfig(char *filename) { if ((server.shareobjects = yesnotoi(argv[1])) == -1) { err = "argument must be 'yes' or 'no'"; goto loaderr; } + } else if (!strcasecmp(argv[0],"shareobjectspoolsize") && argc == 2) { + server.sharingpoolsize = atoi(argv[1]); + if (server.sharingpoolsize < 1) { + err = "invalid object sharing pool size"; goto loaderr; + } } else if (!strcasecmp(argv[0],"daemonize") && argc == 2) { if ((server.daemonize = yesnotoi(argv[1])) == -1) { err = "argument must be 'yes' or 'no'"; goto loaderr; diff --git a/redis.conf b/redis.conf index 8a962f4a96cfa50f41284df34b7c07b6d78497a7..fc1e9dd9082f52100c742dc2e07246303483528d 100644 --- a/redis.conf +++ b/redis.conf @@ -118,4 +118,15 @@ glueoutputbuf yes # string in your dataset, but performs lookups against the shared objects # pool so it uses more CPU and can be a bit slower. Usually it's a good # idea. +# +# When object sharing is enabled (shareobjects yes) you can use +# shareobjectspoolsize to control the size of the pool used in order to try +# object sharing. A bigger pool size will lead to better sharing capabilities. +# In general you want this value to be at least the double of the number of +# very common strings you have in your dataset. +# +# WARNING: object sharing is experimental, don't enable this feature +# in production before of Redis 1.0-stable. Still please try this feature in +# your development environment so that we can test it better. shareobjects no +shareobjectspoolsize 1024