pub struct TransactionManager { /* private fields */ }๐Deprecated since 0.1.0:
Use MvccTransactionManager from wal_integration for production workloads with durability
Expand description
Transaction manager for MVCC (snapshot-only, no WAL durability)
ยงDeprecation Notice
This implementation is deprecated for production use. It provides snapshot isolation but does NOT include WAL integration for crash recovery.
ยงMigration Guide
For production workloads requiring durability, use MvccTransactionManager
from sochdb_storage::wal_integration which includes:
- Write-ahead logging for crash recovery
- Serializable Snapshot Isolation (SSI)
- Group commit for high throughput
- Event-driven async architecture
ยงWhen to Use This Implementation
- Unit testing without durability overhead
- Ephemeral in-memory operations
- Prototyping snapshot isolation logic
ยงSee Also
crate::wal_integration::MvccTransactionManager- Production transaction managercrate::transaction::TransactionCoordinator- Unified transaction trait
Implementationsยง
Sourceยงimpl TransactionManager
impl TransactionManager
Sourcepub fn acquire_snapshot(&self, txn_id: TxnId) -> Snapshot
pub fn acquire_snapshot(&self, txn_id: TxnId) -> Snapshot
Acquire a read snapshot
Sourcepub fn get_status(&self, txn_id: TxnId) -> Option<TxnStatus>
pub fn get_status(&self, txn_id: TxnId) -> Option<TxnStatus>
Get transaction status
Sourcepub fn get_commit_ts(&self, txn_id: TxnId) -> Option<Timestamp>
pub fn get_commit_ts(&self, txn_id: TxnId) -> Option<Timestamp>
Get commit timestamp for a transaction
Sourcepub fn min_active_txn_id(&self) -> TxnId
pub fn min_active_txn_id(&self) -> TxnId
Get minimum active transaction ID (for garbage collection)
Sourcepub fn current_timestamp(&self) -> Timestamp
pub fn current_timestamp(&self) -> Timestamp
Get current timestamp
Trait Implementationsยง
Auto Trait Implementationsยง
impl !Freeze for TransactionManager
impl !RefUnwindSafe for TransactionManager
impl Send for TransactionManager
impl Sync for TransactionManager
impl Unpin for TransactionManager
impl UnsafeUnpin for TransactionManager
impl UnwindSafe for TransactionManager
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more