From 6b33ffef8e86bc39176bc78c0f8dd6f29112fadb Mon Sep 17 00:00:00 2001 From: John Sully Date: Sun, 31 Jan 2021 21:24:49 +0000 Subject: [PATCH 01/10] Bump version Former-commit-id: d30fcfbe8a960aee61042f28ab3786adfa371671 --- src/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/version.h b/src/version.h index ead3c9b4b..014060606 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define KEYDB_REAL_VERSION "6.0.16" -#define KEYDB_VERSION_NUM 0x00060010 +#define KEYDB_REAL_VERSION "6.0.17" +#define KEYDB_VERSION_NUM 0x00060011 extern const char *KEYDB_SET_VERSION; // Unlike real version, this can be overriden by the config From 7554a9ed9c6c2c5160a6a2eb0746909e4fa98116 Mon Sep 17 00:00:00 2001 From: benschermel Date: Fri, 26 Mar 2021 22:55:12 +0000 Subject: [PATCH 02/10] update rpm script for centos8 Former-commit-id: f52815d30956d4283452598d33a7fa6466c5e9c5 --- pkg/rpm/generate_rpms.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/rpm/generate_rpms.sh b/pkg/rpm/generate_rpms.sh index ab5eefefb..abc1f9d91 100755 --- a/pkg/rpm/generate_rpms.sh +++ b/pkg/rpm/generate_rpms.sh @@ -6,6 +6,9 @@ version=$(grep KEYDB_REAL_VERSION $DIR/../../src/version.h | awk '{ printf $3 }' release=1 # by default this will always be 1 for keydb version structure. If build release version needs to be update you can modify here arch=$(uname -m) dist=el$(rpm -q --queryformat '%{VERSION}' centos-release | cut -d. -f1) +if [[ "$dist" == "elpackage centos-release is not installed" ]]; then + dist=el$(rpm -q --queryformat '%{VERSION}' centos-linux-release | cut -d. -f1) +fi if [[ "$arch" != "aarch64" ]] && [[ "$arch" != "x86_64" ]]; then echo "This script is only valid and tested for aarch64 and x86_64 architectures. You are trying to use: $arch" From d42ad8f837d6fd10960ab25820677ba2d506e90b Mon Sep 17 00:00:00 2001 From: benschermel Date: Fri, 26 Mar 2021 22:57:19 +0000 Subject: [PATCH 03/10] bump version Former-commit-id: 4272a7de24eca935bfe1e13d44bdc0ece58efb55 --- pkg/deb/master_changelog | 9 +++++++++ src/version.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/deb/master_changelog b/pkg/deb/master_changelog index fb561ef02..b6c7eeb9e 100644 --- a/pkg/deb/master_changelog +++ b/pkg/deb/master_changelog @@ -1,3 +1,12 @@ +keydb (6:6.0.18-1distribution_placeholder) codename_placeholder; urgency=medium + + * 6.0.18 - This release contains a number of improvements to stability and performance. + * Additional tests were added with improvements to existing test reliability + * Merged Redis 6.0.10 into KeyDB + * Issues resolved in this release: #214, #222, #238, #257, #273, #276, #285 + + -- Ben Schermel Fri, 26 Mar 2021 16:00:00 +0000 + keydb (6:6.0.16-1distribution_placeholder) codename_placeholder; urgency=medium * 6.0.16 - This release contains significant performance improvements as well as fixes to the following issues: #234, #236, #233, #207, #229, #231 diff --git a/src/version.h b/src/version.h index 014060606..e5279cce6 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define KEYDB_REAL_VERSION "6.0.17" +#define KEYDB_REAL_VERSION "6.0.18" #define KEYDB_VERSION_NUM 0x00060011 extern const char *KEYDB_SET_VERSION; // Unlike real version, this can be overriden by the config From 2245b1db0084e9c2f9b53c82aa540891b65f3a0d Mon Sep 17 00:00:00 2001 From: benschermel Date: Sat, 27 Mar 2021 18:30:52 +0000 Subject: [PATCH 04/10] bump version Former-commit-id: f660cd93574ba96d707c1cf7853e1e5074b0ec3f --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index e5279cce6..4c4af98b3 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #define KEYDB_REAL_VERSION "6.0.18" -#define KEYDB_VERSION_NUM 0x00060011 +#define KEYDB_VERSION_NUM 0x00060012 extern const char *KEYDB_SET_VERSION; // Unlike real version, this can be overriden by the config From bfbbb3030b1f40a19ddbb0f7ef7060c0832cfcfa Mon Sep 17 00:00:00 2001 From: John Sully Date: Tue, 30 Mar 2021 23:30:17 +0000 Subject: [PATCH 05/10] Fix issue #300 Former-commit-id: bf5b2d78d98b61dedb8fa09930b70651ba97028f --- src/networking.cpp | 5 +++++ src/server.h | 6 ++---- tests/unit/scripting.tcl | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/networking.cpp b/src/networking.cpp index dc4e56e92..4c62ae29d 100644 --- a/src/networking.cpp +++ b/src/networking.cpp @@ -2315,6 +2315,8 @@ void processInputBuffer(client *c, int callFlags) { /* Immediately abort if the client is in the middle of something. */ if (c->flags & CLIENT_BLOCKED) break; + if (c->flags & CLIENT_EXECUTING_COMMAND) break; + /* Don't process input from the master while there is a busy script * condition on the replica. We want just to accumulate the replication * stream (instead of replying -BUSY like we do with other clients) and @@ -2349,13 +2351,16 @@ void processInputBuffer(client *c, int callFlags) { if (c->argc == 0) { resetClient(c); } else { + c->flags |= CLIENT_EXECUTING_COMMAND; /* We are finally ready to execute the command. */ if (processCommandAndResetClient(c, callFlags) == C_ERR) { /* If the client is no longer valid, we avoid exiting this * loop and trimming the client buffer later. So we return * ASAP in that case. */ + c->flags &= ~CLIENT_EXECUTING_COMMAND; return; } + c->flags &= ~CLIENT_EXECUTING_COMMAND; } } diff --git a/src/server.h b/src/server.h index 0da8b84f3..36c7be448 100644 --- a/src/server.h +++ b/src/server.h @@ -441,10 +441,8 @@ extern int configOOMScoreAdjValuesDefaults[CONFIG_OOM_COUNT]; #define CLIENT_PENDING_READ (1<<29) /* The client has pending reads and was put in the list of clients we can read from. */ -#define CLIENT_PENDING_COMMAND (1<<30) /* Used in threaded I/O to signal after - we return single threaded that the - client has already pending commands - to be executed. */ +#define CLIENT_EXECUTING_COMMAND (1<<30) /* Used to handle reentrency cases in processCommandWhileBlocked + to ensure we don't process a client already executing */ #define CLIENT_TRACKING (1ULL<<31) /* Client enabled keys tracking in order to perform client side caching. */ #define CLIENT_TRACKING_BROKEN_REDIR (1ULL<<32) /* Target client is invalid. */ diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index b41956f9a..a4960d222 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -430,6 +430,21 @@ start_server {tags {"scripting"}} { set res } {102} + test {EVAL with pipelined command (No crash)} { + r flushall + r config set lua-time-limit 1 + set rd [redis_deferring_client] + $rd eval {for i=1,1000000 do redis.call('set', i, 'sdfdsfd') end} 0 + $rd set testkey foo + $rd get testkey + after 1200 + catch {r echo "foo"} err + assert_match {BUSY*} $err + $rd read + $rd close + } + + test {EVAL timeout from AOF} { # generate a long running script that is propagated to the AOF as script # make sure that the script times out during loading From 9b9dfb94c65b6b3cae425465d37dae6aff0f3eee Mon Sep 17 00:00:00 2001 From: malavan Date: Wed, 11 Aug 2021 23:23:39 +0000 Subject: [PATCH 06/10] bump version Former-commit-id: aae676dc7d65df8f9e2f241a478be249e4ac422b --- src/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/version.h b/src/version.h index 4c4af98b3..6301628bc 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define KEYDB_REAL_VERSION "6.0.18" -#define KEYDB_VERSION_NUM 0x00060012 +#define KEYDB_REAL_VERSION "6.2.0" +#define KEYDB_VERSION_NUM 0x00060013 extern const char *KEYDB_SET_VERSION; // Unlike real version, this can be overriden by the config From 4a2442ce8756b4fe626046835286f8a90cd63883 Mon Sep 17 00:00:00 2001 From: benschermel Date: Fri, 13 Aug 2021 00:40:46 +0000 Subject: [PATCH 07/10] bump version Former-commit-id: 7260ebf5c164fb779931723fabb66e48e9593385 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 6301628bc..120dbe031 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #define KEYDB_REAL_VERSION "6.2.0" -#define KEYDB_VERSION_NUM 0x00060013 +#define KEYDB_VERSION_NUM 0x00060200 extern const char *KEYDB_SET_VERSION; // Unlike real version, this can be overriden by the config From 4ca625cd7cbf25cc9954b4e0cf69716d3afec1bb Mon Sep 17 00:00:00 2001 From: benschermel Date: Fri, 13 Aug 2021 00:49:41 +0000 Subject: [PATCH 08/10] update deb master changelog Former-commit-id: afd8ac5c386bb2265974407cf0a422015ad2fcd9 --- pkg/deb/master_changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/deb/master_changelog b/pkg/deb/master_changelog index b6c7eeb9e..9066034ca 100644 --- a/pkg/deb/master_changelog +++ b/pkg/deb/master_changelog @@ -1,3 +1,17 @@ +keydb (6:6.2.0-1distribution_placeholder) codename_placeholder; urgency=medium + + * Removed unused command line options(-a, -d, -P, -r, -q, --csv, -l, -I, -e, --precision, --cluster, --enable-tracking) + * --ms option changed to --time, added --clients, --host, --port, and --threads options + * Added keydb-diagnostic-tool + * Improved test reliability + * Fixed memory leak in keydb-benchmark + * Fixed a number of race conditions + * Fixed OSX build issues + * Feature parity with Redis 6.2.3 + * Fixed Issues: #323 #325 #276 + + -- Ben Schermel Thu, 12 Aug 2021 20:00:37 +0000 + keydb (6:6.0.18-1distribution_placeholder) codename_placeholder; urgency=medium * 6.0.18 - This release contains a number of improvements to stability and performance. From dd9c533d6ea794ffc69c45f94df1ae05fd2dfbc5 Mon Sep 17 00:00:00 2001 From: malavan Date: Fri, 13 Aug 2021 15:46:09 +0000 Subject: [PATCH 09/10] Remove duplicate code Former-commit-id: 2911145df7e007b7e6e5135745b732f3ac6a3e81 --- src/tls.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/tls.cpp b/src/tls.cpp index c1ad9158e..b2c96c497 100644 --- a/src/tls.cpp +++ b/src/tls.cpp @@ -140,47 +140,6 @@ static void initCryptoLocks(void) { } #endif /* USE_CRYPTO_LOCKS */ -/** - * OpenSSL global initialization and locking handling callbacks. - * Note that this is only required for OpenSSL < 1.1.0. - */ - -#if OPENSSL_VERSION_NUMBER < 0x10100000L -#define USE_CRYPTO_LOCKS -#endif - -#ifdef USE_CRYPTO_LOCKS - -static pthread_mutex_t *openssl_locks; - -static void sslLockingCallback(int mode, int lock_id, const char *f, int line) { - pthread_mutex_t *mt = openssl_locks + lock_id; - - if (mode & CRYPTO_LOCK) { - pthread_mutex_lock(mt); - } else { - pthread_mutex_unlock(mt); - } - - (void)f; - (void)line; -} - -static void initCryptoLocks(void) { - unsigned i, nlocks; - if (CRYPTO_get_locking_callback() != NULL) { - /* Someone already set the callback before us. Don't destroy it! */ - return; - } - nlocks = CRYPTO_num_locks(); - openssl_locks = zmalloc(sizeof(*openssl_locks) * nlocks); - for (i = 0; i < nlocks; i++) { - pthread_mutex_init(openssl_locks + i, NULL); - } - CRYPTO_set_locking_callback(sslLockingCallback); -} -#endif /* USE_CRYPTO_LOCKS */ - void tlsInit(void) { /* Enable configuring OpenSSL using the standard openssl.cnf * OPENSSL_config()/OPENSSL_init_crypto() should be the first From fe6f07655f3b5522dcf070681f8af5e68ab62bb0 Mon Sep 17 00:00:00 2001 From: malavan Date: Fri, 13 Aug 2021 20:02:06 +0000 Subject: [PATCH 10/10] don't use flags that aren't supported by certain versions of OPENSSL Former-commit-id: 0bfd2ea8a66c20a006311e468b57f33ad21855f6 --- src/tls.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tls.cpp b/src/tls.cpp index b2c96c497..0315962e5 100644 --- a/src/tls.cpp +++ b/src/tls.cpp @@ -149,6 +149,8 @@ void tlsInit(void) { */ #if OPENSSL_VERSION_NUMBER < 0x10100000L OPENSSL_config(NULL); + #elif OPENSSL_VERSION_NUMBER < 0x10101000L + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL); #else OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG|OPENSSL_INIT_ATFORK, NULL); #endif