From fc4d9e6d1fbacdc9064a53392c719ebaea4e41bc Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 3 Jan 2020 16:50:13 -0500 Subject: [PATCH 1/5] subkey expire testes Former-commit-id: 0cf3af6857c192bd03656c28b5a0a2bb11416b8c --- tests/unit/expire.tcl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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] + } } From 48c3ecc739538ba5be091050df338cf1532f6fa6 Mon Sep 17 00:00:00 2001 From: John Sully Date: Mon, 6 Jan 2020 14:24:37 -0500 Subject: [PATCH 2/5] pro launch should respect KEYDB_PRO_DIRECTORY Former-commit-id: d5f8df59977194ee0cfce798364eb5620435e6f3 --- src/server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } From ce7dd778308284ed5748e3bd87dcf2371648ad1e Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 10 Jan 2020 14:19:44 -0500 Subject: [PATCH 3/5] Update graphs Former-commit-id: 7475ea1b0b7d8b2f7a8dfb6c6b754126d5160e5b --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d8c59ff0..e4841e23d 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? --------------- From 8a52788844e855f3eb5cf99ad731b45301737bb0 Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 10 Jan 2020 14:21:11 -0500 Subject: [PATCH 4/5] Update README.md Former-commit-id: 0ba0a6ab0a2c552e17a4344f9935b40f26c694e1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4841e23d..70b879d52 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ 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/ From 831528e8e45a12223e0e0a779b7c718baa643f4c Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 10 Jan 2020 17:46:02 -0500 Subject: [PATCH 5/5] Ignore other flags after pro is enabled since we won't understand them Former-commit-id: 049b48ef79fdde4c9b1c9f227a329bd9223e2b1d --- src/config.cpp | 1 + 1 file changed, 1 insertion(+) 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; }