-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
- If I use rocksdb with version 6.28.2, you will encounter the following error during compilation:
src/mongo/db/modules/rocks/src/totdb/totransaction_db_impl.cpp: In member function 'virtual rocksdb::Status rocksdb::TOTransactionDBImpl::QueryTimeStamp(const rocksdb::TimeStampType&, rocksdb::RocksTimeStamp*)':
src/mongo/db/modules/rocks/src/totdb/totransaction_db_impl.cpp:1149:27: error: 'class rocksdb::DB' has no member named 'GetFullHistoryTsLow'
auto s = GetRootDB()->GetFullHistoryTsLow(GetRootDB()->DefaultColumnFamily(), &ts_holder);
The DB class in db.h does not have a GetFullHistoryTsLow method.
- If I use rocksdb with version 9.0.0, the compilation will succeed, but you need to add #include <rocksdb/advanced_cache.h> in rocks_parameters.cpp or rocks_engine.h, otherwise you will get an error:
src/mongo/db/modules/rocks/src/rocks_parameters.cpp: In member function 'virtual void mongo::RocksCacheSizeParameter::append(mongo::OperationContext*, mongo::BSONObjBuilder&, const string&)':
src/mongo/db/modules/rocks/src/rocks_parameters.cpp:132:57: error: invalid use of incomplete type 'using element_type = class rocksdb::Cache' {aka 'class rocksdb::Cache'}
long long cacheSizeInGB = _data->getBlockCache()->GetCapacity() / bytesInGB;
^~
In file included from src/mongo/db/modules/rocks/src/rocks_engine.h:39,
from build/opt/mongo/db/modules/rocks/src/rocks_parameters_gen.h:21,
from src/mongo/db/modules/rocks/src/rocks_parameters.cpp:32:
/usr/local/include/rocksdb/cache.h:25:7: note: forward declaration of 'using element_type = class rocksdb::Cache' {aka 'class rocksdb::Cache'}
class Cache; // defined in advanced_cache.h
- If I use rocksdb with version 95305c44a, it will compile and run normally.
my test environment:
[root@VM-24-2-opencloudos code]# uname -a
Linux VM-24-2-opencloudos 5.4.119-20.0009.29 #1 SMP Mon Aug 14 20:03:28 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@VM-24-2-opencloudos code]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://cloud.tencent.com/product/ts --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.5.0 20210514 (Tencent 8.5.0-22) (GCC)
rocksdb compile command:
USE_RTTI=1 CFLAGS=-fPIC make static_lib -j2
INSTALL_PATH=/usr make install
mongodb(r4.2.5) compile command:
python3 buildscripts/scons.py mongod MONGO_VERSION="4.2.5" -j1
Metadata
Metadata
Assignees
Labels
No labels