From b50f0cc21f694c955c99ef39238d35c1016606e5 Mon Sep 17 00:00:00 2001 From: Malavan Sotheeswaran <105669860+msotheeswaran@users.noreply.github.com> Date: Thu, 29 Dec 2022 15:09:53 -0500 Subject: [PATCH] flash package update (#528) * ship packages with flash option * deb12 fix Co-authored-by: benschermel --- README.md | 12 ++++++++++++ keydb.conf | 16 +++++++++++++++- pkg/deb/conf/keydb.conf | 14 ++++++++++++++ pkg/deb/deb-buildsource.sh | 5 +++++ pkg/deb/debian/rules | 1 + pkg/deb/debian_dh9/rules | 1 + .../keydb_build/keydb_rpm/etc/keydb/keydb.conf | 14 ++++++++++++++ 7 files changed, 62 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f69ef58ba..9cfecd503 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,12 @@ Avoid forwarding RREPLAY messages to other masters? WARNING: This setting is dan If you would like KeyDB to dump and load directly to AWS S3 this option specifies the bucket. Using this option with the traditional RDB options will result in KeyDB backing up twice to both locations. If both are specified KeyDB will first attempt to load from the local dump file and if that fails load from S3. This requires the AWS CLI tools to be installed and configured which are used under the hood to transfer the data. +``` +storage-provider flash /path/to/flash +``` +If you would like to use KeyDB FLASH storage, specify the storage medium followed by the directory path on your local SSD volume. Note that this feature is still considered experimental and should be used with discretion. See [FLASH Documentation](https://docs.keydb.dev/docs/flash) for more details on configuration and setting up your FLASH volume. + + Building KeyDB -------------- @@ -145,6 +151,12 @@ installed): % ./utils/gen-test-certs.sh % ./runtest --tls +To build with KeyDB FLASH support, use: + + % make ENABLE_FLASH=yes + +***Note that the KeyDB FLASH feature is considered experimental (beta) and should used with discretion + Fixing build problems with dependencies or cached build options --------- diff --git a/keydb.conf b/keydb.conf index 3f9f1b663..800657138 100644 --- a/keydb.conf +++ b/keydb.conf @@ -2073,4 +2073,18 @@ replica-weighting-factor 2 # # By default this is enabled # -active-client-balancing yes \ No newline at end of file +active-client-balancing yes + +# Enable FLASH support (Experimental Feature) +# storage-provider flash /path/to/flash/db + +# Blob support is a way to store very large objects (>200MB) on disk +# The files are automatically cleaned up when KeyDB exits and are only +# for temporary use. This helps reduce memory pressure for very large +# data items at the cost of some performance. +# +# By default this config is disable. When enabled the disk associated +# with KeyDB's working directory will be used. If there is insufficient +# disk space or any other I/O error KeyDB will instead use memory. +# +# blob-support false diff --git a/pkg/deb/conf/keydb.conf b/pkg/deb/conf/keydb.conf index 8be0b523e..9567087a4 100644 --- a/pkg/deb/conf/keydb.conf +++ b/pkg/deb/conf/keydb.conf @@ -2063,3 +2063,17 @@ server-threads 2 # # By default KeyDB sets this to 2. replica-weighting-factor 2 + +# Enable FLASH support (Experimental Feature) +# storage-provider flash /path/to/flash/db + +# Blob support is a way to store very large objects (>200MB) on disk +# The files are automatically cleaned up when KeyDB exits and are only +# for temporary use. This helps reduce memory pressure for very large +# data items at the cost of some performance. +# +# By default this config is disable. When enabled the disk associated +# with KeyDB's working directory will be used. If there is insufficient +# disk space or any other I/O error KeyDB will instead use memory. +# +# blob-support false diff --git a/pkg/deb/deb-buildsource.sh b/pkg/deb/deb-buildsource.sh index 39a2782e9..99108a2af 100755 --- a/pkg/deb/deb-buildsource.sh +++ b/pkg/deb/deb-buildsource.sh @@ -19,6 +19,11 @@ elif [ "$distributor" == "Ubuntu" ]; then fi codename=$(lsb_release --codename --short) date=$(date +%a," "%d" "%b" "%Y" "%T) + +# overwrite debian bookworm version until updated +if [ $codename == "bookworm" ]; then + distname=+deb12u1 +fi pkg_name=keydb-$majorv:$version$distname # create build tree diff --git a/pkg/deb/debian/rules b/pkg/deb/debian/rules index 957e05f9a..51896759a 100755 --- a/pkg/deb/debian/rules +++ b/pkg/deb/debian/rules @@ -4,6 +4,7 @@ include /usr/share/dpkg/buildflags.mk export BUILD_TLS=yes export USE_SYSTEMD=yes +export ENABLE_FLASH=yes export CFLAGS CPPFLAGS LDFLAGS export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -ldl -latomic $(LUA_LDFLAGS) diff --git a/pkg/deb/debian_dh9/rules b/pkg/deb/debian_dh9/rules index a568ae470..f2afc8a97 100755 --- a/pkg/deb/debian_dh9/rules +++ b/pkg/deb/debian_dh9/rules @@ -10,6 +10,7 @@ include /usr/share/dpkg/buildflags.mk export BUILD_TLS=yes export USE_SYSTEMD=yes +export ENABLE_FLASH=yes export CFLAGS CPPFLAGS LDFLAGS export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -ldl -latomic $(LUA_LDFLAGS) 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 fca1c74e6..6cca339b1 100644 --- a/pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf +++ b/pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf @@ -2063,3 +2063,17 @@ server-threads 2 # # By default KeyDB sets this to 2. replica-weighting-factor 2 + +# Enable FLASH support (Experimental Feature) +# storage-provider flash /path/to/flash/db + +# Blob support is a way to store very large objects (>200MB) on disk +# The files are automatically cleaned up when KeyDB exits and are only +# for temporary use. This helps reduce memory pressure for very large +# data items at the cost of some performance. +# +# By default this config is disable. When enabled the disk associated +# with KeyDB's working directory will be used. If there is insufficient +# disk space or any other I/O error KeyDB will instead use memory. +# +# blob-support false