Skip to main content

Crate noxu_txn

Crate noxu_txn 

Source
Expand description

Internal component of the noxu database.

This crate is published only so the noxu umbrella crate can depend on it. Use noxu (noxu = "3") in applications; depend on this crate directly only if you are extending the engine internals. Its API may change without a major version bump.

Transaction management and locking for Noxu DB.

transaction management and record-level locking with deadlock detection.

§Phase 3: Lock Type System Foundation (Implemented)

  • Lock types, conflict and upgrade matrices
  • Lock grant types and results
  • Write lock info for undo operations
  • Lock statistics
  • Locker hierarchy (BasicLocker, ThreadLocker, HandleLocker)

Re-exports§

pub use locker::Locker;
pub use basic_locker::BasicLocker;
pub use thread_locker::ThreadLocker;
pub use handle_locker::HandleLocker;
pub use locker_factory::LockerFactory;
pub use group_commit::GroupCommit;
pub use group_commit::GroupCommitMaster;
pub use group_commit::GroupCommitReplica;

Modules§

basic_locker
BasicLocker - non-transactional locker.
group_commit
Group commit interface and implementations.
handle_locker
HandleLocker - database handle locker.
locker
Base Locker trait.
locker_factory
Factory for creating lockers.
thread_locker
ThreadLocker - per-thread locker.

Structs§

CompareSlot
Identifies a slot in a BIN (key + BIN node ID) for deduplication.
DeadlockDetector
Deadlock detector using waits-for graph analysis.
DummyLockManager
A no-op lock manager that always grants locks immediately.
LockAttemptResult
Result of a single lock attempt on a Lock object.
LockImpl
A Lock embodies the lock state of an LSN. It includes a set of owners and a list of waiters.
LockInfo
Information about a single lock owner or waiter.
LockManager
The LockManager manages all locks in the system.
LockResult
Result of a Locker.lock() call.
LockStats
Lock statistics counters.
RevertInfo
Revert information for a single log entry in the undo chain.
ThinLockImpl
Memory-optimized lock for the common case of a single owner with no waiters.
Txn
A Txn is the internal representation of a transaction.
TxnAbort
A TxnAbort is logged when a transaction aborts.
TxnChain
A backward traversal of a transaction’s log chain for partial rollback.
TxnCommit
A TxnCommit is logged when a transaction commits.
TxnEnd
Base type for transaction end log entries (commit/abort).
TxnManager
Manages all active transactions.
TxnStats
Transaction statistics.
UndoRecord
A single undo record produced when a transaction aborts.
WriteLockInfo
Information needed to undo write operations if a transaction aborts.

Enums§

Durability
Durability policy for transaction commit.
Lock
A lock on an LSN, either thin (single owner) or full (multiple owners/waiters).
LockConflict
Result of checking whether two lock types conflict.
LockGrantType
Result of a lock attempt.
LockType
Lock types used in the transaction system.
LockUpgrade
Result of checking whether a lock can be upgraded.
TxnError
Transaction and locking errors.
TxnState
Transaction states.

Constants§

NULL_TXN_ID
Null transaction ID for non-transactional lockers.

Type Aliases§

TxnResult
Type alias for transaction results.