From e277a2f8f030a755c4708c24abff598537a9dddd Mon Sep 17 00:00:00 2001 From: malavan Date: Fri, 13 Aug 2021 20:02:06 +0000 Subject: [PATCH 01/11] don't use flags that aren't supported by certain versions of OPENSSL Former-commit-id: 1ae9af250513d1430160b37d24ba617551402926 --- src/tls.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tls.cpp b/src/tls.cpp index c1ad9158e..ebf3c4726 100644 --- a/src/tls.cpp +++ b/src/tls.cpp @@ -190,6 +190,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 From ce23ead7a87c57477f07da8b307e63a4947cd496 Mon Sep 17 00:00:00 2001 From: malavan Date: Fri, 13 Aug 2021 15:46:09 +0000 Subject: [PATCH 02/11] Remove duplicate code Former-commit-id: 046df30861b73f796a7819d8a9ffe6bd68b7e910 --- src/tls.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/tls.cpp b/src/tls.cpp index ebf3c4726..0315962e5 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 09d8acd9fb72dd6b6c5c8f1e4578d489297d343e Mon Sep 17 00:00:00 2001 From: malavan Date: Wed, 18 Aug 2021 20:13:53 +0000 Subject: [PATCH 03/11] patch rocksdb to fix archlinux build Former-commit-id: b3c6e4f6353935545dca73cbc103fac9f3da7c42 --- deps/rocksdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rocksdb b/deps/rocksdb index e3169e3ea..7dd041ce8 160000 --- a/deps/rocksdb +++ b/deps/rocksdb @@ -1 +1 @@ -Subproject commit e3169e3ea8762d2f34880742106858a23c8dc8b7 +Subproject commit 7dd041ce89138b1506018beb07cd6dd7050a9ed7 From d7bcea1fe2f4d72b2e525c2df260158444ad6e09 Mon Sep 17 00:00:00 2001 From: malavan Date: Wed, 18 Aug 2021 21:46:16 +0000 Subject: [PATCH 04/11] use our own clone of rocksdb Former-commit-id: 0aeceb2a8c487eea43d47497647d4e38a3478ca7 --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 21accf31b..10f6aca73 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "deps/rocksdb"] path = deps/rocksdb - url = https://github.com/facebook/rocksdb.git + url = https://gitlab.eqalpha.com/keydb-dev/rocksdb.git [submodule "deps/depot_tools"] path = deps/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git From 915841110176482cc6cb6710e841a0334dbf0545 Mon Sep 17 00:00:00 2001 From: malavan Date: Wed, 18 Aug 2021 21:53:55 +0000 Subject: [PATCH 05/11] use our own clone of rocksdb Former-commit-id: 1de8a88679faa94d14875655305e6102289556a0 --- deps/rocksdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rocksdb b/deps/rocksdb index 7dd041ce8..887e6bf34 160000 --- a/deps/rocksdb +++ b/deps/rocksdb @@ -1 +1 @@ -Subproject commit 7dd041ce89138b1506018beb07cd6dd7050a9ed7 +Subproject commit 887e6bf34527403164a9c4eb1d62dfb668291734 From dd0de078bc231f4076990eaaabc71d55876a4e69 Mon Sep 17 00:00:00 2001 From: Malavan Sotheeswaran Date: Wed, 18 Aug 2021 22:47:38 +0000 Subject: [PATCH 06/11] Revert "Merge branch 'patch_rocks_db' into 'keydbpro'" This reverts merge request !35 Former-commit-id: 8ee1c251de5687fdcf8af740766d2968163bc8e9 --- .gitmodules | 2 +- deps/rocksdb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 10f6aca73..21accf31b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "deps/rocksdb"] path = deps/rocksdb - url = https://gitlab.eqalpha.com/keydb-dev/rocksdb.git + url = https://github.com/facebook/rocksdb.git [submodule "deps/depot_tools"] path = deps/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git diff --git a/deps/rocksdb b/deps/rocksdb index 887e6bf34..e3169e3ea 160000 --- a/deps/rocksdb +++ b/deps/rocksdb @@ -1 +1 @@ -Subproject commit 887e6bf34527403164a9c4eb1d62dfb668291734 +Subproject commit e3169e3ea8762d2f34880742106858a23c8dc8b7 From 1ad621db0f05d8bcae4a737c9c71f9161a23cf04 Mon Sep 17 00:00:00 2001 From: malavan Date: Thu, 19 Aug 2021 17:22:09 +0000 Subject: [PATCH 07/11] public copy of rocksdb Former-commit-id: 50bbadcab6d2911fb9cbe15aef03c9762aa91280 --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 10f6aca73..4c6d6c2fc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "deps/rocksdb"] path = deps/rocksdb - url = https://gitlab.eqalpha.com/keydb-dev/rocksdb.git + url = https://gitlab.eqalpha.com/submodules/rocksdb.git [submodule "deps/depot_tools"] path = deps/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git From 76ce7ae47a30374b9347282036709ee52b060079 Mon Sep 17 00:00:00 2001 From: malavan Date: Thu, 19 Aug 2021 17:42:52 +0000 Subject: [PATCH 08/11] add branch for git submodule Former-commit-id: b4471308f1cf99b0a5a4c8c8da8ccf9546123e3f --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index 4c6d6c2fc..26782f10f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "deps/rocksdb"] path = deps/rocksdb url = https://gitlab.eqalpha.com/submodules/rocksdb.git + branch = keydb_v6 [submodule "deps/depot_tools"] path = deps/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git From 9192272cd86423f7cb462dbf65b964c68f430dad Mon Sep 17 00:00:00 2001 From: malavan Date: Thu, 19 Aug 2021 17:45:37 +0000 Subject: [PATCH 09/11] use --init instead of git submodule init Former-commit-id: e5582ddf313a6bdd2ae0cb68da980954caf83e1b --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8742a73b2..db776c60f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ build: - docker stage: build script: - - git submodule init && git submodule update + - git submodule update --remote --init - make distclean - make -j artifacts: @@ -113,7 +113,7 @@ endurance-test: - docker stage: test script: - - git submodule init && git submodule update + - git submodule update --remote --init - make distclean - make -j - ./runtest --config server-threads 3 --loop --stop @@ -125,7 +125,7 @@ coverage-test: - docker stage: test script: - - git submodule init && git submodule update + - git submodule update --remote --init - make distclean - make gcov -j - make install From 4d7266804572bbd6f49fb9529d0e09b6321a0530 Mon Sep 17 00:00:00 2001 From: malavan Date: Thu, 19 Aug 2021 17:47:23 +0000 Subject: [PATCH 10/11] use --init instead of git submodule init Former-commit-id: 967866c56c9d4590d72c63169d0e3c32c21b24e0 --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db776c60f..4f704245e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ build: - docker stage: build script: - - git submodule update --remote --init + - git submodule update --init --remote - make distclean - make -j artifacts: @@ -113,7 +113,7 @@ endurance-test: - docker stage: test script: - - git submodule update --remote --init + - git submodule update --init --remote - make distclean - make -j - ./runtest --config server-threads 3 --loop --stop @@ -125,7 +125,7 @@ coverage-test: - docker stage: test script: - - git submodule update --remote --init + - git submodule update --init --remote - make distclean - make gcov -j - make install From 0abda4443a3720e149d01416bd7cb128e6c37395 Mon Sep 17 00:00:00 2001 From: malavan Date: Thu, 19 Aug 2021 18:24:01 +0000 Subject: [PATCH 11/11] switch to new patch of rocksdb that fixes archlinux build Former-commit-id: e2e5b5320e5c1b89ec2a3f946826097b819f6593 --- deps/rocksdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rocksdb b/deps/rocksdb index e3169e3ea..887e6bf34 160000 --- a/deps/rocksdb +++ b/deps/rocksdb @@ -1 +1 @@ -Subproject commit e3169e3ea8762d2f34880742106858a23c8dc8b7 +Subproject commit 887e6bf34527403164a9c4eb1d62dfb668291734