pub struct ActiveTxRegistry { /* private fields */ }Expand description
Live-transaction table. Cheap to clone (internally Arc-wrapped
state); pass clones into worker threads.
Implementations§
Source§impl ActiveTxRegistry
impl ActiveTxRegistry
Sourcepub fn register(&self, clock: &MvccClock) -> TxHandle
pub fn register(&self, clock: &MvccClock) -> TxHandle
Registers a new transaction. Allocates a fresh TxId from
clock and snapshots the current clock value as the
transaction’s begin_ts.
Returns a TxHandle — when the handle drops, the
transaction is automatically unregistered. RAII keeps the
“did the transaction’s caller forget to clean up?” failure
mode out of the cold-path code.
Sourcepub fn min_active_begin_ts(&self) -> Option<u64>
pub fn min_active_begin_ts(&self) -> Option<u64>
Returns the begin-timestamp of the oldest in-flight
transaction, or None when nothing is in flight. Phase 11.6
uses this to set the GC watermark — versions whose end
timestamp is strictly less than this value can never be seen
again and may be reclaimed.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Number of in-flight transactions. Cheap diagnostic accessor; not load-bearing for correctness.
Trait Implementations§
Source§impl Clone for ActiveTxRegistry
impl Clone for ActiveTxRegistry
Source§fn clone(&self) -> ActiveTxRegistry
fn clone(&self) -> ActiveTxRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more