feat(storage): use mdbx_txn_reset to time out transactions (#6850)

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
Alexey Shekhirin
2024-02-29 20:44:56 +00:00
committed by GitHub
parent 771951429e
commit 74dc0e36d3
11 changed files with 289 additions and 335 deletions

View File

@ -46,7 +46,7 @@ fn bench_get_rand_raw(c: &mut Criterion) {
c.bench_function("bench_get_rand_raw", |b| {
b.iter(|| unsafe {
txn.with_raw_tx_ptr(|txn| {
txn.txn_execute(|txn| {
let mut i: size_t = 0;
for key in &keys {
key_val.iov_len = key.len() as size_t;
@ -57,7 +57,8 @@ fn bench_get_rand_raw(c: &mut Criterion) {
i += key_val.iov_len;
}
black_box(i);
});
})
.unwrap();
})
});
}