summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md14
-rw-r--r--Cargo.toml2
-rw-r--r--src/backup.rs14
-rw-r--r--tests/test_column_family.rs2
4 files changed, 22 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5c03ba..c4324a0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,22 @@
## [Unreleased]
+## 0.20.0 (2023-02-09)
+
+* Support RocksDB 7.x `BackupEngineOptions` (exabytes18)
+* Fix `int128` compatibility check (Dirreke)
+* Add `Options::load_latest` method to load the latest options from RockDB (Congyuwang)
+* Bump bindgen to 0.64.0 (cwlittle)
* Bump rocksdb to 7.9.2 (kwek20)
+* Make `set_snapshot` method public (a14e)
+* Add `drop_cf` function to `TransactionDB` (bothra90)
* Bump rocksdb to 7.8.3 (aleksuss)
+* Add doc for `set_cache_index_and_filter_blocks` (guerinoni)
+* Re-run `build.rs` if env vars change (drahnr)
+* Add `WriteBatch::data` method (w41ter)
+* Add `DB::open_cf_with_opts` method (w41ter)
+* Use lz4-sys crate rather then submodule (niklasf)
+* Make create_new_backup_flush generic (minshao)
## 0.19.0 (2022-08-05)
diff --git a/Cargo.toml b/Cargo.toml
index 815f1b8..34a70da 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "rocksdb"
description = "Rust wrapper for Facebook's RocksDB embeddable database"
-version = "0.19.0"
+version = "0.20.0"
edition = "2018"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"]
repository = "https://github.com/rust-rocksdb/rust-rocksdb"
diff --git a/src/backup.rs b/src/backup.rs
index 31fb820..17d0796 100644
--- a/src/backup.rs
+++ b/src/backup.rs
@@ -224,19 +224,17 @@ impl BackupEngine {
}
impl BackupEngineOptions {
- /// Initializes BackupEngineOptions with the directory to be used for storing/accessing the
+ /// Initializes `BackupEngineOptions` with the directory to be used for storing/accessing the
/// backup files.
pub fn new<P: AsRef<Path>>(backup_dir: P) -> Result<Self, Error> {
let backup_dir = backup_dir.as_ref();
- let c_backup_dir = if let Ok(c) = CString::new(backup_dir.to_string_lossy().as_bytes()) {
- c
- } else {
- return Err(Error::new(
+ let c_backup_dir = CString::new(backup_dir.to_string_lossy().as_bytes()).map_err(|_| {
+ Error::new(
"Failed to convert backup_dir to CString \
when constructing BackupEngineOptions"
.to_owned(),
- ));
- };
+ )
+ })?;
unsafe {
let opts = ffi::rocksdb_backup_engine_options_create(c_backup_dir.as_ptr());
@@ -246,7 +244,7 @@ impl BackupEngineOptions {
}
}
- /// Sets the number of operations (such as file copies or file checksums) that RocksDB may
+ /// Sets the number of operations (such as file copies or file checksums) that `RocksDB` may
/// perform in parallel when executing a backup or restore.
///
/// Default: 1
diff --git a/tests/test_column_family.rs b/tests/test_column_family.rs
index db9f666..0daee9b 100644
--- a/tests/test_column_family.rs
+++ b/tests/test_column_family.rs
@@ -198,7 +198,7 @@ fn test_column_family_with_transactiondb() {
let opts = Options::default();
let cfs = &["cf1"];
#[cfg(feature = "multi-threaded-cf")]
- let mut db = TransactionDB::<MultiThreaded>::open_cf(
+ let db = TransactionDB::<MultiThreaded>::open_cf(
&opts,
&TransactionDBOptions::default(),
&n,