Expand description
Internal component of the
noxudatabase.This crate is published only so the
noxuumbrella crate can depend on it. Usenoxu(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§
- Compare
Slot - Identifies a slot in a BIN (key + BIN node ID) for deduplication.
- Deadlock
Detector - Deadlock detector using waits-for graph analysis.
- Dummy
Lock Manager - A no-op lock manager that always grants locks immediately.
- Lock
Attempt Result - Result of a single lock attempt on a Lock object.
- Lock
Impl - A Lock embodies the lock state of an LSN. It includes a set of owners and a list of waiters.
- Lock
Info - Information about a single lock owner or waiter.
- Lock
Manager - The LockManager manages all locks in the system.
- Lock
Result - Result of a Locker.lock() call.
- Lock
Stats - Lock statistics counters.
- Revert
Info - Revert information for a single log entry in the undo chain.
- Thin
Lock Impl - 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.
- Undo
Record - A single undo record produced when a transaction aborts.
- Write
Lock Info - 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).
- Lock
Conflict - Result of checking whether two lock types conflict.
- Lock
Grant Type - Result of a lock attempt.
- Lock
Type - Lock types used in the transaction system.
- Lock
Upgrade - 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.