diff --git a/.gitignore b/.gitignore index c29512367..f85cfbc81 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,9 @@ core !**/keydb-sentinel.service.d *.log dump.rdb -src/keydb-pro-server -**/bin/keydb-pro-server -**/app/keydb-pro-server +src/keydb-server +**/bin/keydb-server +**/app/keydb-server *.deb *.rpm src/keydb-cli diff --git a/README.md b/README.md index 5cd8c02b5..bcb3e850e 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,13 @@ KeyDB can be compiled and is tested for use on Linux. KeyDB currently relies on More on CentOS/Archlinux/Alpine/Debian/Ubuntu dependencies and builds can be found here: https://docs.keydb.dev/docs/build/ +Init and clone submodule dependencies: + + % git submodule init && git submodule update + Install dependencies: - % sudo apt install build-essential nasm autotools-dev autoconf libjemalloc-dev tcl tcl-dev uuid-dev libcurl4-openssl-dev + % sudo apt install build-essential nasm autotools-dev autoconf libjemalloc-dev tcl tcl-dev uuid-dev libcurl4-openssl-dev libbz2-dev libzstd-dev liblz4-dev libsnappy-dev Compiling is as simple as: @@ -185,19 +189,19 @@ Running KeyDB To run KeyDB with the default configuration, just type: % cd src - % ./keydb-pro-server + % ./keydb-server If you want to provide your keydb.conf, you have to run it using an additional parameter (the path of the configuration file): % cd src - % ./keydb-pro-server /path/to/keydb.conf + % ./keydb-server /path/to/keydb.conf It is possible to alter the KeyDB configuration by passing parameters directly as options using the command line. Examples: - % ./keydb-pro-server --port 9999 --replicaof 127.0.0.1 6379 - % ./keydb-pro-server /etc/keydb/6379.conf --loglevel debug + % ./keydb-server --port 9999 --replicaof 127.0.0.1 6379 + % ./keydb-server /etc/keydb/6379.conf --loglevel debug All the options in keydb.conf are also supported as options using the command line, with exactly the same name. @@ -213,7 +217,7 @@ how to use Redis with TLS. Playing with KeyDB ------------------ -You can use keydb-cli to play with KeyDB. Start a keydb-pro-server instance, +You can use keydb-cli to play with KeyDB. Start a keydb-server instance, then in another terminal try the following: % cd src @@ -278,7 +282,7 @@ Simply make a directory you would like to have the latest binaries dumped in, th ``` $ docker run -it --rm -v /path-to-dump-binaries:/keydb_bin eqalpha/keydb-build-bin ``` -You should receive the following files: keydb-benchmark, keydb-check-aof, keydb-check-rdb, keydb-cli, keydb-sentinel, keydb-pro-server +You should receive the following files: keydb-benchmark, keydb-check-aof, keydb-check-rdb, keydb-cli, keydb-sentinel, keydb-server If you are looking to enable flash support with the build (make MALLOC=memkind) then use the following command: ``` diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile index c231a9b93..841990d5c 100644 --- a/deps/hiredis/Makefile +++ b/deps/hiredis/Makefile @@ -29,9 +29,9 @@ INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH) INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH) INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH) -# keydb-pro-server configuration used for testing +# keydb-server configuration used for testing REDIS_PORT=56379 -REDIS_SERVER=keydb-pro-server +REDIS_SERVER=keydb-server define REDIS_TEST_CONFIG daemonize yes pidfile /tmp/hiredis-test-redis.pid diff --git a/keydb.conf b/keydb.conf index 48c321fdc..50f9784a1 100644 --- a/keydb.conf +++ b/keydb.conf @@ -3,7 +3,7 @@ # Note that in order to read the configuration file, KeyDB must be # started with the file path as first argument: # -# ./keydb-pro-server /path/to/keydb.conf +# ./keydb-server /path/to/keydb.conf # Note on units: when memory size is needed, it is possible to specify # it in the usual form of 1k 5GB 4M and so forth: @@ -1828,9 +1828,9 @@ server-threads 2 # bringing up replicas can result in data loss (the first master will win). # active-replica yes -# Enable Pro? KeyDB pro provides support for pro only features -# note: you may omit the license key to demo pro features for a limited time -# enable-pro [License Key] +# Enable Enterprise? KeyDB Enterprise provides support for Enterprise only features +# note: you may omit the license key to demo Enterprise features for a limited time +# enable-enterprise [License Key] -# Enable FLASH support? (Pro Only) +# Enable FLASH support? (Enterprise Only) # storage-provider flash /path/to/flash/db diff --git a/pkg/deb/conf/keydb.conf b/pkg/deb/conf/keydb.conf index 9cf1773c7..821591b32 100644 --- a/pkg/deb/conf/keydb.conf +++ b/pkg/deb/conf/keydb.conf @@ -1568,9 +1568,9 @@ server-threads 2 # bringing up replicas can result in data loss (the first master will win). # active-replica yes -# Enable Pro? KeyDB pro provides support for pro only features -# note: you may omit the license key to demo pro features for a limited time -# enable-pro [License Key] +# Enable Enterprise? KeyDB Enterprise provides support for Enterprise only features +# note: you may omit the license key to demo Enterprise features for a limited time +# enable-enterprise [License Key] -# Enable FLASH support? (Pro Only) +# Enable FLASH support? (Enterprise Only) # storage-provider flash /path/to/flash/db diff --git a/pkg/deb/deb-buildsource.sh b/pkg/deb/deb-buildsource.sh index d51c179fb..b1109642b 100755 --- a/pkg/deb/deb-buildsource.sh +++ b/pkg/deb/deb-buildsource.sh @@ -19,11 +19,11 @@ elif [ "$distributor" == "Ubuntu" ]; then fi codename=$(lsb_release --codename --short) date=$(date +%a," "%d" "%b" "%Y" "%T) -pkg_name=keydb-pro-$majorv:$version$distname +pkg_name=keydb-enterprise-$majorv:$version$distname # create build tree cd ../../../ -tar -czvf keydb-pro_$version.orig.tar.gz --force-local KeyDB-Pro +tar -czvf keydb-enterprise_$version.orig.tar.gz --force-local KeyDB-Pro cd KeyDB-Pro/pkg/deb/ mkdir -p $pkg_name/tmp if [[ "$codename" == "xenial" ]] || [[ "$codename" == "stretch" ]]; then @@ -32,9 +32,9 @@ else cp -r debian $pkg_name/tmp fi cp master_changelog $pkg_name/tmp/debian/changelog -mv ../../../keydb-pro_$version.orig.tar.gz ./$pkg_name +mv ../../../keydb-enterprise_$version.orig.tar.gz ./$pkg_name cd $pkg_name/tmp -changelog_str="keydb-pro ($majorv:$version-$build$distname) $codename; urgency=medium\n\n * $version $changelog_comments \n\n -- Ben Schermel $date +0000\n\n" +changelog_str="keydb-enterprise ($majorv:$version-$build$distname) $codename; urgency=medium\n\n * $version $changelog_comments \n\n -- Ben Schermel $date +0000\n\n" if [ $# -eq 0 ]; then sed -i "1s/^/$changelog_str\n/" debian/changelog elif [ $# -eq 1 ] && [ "$1" != "None" ]; then diff --git a/pkg/deb/debian/bin/generate-systemd-service-files b/pkg/deb/debian/bin/generate-systemd-service-files index 9ee38792e..4a3df9a12 100755 --- a/pkg/deb/debian/bin/generate-systemd-service-files +++ b/pkg/deb/debian/bin/generate-systemd-service-files @@ -25,28 +25,22 @@ do case "${BINARY}" in keydb-server) NAME="keydb" - BINARY_EXEC="keydb-server" - BINARY_NAME="keydb-pro-server" - TARGET_NAME="keydb-pro-server" ;; keydb-sentinel) NAME="sentinel" - BINARY_EXEC="keydb-sentinel" - BINARY_NAME="keydb-sentinel" - TARGET_NAME="keydb-pro-sentinel" ;; esac case "${MODE}" in default) EXTRA="Alias=${NAME}.service" - TARGET="debian/${TARGET_NAME}.${BINARY}.service" + TARGET="debian/${BINARY}.service" NAMESPACED="${NAME}" DESCRIPTION="Advanced key-value store" ;; templated) EXTRA="" - TARGET="debian/${TARGET_NAME}.${BINARY}@.service" + TARGET="debian/${BINARY}@.service" NAMESPACED="${NAME}-%i" DESCRIPTION="Advanced key-value store (%I)" ;; @@ -94,7 +88,7 @@ Documentation=https://docs.keydb.dev, man:${BINARY}(1) [Service] Type=forking -ExecStart=/usr/bin/${BINARY_NAME} /etc/keydb/${NAMESPACED}.conf +ExecStart=/usr/bin/${BINARY} /etc/keydb/${NAMESPACED}.conf ExecStop=/bin/kill -s TERM \$MAINPID PIDFile=/var/run/${NAMESPACED}/${BINARY}.pid TimeoutStopSec=0 diff --git a/pkg/deb/debian/control b/pkg/deb/debian/control index 5a46e1848..6354eaa85 100644 --- a/pkg/deb/debian/control +++ b/pkg/deb/debian/control @@ -1,4 +1,4 @@ -Source: keydb-pro +Source: keydb-enterprise Section: database Priority: optional Maintainer: Ben Schermel @@ -7,6 +7,7 @@ Build-Depends: dpkg-dev (>= 1.17.5), systemd, procps , + pkg-config , build-essential , tcl , tcl-dev , @@ -24,14 +25,14 @@ Build-Depends: libzstd-dev Standards-Version: 4.2.1 Homepage: https://docs.keydb.dev/ -Vcs-Git: https://github.com/JohnSully/KeyDB-Pro.git -Vcs-Browser: https://github.com/JohnSully/KeyDB-Pro +Vcs-Git: https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro.git +Vcs-Browser: https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro -Package: keydb-pro +Package: keydb-enterprise Architecture: all Depends: - keydb-pro-server (<< ${binary:Version}.1~), - keydb-pro-server (>= ${binary:Version}), + keydb-enterprise-server (<< ${binary:Version}.1~), + keydb-enterprise-server (>= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (metapackage) keydb is a key-value database in a similar vein to memcache but the dataset @@ -42,11 +43,11 @@ Description: Persistent key-value database with network interface (metapackage) . This package depends on the keydb-server package. -Package: keydb-pro-sentinel +Package: keydb-enterprise-sentinel Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-pro-tools (= ${binary:Version}), + keydb-enterprise-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (monitoring) keydb is a key-value database in a similar vein to memcache but the dataset @@ -55,11 +56,11 @@ Description: Persistent key-value database with network interface (monitoring) . This package contains the keydb Sentinel monitoring software. -Package: keydb-pro-server +Package: keydb-enterprise-server Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-pro-tools (= ${binary:Version}), + keydb-enterprise-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface keydb is a key-value database in a similar vein to memcache but the dataset @@ -68,7 +69,7 @@ Description: Persistent key-value database with network interface . The dataset is stored entirely in memory and periodically flushed to disk. -Package: keydb-pro-tools +Package: keydb-enterprise-tools Architecture: any Depends: adduser, diff --git a/pkg/deb/debian/copyright b/pkg/deb/debian/copyright index c7e2428e7..57591384f 100644 --- a/pkg/deb/debian/copyright +++ b/pkg/deb/debian/copyright @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: John Sully -Upstream-Name: keydb-pro -Source: https://github.com/JohnSully/KeyDB-Pro +Upstream-Name: keydb-enterprise +Source: https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro Files: * Copyright: © 2006-2014 Salvatore Sanfilippo diff --git a/pkg/deb/debian/keydb-pro-sentinel.1 b/pkg/deb/debian/keydb-enterprise-sentinel.1 similarity index 100% rename from pkg/deb/debian/keydb-pro-sentinel.1 rename to pkg/deb/debian/keydb-enterprise-sentinel.1 diff --git a/pkg/deb/debian/keydb-pro-sentinel.install b/pkg/deb/debian/keydb-enterprise-sentinel.install similarity index 100% rename from pkg/deb/debian/keydb-pro-sentinel.install rename to pkg/deb/debian/keydb-enterprise-sentinel.install diff --git a/pkg/deb/debian/keydb-pro-sentinel.logrotate b/pkg/deb/debian/keydb-enterprise-sentinel.logrotate similarity index 100% rename from pkg/deb/debian/keydb-pro-sentinel.logrotate rename to pkg/deb/debian/keydb-enterprise-sentinel.logrotate diff --git a/pkg/deb/debian/keydb-enterprise-sentinel.manpages b/pkg/deb/debian/keydb-enterprise-sentinel.manpages new file mode 100644 index 000000000..036eda5a6 --- /dev/null +++ b/pkg/deb/debian/keydb-enterprise-sentinel.manpages @@ -0,0 +1 @@ +debian/keydb-enterprise-sentinel.1 diff --git a/pkg/deb/debian/keydb-pro-sentinel.postinst b/pkg/deb/debian/keydb-enterprise-sentinel.postinst similarity index 100% rename from pkg/deb/debian/keydb-pro-sentinel.postinst rename to pkg/deb/debian/keydb-enterprise-sentinel.postinst diff --git a/pkg/deb/debian/keydb-pro-sentinel.postrm b/pkg/deb/debian/keydb-enterprise-sentinel.postrm similarity index 100% rename from pkg/deb/debian/keydb-pro-sentinel.postrm rename to pkg/deb/debian/keydb-enterprise-sentinel.postrm diff --git a/pkg/deb/debian/keydb-pro-server.1 b/pkg/deb/debian/keydb-enterprise-server.1 similarity index 100% rename from pkg/deb/debian/keydb-pro-server.1 rename to pkg/deb/debian/keydb-enterprise-server.1 diff --git a/pkg/deb/debian/keydb-pro-server.docs b/pkg/deb/debian/keydb-enterprise-server.docs similarity index 100% rename from pkg/deb/debian/keydb-pro-server.docs rename to pkg/deb/debian/keydb-enterprise-server.docs diff --git a/pkg/deb/debian/keydb-pro-server.install b/pkg/deb/debian/keydb-enterprise-server.install similarity index 100% rename from pkg/deb/debian/keydb-pro-server.install rename to pkg/deb/debian/keydb-enterprise-server.install diff --git a/pkg/deb/debian/keydb-pro-server.logrotate b/pkg/deb/debian/keydb-enterprise-server.logrotate similarity index 100% rename from pkg/deb/debian/keydb-pro-server.logrotate rename to pkg/deb/debian/keydb-enterprise-server.logrotate diff --git a/pkg/deb/debian/keydb-enterprise-server.manpages b/pkg/deb/debian/keydb-enterprise-server.manpages new file mode 100644 index 000000000..f66cf18d1 --- /dev/null +++ b/pkg/deb/debian/keydb-enterprise-server.manpages @@ -0,0 +1 @@ +debian/keydb-enterprise-server.1 diff --git a/pkg/deb/debian/keydb-pro-server.postinst b/pkg/deb/debian/keydb-enterprise-server.postinst similarity index 100% rename from pkg/deb/debian/keydb-pro-server.postinst rename to pkg/deb/debian/keydb-enterprise-server.postinst diff --git a/pkg/deb/debian/keydb-pro-server.postrm b/pkg/deb/debian/keydb-enterprise-server.postrm similarity index 100% rename from pkg/deb/debian/keydb-pro-server.postrm rename to pkg/deb/debian/keydb-enterprise-server.postrm diff --git a/pkg/deb/debian/keydb-pro-tools.examples b/pkg/deb/debian/keydb-enterprise-tools.examples similarity index 100% rename from pkg/deb/debian/keydb-pro-tools.examples rename to pkg/deb/debian/keydb-enterprise-tools.examples diff --git a/pkg/deb/debian_dh9/keydb-pro-tools.install b/pkg/deb/debian/keydb-enterprise-tools.install similarity index 87% rename from pkg/deb/debian_dh9/keydb-pro-tools.install rename to pkg/deb/debian/keydb-enterprise-tools.install index 346ad4597..166faeafd 100644 --- a/pkg/deb/debian_dh9/keydb-pro-tools.install +++ b/pkg/deb/debian/keydb-enterprise-tools.install @@ -3,5 +3,5 @@ src/keydb-benchmark /usr/bin src/keydb-check-aof /usr/bin src/keydb-check-rdb /usr/bin src/keydb-cli /usr/bin -src/keydb-pro-server /usr/bin +src/keydb-server /usr/bin src/keydb-sentinel /usr/bin diff --git a/pkg/deb/debian/keydb-pro-tools.manpages b/pkg/deb/debian/keydb-enterprise-tools.manpages similarity index 100% rename from pkg/deb/debian/keydb-pro-tools.manpages rename to pkg/deb/debian/keydb-enterprise-tools.manpages diff --git a/pkg/deb/debian/keydb-pro-tools.postinst b/pkg/deb/debian/keydb-enterprise-tools.postinst similarity index 100% rename from pkg/deb/debian/keydb-pro-tools.postinst rename to pkg/deb/debian/keydb-enterprise-tools.postinst diff --git a/pkg/deb/debian/keydb-pro-tools.postrm b/pkg/deb/debian/keydb-enterprise-tools.postrm similarity index 100% rename from pkg/deb/debian/keydb-pro-tools.postrm rename to pkg/deb/debian/keydb-enterprise-tools.postrm diff --git a/pkg/deb/debian/keydb-pro-sentinel.manpages b/pkg/deb/debian/keydb-pro-sentinel.manpages deleted file mode 100644 index 08ce51ff5..000000000 --- a/pkg/deb/debian/keydb-pro-sentinel.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-pro-sentinel.1 diff --git a/pkg/deb/debian/keydb-pro-server.manpages b/pkg/deb/debian/keydb-pro-server.manpages deleted file mode 100644 index 06ff67ee3..000000000 --- a/pkg/deb/debian/keydb-pro-server.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-pro-server.1 diff --git a/pkg/deb/debian/source/lintian-overrides b/pkg/deb/debian/source/lintian-overrides index 44dec9b63..ebc49b26e 100644 --- a/pkg/deb/debian/source/lintian-overrides +++ b/pkg/deb/debian/source/lintian-overrides @@ -1,2 +1,2 @@ # Upstream do not provide signed tarballs. -keydb-pro source: debian-watch-does-not-check-gpg-signature +keydb-enterprise source: debian-watch-does-not-check-gpg-signature diff --git a/pkg/deb/debian/watch b/pkg/deb/debian/watch index acca0f199..2dac38351 100644 --- a/pkg/deb/debian/watch +++ b/pkg/deb/debian/watch @@ -1,3 +1,3 @@ version=6 opts=uversionmangle=s/-?(alpha|beta|rc)/~$1/ \ - https://github.com/JohnSully/KeyDB-Pro/releases .*/archive/(.*).tar.gz + https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro/releases .*/archive/(.*).tar.gz diff --git a/pkg/deb/debian_dh9/bin/generate-systemd-service-files b/pkg/deb/debian_dh9/bin/generate-systemd-service-files index 738e2f542..4a3df9a12 100755 --- a/pkg/deb/debian_dh9/bin/generate-systemd-service-files +++ b/pkg/deb/debian_dh9/bin/generate-systemd-service-files @@ -25,13 +25,9 @@ do case "${BINARY}" in keydb-server) NAME="keydb" - BINARY_EXEC="keydb-server" - BINARY_NAME="keydb-pro-server" ;; keydb-sentinel) NAME="sentinel" - BINARY_EXEC="keydb-sentinel" - BINARY_NAME="keydb-sentinel" ;; esac @@ -92,7 +88,7 @@ Documentation=https://docs.keydb.dev, man:${BINARY}(1) [Service] Type=forking -ExecStart=/usr/bin/${BINARY_NAME} /etc/keydb/${NAMESPACED}.conf +ExecStart=/usr/bin/${BINARY} /etc/keydb/${NAMESPACED}.conf ExecStop=/bin/kill -s TERM \$MAINPID PIDFile=/var/run/${NAMESPACED}/${BINARY}.pid TimeoutStopSec=0 diff --git a/pkg/deb/debian_dh9/control b/pkg/deb/debian_dh9/control index f847ad345..1932b27fe 100644 --- a/pkg/deb/debian_dh9/control +++ b/pkg/deb/debian_dh9/control @@ -1,4 +1,4 @@ -Source: keydb-pro +Source: keydb-enterprise Section: database Priority: optional Maintainer: Ben Schermel @@ -29,14 +29,14 @@ Build-Depends: libzstd-dev Standards-Version: 4.2.1 Homepage: https://docs.keydb.dev/ -Vcs-Git: https://github.com/JohnSully/KeyDB-Pro.git -Vcs-Browser: https://github.com/JohnSully/KeyDB-Pro +Vcs-Git: https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro.git +Vcs-Browser: https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro -Package: keydb-pro +Package: keydb-enterprise Architecture: all Depends: - keydb-pro-server (<< ${binary:Version}.1~), - keydb-pro-server (>= ${binary:Version}), + keydb-enterprise-server (<< ${binary:Version}.1~), + keydb-enterprise-server (>= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (metapackage) keydb is a key-value database in a similar vein to memcache but the dataset @@ -47,11 +47,11 @@ Description: Persistent key-value database with network interface (metapackage) . This package depends on the keydb-server package. -Package: keydb-pro-sentinel +Package: keydb-enterprise-sentinel Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-pro-tools (= ${binary:Version}), + keydb-enterprise-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (monitoring) keydb is a key-value database in a similar vein to memcache but the dataset @@ -60,11 +60,11 @@ Description: Persistent key-value database with network interface (monitoring) . This package contains the keydb Sentinel monitoring software. -Package: keydb-pro-server +Package: keydb-enterprise-server Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-pro-tools (= ${binary:Version}), + keydb-enterprise-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface keydb is a key-value database in a similar vein to memcache but the dataset @@ -73,7 +73,7 @@ Description: Persistent key-value database with network interface . The dataset is stored entirely in memory and periodically flushed to disk. -Package: keydb-pro-tools +Package: keydb-enterprise-tools Architecture: any Depends: adduser, diff --git a/pkg/deb/debian_dh9/copyright b/pkg/deb/debian_dh9/copyright index c7e2428e7..57591384f 100644 --- a/pkg/deb/debian_dh9/copyright +++ b/pkg/deb/debian_dh9/copyright @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: John Sully -Upstream-Name: keydb-pro -Source: https://github.com/JohnSully/KeyDB-Pro +Upstream-Name: keydb-enterprise +Source: https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro Files: * Copyright: © 2006-2014 Salvatore Sanfilippo diff --git a/pkg/deb/debian_dh9/files b/pkg/deb/debian_dh9/files deleted file mode 100644 index 4fa490963..000000000 --- a/pkg/deb/debian_dh9/files +++ /dev/null @@ -1 +0,0 @@ -keydb-pro_5.3.3-1~bionic1_source.buildinfo database optional diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.1 b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.1 similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.1 rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.1 diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.install b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.install similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.install rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.install diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.logrotate b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.logrotate similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.logrotate rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.logrotate diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.maintscript b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.maintscript similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.maintscript rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.maintscript diff --git a/pkg/deb/debian_dh9/keydb-enterprise-sentinel.manpages b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.manpages new file mode 100644 index 000000000..036eda5a6 --- /dev/null +++ b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.manpages @@ -0,0 +1 @@ +debian/keydb-enterprise-sentinel.1 diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.postinst b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.postinst similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.postinst rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.postinst diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.postrm b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.postrm similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.postrm rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.postrm diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.prerm b/pkg/deb/debian_dh9/keydb-enterprise-sentinel.prerm similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-sentinel.prerm rename to pkg/deb/debian_dh9/keydb-enterprise-sentinel.prerm diff --git a/pkg/deb/debian_dh9/keydb-pro-server.1 b/pkg/deb/debian_dh9/keydb-enterprise-server.1 similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.1 rename to pkg/deb/debian_dh9/keydb-enterprise-server.1 diff --git a/pkg/deb/debian_dh9/keydb-pro-server.docs b/pkg/deb/debian_dh9/keydb-enterprise-server.docs similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.docs rename to pkg/deb/debian_dh9/keydb-enterprise-server.docs diff --git a/pkg/deb/debian_dh9/keydb-pro-server.install b/pkg/deb/debian_dh9/keydb-enterprise-server.install similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.install rename to pkg/deb/debian_dh9/keydb-enterprise-server.install diff --git a/pkg/deb/debian_dh9/keydb-pro-server.logrotate b/pkg/deb/debian_dh9/keydb-enterprise-server.logrotate similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.logrotate rename to pkg/deb/debian_dh9/keydb-enterprise-server.logrotate diff --git a/pkg/deb/debian_dh9/keydb-pro-server.maintscript b/pkg/deb/debian_dh9/keydb-enterprise-server.maintscript similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.maintscript rename to pkg/deb/debian_dh9/keydb-enterprise-server.maintscript diff --git a/pkg/deb/debian_dh9/keydb-enterprise-server.manpages b/pkg/deb/debian_dh9/keydb-enterprise-server.manpages new file mode 100644 index 000000000..f66cf18d1 --- /dev/null +++ b/pkg/deb/debian_dh9/keydb-enterprise-server.manpages @@ -0,0 +1 @@ +debian/keydb-enterprise-server.1 diff --git a/pkg/deb/debian_dh9/keydb-pro-server.postinst b/pkg/deb/debian_dh9/keydb-enterprise-server.postinst similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.postinst rename to pkg/deb/debian_dh9/keydb-enterprise-server.postinst diff --git a/pkg/deb/debian_dh9/keydb-pro-server.postrm b/pkg/deb/debian_dh9/keydb-enterprise-server.postrm similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.postrm rename to pkg/deb/debian_dh9/keydb-enterprise-server.postrm diff --git a/pkg/deb/debian_dh9/keydb-pro-server.prerm b/pkg/deb/debian_dh9/keydb-enterprise-server.prerm similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-server.prerm rename to pkg/deb/debian_dh9/keydb-enterprise-server.prerm diff --git a/pkg/deb/debian_dh9/keydb-pro-tools.examples b/pkg/deb/debian_dh9/keydb-enterprise-tools.examples similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-tools.examples rename to pkg/deb/debian_dh9/keydb-enterprise-tools.examples diff --git a/pkg/deb/debian/keydb-pro-tools.install b/pkg/deb/debian_dh9/keydb-enterprise-tools.install similarity index 87% rename from pkg/deb/debian/keydb-pro-tools.install rename to pkg/deb/debian_dh9/keydb-enterprise-tools.install index 346ad4597..166faeafd 100644 --- a/pkg/deb/debian/keydb-pro-tools.install +++ b/pkg/deb/debian_dh9/keydb-enterprise-tools.install @@ -3,5 +3,5 @@ src/keydb-benchmark /usr/bin src/keydb-check-aof /usr/bin src/keydb-check-rdb /usr/bin src/keydb-cli /usr/bin -src/keydb-pro-server /usr/bin +src/keydb-server /usr/bin src/keydb-sentinel /usr/bin diff --git a/pkg/deb/debian_dh9/keydb-pro-tools.manpages b/pkg/deb/debian_dh9/keydb-enterprise-tools.manpages similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-tools.manpages rename to pkg/deb/debian_dh9/keydb-enterprise-tools.manpages diff --git a/pkg/deb/debian_dh9/keydb-pro-tools.postinst b/pkg/deb/debian_dh9/keydb-enterprise-tools.postinst similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-tools.postinst rename to pkg/deb/debian_dh9/keydb-enterprise-tools.postinst diff --git a/pkg/deb/debian_dh9/keydb-pro-tools.postrm b/pkg/deb/debian_dh9/keydb-enterprise-tools.postrm similarity index 100% rename from pkg/deb/debian_dh9/keydb-pro-tools.postrm rename to pkg/deb/debian_dh9/keydb-enterprise-tools.postrm diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.manpages b/pkg/deb/debian_dh9/keydb-pro-sentinel.manpages deleted file mode 100644 index 08ce51ff5..000000000 --- a/pkg/deb/debian_dh9/keydb-pro-sentinel.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-pro-sentinel.1 diff --git a/pkg/deb/debian_dh9/keydb-pro-server.manpages b/pkg/deb/debian_dh9/keydb-pro-server.manpages deleted file mode 100644 index 06ff67ee3..000000000 --- a/pkg/deb/debian_dh9/keydb-pro-server.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-pro-server.1 diff --git a/pkg/deb/debian_dh9/source/include-binaries b/pkg/deb/debian_dh9/source/include-binaries index 55422f4bb..aa70b47d3 100644 --- a/pkg/deb/debian_dh9/source/include-binaries +++ b/pkg/deb/debian_dh9/source/include-binaries @@ -1,3 +1,3 @@ -keydb-pro_5.0.6.orig.tar.gz -keydb-pro_5.0.6-1~bionic1.debian.tar.xz +keydb-enterprise_5.0.6.orig.tar.gz +keydb-enterprise_5.0.6-1~bionic1.debian.tar.xz diff --git a/pkg/deb/debian_dh9/source/lintian-overrides b/pkg/deb/debian_dh9/source/lintian-overrides index 44dec9b63..ebc49b26e 100644 --- a/pkg/deb/debian_dh9/source/lintian-overrides +++ b/pkg/deb/debian_dh9/source/lintian-overrides @@ -1,2 +1,2 @@ # Upstream do not provide signed tarballs. -keydb-pro source: debian-watch-does-not-check-gpg-signature +keydb-enterprise source: debian-watch-does-not-check-gpg-signature diff --git a/pkg/deb/debian_dh9/watch b/pkg/deb/debian_dh9/watch index acca0f199..2dac38351 100644 --- a/pkg/deb/debian_dh9/watch +++ b/pkg/deb/debian_dh9/watch @@ -1,3 +1,3 @@ version=6 opts=uversionmangle=s/-?(alpha|beta|rc)/~$1/ \ - https://github.com/JohnSully/KeyDB-Pro/releases .*/archive/(.*).tar.gz + https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro/releases .*/archive/(.*).tar.gz diff --git a/pkg/deb/master_changelog b/pkg/deb/master_changelog index e92f8cc95..c5b91f9fa 100644 --- a/pkg/deb/master_changelog +++ b/pkg/deb/master_changelog @@ -1,58 +1,5 @@ -keydb-pro (6:6.0.12-1distribution_placeholder) codename_placeholder; urgency=medium +keydb-enterprise (6:6.0.12-1distribution_placeholder) codename_placeholder; urgency=medium * 6.0.12 Enable SCAN for MVCC -- Ben Schermel Fri, 10 Jul 2020 20:00:37 +0000 - -keydb-pro (6:6.0.11-1distribution_placeholder) codename_placeholder; urgency=medium - - * 6.0.11 fixes applied related to cluster usage and expires - - -- Ben Schermel Wed, 17 Jun 2020 20:00:37 +0000 - -keydb-pro (6:6.0.9-1distribution_placeholder) codename_placeholder; urgency=medium - - * 6.0.9 Addressing issues 187 - cpu lockup with subkey expire, 190 - missing sentinel binary in keydb-tools. - * FLASH performance updates, including updating client handling to mitigate SSD overload behavior on heavy writes. - * flash_memory parameter has been added to INFO memory - - -- Ben Schermel Sun, 07 Jun 2020 18:00:37 +0000 - -keydb-pro (6:6.0.8-1distribution_placeholder) codename_placeholder; urgency=medium - - * This is our first release to fully support all Redis 6.0.4 features, including but not limited to: TLS Support (fully supports multithreading!), Client side caching, RESP 3 Support - * KeyDB Has also added the following new features: Improved memory efficiency for short strings, Fastlock autotuning, KeyDB.HRENAME (rename a member of a hash)In addition we've spent a lot of time focussing on stability. - * The following bug fixes are resolved: #150 - Deadlock in ReplicationFeedMonitors, #170 - KeyDB dying via SIGABORT, #180 - crash after setting maxclients via cmd line, #169 - Write performance of a master dropped sharply when a slave is added - * In addition untracked issues were resolved: Potential deadlock when entering futex sleep, Pub/Sub Async messages may not be sent in a timely manner when load is low, Excessive logging during failed RREPLAY, KeyDB unresponsive handling clients on different threads during RDB load - * Updated deb package builds to build from source and phasing out init.d. dh_installsystemd from deb helper 11 used where applicable - * Naming conventions are now updated [ keydbpackage_version-build~distribution_architecture] and master changelog included and maintained - * keydb-pro-server binary is no longer inluded in the open source package - - -- Ben Schermel Mon, 1 Jun 2020 8:00:37 +0000 - -keydb-pro (5:5.1.12-1chl1distribution_placeholder) codename_placeholder; urgency=medium - - * 5.1.1 update. This update fixes several rare deadlock scenarios. Deadlock detection is also added. - - -- Ben Schermel Fri, 25 Oct 2019 8:00:37 +0000 - - -keydb-pro (5:5.1.11-1chl1distribution_placeholder) codename_placeholder; urgency=medium - - * 5.1 release. This release includes subkey expires (EXPIREMEMBER/EXPIREMEMBERAT), with updates to PTTL/TTL accordingly. New OBJECT LASTMODIFIED, BITIOP LSHIFT & BITOP RSHIFT commands. See https://docs.keydb.dev/blog/2019/10/20/blog-post/ for detailed review of release. - - -- Ben Schermel Mon, 21 Oct 2019 8:00:37 +0000 - - -keydb-pro (5:5.0.1-1chl1distribution_placeholder) codename_placeholder; urgency=medium - - * Arm build now included for bionic package - - -- Ben Schermel Wed, 21 Aug 2019 22:58:37 +0000 - - -keydb-pro (5:5.0.0-1chl1distribution_placeholder) codename_placeholder; urgency=medium - - * Initial release of KeyDB PPA. This PPA was originally derived from https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server - - -- Ben Schermel Wed, 21 Aug 2019 2:58:37 +0000 diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile index c71353b00..8528aabb5 100644 --- a/pkg/docker/Dockerfile +++ b/pkg/docker/Dockerfile @@ -88,4 +88,4 @@ ENTRYPOINT ["docker-entrypoint.sh"] # Expose container port and start KeyDB by default on running container EXPOSE 6379 -CMD ["keydb-pro-server", "/etc/keydb/keydb.conf"] +CMD ["keydb-server", "/etc/keydb/keydb.conf"] diff --git a/pkg/rpm/generate_rpms.sh b/pkg/rpm/generate_rpms.sh index 2f5959c89..925509935 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" @@ -31,8 +34,8 @@ sed -i '3d' $DIR/keydb_build/keydb.spec sed -i -E "2a\Release : $release%{?dist}" $DIR/keydb_build/keydb.spec # yum install -y scl-utils centos-release-scl rpm-build -mkdir -p /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch -cp -r $DIR/keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch/ +mkdir -p /root/rpmbuild/BUILDROOT/keydb-enterprise-$version-$release.$dist.$arch +cp -r $DIR/keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-enterprise-$version-$release.$dist.$arch/ rpmbuild -bb $DIR/keydb_build/keydb.spec mv /root/rpmbuild/RPMS/$arch/* $DIR/rpm_files_generated diff --git a/pkg/rpm/keydb_build/keydb.spec b/pkg/rpm/keydb_build/keydb.spec index 8c47c178c..8fd826937 100755 --- a/pkg/rpm/keydb_build/keydb.spec +++ b/pkg/rpm/keydb_build/keydb.spec @@ -1,4 +1,4 @@ -Name : keydb-pro +Name : keydb-enterprise Version : 6.0.5 Release : 1%{?dist} Group : Unspecified @@ -27,7 +27,7 @@ getent group keydb &> /dev/null || \ groupadd -r keydb &> /dev/null getent passwd keydb &> /dev/null || \ useradd -r -g keydb -d /var/lib/keydb -s /sbin/nologin \ --c 'KeyDB Professional Database Server' keydb &> /dev/null +-c 'KeyDB Enterprise Database Server' keydb &> /dev/null exit 0 #postinstall scriptlet (using /bin/sh): diff --git a/pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf b/pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf index 9cf1773c7..821591b32 100644 --- a/pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf +++ b/pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf @@ -1568,9 +1568,9 @@ server-threads 2 # bringing up replicas can result in data loss (the first master will win). # active-replica yes -# Enable Pro? KeyDB pro provides support for pro only features -# note: you may omit the license key to demo pro features for a limited time -# enable-pro [License Key] +# Enable Enterprise? KeyDB Enterprise provides support for Enterprise only features +# note: you may omit the license key to demo Enterprise features for a limited time +# enable-enterprise [License Key] -# Enable FLASH support? (Pro Only) +# Enable FLASH support? (Enterprise Only) # storage-provider flash /path/to/flash/db diff --git a/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service b/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service index 861c7a384..e36f5f2cf 100644 --- a/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service +++ b/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service @@ -5,7 +5,7 @@ Documentation=https://docs.keydb.dev, man:keydb-server(1) [Service] Type=forking -ExecStart=/usr/bin/keydb-pro-server /etc/keydb/keydb.conf +ExecStart=/usr/bin/keydb-server /etc/keydb/keydb.conf ExecStop=/bin/kill -s TERM $MAINPID PIDFile=/var/run/keydb/keydb-server.pid TimeoutStopSec=0 diff --git a/src/Makefile b/src/Makefile index 927782e51..966ce4400 100644 --- a/src/Makefile +++ b/src/Makefile @@ -310,7 +310,7 @@ QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(EN QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR); endif -REDIS_SERVER_NAME=keydb-pro-server$(PROG_SUFFIX) +REDIS_SERVER_NAME=keydb-server$(PROG_SUFFIX) REDIS_SENTINEL_NAME=keydb-sentinel$(PROG_SUFFIX) REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o t_nhash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o acl.o storage.o rdb-s3.o fastlock.o new.o tracking.o cron.o connection.o tls.o sha256.o motd.o timeout.o setcpuaffinity.o AsyncWorkQueue.o snapshot.o storage/rocksdb.o storage/rocksdbfactory.o storage/teststorageprovider.o keydbutils.o StorageCache.o $(ASM_OBJ) REDIS_CLI_NAME=keydb-cli$(PROG_SUFFIX) @@ -368,7 +368,7 @@ else endif @touch $@ -# keydb-pro-server +# keydb-server $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/rocksdb/librocksdb.a $(FINAL_LIBS) diff --git a/src/asciilogo.h b/src/asciilogo.h index dbb3cfcd6..d4dfe6a77 100644 --- a/src/asciilogo.h +++ b/src/asciilogo.h @@ -32,7 +32,7 @@ const char *ascii_logo = " _ \n" " _-(+)-_ \n" " _-- / \\ --_ \n" -" _-- / \\ --_ KeyDB Pro %s (%s/%d) %s bit \n" +" _-- / \\ --_ KeyDB Enterprise %s (%s/%d) %s bit \n" " __-- / \\ --__ \n" " (+) _ / \\ _ (+) Running in %s mode\n" " | -- / \\ -- | Port: %d\n" diff --git a/src/config.cpp b/src/config.cpp index f7609feb7..25311e7e5 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -730,7 +730,7 @@ void loadServerConfigFromString(char *config) { g_sdsProvider = sdsdup(argv[1]); if (argc > 2) g_sdsArgs = sdsdup(argv[2]); - } else if (!strcasecmp(argv[0],"enable-pro") && (argc == 1 || argc == 2)) { + } else if (!strcasecmp(argv[0],"enable-enterprise") && (argc == 1 || argc == 2)) { if (argc == 2) { if (!FValidKey(argv[1], strlen(argv[1]))) { @@ -1855,7 +1855,7 @@ int rewriteConfig(char *path, int force_all) { rewriteConfigClientoutputbufferlimitOption(state); rewriteConfigYesNoOption(state,"active-replica",g_pserver->fActiveReplica,CONFIG_DEFAULT_ACTIVE_REPLICA); rewriteConfigStringOption(state, "version-override",KEYDB_SET_VERSION,KEYDB_REAL_VERSION); - rewriteConfigStringOption(state, "enable-pro", cserver.license_key, CONFIG_DEFAULT_LICENSE_KEY); + rewriteConfigStringOption(state, "enable-enterprise", cserver.license_key, CONFIG_DEFAULT_LICENSE_KEY); rewriteConfigOOMScoreAdjValuesOption(state); /* Rewrite Sentinel config if in Sentinel mode. */ diff --git a/src/debug.cpp b/src/debug.cpp index 23a7c9c02..cd5fe7909 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -1817,7 +1817,7 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) { "\n=== KEYDB BUG REPORT END. Make sure to include from START to END. ===\n\n" " Please report the crash by opening an issue on github:\n\n" " https://github.com/JohnSully/KeyDB/issues\n\n" -" Suspect RAM error? Use keydb-pro-server --test-memory to verify it.\n\n" +" Suspect RAM error? Use keydb-server --test-memory to verify it.\n\n" ); /* free(messages); Don't call free() with possibly corrupted memory. */ diff --git a/src/networking.cpp b/src/networking.cpp index 58ff54bac..fd7c29994 100644 --- a/src/networking.cpp +++ b/src/networking.cpp @@ -158,6 +158,7 @@ client *createClient(connection *conn, int iel) { c->reploff_cmd = 0; c->repl_ack_off = 0; c->repl_ack_time = 0; + c->repl_down_since = 0; c->slave_listening_port = 0; c->slave_ip[0] = '\0'; c->slave_capa = SLAVE_CAPA_NONE; @@ -1618,7 +1619,8 @@ void freeClientAsync(client *c) { AeLocker lock; lock.arm(c); if (c->flags & CLIENT_CLOSE_ASAP || c->flags & CLIENT_LUA) return; // race condition after we acquire the lock - c->flags |= CLIENT_CLOSE_ASAP; + c->flags |= CLIENT_CLOSE_ASAP; + c->repl_down_since = g_pserver->unixtime; std::unique_lock ul(lockasyncfree); listAddNodeTail(g_pserver->clients_to_close,c); } @@ -2372,7 +2374,7 @@ void parseClientCommandBuffer(client *c) { /* Prefetch outside the lock for better perf */ if (g_pserver->prefetch_enabled && cqueriesStart < c->vecqueuedcmd.size() && - (g_pserver->m_pstorageFactory || aeLockContested(cserver.cthreads/2)) && !GlobalLocksAcquired()) { + (g_pserver->m_pstorageFactory || aeLockContested(cserver.cthreads/2) || cserver.cthreads == 1) && !GlobalLocksAcquired()) { auto &query = c->vecqueuedcmd.back(); if (query.argc > 0 && query.argc == query.argcMax) { if (c->db->prefetchKeysAsync(c, query, c->vecqueuedcmd.size() == 1)) { @@ -2408,6 +2410,7 @@ void processInputBuffer(client *c, bool fParse, int callFlags) { /* Return if we're still parsing this command */ auto &cmd = c->vecqueuedcmd.front(); if (cmd.argc != cmd.argcMax) break; + if (c->flags & CLIENT_EXECUTING_COMMAND) break; if (!FClientReady(c)) break; @@ -2426,13 +2429,16 @@ void processInputBuffer(client *c, bool fParse, 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/replication.cpp b/src/replication.cpp index d0cd15b37..ce5c64863 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -2748,8 +2748,8 @@ void syncWithMaster(connection *conn) { err = sendSynchronousCommand(mi, SYNC_CMD_READ,conn,NULL); if (err[0] == '-') { if (err[1] == 'E' && err[2] == 'R' && err[3] == 'R') { - // Replicating with non-pro - serverLog(LL_WARNING, "Replicating with non-pro server."); + // Replicating with non-enterprise + serverLog(LL_WARNING, "Replicating with non-enterprise server."); } else { serverLog(LL_WARNING, "Recieved error from client: %s", err); sdsfree(err); @@ -3214,9 +3214,14 @@ void replicationHandleMasterDisconnection(redisMaster *mi) { moduleFireServerEvent(REDISMODULE_EVENT_MASTER_LINK_CHANGE, REDISMODULE_SUBEVENT_MASTER_LINK_DOWN, NULL); + if (mi->master && mi->master->repl_down_since) { + mi->repl_down_since = mi->master->repl_down_since; + } + else { + mi->repl_down_since = g_pserver->unixtime; + } mi->master = NULL; mi->repl_state = REPL_STATE_CONNECT; - mi->repl_down_since = g_pserver->unixtime; /* We lost connection with our master, don't disconnect slaves yet, * maybe we'll be able to PSYNC with our master later. We'll disconnect * the slaves only if we'll have to do a full resync with our master. */ @@ -3535,6 +3540,7 @@ void replicationResurrectCachedMaster(redisMaster *mi, connection *conn) { mi->master->lastinteraction = g_pserver->unixtime; mi->repl_state = REPL_STATE_CONNECTED; mi->repl_down_since = 0; + mi->master->repl_down_since = 0; /* Normally changing the thread of a client is a BIG NONO, but this client was unlinked so its OK here */ diff --git a/src/server.cpp b/src/server.cpp index fbcd0cc43..0ffab4b4b 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -61,6 +61,7 @@ #include #include #include +#include #include "aelocker.h" #include "keycheck.h" #include "motd.h" @@ -71,7 +72,7 @@ int g_fTestMode = false; const char *motd_url = "http://api.keydb.dev/motd/motd_server_pro.txt"; -const char *motd_cache_file = "/.keydb-pro-server-motd"; +const char *motd_cache_file = "/.keydb-enterprise-server-motd"; #ifdef __linux__ #include @@ -97,6 +98,10 @@ redisServer *g_pserver = &GlobalHidden::server; struct redisServerConst cserver; thread_local struct redisServerThreadVars *serverTL = NULL; // thread local server vars volatile unsigned long lru_clock; /* Server global current LRU time. */ +std::mutex time_thread_mutex; +std::condition_variable time_thread_cv; +int sleeping_threads = cserver.cthreads; +void wakeTimeThread(); /* Our command table. * @@ -2440,6 +2445,14 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { /* CRON functions may trigger async writes, so do this last */ ProcessPendingAsyncWrites(); + // Measure lock contention from a different thread to be more accurate + g_pserver->asyncworkqueue->AddWorkFunction([]{ + g_pserver->rglockSamples[g_pserver->ilockRingHead] = (uint16_t)aeLockContention(); + ++g_pserver->ilockRingHead; + if (g_pserver->ilockRingHead >= redisServer::s_lockContentionSamples) + g_pserver->ilockRingHead = 0; + }); + run_with_period(10) { if (!g_pserver->garbageCollector.empty()) { // Server threads don't free the GC, but if we don't have a @@ -2452,14 +2465,6 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { } } - // Measure lock contention from a different thread to be more accurate - g_pserver->asyncworkqueue->AddWorkFunction([]{ - g_pserver->rglockSamples[g_pserver->ilockRingHead] = (uint16_t)aeLockContention(); - ++g_pserver->ilockRingHead; - if (g_pserver->ilockRingHead >= redisServer::s_lockContentionSamples) - g_pserver->ilockRingHead = 0; - }); - g_pserver->cronloops++; return 1000/g_pserver->hz; } @@ -2675,6 +2680,13 @@ void beforeSleep(struct aeEventLoop *eventLoop) { locker.disarm(); if (!fSentReplies) handleClientsWithPendingWrites(iel, aof_state); + + { + std::lock_guard lock(time_thread_mutex); + sleeping_threads++; + serverAssert(sleeping_threads <= cserver.cthreads); + } + if (moduleCount()) moduleReleaseGIL(TRUE /*fServerThread*/); /* Do NOT add anything below moduleReleaseGIL !!! */ @@ -2690,6 +2702,8 @@ void afterSleep(struct aeEventLoop *eventLoop) { /* Aquire the modules GIL so that their threads won't touch anything. */ if (moduleCount()) moduleAcquireGIL(TRUE /*fServerThread*/); + wakeTimeThread(); + serverAssert(serverTL->gcEpoch.isReset()); serverTL->gcEpoch = g_pserver->garbageCollector.startEpoch(); for (int idb = 0; idb < cserver.dbnum; ++idb) @@ -5463,7 +5477,7 @@ sds genRedisInfoString(const char *section) { if (sections++) info = sdscat(info,"\r\n"); info = sdscatprintf(info, "# KeyDB\r\n" - "variant:pro\r\n" + "variant:enterprise\r\n" "license_status:%s\r\n" "mvcc_depth:%d\r\n", cserver.license_key ? "OK" : "Trial", @@ -5697,19 +5711,19 @@ void version(void) { } void usage(void) { - fprintf(stderr,"Usage: ./keydb-pro-server [/path/to/keydb.conf] [options]\n"); - fprintf(stderr," ./keydb-pro-server - (read config from stdin)\n"); - fprintf(stderr," ./keydb-pro-server -v or --version\n"); - fprintf(stderr," ./keydb-pro-server -h or --help\n"); - fprintf(stderr," ./keydb-pro-server --test-memory \n\n"); + fprintf(stderr,"Usage: ./keydb-server [/path/to/keydb.conf] [options]\n"); + fprintf(stderr," ./keydb-server - (read config from stdin)\n"); + fprintf(stderr," ./keydb-server -v or --version\n"); + fprintf(stderr," ./keydb-server -h or --help\n"); + fprintf(stderr," ./keydb-server --test-memory \n\n"); fprintf(stderr,"Examples:\n"); - fprintf(stderr," ./keydb-pro-server (run the server with default conf)\n"); - fprintf(stderr," ./keydb-pro-server /etc/redis/6379.conf\n"); - fprintf(stderr," ./keydb-pro-server --port 7777\n"); - fprintf(stderr," ./keydb-pro-server --port 7777 --replicaof 127.0.0.1 8888\n"); - fprintf(stderr," ./keydb-pro-server /etc/mykeydb.conf --loglevel verbose\n\n"); + fprintf(stderr," ./keydb-server (run the server with default conf)\n"); + fprintf(stderr," ./keydb-server /etc/redis/6379.conf\n"); + fprintf(stderr," ./keydb-server --port 7777\n"); + fprintf(stderr," ./keydb-server --port 7777 --replicaof 127.0.0.1 8888\n"); + fprintf(stderr," ./keydb-server /etc/mykeydb.conf --loglevel verbose\n\n"); fprintf(stderr,"Sentinel mode:\n"); - fprintf(stderr," ./keydb-pro-server /etc/sentinel.conf --sentinel\n"); + fprintf(stderr," ./keydb-server /etc/sentinel.conf --sentinel\n"); exit(1); } @@ -5754,7 +5768,7 @@ void redisAsciiArt(void) { if (cserver.license_key == nullptr && !g_pserver->sentinel_mode) { #ifndef NO_LICENSE_CHECK - serverLog(LL_WARNING, "!!!! KeyDB Pro is being run in trial mode !!!!"); + serverLog(LL_WARNING, "!!!! KeyDB Enterprise is being run in trial mode !!!!"); serverLog(LL_WARNING, "!!!! Execution will terminate in %d minutes !!!!", cserver.trial_timeout); #endif } @@ -6120,15 +6134,29 @@ void OnTerminate() serverPanic("std::teminate() called"); } +void wakeTimeThread() { + updateCachedTime(); + std::lock_guard lock(time_thread_mutex); + sleeping_threads--; + serverAssert(sleeping_threads >= 0); + time_thread_cv.notify_one(); +} + void *timeThreadMain(void*) { timespec delay; delay.tv_sec = 0; delay.tv_nsec = 100; while (true) { + { + std::unique_lock lock(time_thread_mutex); + if (sleeping_threads >= cserver.cthreads) { + time_thread_cv.wait(lock); + } + } updateCachedTime(); - clock_nanosleep(CLOCK_REALTIME, 0, &delay, NULL); + clock_nanosleep(CLOCK_MONOTONIC, 0, &delay, NULL); } -} +} void *workerThreadMain(void *parg) { @@ -6297,7 +6325,7 @@ int main(int argc, char **argv) { exit(0); } else { fprintf(stderr,"Please specify the amount of memory to test in megabytes.\n"); - fprintf(stderr,"Example: ./keydb-pro-server --test-memory 4096\n\n"); + fprintf(stderr,"Example: ./keydb-server --test-memory 4096\n\n"); exit(1); } } @@ -6478,11 +6506,11 @@ int main(int argc, char **argv) { serverAssert(cserver.cthreads > 0 && cserver.cthreads <= MAX_EVENT_LOOPS); pthread_create(&cserver.time_thread_id, nullptr, timeThreadMain, nullptr); -if (cserver.time_thread_priority) { - struct sched_param time_thread_priority; - time_thread_priority.sched_priority = sched_get_priority_max(SCHED_FIFO); - pthread_setschedparam(cserver.time_thread_id, SCHED_FIFO, &time_thread_priority); -} + if (cserver.time_thread_priority) { + struct sched_param time_thread_priority; + time_thread_priority.sched_priority = sched_get_priority_max(SCHED_FIFO); + pthread_setschedparam(cserver.time_thread_id, SCHED_FIFO, &time_thread_priority); + } pthread_attr_t tattr; pthread_attr_init(&tattr); diff --git a/src/server.h b/src/server.h index 9d3e70197..c4d93eb77 100644 --- a/src/server.h +++ b/src/server.h @@ -506,10 +506,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. */ @@ -1509,6 +1507,7 @@ struct client { off_t repldboff; /* Replication DB file offset. */ off_t repldbsize; /* Replication DB file size. */ sds replpreamble; /* Replication DB preamble. */ + time_t repl_down_since; /* When client lost connection. */ long long read_reploff; /* Read replication offset if this is a master. */ long long reploff; /* Applied replication offset if this is a master. */ long long reploff_skipped; /* Repl backlog we did not send to this client */ diff --git a/tests/instances.tcl b/tests/instances.tcl index d4f3581a2..99d3984c7 100644 --- a/tests/instances.tcl +++ b/tests/instances.tcl @@ -41,7 +41,7 @@ if {[catch {cd tmp}]} { # the provided configuration file. Returns the PID of the process. proc exec_instance {type dirname cfgfile} { if {$type eq "redis"} { - set prgname keydb-pro-server + set prgname keydb-server } elseif {$type eq "sentinel"} { set prgname keydb-sentinel } else { diff --git a/tests/support/server.tcl b/tests/support/server.tcl index c83517a19..cb21f0b9c 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -178,11 +178,11 @@ proc create_server_config_file {filename config} { proc spawn_server {config_file stdout stderr} { if {$::valgrind} { - set pid [exec valgrind --track-origins=yes --trace-children=yes --suppressions=[pwd]/src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/keydb-pro-server $config_file >> $stdout 2>> $stderr &] + set pid [exec valgrind --track-origins=yes --trace-children=yes --suppressions=[pwd]/src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/keydb-server $config_file >> $stdout 2>> $stderr &] } elseif ($::stack_logging) { - set pid [exec /usr/bin/env MallocStackLogging=1 MallocLogFile=/tmp/malloc_log.txt src/keydb-pro-server $config_file >> $stdout 2>> $stderr &] + set pid [exec /usr/bin/env MallocStackLogging=1 MallocLogFile=/tmp/malloc_log.txt src/keydb-server $config_file >> $stdout 2>> $stderr &] } else { - set pid [exec src/keydb-pro-server $config_file >> $stdout 2>> $stderr &] + set pid [exec src/keydb-server $config_file >> $stdout 2>> $stderr &] } if {$::wait_server} { diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 65100269e..79acb6d5e 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -187,7 +187,7 @@ proc test {name code {okpattern undefined} {options undefined}} { } if {$::traceleaks} { - set output [exec leaks keydb-pro-server] + set output [exec leaks keydb-server] if {![string match {*0 leaks*} $output]} { send_data_packet $::test_server_fd err "Detected a memory leak in test '$name': $output" } 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 diff --git a/utils/create-cluster/create-cluster b/utils/create-cluster/create-cluster index c07a45963..4733f0ccb 100755 --- a/utils/create-cluster/create-cluster +++ b/utils/create-cluster/create-cluster @@ -26,7 +26,7 @@ then while [ $((PORT < ENDPORT)) != "0" ]; do PORT=$((PORT+1)) echo "Starting $PORT" - $BIN_PATH/keydb-pro-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} + $BIN_PATH/keydb-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} done exit 0 fi diff --git a/utils/install_server.sh b/utils/install_server.sh index 2e3ee9d4a..ee809b82b 100755 --- a/utils/install_server.sh +++ b/utils/install_server.sh @@ -1,3 +1,4 @@ + #!/bin/sh # Copyright 2011 Dvir Volk . All rights reserved. @@ -37,7 +38,7 @@ # REDIS_CONFIG_FILE=/etc/redis/1234.conf \ # REDIS_LOG_FILE=/var/log/redis_1234.log \ # REDIS_DATA_DIR=/var/lib/redis/1234 \ -# REDIS_EXECUTABLE=`command -v keydb-pro-server` ./utils/install_server.sh +# REDIS_EXECUTABLE=`command -v keydb-server` ./utils/install_server.sh # # This generates a redis config file and an /etc/init.d script, and installs them. # @@ -129,7 +130,7 @@ fi if [ ! -x "$REDIS_EXECUTABLE" ] ; then _MANUAL_EXECUTION=true #get the redis executable path - _REDIS_EXECUTABLE=`command -v keydb-pro-server` + _REDIS_EXECUTABLE=`command -v keydb-server` read -p "Please select the redis executable path [$_REDIS_EXECUTABLE] " REDIS_EXECUTABLE if [ ! -x "$REDIS_EXECUTABLE" ] ; then REDIS_EXECUTABLE=$_REDIS_EXECUTABLE diff --git a/utils/redis_init_script b/utils/redis_init_script index 589792ee3..bee5545ef 100755 --- a/utils/redis_init_script +++ b/utils/redis_init_script @@ -12,7 +12,7 @@ ### END INIT INFO REDISPORT=6379 -EXEC=/usr/local/bin/keydb-pro-server +EXEC=/usr/local/bin/keydb-server CLIEXEC=/usr/local/bin/keydb-cli PIDFILE=/var/run/redis_${REDISPORT}.pid diff --git a/utils/speed-regression.tcl b/utils/speed-regression.tcl index 073f01a19..8d5220c75 100755 --- a/utils/speed-regression.tcl +++ b/utils/speed-regression.tcl @@ -27,8 +27,8 @@ proc run-tests branches { } # Start the Redis server - puts " starting the server... [exec ./keydb-pro-server -v]" - set pids [exec echo "port $::port\nloglevel warning\n" | ./keydb-pro-server - > /dev/null 2> /dev/null &] + puts " starting the server... [exec ./keydb-server -v]" + set pids [exec echo "port $::port\nloglevel warning\n" | ./keydb-server - > /dev/null 2> /dev/null &] puts " pids: $pids" after 1000 puts " running the benchmark"