diff --git a/kvdb-rocksdb/CHANGELOG.md b/kvdb-rocksdb/CHANGELOG.md index f2754de3b..f7cd5a5e9 100644 --- a/kvdb-rocksdb/CHANGELOG.md +++ b/kvdb-rocksdb/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog]. ## [Unreleased] +## [0.4.2] - 2019-02-04 +### Fixes +- Fixed `iter_from_prefix` being slow. [#326](https://github.com/paritytech/parity-common/pull/326) + +## [0.4.1] - 2019-01-06 +- Updated features and feature dependencies. [#307](https://github.com/paritytech/parity-common/pull/307) + ## [0.4.0] - 2019-01-03 - Add I/O statistics for RocksDB. [#294](https://github.com/paritytech/parity-common/pull/294) - Support querying memory footprint via `MallocSizeOf` trait. [#292](https://github.com/paritytech/parity-common/pull/292) diff --git a/kvdb-rocksdb/Cargo.toml b/kvdb-rocksdb/Cargo.toml index d7cef5999..797203ffe 100644 --- a/kvdb-rocksdb/Cargo.toml +++ b/kvdb-rocksdb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kvdb-rocksdb" -version = "0.4.1" +version = "0.4.2" authors = ["Parity Technologies "] repository = "https://github.com/paritytech/parity-common" description = "kvdb implementation backed by RocksDB" diff --git a/kvdb-rocksdb/src/lib.rs b/kvdb-rocksdb/src/lib.rs index d478a0c6d..40ee0f595 100644 --- a/kvdb-rocksdb/src/lib.rs +++ b/kvdb-rocksdb/src/lib.rs @@ -616,7 +616,7 @@ impl Database { // We're not using "Prefix Seek" mode, so the iterator will return // keys not starting with the given prefix as well, // see https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes - optional.into_iter().flat_map(identity).filter(move |(k, _)| k.starts_with(prefix)) + optional.into_iter().flat_map(identity).take_while(move |(k, _)| k.starts_with(prefix)) } /// Close the database