Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Renault <[email protected]>
  • Loading branch information
darnuria and Kerollmops authored Jul 10, 2023
1 parent a7c7bc8 commit cbc0b92
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions heed/src/txn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>,
Expand Down

0 comments on commit cbc0b92

Please sign in to comment.