Skip to content

Commit

Permalink
Update RocksDB to 8.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Sep 2, 2023
1 parent b993275 commit 9a6edae
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ serde1 = ["serde"]

[dependencies]
libc = "0.2"
librocksdb-sys = { path = "librocksdb-sys", version = "0.11.0" }
librocksdb-sys = { path = "librocksdb-sys", version = "0.12.0" }
serde = { version = "1", features = [ "derive" ], optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion librocksdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "librocksdb-sys"
version = "0.11.0+8.3.2"
version = "0.12.0+8.5.3"
edition = "2018"
rust-version = "1.63"
authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@ethcore.io>"]
Expand Down
8 changes: 4 additions & 4 deletions librocksdb-sys/build_version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

// The build script may replace these values with real values based
// on whether or not GIT is available and the platform settings
static const std::string rocksdb_build_git_sha = "3f7c92b9753b697ce6a5ea737086d2751f17956c";
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:v8.3.2";
static const std::string rocksdb_build_git_sha = "f32521662acf3352397d438b732144c7813bbbec";
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:v8.5.3";
#define HAS_GIT_CHANGES 0
#if HAS_GIT_CHANGES == 0
// If HAS_GIT_CHANGES is 0, the GIT date is used.
// Use the time the branch/tag was last modified
static const std::string rocksdb_build_date = "rocksdb_build_date:2023-06-15 05:32:14";
static const std::string rocksdb_build_date = "rocksdb_build_date:2023-09-01 20:58:39";
#else
// If HAS_GIT_CHANGES is > 0, the branch/tag has modifications.
// Use the time the build was created.
static const std::string rocksdb_build_date = "rocksdb_build_date:2023-06-15 05:32:14";
static const std::string rocksdb_build_date = "rocksdb_build_date:2023-09-01 20:58:39";
#endif

std::unordered_map<std::string, ROCKSDB_NAMESPACE::RegistrarFunc> ROCKSDB_NAMESPACE::ObjectRegistry::builtins_ = {};
Expand Down
2 changes: 1 addition & 1 deletion librocksdb-sys/rocksdb
Submodule rocksdb updated 236 files
2 changes: 2 additions & 0 deletions librocksdb-sys/rocksdb_lib_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ util/stderr_logger.cc
util/string_util.cc
util/thread_local.cc
util/threadpool_imp.cc
util/udt_util.cc
util/write_batch_util.cc
util/xxhash.cc
utilities/agg_merge/agg_merge.cc
utilities/backup/backup_engine.cc
Expand Down
2 changes: 1 addition & 1 deletion librocksdb-sys/tests/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ fn ffi() {
rocksdb_slicetransform_create_fixed_prefix(3),
);
rocksdb_options_set_hash_skip_list_rep(options, 5000, 4, 4);
rocksdb_options_set_plain_table_factory(options, 4, 10, 0.75, 16);
rocksdb_options_set_plain_table_factory(options, 4, 10, 0.75, 16, 0, 0, 0, 0);
rocksdb_options_set_allow_concurrent_memtable_write(options, 0);

db = rocksdb_open(options, dbname, &mut err);
Expand Down
17 changes: 17 additions & 0 deletions src/db_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2446,6 +2446,10 @@ impl Options {
options.bloom_bits_per_key,
options.hash_table_ratio,
options.index_sparseness,
options.huge_page_tlb_size,
options.encoding_type as c_char,
c_uchar::from(options.full_scan_mode),
c_uchar::from(options.store_index_in_file),
);
}
}
Expand Down Expand Up @@ -3596,6 +3600,15 @@ pub enum ChecksumType {
XXH3 = 4, // Supported since RocksDB 6.27
}

/// Used in [`PlainTableFactoryOptions`].
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum EncodingType {
/// Always write full keys.
Plain,
/// Find opportunities to write the same prefix for multiple rows.
Prefix,
}

/// Used with DBOptions::set_plain_table_factory.
/// See official [wiki](https://github.com/facebook/rocksdb/wiki/PlainTable-Format) for more
/// information.
Expand All @@ -3610,6 +3623,10 @@ pub struct PlainTableFactoryOptions {
pub bloom_bits_per_key: i32,
pub hash_table_ratio: f64,
pub index_sparseness: usize,
pub huge_page_tlb_size: usize,
pub encoding_type: EncodingType,
pub full_scan_mode: bool,
pub store_index_in_file: bool,
}

#[derive(Debug, Copy, Clone, PartialEq, Eq)]
Expand Down

0 comments on commit 9a6edae

Please sign in to comment.