Add "no compression" job to CircleCI (#9850)

Summary:
Since they operate at distinct abstraction layers, I thought it
was prudent to combine with EncryptedEnv CI test for each PR, for efficiency
in testing. Also added supported compressions to sst_dump --help output
so that CI job can verify no compiled-in compression support.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9850

Test Plan: CI, some manual stuff

Reviewed By: riversand963

Differential Revision: D35682346

Pulled By: pdillinger

fbshipit-source-id: be9879c1533fed304ee32c89fd9ba4b07c2b90cc
This commit is contained in:
Peter Dillinger 2022-04-18 12:47:16 -07:00 committed by Facebook GitHub Bot
parent 3d473235d4
commit 41237dd306
5 changed files with 116 additions and 70 deletions

View File

@ -224,14 +224,16 @@ jobs:
- run: make V=1 J=32 -j32 check - run: make V=1 J=32 -j32 check
- post-steps - post-steps
build-linux-encrypted-env: build-linux-encrypted_env-no_compression:
machine: machine:
image: ubuntu-2004:202111-02 image: ubuntu-2004:202111-02
resource_class: 2xlarge resource_class: 2xlarge
steps: steps:
- pre-steps - pre-steps
- install-gflags - install-gflags
- run: ENCRYPTED_ENV=1 make V=1 J=32 -j32 check - run: ENCRYPTED_ENV=1 ROCKSDB_DISABLE_SNAPPY=1 ROCKSDB_DISABLE_ZLIB=1 ROCKSDB_DISABLE_BZIP=1 ROCKSDB_DISABLE_LZ4=1 ROCKSDB_DISABLE_ZSTD=1 make V=1 J=32 -j32 check
- run: |
./sst_dump --help | egrep -q 'Supported compression types: kNoCompression$' # Verify no compiled in compression
- post-steps - post-steps
build-linux-shared_lib-alt_namespace-status_checked: build-linux-shared_lib-alt_namespace-status_checked:
@ -803,9 +805,9 @@ workflows:
jobs: jobs:
- build-linux-cmake-with-folly - build-linux-cmake-with-folly
- build-linux-cmake-with-benchmark - build-linux-cmake-with-benchmark
build-linux-encrypted-env: build-linux-encrypted_env-no_compression:
jobs: jobs:
- build-linux-encrypted-env - build-linux-encrypted_env-no_compression
build-linux-shared_lib-alt_namespace-status_checked: build-linux-shared_lib-alt_namespace-status_checked:
jobs: jobs:
- build-linux-shared_lib-alt_namespace-status_checked - build-linux-shared_lib-alt_namespace-status_checked

View File

@ -21,38 +21,48 @@ LIBGCC_LIBS=" -L $LIBGCC_BASE/lib"
GLIBC_INCLUDE="$GLIBC_BASE/include" GLIBC_INCLUDE="$GLIBC_BASE/include"
GLIBC_LIBS=" -L $GLIBC_BASE/lib" GLIBC_LIBS=" -L $GLIBC_BASE/lib"
# snappy if ! test $ROCKSDB_DISABLE_SNAPPY; then
SNAPPY_INCLUDE=" -I $SNAPPY_BASE/include/" # snappy
if test -z $PIC_BUILD; then SNAPPY_INCLUDE=" -I $SNAPPY_BASE/include/"
SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy.a" if test -z $PIC_BUILD; then
else SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy.a"
SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy_pic.a" else
fi SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy_pic.a"
CFLAGS+=" -DSNAPPY" fi
CFLAGS+=" -DSNAPPY"
if test -z $PIC_BUILD; then
# location of zlib headers and libraries
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
ZLIB_LIBS=" $ZLIB_BASE/lib/libz.a"
CFLAGS+=" -DZLIB"
# location of bzip headers and libraries
BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2.a"
CFLAGS+=" -DBZIP2"
LZ4_INCLUDE=" -I $LZ4_BASE/include/"
LZ4_LIBS=" $LZ4_BASE/lib/liblz4.a"
CFLAGS+=" -DLZ4"
fi fi
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
if test -z $PIC_BUILD; then if test -z $PIC_BUILD; then
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd.a" if ! test $ROCKSDB_DISABLE_ZLIB; then
else # location of zlib headers and libraries
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd_pic.a" ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
ZLIB_LIBS=" $ZLIB_BASE/lib/libz.a"
CFLAGS+=" -DZLIB"
fi
if ! test $ROCKSDB_DISABLE_BZIP; then
# location of bzip headers and libraries
BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2.a"
CFLAGS+=" -DBZIP2"
fi
if ! test $ROCKSDB_DISABLE_LZ4; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/"
LZ4_LIBS=" $LZ4_BASE/lib/liblz4.a"
CFLAGS+=" -DLZ4"
fi
fi
if ! test $ROCKSDB_DISABLE_ZSTD; then
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
if test -z $PIC_BUILD; then
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd.a"
else
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd_pic.a"
fi
CFLAGS+=" -DZSTD -DZSTD_STATIC_LINKING_ONLY"
fi fi
CFLAGS+=" -DZSTD -DZSTD_STATIC_LINKING_ONLY"
# location of gflags headers and libraries # location of gflags headers and libraries
GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/" GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/"

View File

@ -27,28 +27,38 @@ else
MAYBE_PIC=_pic MAYBE_PIC=_pic
fi fi
# snappy if ! test $ROCKSDB_DISABLE_SNAPPY; then
SNAPPY_INCLUDE=" -I $SNAPPY_BASE/include/" # snappy
SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy${MAYBE_PIC}.a" SNAPPY_INCLUDE=" -I $SNAPPY_BASE/include/"
CFLAGS+=" -DSNAPPY" SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy${MAYBE_PIC}.a"
CFLAGS+=" -DSNAPPY"
fi
# location of zlib headers and libraries if ! test $ROCKSDB_DISABLE_ZLIB; then
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/" # location of zlib headers and libraries
ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a" ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
CFLAGS+=" -DZLIB" ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a"
CFLAGS+=" -DZLIB"
fi
# location of bzip headers and libraries if ! test $ROCKSDB_DISABLE_BZIP; then
BZIP_INCLUDE=" -I $BZIP2_BASE/include/" # location of bzip headers and libraries
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a" BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
CFLAGS+=" -DBZIP2" BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a"
CFLAGS+=" -DBZIP2"
fi
LZ4_INCLUDE=" -I $LZ4_BASE/include/" if ! test $ROCKSDB_DISABLE_LZ4; then
LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a" LZ4_INCLUDE=" -I $LZ4_BASE/include/"
CFLAGS+=" -DLZ4" LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a"
CFLAGS+=" -DLZ4"
fi
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/" if ! test $ROCKSDB_DISABLE_ZSTD; then
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd${MAYBE_PIC}.a" ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
CFLAGS+=" -DZSTD" ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd${MAYBE_PIC}.a"
CFLAGS+=" -DZSTD"
fi
# location of gflags headers and libraries # location of gflags headers and libraries
GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/" GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/"

View File

@ -29,28 +29,38 @@ else
MAYBE_PIC=_pic MAYBE_PIC=_pic
fi fi
# snappy if ! test $ROCKSDB_DISABLE_SNAPPY; then
SNAPPY_INCLUDE=" -I $SNAPPY_BASE/include/" # snappy
SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy${MAYBE_PIC}.a" SNAPPY_INCLUDE=" -I $SNAPPY_BASE/include/"
CFLAGS+=" -DSNAPPY" SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy${MAYBE_PIC}.a"
CFLAGS+=" -DSNAPPY"
fi
# location of zlib headers and libraries if ! test $ROCKSDB_DISABLE_ZLIB; then
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/" # location of zlib headers and libraries
ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a" ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
CFLAGS+=" -DZLIB" ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a"
CFLAGS+=" -DZLIB"
fi
# location of bzip headers and libraries if ! test $ROCKSDB_DISABLE_BZIP; then
BZIP_INCLUDE=" -I $BZIP2_BASE/include/" # location of bzip headers and libraries
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a" BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
CFLAGS+=" -DBZIP2" BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a"
CFLAGS+=" -DBZIP2"
fi
LZ4_INCLUDE=" -I $LZ4_BASE/include/" if ! test $ROCKSDB_DISABLE_LZ4; then
LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a" LZ4_INCLUDE=" -I $LZ4_BASE/include/"
CFLAGS+=" -DLZ4" LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a"
CFLAGS+=" -DLZ4"
fi
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/" if ! test $ROCKSDB_DISABLE_ZSTD; then
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd${MAYBE_PIC}.a" ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
CFLAGS+=" -DZSTD" ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd${MAYBE_PIC}.a"
CFLAGS+=" -DZSTD"
fi
# location of gflags headers and libraries # location of gflags headers and libraries
GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/" GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/"
@ -108,7 +118,7 @@ if [ -z "$USE_CLANG" ]; then
CXX="$GCC_BASE/bin/g++" CXX="$GCC_BASE/bin/g++"
AR="$GCC_BASE/bin/gcc-ar" AR="$GCC_BASE/bin/gcc-ar"
CFLAGS+=" -B$BINUTILS" CFLAGS+=" -B$BINUTILS"
CFLAGS+=" -isystem $LIBGCC_INCLUDE" CFLAGS+=" -isystem $LIBGCC_INCLUDE"
CFLAGS+=" -isystem $GLIBC_INCLUDE" CFLAGS+=" -isystem $GLIBC_INCLUDE"

View File

@ -10,7 +10,9 @@
#include <cinttypes> #include <cinttypes>
#include <iostream> #include <iostream>
#include "options/options_helper.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/convenience.h"
#include "rocksdb/utilities/ldb_cmd.h" #include "rocksdb/utilities/ldb_cmd.h"
#include "table/sst_file_dumper.h" #include "table/sst_file_dumper.h"
@ -30,6 +32,16 @@ static const std::vector<std::pair<CompressionType, const char*>>
namespace { namespace {
void print_help(bool to_stderr) { void print_help(bool to_stderr) {
std::string supported_compressions;
for (CompressionType ct : GetSupportedCompressions()) {
if (!supported_compressions.empty()) {
supported_compressions += ", ";
}
std::string str;
Status s = GetStringFromCompressionType(&str, ct);
assert(s.ok());
supported_compressions += str;
}
fprintf( fprintf(
to_stderr ? stderr : stdout, to_stderr ? stderr : stdout,
R"(sst_dump --file=<data_dir_OR_sst_file> [--command=check|scan|raw|recompress|identify] R"(sst_dump --file=<data_dir_OR_sst_file> [--command=check|scan|raw|recompress|identify]
@ -88,6 +100,7 @@ void print_help(bool to_stderr) {
kSnappyCompression> kSnappyCompression>
Can be combined with --command=recompress to run recompression for this Can be combined with --command=recompress to run recompression for this
list of compression types list of compression types
Supported compression types: %s
--parse_internal_key=<0xKEY> --parse_internal_key=<0xKEY>
Convenience option to parse an internal key on the command line. Dumps the Convenience option to parse an internal key on the command line. Dumps the
@ -109,7 +122,8 @@ void print_help(bool to_stderr) {
--compression_max_dict_buffer_bytes=<int64_t> --compression_max_dict_buffer_bytes=<int64_t>
Limit on buffer size from which we collect samples for dictionary generation. Limit on buffer size from which we collect samples for dictionary generation.
)"); )",
supported_compressions.c_str());
} }
// arg_name would include all prefix, e.g. "--my_arg=" // arg_name would include all prefix, e.g. "--my_arg="