Commit 96cee524 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

MDEV-15578: MyRocks: support zstandard compression where the distro allows it

Add libzstd-dev as a build dependency to the server and libzstd1 as a
runtime dependency for rocksdb. libzstd is practially a mandatory
compression library to ensure adequate performance for RocksDB.
parent dda808e6
...@@ -73,6 +73,15 @@ then ...@@ -73,6 +73,15 @@ then
sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.3.install sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.3.install
fi fi
# If libzstd-dev is not available (before Debian Stretch and Ubuntu Xenial)
# remove the dependency from server and rocksdb so it can build properly
if ! apt-cache madison libzstd-dev | grep 'libzstd-dev' >/dev/null 2>&1
then
sed '/libzstd-dev/d' -i debian/control
sed '/libzstd1/d' -i debian/control
fi
# Convert gcc version to numberical value. Format is Mmmpp where M is Major # Convert gcc version to numberical value. Format is Mmmpp where M is Major
# version, mm is minor version and p is patch. # version, mm is minor version and p is patch.
# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7) # -dumpfullversion & -dumpversion to make it uniform across old and new (>=7)
......
...@@ -26,6 +26,7 @@ Build-Depends: bison, ...@@ -26,6 +26,7 @@ Build-Depends: bison,
libssl-dev | libssl1.0-dev, libssl-dev | libssl1.0-dev,
libsystemd-dev, libsystemd-dev,
libxml2-dev, libxml2-dev,
libzstd-dev,
lsb-release, lsb-release,
perl (>= 5.6.0), perl (>= 5.6.0),
po-debconf, po-debconf,
...@@ -536,6 +537,7 @@ Description: Connect storage engine for MariaDB ...@@ -536,6 +537,7 @@ Description: Connect storage engine for MariaDB
Package: mariadb-plugin-rocksdb Package: mariadb-plugin-rocksdb
Architecture: amd64 arm64 mips64el ppc64el Architecture: amd64 arm64 mips64el ppc64el
Depends: mariadb-server-10.3 (= ${binary:Version}), Depends: mariadb-server-10.3 (= ${binary:Version}),
libzstd1,
${misc:Depends}, ${misc:Depends},
${shlibs:Depends} ${shlibs:Depends}
Breaks: mariadb-rocksdb-engine-10.2, Breaks: mariadb-rocksdb-engine-10.2,
......
...@@ -234,6 +234,13 @@ IF(MSVC) ...@@ -234,6 +234,13 @@ IF(MSVC)
ENDIF() ENDIF()
ENDIF() ENDIF()
# Enable ZSTD if available. Upstream rocksdb cmake will use WITH_ZSTD and set
# defines within their code.
FIND_PACKAGE(zstd)
IF (ZSTD_FOUND)
SET(WITH_ZSTD ON)
ENDIF()
IF(GIT_EXECUTABLE) IF(GIT_EXECUTABLE)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment