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
main
Peter Dillinger 3 years ago committed by Facebook GitHub Bot
parent 3d473235d4
commit 41237dd306
  1. 10
      .circleci/config.yml
  2. 28
      build_tools/fbcode_config.sh
  3. 54
      build_tools/fbcode_config_platform009.sh
  4. 54
      build_tools/fbcode_config_platform010.sh
  5. 16
      tools/sst_dump_tool.cc

@ -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

@ -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/"
if test -z $PIC_BUILD; then
SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy.a" SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy.a"
else else
SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy_pic.a" SNAPPY_LIBS=" $SNAPPY_BASE/lib/libsnappy_pic.a"
fi
CFLAGS+=" -DSNAPPY"
fi fi
CFLAGS+=" -DSNAPPY"
if test -z $PIC_BUILD; then if test -z $PIC_BUILD; then
if ! test $ROCKSDB_DISABLE_ZLIB; then
# location of zlib headers and libraries # location of zlib headers and libraries
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/" ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
ZLIB_LIBS=" $ZLIB_BASE/lib/libz.a" ZLIB_LIBS=" $ZLIB_BASE/lib/libz.a"
CFLAGS+=" -DZLIB" CFLAGS+=" -DZLIB"
fi
if ! test $ROCKSDB_DISABLE_BZIP; then
# location of bzip headers and libraries # location of bzip headers and libraries
BZIP_INCLUDE=" -I $BZIP2_BASE/include/" BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2.a" BZIP_LIBS=" $BZIP2_BASE/lib/libbz2.a"
CFLAGS+=" -DBZIP2" CFLAGS+=" -DBZIP2"
fi
if ! test $ROCKSDB_DISABLE_LZ4; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/" LZ4_INCLUDE=" -I $LZ4_BASE/include/"
LZ4_LIBS=" $LZ4_BASE/lib/liblz4.a" LZ4_LIBS=" $LZ4_BASE/lib/liblz4.a"
CFLAGS+=" -DLZ4" CFLAGS+=" -DLZ4"
fi
fi fi
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/" if ! test $ROCKSDB_DISABLE_ZSTD; then
if test -z $PIC_BUILD; then ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
if test -z $PIC_BUILD; then
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd.a" ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd.a"
else else
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd_pic.a" 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/"

@ -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"
# location of zlib headers and libraries fi
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a" if ! test $ROCKSDB_DISABLE_ZLIB; then
CFLAGS+=" -DZLIB" # location of zlib headers and libraries
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
# location of bzip headers and libraries ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a"
BZIP_INCLUDE=" -I $BZIP2_BASE/include/" CFLAGS+=" -DZLIB"
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a" fi
CFLAGS+=" -DBZIP2"
if ! test $ROCKSDB_DISABLE_BZIP; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/" # location of bzip headers and libraries
LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a" BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
CFLAGS+=" -DLZ4" BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a"
CFLAGS+=" -DBZIP2"
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/" fi
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd${MAYBE_PIC}.a"
CFLAGS+=" -DZSTD" if ! test $ROCKSDB_DISABLE_LZ4; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/"
LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a"
CFLAGS+=" -DLZ4"
fi
if ! test $ROCKSDB_DISABLE_ZSTD; then
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
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/"

@ -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"
# location of zlib headers and libraries fi
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a" if ! test $ROCKSDB_DISABLE_ZLIB; then
CFLAGS+=" -DZLIB" # location of zlib headers and libraries
ZLIB_INCLUDE=" -I $ZLIB_BASE/include/"
# location of bzip headers and libraries ZLIB_LIBS=" $ZLIB_BASE/lib/libz${MAYBE_PIC}.a"
BZIP_INCLUDE=" -I $BZIP2_BASE/include/" CFLAGS+=" -DZLIB"
BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a" fi
CFLAGS+=" -DBZIP2"
if ! test $ROCKSDB_DISABLE_BZIP; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/" # location of bzip headers and libraries
LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a" BZIP_INCLUDE=" -I $BZIP2_BASE/include/"
CFLAGS+=" -DLZ4" BZIP_LIBS=" $BZIP2_BASE/lib/libbz2${MAYBE_PIC}.a"
CFLAGS+=" -DBZIP2"
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/" fi
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd${MAYBE_PIC}.a"
CFLAGS+=" -DZSTD" if ! test $ROCKSDB_DISABLE_LZ4; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/"
LZ4_LIBS=" $LZ4_BASE/lib/liblz4${MAYBE_PIC}.a"
CFLAGS+=" -DLZ4"
fi
if ! test $ROCKSDB_DISABLE_ZSTD; then
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
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/"

@ -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="

Loading…
Cancel
Save