pub struct WriteLockInfo {
pub abort_lsn: u64,
pub abort_known_deleted: bool,
pub abort_key: Option<Vec<u8>>,
pub abort_data: Option<Vec<u8>>,
pub abort_vlsn: i64,
pub abort_log_size: i32,
pub abort_expiration: i32,
pub abort_expiration_in_hours: bool,
pub never_locked: bool,
pub database_id: u64,
}Expand description
Information needed to undo write operations if a transaction aborts.
Stores the “abort version” - the state of a record before this txn modified it. This allows the transaction to restore the previous state on abort.
Fields§
§abort_lsn: u64LSN of the record’s abort version.
abort_known_deleted: boolWhether the abort version is a known-deleted record.
abort_key: Option<Vec<u8>>Key of the abort version (if key updates allowed).
abort_data: Option<Vec<u8>>Data of the abort version (if embedded in BIN).
abort_vlsn: i64VLSN of the abort version.
abort_log_size: i32On-disk size of the abort version.
abort_expiration: i32Expiration time of the abort version.
abort_expiration_in_hours: boolWhether expiration is in hours (true) or days (false).
never_locked: boolTrue if the LSN has never been locked before by this Txn.
Per the: “True if this locker has never had this LSN locked, is false otherwise. This is used to determine if the locker must add undo information for a write lock.”
database_id: u64Database ID of the database that was modified.
Stored so that Txn::abort() can route each UndoRecord to the
correct database’s B-tree.
Implementations§
Source§impl WriteLockInfo
impl WriteLockInfo
Sourcepub fn copy_all_info(&mut self, from: &WriteLockInfo)
pub fn copy_all_info(&mut self, from: &WriteLockInfo)
Copies all abort information from another WriteLockInfo.
Sourcepub fn set_abort_info(
&mut self,
abort_lsn: u64,
abort_key: Option<Vec<u8>>,
abort_data: Option<Vec<u8>>,
abort_vlsn: i64,
abort_log_size: i32,
abort_known_deleted: bool,
abort_expiration: i32,
abort_expiration_in_hours: bool,
)
pub fn set_abort_info( &mut self, abort_lsn: u64, abort_key: Option<Vec<u8>>, abort_data: Option<Vec<u8>>, abort_vlsn: i64, abort_log_size: i32, abort_known_deleted: bool, abort_expiration: i32, abort_expiration_in_hours: bool, )
Sets the abort information from a log entry.
Sourcepub fn is_null_abort_lsn(&self) -> bool
pub fn is_null_abort_lsn(&self) -> bool
Returns true if this represents a NULL abort LSN.
Trait Implementations§
Source§impl Clone for WriteLockInfo
impl Clone for WriteLockInfo
Source§fn clone(&self) -> WriteLockInfo
fn clone(&self) -> WriteLockInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more