From cbc0b92b4c322dce8a53a561fc84da13e1494ad0 Mon Sep 17 00:00:00 2001 From: Axel Viala Date: Mon, 10 Jul 2023 16:51:09 +0200 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Renault --- heed/src/txn.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/heed/src/txn.rs b/heed/src/txn.rs index 1fa633ce..ceb12714 100644 --- a/heed/src/txn.rs +++ b/heed/src/txn.rs @@ -7,11 +7,11 @@ use crate::{Env, Result}; /// A read-only transaction. /// -/// ## LMDB Limitation +/// ## LMDB Limitations /// -/// It's a must to keep read transaction short lived. +/// It's a must to keep read transactions short-lived. /// -/// Active Read transactions prevent reuse of pages freed +/// Active Read transactions prevent the reuse of pages freed /// by newer write transactions, thus the database can grow quickly. pub struct RoTxn<'e> { pub(crate) txn: *mut ffi::MDB_txn, @@ -58,8 +58,10 @@ fn abort_txn(txn: *mut ffi::MDB_txn) { /// A read-write transaction. /// -/// Only one [RwTxn] may exist on the same environnement at the same time, -/// it two exist the new one may wait on a Mutex for [RwTxn::commit] or [RwTxn::abort] of +/// ## LMDB Limitations +/// +/// Only one [RwTxn] may exist in the same environment at the same time, +/// it two exist, the new one may wait on a Mutex for [RwTxn::commit] or [RwTxn::abort] of /// the first one. pub struct RwTxn<'p> { pub(crate) txn: RoTxn<'p>,