mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Prevent possible rocksdb-corruption by running benchmark-storage (#11040)
* Prevent possible rocksdb-corruption by running benchmark-storage Also adds a `sanitize_key` function to strip path-prefixes from the db-keys (for databases that use prefixed keys such as rocksdb) fixes #10998 * Fix @cheme 's annotations. * Update utils/frame/benchmarking-cli/src/storage/write.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make logic match the name of bool flag `invert_inserts` * Remove unused lifetime Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
800cc1d4be
commit
7a54efd1f2
@@ -110,6 +110,11 @@ pub trait Database<H: Clone + AsRef<[u8]>>: Send + Sync {
|
||||
fn supports_ref_counting(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Remove a possible path-prefix from the key.
|
||||
///
|
||||
/// Not all database implementations use a prefix for keys, so this function may be a noop.
|
||||
fn sanitize_key(&self, _key: &mut Vec<u8>) {}
|
||||
}
|
||||
|
||||
impl<H> std::fmt::Debug for dyn Database<H> {
|
||||
|
||||
Reference in New Issue
Block a user