mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 08:01:09 +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
@@ -112,4 +112,8 @@ impl<H: Clone + AsRef<[u8]>> Database<H> for DbAdapter {
|
||||
fn supports_ref_counting(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn sanitize_key(&self, key: &mut Vec<u8>) {
|
||||
let _prefix = key.drain(0..key.len() - crate::DB_HASH_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user