Bump rocksdb up to 6.15.4 (#493)

master
Oleksandr Anyshchenko 4 years ago committed by GitHub
parent ff5640a50d
commit 3d32011909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Cargo.toml
  2. 2
      librocksdb-sys/Cargo.toml
  3. 42
      librocksdb-sys/build.rs
  4. 4
      librocksdb-sys/build_version.cc
  5. 2
      librocksdb-sys/rocksdb
  6. 15
      librocksdb-sys/rocksdb_lib_sources.txt
  7. 5
      tests/test_column_family.rs
  8. 2
      tests/test_iterator.rs

@ -27,7 +27,7 @@ bzip2 = ["librocksdb-sys/bzip2"]
[dependencies] [dependencies]
libc = "0.2" libc = "0.2"
librocksdb-sys = { path = "librocksdb-sys", version = "6.11.4" } librocksdb-sys = { path = "librocksdb-sys", version = "6.15.4" }
[dev-dependencies] [dev-dependencies]
trybuild = "1.0.21" trybuild = "1.0.21"

@ -1,6 +1,6 @@
[package] [package]
name = "librocksdb-sys" name = "librocksdb-sys"
version = "6.11.4" version = "6.15.4"
edition = "2018" edition = "2018"
authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@ethcore.io>"] authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@ethcore.io>"]
license = "MIT/Apache-2.0/BSD-3-Clause" license = "MIT/Apache-2.0/BSD-3-Clause"

@ -115,32 +115,36 @@ fn build_rocksdb() {
} }
if target.contains("darwin") { if target.contains("darwin") {
config.define("OS_MACOSX", Some("1")); config.define("OS_MACOSX", None);
config.define("ROCKSDB_PLATFORM_POSIX", Some("1")); config.define("ROCKSDB_PLATFORM_POSIX", None);
config.define("ROCKSDB_LIB_IO_POSIX", Some("1")); config.define("ROCKSDB_LIB_IO_POSIX", None);
} else if target.contains("android") { } else if target.contains("android") {
config.define("OS_ANDROID", Some("1")); config.define("OS_ANDROID", None);
config.define("ROCKSDB_PLATFORM_POSIX", Some("1")); config.define("ROCKSDB_PLATFORM_POSIX", None);
config.define("ROCKSDB_LIB_IO_POSIX", Some("1")); config.define("ROCKSDB_LIB_IO_POSIX", None);
} else if target.contains("linux") { } else if target.contains("linux") {
config.define("OS_LINUX", Some("1")); config.define("OS_LINUX", None);
config.define("ROCKSDB_PLATFORM_POSIX", Some("1")); config.define("ROCKSDB_PLATFORM_POSIX", None);
config.define("ROCKSDB_LIB_IO_POSIX", Some("1")); config.define("ROCKSDB_LIB_IO_POSIX", None);
} else if target.contains("freebsd") { } else if target.contains("freebsd") {
config.define("OS_FREEBSD", Some("1")); config.define("OS_FREEBSD", None);
config.define("ROCKSDB_PLATFORM_POSIX", Some("1")); config.define("ROCKSDB_PLATFORM_POSIX", None);
config.define("ROCKSDB_LIB_IO_POSIX", Some("1")); config.define("ROCKSDB_LIB_IO_POSIX", None);
} else if target.contains("windows") { } else if target.contains("windows") {
link("rpcrt4", false); link("rpcrt4", false);
link("shlwapi", false); link("shlwapi", false);
config.define("OS_WIN", Some("1")); config.define("DWIN32", None);
config.define("ROCKSDB_WINDOWS_UTF8_FILENAMES", Some("1")); config.define("OS_WIN", None);
config.define("_MBCS", None);
config.define("WIN64", None);
config.define("NOMINMAX", None);
if &target == "x86_64-pc-windows-gnu" { if &target == "x86_64-pc-windows-gnu" {
// Tell MinGW to create localtime_r wrapper of localtime_s function. // Tell MinGW to create localtime_r wrapper of localtime_s function.
config.define("_POSIX_C_SOURCE", None); config.define("_POSIX_C_SOURCE", Some("1"));
// Tell MinGW to use at least Windows Vista headers instead of the ones of Windows XP. // Tell MinGW to use at least Windows Vista headers instead of the ones of Windows XP.
// (This is minimum supported version of rocksdb) // (This is minimum supported version of rocksdb)
config.define("_WIN32_WINNT", Some("0x0600")); config.define("_WIN32_WINNT", Some("_WIN32_WINNT_VISTA"));
} }
// Remove POSIX-specific sources // Remove POSIX-specific sources
@ -306,6 +310,12 @@ fn build_bzip2() {
} }
fn try_to_find_and_link_lib(lib_name: &str) -> bool { fn try_to_find_and_link_lib(lib_name: &str) -> bool {
if let Ok(v) = env::var(&format!("{}_COMPILE", lib_name)) {
if v.to_lowercase() == "true" || v == "1" {
return false;
}
}
if let Ok(lib_dir) = env::var(&format!("{}_LIB_DIR", lib_name)) { if let Ok(lib_dir) = env::var(&format!("{}_LIB_DIR", lib_name)) {
println!("cargo:rustc-link-search=native={}", lib_dir); println!("cargo:rustc-link-search=native={}", lib_dir);
let mode = match env::var_os(&format!("{}_STATIC", lib_name)) { let mode = match env::var_os(&format!("{}_STATIC", lib_name)) {

@ -1,4 +1,4 @@
#include "build_version.h" #include "build_version.h"
const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:@48bfca38f6f175435052a59791922a1a453d9609@"; const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:@fbed72f03c3d9e4fdca3e5993587ef2559ba6ab9@";
const char* rocksdb_build_git_date = "rocksdb_build_git_date:@2020/07/15 17:54:15@"; const char* rocksdb_build_git_date = "rocksdb_build_git_date:@2021/01/21 12:41:08@";
const char* rocksdb_build_compile_date = __DATE__; const char* rocksdb_build_compile_date = __DATE__;

@ -1 +1 @@
Subproject commit 50f206ad84fa6cd516bad1bea93c03ae0655b314 Subproject commit fbed72f03c3d9e4fdca3e5993587ef2559ba6ab9

@ -4,10 +4,13 @@ cache/lru_cache.cc
cache/sharded_cache.cc cache/sharded_cache.cc
db/arena_wrapped_db_iter.cc db/arena_wrapped_db_iter.cc
db/blob/blob_file_addition.cc db/blob/blob_file_addition.cc
db/blob/blob_file_builder.cc
db/blob/blob_file_cache.cc
db/blob/blob_file_garbage.cc db/blob/blob_file_garbage.cc
db/blob/blob_file_meta.cc db/blob/blob_file_meta.cc
db/blob/blob_file_reader.cc
db/blob/blob_log_format.cc db/blob/blob_log_format.cc
db/blob/blob_log_reader.cc db/blob/blob_log_sequential_reader.cc
db/blob/blob_log_writer.cc db/blob/blob_log_writer.cc
db/builder.cc db/builder.cc
db/c.cc db/c.cc
@ -53,6 +56,8 @@ db/memtable.cc
db/memtable_list.cc db/memtable_list.cc
db/merge_helper.cc db/merge_helper.cc
db/merge_operator.cc db/merge_operator.cc
db/output_validator.cc
db/periodic_work_scheduler.cc
db/range_del_aggregator.cc db/range_del_aggregator.cc
db/range_tombstone_fragmenter.cc db/range_tombstone_fragmenter.cc
db/repair.cc db/repair.cc
@ -65,6 +70,7 @@ db/version_builder.cc
db/version_edit.cc db/version_edit.cc
db/version_edit_handler.cc db/version_edit_handler.cc
db/version_set.cc db/version_set.cc
db/wal_edit.cc
db/wal_manager.cc db/wal_manager.cc
db/write_batch.cc db/write_batch.cc
db/write_batch_base.cc db/write_batch_base.cc
@ -118,6 +124,8 @@ monitoring/thread_status_updater_debug.cc
monitoring/thread_status_util.cc monitoring/thread_status_util.cc
monitoring/thread_status_util_debug.cc monitoring/thread_status_util_debug.cc
options/cf_options.cc options/cf_options.cc
options/configurable.cc
options/customizable.cc
options/db_options.cc options/db_options.cc
options/options.cc options/options.cc
options/options_helper.cc options/options_helper.cc
@ -169,6 +177,7 @@ table/plain/plain_table_reader.cc
table/sst_file_dumper.cc table/sst_file_dumper.cc
table/sst_file_reader.cc table/sst_file_reader.cc
table/sst_file_writer.cc table/sst_file_writer.cc
table/table_factory.cc
table/table_properties.cc table/table_properties.cc
table/two_level_iterator.cc table/two_level_iterator.cc
test_util/sync_point.cc test_util/sync_point.cc
@ -235,6 +244,9 @@ utilities/simulator_cache/cache_simulator.cc
utilities/simulator_cache/sim_cache.cc utilities/simulator_cache/sim_cache.cc
utilities/table_properties_collectors/compact_on_deletion_collector.cc utilities/table_properties_collectors/compact_on_deletion_collector.cc
utilities/trace/file_trace_reader_writer.cc utilities/trace/file_trace_reader_writer.cc
utilities/transactions/lock/lock_manager.cc
utilities/transactions/lock/point/point_lock_tracker.cc
utilities/transactions/lock/point/point_lock_manager.cc
utilities/transactions/optimistic_transaction.cc utilities/transactions/optimistic_transaction.cc
utilities/transactions/optimistic_transaction_db_impl.cc utilities/transactions/optimistic_transaction_db_impl.cc
utilities/transactions/pessimistic_transaction.cc utilities/transactions/pessimistic_transaction.cc
@ -242,7 +254,6 @@ utilities/transactions/pessimistic_transaction_db.cc
utilities/transactions/snapshot_checker.cc utilities/transactions/snapshot_checker.cc
utilities/transactions/transaction_base.cc utilities/transactions/transaction_base.cc
utilities/transactions/transaction_db_mutex_impl.cc utilities/transactions/transaction_db_mutex_impl.cc
utilities/transactions/transaction_lock_mgr.cc
utilities/transactions/transaction_util.cc utilities/transactions/transaction_util.cc
utilities/transactions/write_prepared_txn.cc utilities/transactions/write_prepared_txn.cc
utilities/transactions/write_prepared_txn_db.cc utilities/transactions/write_prepared_txn_db.cc

@ -48,10 +48,7 @@ fn test_column_family() {
specifying column specifying column
families" families"
), ),
Err(e) => assert!(e.to_string().starts_with( Err(e) => assert!(e.to_string().starts_with("Invalid argument")),
"Invalid argument: You have to open all \
column families."
)),
} }
} }

@ -300,7 +300,7 @@ fn test_full_iterator() {
} }
} }
fn custom_iter<'a>(db: &'a DB) -> impl Iterator<Item = usize> + 'a { fn custom_iter(db: &'_ DB) -> impl Iterator<Item = usize> + '_ {
db.iterator(IteratorMode::Start) db.iterator(IteratorMode::Start)
.map(|(_, db_value)| db_value.len()) .map(|(_, db_value)| db_value.len())
} }

Loading…
Cancel
Save