Module transaction

Source

Macros§

lock_keys

Structs§

DeviceRangeV32
LockManager
LockManager holds the locks that transactions might have taken. A TransactionManager implementation would typically have one of these.
ObjectStoreMutationV40
ObjectStoreMutationV41
ObjectStoreMutationV43
Options
This allows for special handling of certain transactions such as deletes and the extension of Journal extents. For most other use cases it is appropriate to use default() here.
ReadGuard
Transaction
A transaction groups mutation records to be committed as a group.
TransactionLocks
TxnMutation
UpdateMutationsKeyV32
UpdateMutationsKeyV40
WriteGuard

Enums§

AllocatorMutationV32
AssocObj
BorrowedOrOwned
LockKey
When creating a transaction, locks typically need to be held to prevent two or more writers trying to make conflicting mutations at the same time. LockKeys are used for this. NOTE: Ordering is important here! The lock manager sorts the list of locks in a transaction to acquire them in a consistent order, but there are special cases for the Filesystem lock and the Flush lock. The Filesystem lock is taken by every transaction and is done so first, as part of the TxnGuard. The Flush lock is taken when we flush an LSM tree (e.g. an object store), and is held for several transactions. As such, it must come first in the lock acquisition ordering, so that other transactions using the Flush lock have the same ordering as in flushing.
LockKeys
A container for holding LockKey objects. Can store a single LockKey inline.
MetadataReservation
MutationV40
MutationV41
MutationV43
OperationV32

Constants§

TRANSACTION_MAX_JOURNAL_USAGE
TRANSACTION_METADATA_MAX_AMOUNT

Traits§

AssociatedObject
Mutations in a transaction can be associated with an object so that when mutations are applied, updates can be applied to in-memory structures. For example, we cache object sizes, so when a size change is applied, we can update the cached object size.

Type Aliases§

AllocatorMutation
DeviceRange
Same as std::ops::Range but with Ord and PartialOrd support, sorted first by start of the range, then by the end.
Mutation
The journal consists of these records which will be replayed at mount time. Within a transaction, these are stored as a set which allows some mutations to be deduplicated and found (and we require custom comparison functions below). For example, we need to be able to find object size changes.
ObjectStoreMutation
Operation
The different LSM tree operations that can be performed as part of a mutation.
UpdateMutationsKey