Upgrading RocksDB to stock 7.8.3. (#4028)

* Upgrading RocksDB to stock 7.8.3.

* Turn off Werror for rockdb to work around unreachable code error.
This commit is contained in:
clemahieu 2023-01-04 14:46:47 +00:00 committed by GitHub
commit a62447719d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

3
.gitmodules vendored
View file

@ -25,8 +25,7 @@
url = https://github.com/google/flatbuffers.git url = https://github.com/google/flatbuffers.git
[submodule "rocksdb"] [submodule "rocksdb"]
path = rocksdb path = rocksdb
url = https://github.com/nanocurrency/rocksdb.git url = https://github.com/facebook/rocksdb.git
branch = 6.13.3
[submodule "diskhash"] [submodule "diskhash"]
path = diskhash path = diskhash
url = https://github.com/nanocurrency/diskhash.git url = https://github.com/nanocurrency/diskhash.git

View file

@ -431,6 +431,11 @@ else()
ON ON
CACHE BOOL "" FORCE) CACHE BOOL "" FORCE)
endif() endif()
set(FAIL_ON_WARNINGS
OFF
CACHE BOOL "") # Ignore unreachable code warning in merging_iterator.cc
# RocksDB v7.8.3 on Windows
# https://github.com/facebook/rocksdb/issues/11072
add_subdirectory(rocksdb EXCLUDE_FROM_ALL) add_subdirectory(rocksdb EXCLUDE_FROM_ALL)
include_directories(cpptoml/include) include_directories(cpptoml/include)

View file

@ -12,7 +12,7 @@
#include <rocksdb/merge_operator.h> #include <rocksdb/merge_operator.h>
#include <rocksdb/slice.h> #include <rocksdb/slice.h>
#include <rocksdb/slice_transform.h> #include <rocksdb/slice_transform.h>
#include <rocksdb/utilities/backupable_db.h> #include <rocksdb/utilities/backup_engine.h>
#include <rocksdb/utilities/transaction.h> #include <rocksdb/utilities/transaction.h>
#include <rocksdb/utilities/transaction_db.h> #include <rocksdb/utilities/transaction_db.h>
@ -739,7 +739,7 @@ bool nano::rocksdb::store::copy_db (boost::filesystem::path const & destination_
std::unique_ptr<::rocksdb::BackupEngine> backup_engine; std::unique_ptr<::rocksdb::BackupEngine> backup_engine;
{ {
::rocksdb::BackupEngine * backup_engine_raw; ::rocksdb::BackupEngine * backup_engine_raw;
::rocksdb::BackupableDBOptions backup_options (destination_path.string ()); ::rocksdb::BackupEngineOptions backup_options (destination_path.string ());
// Use incremental backups (default) // Use incremental backups (default)
backup_options.share_table_files = true; backup_options.share_table_files = true;
@ -775,7 +775,7 @@ bool nano::rocksdb::store::copy_db (boost::filesystem::path const & destination_
std::unique_ptr<::rocksdb::BackupEngineReadOnly> backup_engine_read; std::unique_ptr<::rocksdb::BackupEngineReadOnly> backup_engine_read;
{ {
::rocksdb::BackupEngineReadOnly * backup_engine_read_raw; ::rocksdb::BackupEngineReadOnly * backup_engine_read_raw;
status = ::rocksdb::BackupEngineReadOnly::Open (::rocksdb::Env::Default (), ::rocksdb::BackupableDBOptions (destination_path.string ()), &backup_engine_read_raw); status = ::rocksdb::BackupEngineReadOnly::Open (::rocksdb::Env::Default (), ::rocksdb::BackupEngineOptions (destination_path.string ()), &backup_engine_read_raw);
} }
if (!status.ok ()) if (!status.ok ())
{ {

@ -1 +1 @@
Subproject commit 79f08d7ffa6d34d9ca3357777bcb335884a56cfb Subproject commit bf2c335184de16a3cc1787fa97ef9f22f7114238