Skip to content

Commit

Permalink
Release 0.20.0 (rust-rocksdb#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksuss authored Feb 9, 2023
1 parent 2823760 commit 1c879f0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>", "David Greenberg <[email protected]>"]
repository = "https://github.com/rust-rocksdb/rust-rocksdb"
Expand Down
14 changes: 6 additions & 8 deletions src/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_column_family.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1c879f0

Please sign in to comment.