databases/rocksdb9: Add rocksdb9 9.11.2 (copied from rocksdb)
- Add PORTSCOUT
This commit is contained in:
@@ -880,6 +880,7 @@
|
||||
SUBDIR += retcl
|
||||
SUBDIR += rocksdb
|
||||
SUBDIR += rocksdb-jni
|
||||
SUBDIR += rocksdb9
|
||||
SUBDIR += rqlite
|
||||
SUBDIR += rrdman
|
||||
SUBDIR += rrdmerge
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
PORTNAME= rocksdb
|
||||
PORTVERSION= 9.11.2
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= databases
|
||||
PKGNAMESUFFIX= 9
|
||||
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Persistent key-value store for fast storage environments
|
||||
WWW= https://rocksdb.org/ \
|
||||
https://github.com/facebook/rocksdb
|
||||
|
||||
LICENSE= APACHE20 GPLv2
|
||||
LICENSE_COMB= dual
|
||||
LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE.Apache
|
||||
LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING
|
||||
|
||||
BROKEN_DragonFly= does not build on DragonFly BSD using GCC with -Werror
|
||||
BROKEN_armv6= does not build: db/c.cc:2281:44: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int')
|
||||
BROKEN_armv7= does not build: /nxb-bin/usr/bin/ld: undefined reference to symbol `__gnu_Unwind_Find_exidx@@FBSD_1.4' (try adding -lc) #'`
|
||||
|
||||
BUILD_DEPENDS= bash:shells/bash
|
||||
LIB_DEPENDS= libgflags.so:devel/gflags \
|
||||
libsnappy.so:archivers/snappy
|
||||
|
||||
USES= compiler:c++17-lang gmake localbase:ldflags perl5
|
||||
USE_PERL5= build
|
||||
|
||||
ALL_TARGET= shared_lib static_lib all
|
||||
CFLAGS+= -DOS_FREEBSD
|
||||
CONFIGURE_ARGS= make_config.mk
|
||||
CONFIGURE_ENV= PORTABLE=0 ROCKSDB_ROOT=${WRKSRC}
|
||||
CONFIGURE_SCRIPT= build_tools/build_detect_platform
|
||||
HAS_CONFIGURE= yes
|
||||
MAKE_ENV= CXX=${CXX} INSTALL_PATH=${STAGEDIR}${PREFIX} USE_RTTI=1 V=1
|
||||
USE_CXXSTD= c++17
|
||||
USE_LDCONFIG= yes
|
||||
TEST_TARGET= check
|
||||
|
||||
PLIST_SUB= PORTVERSION=${PORTVERSION} SHLIB_VER=${PORTVERSION:R}
|
||||
PORTDATA= make_config.mk
|
||||
|
||||
GH_ACCOUNT= facebook
|
||||
USE_GITHUB= yes
|
||||
|
||||
CONFLICTS_INSTALL= rocksdb-lite
|
||||
|
||||
PORTSCOUT= limit:^9\.
|
||||
|
||||
BENCHMARKS= cache_bench db_bench memtablerep_bench persistent_cache_bench range_del_aggregator_bench table_reader_bench
|
||||
TOOLS= blob_dump db_repl_stress db_sanity_test db_stress ldb rocksdb_dump rocksdb_undump sst_dump trace_analyzer write_stress
|
||||
|
||||
OPTIONS_DEFINE= DEBUG LZ4 ZSTD
|
||||
OPTIONS_DEFAULT=LZ4 ZSTD
|
||||
|
||||
DEBUG_MAKE_ENV= DEBUG_LEVEL=2
|
||||
DEBUG_MAKE_ENV_OFF= DEBUG_LEVEL=0
|
||||
LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4
|
||||
LZ4_MAKE_ENV_OFF= ROCKSDB_DISABLE_LZ4=yes
|
||||
ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
|
||||
ZSTD_MAKE_ENV_OFF= ROCKSDB_DISABLE_ZSTD=yes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${CHOSEN_COMPILER_TYPE} == clang
|
||||
CXXFLAGS+= -Wno-unused-parameter -Wno-unused-variable
|
||||
.if ${COMPILER_VERSION} >= 170
|
||||
CXXFLAGS+= -Wno-sync-alignment
|
||||
.endif
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if (${ARCH} == amd64 || ${ARCH} == i386) && !empty(CFLAGS:M-march=*)
|
||||
@${REINPLACE_CMD} -e 's| -march=native| ${CFLAGS:M-march=*}|' ${WRKSRC}/build_tools/build_detect_platform
|
||||
.else
|
||||
@${REINPLACE_CMD} -e 's| -march=native||' ${WRKSRC}/build_tools/build_detect_platform
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/
|
||||
cd ${WRKSRC}/ && ${INSTALL_PROGRAM} ${BENCHMARKS} ${TOOLS} ${STAGEDIR}${PREFIX}/bin/
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/librocksdb.so
|
||||
${INSTALL_LIB} ${WRKSRC}/librocksdb_test.so ${WRKSRC}/librocksdb_tools.so ${STAGEDIR}${PREFIX}/lib/
|
||||
${INSTALL_DATA} ${WRKSRC}/make_config.mk ${STAGEDIR}${DATADIR}/
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
@@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1744288704
|
||||
SHA256 (facebook-rocksdb-v9.11.2_GH0.tar.gz) = 0466a3c220464410687c45930f3fa944052229c894274fddb7d821397f2b8fba
|
||||
SIZE (facebook-rocksdb-v9.11.2_GH0.tar.gz) = 13713041
|
||||
@@ -0,0 +1,55 @@
|
||||
--- Makefile.orig 2024-06-24 23:48:34 UTC
|
||||
+++ Makefile
|
||||
@@ -91,20 +91,20 @@ $(info $$DEBUG_LEVEL is $(DEBUG_LEVEL), $$LIB_MODE is
|
||||
# Detect what platform we're building on.
|
||||
# Export some common variables that might have been passed as Make variables
|
||||
# instead of environment variables.
|
||||
-dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)"; \
|
||||
- export CXXFLAGS="$(EXTRA_CXXFLAGS)"; \
|
||||
- export LDFLAGS="$(EXTRA_LDFLAGS)"; \
|
||||
- export COMPILE_WITH_ASAN="$(COMPILE_WITH_ASAN)"; \
|
||||
- export COMPILE_WITH_TSAN="$(COMPILE_WITH_TSAN)"; \
|
||||
- export COMPILE_WITH_UBSAN="$(COMPILE_WITH_UBSAN)"; \
|
||||
- export PORTABLE="$(PORTABLE)"; \
|
||||
- export ROCKSDB_NO_FBCODE="$(ROCKSDB_NO_FBCODE)"; \
|
||||
- export USE_CLANG="$(USE_CLANG)"; \
|
||||
- export LIB_MODE="$(LIB_MODE)"; \
|
||||
- export ROCKSDB_CXX_STANDARD="$(ROCKSDB_CXX_STANDARD)"; \
|
||||
- export USE_FOLLY="$(USE_FOLLY)"; \
|
||||
- export USE_FOLLY_LITE="$(USE_FOLLY_LITE)"; \
|
||||
- "$(CURDIR)/build_tools/build_detect_platform" "$(CURDIR)/make_config.mk"))
|
||||
+#dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)"; \
|
||||
+# export CXXFLAGS="$(EXTRA_CXXFLAGS)"; \
|
||||
+# export LDFLAGS="$(EXTRA_LDFLAGS)"; \
|
||||
+# export COMPILE_WITH_ASAN="$(COMPILE_WITH_ASAN)"; \
|
||||
+# export COMPILE_WITH_TSAN="$(COMPILE_WITH_TSAN)"; \
|
||||
+# export COMPILE_WITH_UBSAN="$(COMPILE_WITH_UBSAN)"; \
|
||||
+# export PORTABLE="$(PORTABLE)"; \
|
||||
+# export ROCKSDB_NO_FBCODE="$(ROCKSDB_NO_FBCODE)"; \
|
||||
+# export USE_CLANG="$(USE_CLANG)"; \
|
||||
+# export LIB_MODE="$(LIB_MODE)"; \
|
||||
+# export ROCKSDB_CXX_STANDARD="$(ROCKSDB_CXX_STANDARD)"; \
|
||||
+# export USE_FOLLY="$(USE_FOLLY)"; \
|
||||
+# export USE_FOLLY_LITE="$(USE_FOLLY_LITE)"; \
|
||||
+# "$(CURDIR)/build_tools/build_detect_platform" "$(CURDIR)/make_config.mk"))
|
||||
# this file is generated by the previous line to set build flags and sources
|
||||
include make_config.mk
|
||||
|
||||
@@ -884,7 +884,7 @@ endif # PLATFORM_SHARED_EXT
|
||||
rocksdbjavastatic rocksdbjava install install-static install-shared \
|
||||
uninstall analyze tools tools_lib check-headers checkout_folly
|
||||
|
||||
-all: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(TESTS)
|
||||
+all: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs # $(TESTS)
|
||||
|
||||
all_but_some_tests: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(ROCKSDBTESTS_SUBSET)
|
||||
|
||||
@@ -1297,7 +1297,7 @@ $(STATIC_LIBRARY): $(LIB_OBJECTS)
|
||||
# Unit tests and tools
|
||||
# ---------------------------------------------------------------------------
|
||||
$(STATIC_LIBRARY): $(LIB_OBJECTS)
|
||||
- $(AM_V_AR)rm -f $@ $(SHARED1) $(SHARED2) $(SHARED3) $(SHARED4)
|
||||
+ $(AM_V_AR)rm -f $@ # $(SHARED1) $(SHARED2) $(SHARED3) $(SHARED4)
|
||||
$(AM_V_at)$(AR) $(ARFLAGS) $@ $(LIB_OBJECTS)
|
||||
|
||||
$(STATIC_TEST_LIBRARY): $(TEST_OBJECTS)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- util/crc32c_arm64.cc.orig 2024-02-28 00:24:11 UTC
|
||||
+++ util/crc32c_arm64.cc
|
||||
@@ -10,7 +10,7 @@
|
||||
#if defined(__linux__)
|
||||
#include <asm/hwcap.h>
|
||||
#endif
|
||||
-#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
|
||||
+#if defined(ROCKSDB_AUXV_GETAUXVAL_PRESENT) || defined(__FreeBSD__)
|
||||
#include <sys/auxv.h>
|
||||
#endif
|
||||
#ifndef HWCAP_CRC32
|
||||
@@ -0,0 +1,115 @@
|
||||
Remove -fno-builtin-memcmp and -ltcmalloc
|
||||
|
||||
% sed -i .orig 's| -fno-builtin-memcmp||; s| -ltcmalloc||' build_tools/build_detect_platform
|
||||
|
||||
--- build_tools/build_detect_platform.orig 2022-02-17 23:56:08 UTC
|
||||
+++ build_tools/build_detect_platform
|
||||
@@ -145,7 +145,7 @@ PLATFORM_SHARED_VERSIONED=true
|
||||
# generic port files (working on all platform by #ifdef) go directly in /port
|
||||
GENERIC_PORT_FILES=`cd "$ROCKSDB_ROOT"; find port -name '*.cc' | tr "\n" " "`
|
||||
|
||||
-# On GCC, we pick libc's memcmp over GCC's memcmp via -fno-builtin-memcmp
|
||||
+# On GCC, we pick libc's memcmp over GCC's memcmp via
|
||||
case "$TARGET_OS" in
|
||||
Darwin)
|
||||
PLATFORM=OS_MACOSX
|
||||
@@ -166,7 +166,7 @@ case "$TARGET_OS" in
|
||||
PLATFORM=OS_LINUX
|
||||
COMMON_FLAGS="$COMMON_FLAGS -DOS_LINUX"
|
||||
if [ -z "$USE_CLANG" ]; then
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS"
|
||||
else
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -latomic"
|
||||
fi
|
||||
@@ -193,21 +193,21 @@ EOF
|
||||
;;
|
||||
SunOS)
|
||||
PLATFORM=OS_SOLARIS
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_SOLARIS -m64"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -D_REENTRANT -DOS_SOLARIS -m64"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lrt -static-libstdc++ -static-libgcc -m64"
|
||||
# PORT_FILES=port/sunos/sunos_specific.cc
|
||||
;;
|
||||
AIX)
|
||||
PLATFORM=OS_AIX
|
||||
CC=gcc
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -maix64 -pthread -fno-builtin-memcmp -D_REENTRANT -DOS_AIX -D__STDC_FORMAT_MACROS"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -maix64 -pthread -D_REENTRANT -DOS_AIX -D__STDC_FORMAT_MACROS"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -pthread -lpthread -lrt -maix64 -static-libstdc++ -static-libgcc"
|
||||
# PORT_FILES=port/aix/aix_specific.cc
|
||||
;;
|
||||
FreeBSD)
|
||||
PLATFORM=OS_FREEBSD
|
||||
CXX=clang++
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_FREEBSD"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -D_REENTRANT -DOS_FREEBSD"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread"
|
||||
# PORT_FILES=port/freebsd/freebsd_specific.cc
|
||||
;;
|
||||
@@ -215,7 +215,7 @@ EOF
|
||||
PLATFORM=OS_GNU_KFREEBSD
|
||||
COMMON_FLAGS="$COMMON_FLAGS -DOS_GNU_KFREEBSD"
|
||||
if [ -z "$USE_CLANG" ]; then
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS"
|
||||
else
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -latomic"
|
||||
fi
|
||||
@@ -224,14 +224,14 @@ EOF
|
||||
;;
|
||||
NetBSD)
|
||||
PLATFORM=OS_NETBSD
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_NETBSD"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -D_REENTRANT -DOS_NETBSD"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lgcc_s"
|
||||
# PORT_FILES=port/netbsd/netbsd_specific.cc
|
||||
;;
|
||||
OpenBSD)
|
||||
PLATFORM=OS_OPENBSD
|
||||
CXX=clang++
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_OPENBSD"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -D_REENTRANT -DOS_OPENBSD"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -pthread"
|
||||
# PORT_FILES=port/openbsd/openbsd_specific.cc
|
||||
FIND=gfind
|
||||
@@ -239,7 +239,7 @@ EOF
|
||||
;;
|
||||
DragonFly)
|
||||
PLATFORM=OS_DRAGONFLYBSD
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_DRAGONFLYBSD"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -D_REENTRANT -DOS_DRAGONFLYBSD"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread"
|
||||
# PORT_FILES=port/dragonfly/dragonfly_specific.cc
|
||||
;;
|
||||
@@ -249,7 +249,7 @@ EOF
|
||||
PLATFORM_CXXFLAGS="-std=gnu++11"
|
||||
COMMON_FLAGS="$COMMON_FLAGS -DCYGWIN"
|
||||
if [ -z "$USE_CLANG" ]; then
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS"
|
||||
else
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -latomic"
|
||||
fi
|
||||
@@ -258,7 +258,7 @@ EOF
|
||||
;;
|
||||
OS_ANDROID_CROSSCOMPILE)
|
||||
PLATFORM=OS_ANDROID
|
||||
- COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_ANDROID -DROCKSDB_PLATFORM_POSIX"
|
||||
+ COMMON_FLAGS="$COMMON_FLAGS -D_REENTRANT -DOS_ANDROID -DROCKSDB_PLATFORM_POSIX"
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS " # All pthread features are in the Android C library
|
||||
# PORT_FILES=port/android/android.cc
|
||||
CROSS_COMPILE=true
|
||||
@@ -448,9 +448,9 @@ EOF
|
||||
if ! test $JEMALLOC && ! test $ROCKSDB_DISABLE_TCMALLOC; then
|
||||
# jemalloc is not available. Let's try tcmalloc
|
||||
if echo 'int main() {}' | $CXX $PLATFORM_CXXFLAGS -x c++ - -o test.o \
|
||||
- -ltcmalloc 2>/dev/null; then
|
||||
- PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -ltcmalloc"
|
||||
- JAVA_LDFLAGS="$JAVA_LDFLAGS -ltcmalloc"
|
||||
+ 2>/dev/null; then
|
||||
+ PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS"
|
||||
+ JAVA_LDFLAGS="$JAVA_LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Reference: https://github.com/facebook/rocksdb/commit/1f0426c44b9416d90a90266a87d6a198b5f61627
|
||||
|
||||
--- db/db_impl/db_impl_write.cc.orig 2024-12-16 20:45:14 UTC
|
||||
+++ db/db_impl/db_impl_write.cc
|
||||
@@ -205,7 +205,7 @@ Status DBImpl::IngestWBWI(std::shared_ptr<WriteBatchWi
|
||||
ColumnFamilySet* cf_set = versions_->GetColumnFamilySet();
|
||||
|
||||
// Create WBWIMemTables
|
||||
- for (const auto [cf_id, stat] : wbwi->GetCFStats()) {
|
||||
+ for (const auto& [cf_id, stat] : wbwi->GetCFStats()) {
|
||||
ColumnFamilyData* cfd = cf_set->GetColumnFamily(cf_id);
|
||||
if (!cfd) {
|
||||
if (ignore_missing_cf) {
|
||||
@@ -0,0 +1,119 @@
|
||||
--- db/db_test_util.cc.orig 2023-02-19 21:44:55 UTC
|
||||
+++ db/db_test_util.cc
|
||||
@@ -102,9 +102,11 @@ DBTestBase::DBTestBase(const std::string path, bool en
|
||||
}
|
||||
|
||||
DBTestBase::~DBTestBase() {
|
||||
+#ifndef NDEBUG
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->LoadDependency({});
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->ClearAllCallBacks();
|
||||
+#endif
|
||||
Close();
|
||||
Options options;
|
||||
options.db_paths.emplace_back(dbname_, 0);
|
||||
@@ -338,6 +340,7 @@ Options DBTestBase::GetOptions(
|
||||
Options options = default_options;
|
||||
BlockBasedTableOptions table_options;
|
||||
bool set_block_based_table_factory = true;
|
||||
+#ifndef NDEBUG
|
||||
#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && \
|
||||
!defined(OS_AIX)
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->ClearCallBack(
|
||||
@@ -345,6 +348,7 @@ Options DBTestBase::GetOptions(
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->ClearCallBack(
|
||||
"NewWritableFile:O_DIRECT");
|
||||
#endif
|
||||
+#endif
|
||||
// kMustFreeHeapAllocations -> indicates ASAN build
|
||||
if (kMustFreeHeapAllocations && !options_override.full_block_cache) {
|
||||
// Detecting block cache use-after-free is normally difficult in unit
|
||||
@@ -409,7 +413,9 @@ Options DBTestBase::GetOptions(
|
||||
options.use_direct_reads = true;
|
||||
options.use_direct_io_for_flush_and_compaction = true;
|
||||
options.compaction_readahead_size = 2 * 1024 * 1024;
|
||||
+#ifndef NDEBUG
|
||||
SetupSyncPointsToMockDirectIO();
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
case kMergePut:
|
||||
@@ -1141,6 +1147,7 @@ std::string DBTestBase::FilesPerLevel(int cf) {
|
||||
}
|
||||
|
||||
|
||||
+#ifndef NDEBUG
|
||||
std::vector<uint64_t> DBTestBase::GetBlobFileNumbers() {
|
||||
VersionSet* const versions = dbfull()->GetVersionSet();
|
||||
assert(versions);
|
||||
@@ -1166,6 +1173,7 @@ std::vector<uint64_t> DBTestBase::GetBlobFileNumbers()
|
||||
|
||||
return result;
|
||||
}
|
||||
+#endif
|
||||
|
||||
size_t DBTestBase::CountFiles() {
|
||||
size_t count = 0;
|
||||
@@ -1248,6 +1256,7 @@ void DBTestBase::FillLevels(const std::string& smalles
|
||||
}
|
||||
|
||||
void DBTestBase::MoveFilesToLevel(int level, int cf) {
|
||||
+#ifndef NDEBUG
|
||||
for (int l = 0; l < level; ++l) {
|
||||
if (cf > 0) {
|
||||
EXPECT_OK(dbfull()->TEST_CompactRange(l, nullptr, nullptr, handles_[cf]));
|
||||
@@ -1255,12 +1264,15 @@ void DBTestBase::MoveFilesToLevel(int level, int cf) {
|
||||
EXPECT_OK(dbfull()->TEST_CompactRange(l, nullptr, nullptr));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void DBTestBase::DumpFileCounts(const char* label) {
|
||||
fprintf(stderr, "---\n%s:\n", label);
|
||||
+#ifndef NDEBUG
|
||||
fprintf(stderr, "maxoverlap: %" PRIu64 "\n",
|
||||
dbfull()->TEST_MaxNextLevelOverlappingBytes());
|
||||
+#endif
|
||||
for (int level = 0; level < db_->NumberLevels(); level++) {
|
||||
int num = NumTableFilesAtLevel(level);
|
||||
if (num > 0) {
|
||||
@@ -1302,10 +1314,12 @@ void DBTestBase::GenerateNewFile(int cf, Random* rnd,
|
||||
ASSERT_OK(Put(cf, Key(*key_idx), rnd->RandomString((i == 99) ? 1 : 990)));
|
||||
(*key_idx)++;
|
||||
}
|
||||
+#ifndef NDEBUG
|
||||
if (!nowait) {
|
||||
ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable());
|
||||
ASSERT_OK(dbfull()->TEST_WaitForCompact());
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
// this will generate non-overlapping files since it keeps increasing key_idx
|
||||
@@ -1314,10 +1328,12 @@ void DBTestBase::GenerateNewFile(Random* rnd, int* key
|
||||
ASSERT_OK(Put(Key(*key_idx), rnd->RandomString((i == 99) ? 1 : 990)));
|
||||
(*key_idx)++;
|
||||
}
|
||||
+#ifndef NDEBUG
|
||||
if (!nowait) {
|
||||
ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable());
|
||||
ASSERT_OK(dbfull()->TEST_WaitForCompact());
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
const int DBTestBase::kNumKeysByGenerateNewRandomFile = 51;
|
||||
@@ -1327,10 +1343,12 @@ void DBTestBase::GenerateNewRandomFile(Random* rnd, bo
|
||||
ASSERT_OK(Put("key" + rnd->RandomString(7), rnd->RandomString(2000)));
|
||||
}
|
||||
ASSERT_OK(Put("key" + rnd->RandomString(7), rnd->RandomString(200)));
|
||||
+#ifndef NDEBUG
|
||||
if (!nowait) {
|
||||
ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable());
|
||||
ASSERT_OK(dbfull()->TEST_WaitForCompact());
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
std::string DBTestBase::IterStatus(Iterator* iter) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- memory/arena_test.cc.orig 2023-02-19 21:44:55 UTC
|
||||
+++ memory/arena_test.cc
|
||||
@@ -96,7 +96,7 @@ static void ApproximateMemoryUsageTest(size_t huge_pag
|
||||
ASSERT_EQ(kZero, arena.ApproximateMemoryUsage());
|
||||
|
||||
// allocate inline bytes
|
||||
- const size_t kAlignUnit = alignof(max_align_t);
|
||||
+ const size_t kAlignUnit = alignof(std::max_align_t);
|
||||
EXPECT_TRUE(arena.IsInInlineBlock());
|
||||
arena.AllocateAligned(kAlignUnit);
|
||||
EXPECT_TRUE(arena.IsInInlineBlock());
|
||||
@@ -0,0 +1,25 @@
|
||||
--- utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h.orig 2021-12-10 22:56:20 UTC
|
||||
+++ utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
||||
@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliate
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
-#if defined(__powerpc__)
|
||||
+#if defined(__powerpc__) && defined(__linux__)
|
||||
#include <sys/platform/ppc.h>
|
||||
#endif
|
||||
|
||||
@@ -132,7 +132,13 @@ static inline tokutime_t toku_time_now(void) {
|
||||
__asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result));
|
||||
return result;
|
||||
#elif defined(__powerpc__)
|
||||
+#ifdef __linux__
|
||||
return __ppc_get_timebase();
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ int64_t tbr;
|
||||
+ asm volatile("mfspr %0, 268" : "=r"(tbr));
|
||||
+ return tbr;
|
||||
+#endif
|
||||
#elif defined(__s390x__)
|
||||
uint64_t result;
|
||||
asm volatile("stckf %0" : "=Q"(result) : : "cc");
|
||||
@@ -0,0 +1,11 @@
|
||||
--- third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc.orig 2020-05-27 23:38:10 UTC
|
||||
+++ third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
// This line ensures that gtest.h can be compiled on its own, even
|
||||
// when it's fused.
|
||||
-#include "gtest/gtest.h"
|
||||
+#include "gtest.h"
|
||||
|
||||
// The following lines pull in the real gtest *.cc files.
|
||||
// Copyright 2005, Google Inc.
|
||||
@@ -0,0 +1,7 @@
|
||||
RocksDB is an embeddable persistent key-value store for fast storage. RocksDB
|
||||
can also be the foundation for a client-server database but our current focus is
|
||||
on embedded workloads.
|
||||
|
||||
RocksDB builds on LevelDB to be scalable to run on servers with many CPU cores,
|
||||
to efficiently use fast storage, to support IO-bound, in-memory and write-once
|
||||
workloads, and to be flexible to allow for innovation.
|
||||
@@ -0,0 +1,136 @@
|
||||
bin/blob_dump
|
||||
bin/cache_bench
|
||||
bin/db_bench
|
||||
bin/db_repl_stress
|
||||
bin/db_sanity_test
|
||||
bin/db_stress
|
||||
bin/ldb
|
||||
bin/memtablerep_bench
|
||||
bin/persistent_cache_bench
|
||||
bin/range_del_aggregator_bench
|
||||
bin/rocksdb_dump
|
||||
bin/rocksdb_undump
|
||||
bin/sst_dump
|
||||
bin/table_reader_bench
|
||||
bin/trace_analyzer
|
||||
bin/write_stress
|
||||
include/rocksdb/advanced_cache.h
|
||||
include/rocksdb/advanced_options.h
|
||||
include/rocksdb/attribute_groups.h
|
||||
include/rocksdb/block_cache_trace_writer.h
|
||||
include/rocksdb/c.h
|
||||
include/rocksdb/cache.h
|
||||
include/rocksdb/cache_bench_tool.h
|
||||
include/rocksdb/cleanable.h
|
||||
include/rocksdb/compaction_filter.h
|
||||
include/rocksdb/compaction_job_stats.h
|
||||
include/rocksdb/comparator.h
|
||||
include/rocksdb/compression_type.h
|
||||
include/rocksdb/concurrent_task_limiter.h
|
||||
include/rocksdb/configurable.h
|
||||
include/rocksdb/convenience.h
|
||||
include/rocksdb/customizable.h
|
||||
include/rocksdb/data_structure.h
|
||||
include/rocksdb/db.h
|
||||
include/rocksdb/db_bench_tool.h
|
||||
include/rocksdb/db_dump_tool.h
|
||||
include/rocksdb/db_stress_tool.h
|
||||
include/rocksdb/env.h
|
||||
include/rocksdb/env_encryption.h
|
||||
include/rocksdb/experimental.h
|
||||
include/rocksdb/external_table_reader.h
|
||||
include/rocksdb/file_checksum.h
|
||||
include/rocksdb/file_system.h
|
||||
include/rocksdb/filter_policy.h
|
||||
include/rocksdb/flush_block_policy.h
|
||||
include/rocksdb/functor_wrapper.h
|
||||
include/rocksdb/io_status.h
|
||||
include/rocksdb/iostats_context.h
|
||||
include/rocksdb/iterator.h
|
||||
include/rocksdb/iterator_base.h
|
||||
include/rocksdb/ldb_tool.h
|
||||
include/rocksdb/listener.h
|
||||
include/rocksdb/memory_allocator.h
|
||||
include/rocksdb/memtablerep.h
|
||||
include/rocksdb/merge_operator.h
|
||||
include/rocksdb/metadata.h
|
||||
include/rocksdb/options.h
|
||||
include/rocksdb/perf_context.h
|
||||
include/rocksdb/perf_level.h
|
||||
include/rocksdb/persistent_cache.h
|
||||
include/rocksdb/port_defs.h
|
||||
include/rocksdb/rate_limiter.h
|
||||
include/rocksdb/rocksdb_namespace.h
|
||||
include/rocksdb/secondary_cache.h
|
||||
include/rocksdb/slice.h
|
||||
include/rocksdb/slice_transform.h
|
||||
include/rocksdb/snapshot.h
|
||||
include/rocksdb/sst_dump_tool.h
|
||||
include/rocksdb/sst_file_manager.h
|
||||
include/rocksdb/sst_file_reader.h
|
||||
include/rocksdb/sst_file_writer.h
|
||||
include/rocksdb/sst_partitioner.h
|
||||
include/rocksdb/statistics.h
|
||||
include/rocksdb/stats_history.h
|
||||
include/rocksdb/status.h
|
||||
include/rocksdb/system_clock.h
|
||||
include/rocksdb/table.h
|
||||
include/rocksdb/table_properties.h
|
||||
include/rocksdb/table_reader_caller.h
|
||||
include/rocksdb/thread_status.h
|
||||
include/rocksdb/threadpool.h
|
||||
include/rocksdb/trace_reader_writer.h
|
||||
include/rocksdb/trace_record.h
|
||||
include/rocksdb/trace_record_result.h
|
||||
include/rocksdb/transaction_log.h
|
||||
include/rocksdb/types.h
|
||||
include/rocksdb/unique_id.h
|
||||
include/rocksdb/universal_compaction.h
|
||||
include/rocksdb/user_write_callback.h
|
||||
include/rocksdb/utilities/agg_merge.h
|
||||
include/rocksdb/utilities/backup_engine.h
|
||||
include/rocksdb/utilities/cache_dump_load.h
|
||||
include/rocksdb/utilities/checkpoint.h
|
||||
include/rocksdb/utilities/convenience.h
|
||||
include/rocksdb/utilities/customizable_util.h
|
||||
include/rocksdb/utilities/db_ttl.h
|
||||
include/rocksdb/utilities/debug.h
|
||||
include/rocksdb/utilities/env_mirror.h
|
||||
include/rocksdb/utilities/info_log_finder.h
|
||||
include/rocksdb/utilities/ldb_cmd.h
|
||||
include/rocksdb/utilities/ldb_cmd_execute_result.h
|
||||
include/rocksdb/utilities/leveldb_options.h
|
||||
include/rocksdb/utilities/lua/rocks_lua_custom_library.h
|
||||
include/rocksdb/utilities/lua/rocks_lua_util.h
|
||||
include/rocksdb/utilities/memory_util.h
|
||||
include/rocksdb/utilities/object_registry.h
|
||||
include/rocksdb/utilities/optimistic_transaction_db.h
|
||||
include/rocksdb/utilities/option_change_migration.h
|
||||
include/rocksdb/utilities/options_type.h
|
||||
include/rocksdb/utilities/options_util.h
|
||||
include/rocksdb/utilities/replayer.h
|
||||
include/rocksdb/utilities/secondary_index.h
|
||||
include/rocksdb/utilities/secondary_index_faiss.h
|
||||
include/rocksdb/utilities/secondary_index_options.h
|
||||
include/rocksdb/utilities/sim_cache.h
|
||||
include/rocksdb/utilities/stackable_db.h
|
||||
include/rocksdb/utilities/table_properties_collectors.h
|
||||
include/rocksdb/utilities/transaction.h
|
||||
include/rocksdb/utilities/transaction_db.h
|
||||
include/rocksdb/utilities/transaction_db_mutex.h
|
||||
include/rocksdb/utilities/types_util.h
|
||||
include/rocksdb/utilities/write_batch_with_index.h
|
||||
include/rocksdb/version.h
|
||||
include/rocksdb/wal_filter.h
|
||||
include/rocksdb/wide_columns.h
|
||||
include/rocksdb/write_batch.h
|
||||
include/rocksdb/write_batch_base.h
|
||||
include/rocksdb/write_buffer_manager.h
|
||||
lib/librocksdb.a
|
||||
lib/librocksdb.so
|
||||
lib/librocksdb.so.9
|
||||
lib/librocksdb.so.%%SHLIB_VER%%
|
||||
lib/librocksdb.so.%%PORTVERSION%%
|
||||
lib/librocksdb_test.so
|
||||
lib/librocksdb_tools.so
|
||||
libdata/pkgconfig/rocksdb.pc
|
||||
Reference in New Issue
Block a user