Merge pull request #3938 from sears/rocksdb_fixes

Rocksdb fixes
This commit is contained in:
Alvin Moore 2020-10-23 15:11:33 -04:00 committed by GitHub
commit 7e13c99d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 6 deletions

View File

@ -11,7 +11,7 @@ RUN yum install -y yum-utils &&\
devtoolset-8-libubsan-devel devtoolset-8-valgrind-devel \
rh-python36-python-devel rh-ruby24 golang python27 rpm-build \
mono-core debbuild python-pip dos2unix valgrind-devel ccache \
distcc wget git &&\
distcc wget git lz4 lz4-devel lz4-static &&\
pip install boto3==1.1.1
USER root
@ -61,8 +61,8 @@ RUN cd /opt/ && curl -L https://github.com/facebook/rocksdb/archive/v6.10.1.tar.
ARG TIMEZONEINFO=America/Los_Angeles
RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/${TIMEZONEINFO} /etc/localtime
LABEL version=0.1.17
ENV DOCKER_IMAGEVER=0.1.17
LABEL version=0.1.18
ENV DOCKER_IMAGEVER=0.1.18
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
ENV CXX=/opt/rh/devtoolset-8/root/usr/bin/g++

View File

@ -1,4 +1,4 @@
FROM foundationdb/foundationdb-build:0.1.17
FROM foundationdb/foundationdb-build:0.1.18
USER root

View File

@ -2,7 +2,7 @@ version: "3"
services:
common: &common
image: foundationdb/foundationdb-build:0.1.17
image: foundationdb/foundationdb-build:0.1.18
build-setup: &build-setup
<<: *common

View File

@ -187,6 +187,18 @@ add_library(fdb_sqlite STATIC
sqlite/sqliteLimit.h
sqlite/sqlite3.amalgamation.c)
if (WITH_ROCKSDB_EXPERIMENTAL)
add_definitions(-DSSD_ROCKSDB_EXPERIMENTAL)
# Set this to 0 if you want to compile RocksDB with `-march=native`.
set(PORTABLE_ROCKSDB 1)
include(CompileRocksDB)
# CompileRocksDB sets `lz4_LIBRARIES` to be the shared lib, we want to link
# statically, so find the static library here.
find_library(lz4_STATIC_LIBRARIES
NAMES liblz4.a REQUIRED)
endif()
# Suppress warnings in sqlite since it's third party
if(NOT WIN32)
target_compile_definitions(fdb_sqlite PRIVATE $<$<CONFIG:Debug>:NDEBUG>)
@ -201,7 +213,14 @@ target_include_directories(fdbserver PRIVATE
${CMAKE_BINARY_DIR}/bindings/c
${CMAKE_CURRENT_BINARY_DIR}/workloads
${CMAKE_CURRENT_SOURCE_DIR}/workloads)
target_link_libraries(fdbserver PRIVATE fdbclient fdb_sqlite)
if (WITH_ROCKSDB_EXPERIMENTAL)
add_dependencies(fdbserver rocksdb)
target_include_directories(fdbserver PRIVATE ${ROCKSDB_INCLUDE_DIR})
target_link_libraries(fdbserver PRIVATE fdbclient fdb_sqlite ${ROCKSDB_LIBRARIES} ${lz4_STATIC_LIBRARIES})
else()
target_link_libraries(fdbserver PRIVATE fdbclient fdb_sqlite)
endif()
if (GPERFTOOLS_FOUND)
add_compile_definitions(USE_GPERFTOOLS)
target_link_libraries(fdbserver PRIVATE gperftools)