diff --git a/README.md b/README.md index 8d8c59ff0..70b879d52 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ KeyDB maintains full compatibility with the Redis protocol, modules, and scripts On the same hardware KeyDB can perform twice as many queries per second as Redis, with 60% lower latency. Active-Replication simplifies hot-spare failover allowing you to easily distribute writes over replicas and use simple TCP based load balancing/failover. KeyDB's higher performance allows you to do more on less hardware which reduces operation costs and complexity. - + + +See the full benchmark results and setup information here: https://docs.keydb.dev/blog/2019/10/07/blog-post/ Why fork Redis? --------------- diff --git a/src/config.cpp b/src/config.cpp index f1e562f6b..c056b98dc 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -804,6 +804,7 @@ void loadServerConfigFromString(char *config) { // NOP, handled in main } else if (!strcasecmp(argv[0],"enable-pro")) { cserver.fUsePro = true; + break; } else { err = "Bad directive or wrong number of arguments"; goto loaderr; } diff --git a/src/server.cpp b/src/server.cpp index f1618419a..12dff6a85 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -5199,7 +5199,10 @@ int main(int argc, char **argv) { } if (cserver.fUsePro) { - execv("keydb-pro-server", argv); + const char *keydb_pro_dir = getenv("KEYDB_PRO_DIRECTORY"); + sds path = sdsnew(keydb_pro_dir); + path = sdscat(path, "keydb-pro-server"); + execv(path, argv); perror("Failed launch the pro binary"); exit(EXIT_FAILURE); } diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index de24eabed..477df0242 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -219,4 +219,37 @@ start_server {tags {"expire"}} { set ttl [r ttl foo] assert {$ttl <= 98 && $ttl > 90} } + + test { EXPIREMEMBER works (set) } { + r flushall + r sadd testkey foo bar baz + r expiremember testkey foo 1 + after 1500 + assert_equal {2} [r scard testkey] + } + + test { EXPIREMEMBER works (hash) } { + r flushall + r hset testkey foo bar + r expiremember testkey foo 1 + after 1500 + r exists testkey + } {0} + + test { EXPIREMEMBER works (zset) } { + r flushall + r zadd testkey 1 foo + r zadd testkey 2 bar + assert_equal {2} [r zcard testkey] + r expiremember testkey foo 1 + after 1500 + assert_equal {1} [r zcard testkey] + } + + test { TTL for subkey expires works } { + r flushall + r sadd testkey foo bar baz + r expiremember testkey foo 10000 + assert [expr [r ttl testkey foo] > 0] + } }