Release 0.20.0 (#736)

master
Oleksandr Anyshchenko 2 years ago committed by GitHub
parent 28237601a2
commit 1c879f073f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      CHANGELOG.md
  2. 2
      Cargo.toml
  3. 14
      src/backup.rs
  4. 2
      tests/test_column_family.rs

@ -2,8 +2,22 @@
## [Unreleased] ## [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) * 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) * 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) ## 0.19.0 (2022-08-05)

@ -1,7 +1,7 @@
[package] [package]
name = "rocksdb" name = "rocksdb"
description = "Rust wrapper for Facebook's RocksDB embeddable database" description = "Rust wrapper for Facebook's RocksDB embeddable database"
version = "0.19.0" version = "0.20.0"
edition = "2018" edition = "2018"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"] authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"]
repository = "https://github.com/rust-rocksdb/rust-rocksdb" repository = "https://github.com/rust-rocksdb/rust-rocksdb"

@ -224,19 +224,17 @@ impl BackupEngine {
} }
impl BackupEngineOptions { 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. /// backup files.
pub fn new<P: AsRef<Path>>(backup_dir: P) -> Result<Self, Error> { pub fn new<P: AsRef<Path>>(backup_dir: P) -> Result<Self, Error> {
let backup_dir = backup_dir.as_ref(); let backup_dir = backup_dir.as_ref();
let c_backup_dir = if let Ok(c) = CString::new(backup_dir.to_string_lossy().as_bytes()) { let c_backup_dir = CString::new(backup_dir.to_string_lossy().as_bytes()).map_err(|_| {
c Error::new(
} else {
return Err(Error::new(
"Failed to convert backup_dir to CString \ "Failed to convert backup_dir to CString \
when constructing BackupEngineOptions" when constructing BackupEngineOptions"
.to_owned(), .to_owned(),
)); )
}; })?;
unsafe { unsafe {
let opts = ffi::rocksdb_backup_engine_options_create(c_backup_dir.as_ptr()); 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. /// perform in parallel when executing a backup or restore.
/// ///
/// Default: 1 /// Default: 1

@ -198,7 +198,7 @@ fn test_column_family_with_transactiondb() {
let opts = Options::default(); let opts = Options::default();
let cfs = &["cf1"]; let cfs = &["cf1"];
#[cfg(feature = "multi-threaded-cf")] #[cfg(feature = "multi-threaded-cf")]
let mut db = TransactionDB::<MultiThreaded>::open_cf( let db = TransactionDB::<MultiThreaded>::open_cf(
&opts, &opts,
&TransactionDBOptions::default(), &TransactionDBOptions::default(),
&n, &n,

Loading…
Cancel
Save