Release 0.20.1 (#742)

master
Oleksandr Anyshchenko 2 years ago committed by GitHub
parent e646999c71
commit 7319f25394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CHANGELOG.md
  2. 2
      Cargo.toml
  3. 6
      tests/test_backup.rs

@ -2,6 +2,10 @@
## [Unreleased] ## [Unreleased]
## 0.20.1 (2023-02-10)
* Fix supporting MSRV 1.60.0 (aleksuss)
## 0.20.0 (2023-02-09) ## 0.20.0 (2023-02-09)
* Support RocksDB 7.x `BackupEngineOptions` (exabytes18) * Support RocksDB 7.x `BackupEngineOptions` (exabytes18)

@ -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.20.0" version = "0.20.1"
edition = "2018" edition = "2018"
rust-version = "1.60" rust-version = "1.60"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"] authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"]

@ -33,8 +33,9 @@ fn restore_from_latest() {
let value = db.get(b"k1"); let value = db.get(b"k1");
assert_eq!(value.unwrap().unwrap(), b"v1111"); assert_eq!(value.unwrap().unwrap(), b"v1111");
{ {
let backup_path = DBPath::new("restore_from_latest_test_backup");
let env = Env::new().unwrap(); let env = Env::new().unwrap();
let backup_opts = BackupEngineOptions::new("backup_path_1").unwrap(); let backup_opts = BackupEngineOptions::new(&backup_path).unwrap();
let mut backup_engine = BackupEngine::open(&backup_opts, &env).unwrap(); let mut backup_engine = BackupEngine::open(&backup_opts, &env).unwrap();
assert!(backup_engine.create_new_backup(&db).is_ok()); assert!(backup_engine.create_new_backup(&db).is_ok());
@ -74,8 +75,9 @@ fn restore_from_backup() {
let value = db.get(b"k1"); let value = db.get(b"k1");
assert_eq!(value.unwrap().unwrap(), b"v1111"); assert_eq!(value.unwrap().unwrap(), b"v1111");
{ {
let backup_path = DBPath::new("restore_from_latest_test_backup");
let env = Env::new().unwrap(); let env = Env::new().unwrap();
let backup_opts = BackupEngineOptions::new("backup_path_2").unwrap(); let backup_opts = BackupEngineOptions::new(&backup_path).unwrap();
let mut backup_engine = BackupEngine::open(&backup_opts, &env).unwrap(); let mut backup_engine = BackupEngine::open(&backup_opts, &env).unwrap();
assert!(backup_engine.create_new_backup(&db).is_ok()); assert!(backup_engine.create_new_backup(&db).is_ok());

Loading…
Cancel
Save