Skip to main content

V2WALRecord

Enum V2WALRecord 

Source
pub enum V2WALRecord {
Show 32 variants NodeInsert { node_id: i64, slot_offset: u64, node_data: Vec<u8>, }, NodeUpdate { node_id: i64, slot_offset: u64, old_data: Vec<u8>, new_data: Vec<u8>, }, NodeDelete { node_id: i64, slot_offset: u64, old_data: Vec<u8>, outgoing_edges: Vec<CompactEdgeRecord>, incoming_edges: Vec<CompactEdgeRecord>, }, ClusterCreate { node_id: i64, direction: Direction, cluster_offset: u64, cluster_size: u32, edge_data: Vec<u8>, }, EdgeInsert { cluster_key: (i64, Direction), edge_record: CompactEdgeRecord, insertion_point: u32, }, EdgeUpdate { cluster_key: (i64, Direction), old_edge: CompactEdgeRecord, new_edge: CompactEdgeRecord, position: u32, }, EdgeDelete { cluster_key: (i64, Direction), old_edge: CompactEdgeRecord, position: u32, }, StringInsert { string_id: u32, string_value: String, }, FreeSpaceAllocate { block_offset: u64, block_size: u32, block_type: u8, }, FreeSpaceDeallocate { block_offset: u64, block_size: u32, block_type: u8, }, TransactionBegin { tx_id: u64, timestamp: u64, }, TransactionCommit { tx_id: u64, timestamp: u64, }, TransactionRollback { tx_id: u64, timestamp: u64, }, Checkpoint { checkpointed_lsn: u64, timestamp: u64, }, HeaderUpdate { header_offset: u64, old_data: Vec<u8>, new_data: Vec<u8>, }, SegmentEnd { segment_lsn: u64, checksum: u32, }, TransactionPrepare { tx_id: u64, record_count: u64, timestamp: SystemTime, }, TransactionAbort { tx_id: u64, abort_reason: String, timestamp: SystemTime, }, SavepointCreate { tx_id: u64, savepoint_id: String, timestamp: SystemTime, }, SavepointRollback { tx_id: u64, savepoint_id: String, timestamp: SystemTime, }, SavepointRelease { tx_id: u64, savepoint_id: String, timestamp: SystemTime, }, BackupCreate { backup_id: String, backup_path: PathBuf, timestamp: SystemTime, }, BackupRestore { backup_id: String, backup_path: PathBuf, target_path: PathBuf, timestamp: SystemTime, }, LockAcquire { tx_id: u64, resource_id: i64, lock_type: u8, timestamp: SystemTime, }, LockRelease { tx_id: u64, resource_id: i64, timestamp: SystemTime, }, IndexUpdate { index_id: u32, operation_type: u8, key_data: Vec<u8>, timestamp: SystemTime, }, StatisticsUpdate { stats_type: u8, stats_data: Vec<u8>, timestamp: SystemTime, }, AllocateContiguous { txn_id: u64, region: ContiguousRegion, timestamp: u64, }, CommitContiguous { txn_id: u64, region: ContiguousRegion, }, RollbackContiguous { region: ContiguousRegion, }, KvSet { key: Vec<u8>, value_bytes: Vec<u8>, value_type: u8, ttl_seconds: Option<u64>, version: u64, }, KvDelete { key: Vec<u8>, old_value_bytes: Option<Vec<u8>>, old_value_type: u8, old_version: u64, },
}
Expand description

V2 WAL record containing operation data

Variants§

§

NodeInsert

Node creation with initial data

Fields

§node_id: i64
§slot_offset: u64
§node_data: Vec<u8>
§

NodeUpdate

Node modification/update

Fields

§node_id: i64
§slot_offset: u64
§old_data: Vec<u8>
§new_data: Vec<u8>
§

NodeDelete

Node deletion (logical) with complete before-image capture

Fields

§node_id: i64
§slot_offset: u64
§old_data: Vec<u8>
§outgoing_edges: Vec<CompactEdgeRecord>

Outgoing edges captured before deletion (for rollback)

§incoming_edges: Vec<CompactEdgeRecord>

Incoming edges captured before deletion (for rollback)

§

ClusterCreate

Edge cluster creation

Fields

§node_id: i64
§direction: Direction
§cluster_offset: u64
§cluster_size: u32
§edge_data: Vec<u8>
§

EdgeInsert

Edge insertion into cluster

Fields

§cluster_key: (i64, Direction)
§edge_record: CompactEdgeRecord
§insertion_point: u32
§

EdgeUpdate

Edge modification within cluster

Fields

§cluster_key: (i64, Direction)
§position: u32
§

EdgeDelete

Edge deletion (logical)

Fields

§cluster_key: (i64, Direction)
§position: u32
§

StringInsert

String table entry creation

Fields

§string_id: u32
§string_value: String
§

FreeSpaceAllocate

Free space block allocation

Fields

§block_offset: u64
§block_size: u32
§block_type: u8
§

FreeSpaceDeallocate

Free space block deallocation

Fields

§block_offset: u64
§block_size: u32
§block_type: u8
§

TransactionBegin

Transaction begin marker

Fields

§tx_id: u64
§timestamp: u64
§

TransactionCommit

Transaction commit marker

Fields

§tx_id: u64
§timestamp: u64
§

TransactionRollback

Transaction rollback marker

Fields

§tx_id: u64
§timestamp: u64
§

Checkpoint

Checkpoint marker

Fields

§checkpointed_lsn: u64
§timestamp: u64
§

HeaderUpdate

Database header update

Fields

§header_offset: u64
§old_data: Vec<u8>
§new_data: Vec<u8>
§

SegmentEnd

End of WAL segment marker

Fields

§segment_lsn: u64
§checksum: u32
§

TransactionPrepare

Transaction prepare phase marker (two-phase commit)

Fields

§tx_id: u64
§record_count: u64
§timestamp: SystemTime
§

TransactionAbort

Transaction abort marker (two-phase commit)

Fields

§tx_id: u64
§abort_reason: String
§timestamp: SystemTime
§

SavepointCreate

Savepoint creation marker

Fields

§tx_id: u64
§savepoint_id: String
§timestamp: SystemTime
§

SavepointRollback

Savepoint rollback marker

Fields

§tx_id: u64
§savepoint_id: String
§timestamp: SystemTime
§

SavepointRelease

Savepoint release marker

Fields

§tx_id: u64
§savepoint_id: String
§timestamp: SystemTime
§

BackupCreate

Backup creation marker

Fields

§backup_id: String
§backup_path: PathBuf
§timestamp: SystemTime
§

BackupRestore

Backup restore marker

Fields

§backup_id: String
§backup_path: PathBuf
§target_path: PathBuf
§timestamp: SystemTime
§

LockAcquire

Lock acquisition marker

Fields

§tx_id: u64
§resource_id: i64
§lock_type: u8
§timestamp: SystemTime
§

LockRelease

Lock release marker

Fields

§tx_id: u64
§resource_id: i64
§timestamp: SystemTime
§

IndexUpdate

Index update marker

Fields

§index_id: u32
§operation_type: u8
§key_data: Vec<u8>
§timestamp: SystemTime
§

StatisticsUpdate

Statistics update marker

Fields

§stats_type: u8
§stats_data: Vec<u8>
§timestamp: SystemTime
§

AllocateContiguous

Contiguous region allocation

Fields

§txn_id: u64
§timestamp: u64
§

CommitContiguous

Contiguous region commit

Fields

§txn_id: u64
§

RollbackContiguous

Contiguous region rollback

Fields

§

KvSet

KV key-value set operation

Fields

§key: Vec<u8>
§value_bytes: Vec<u8>
§value_type: u8
§ttl_seconds: Option<u64>
§version: u64
§

KvDelete

KV key delete operation

Fields

§key: Vec<u8>
§old_value_bytes: Option<Vec<u8>>
§old_value_type: u8
§old_version: u64

Implementations§

Source§

impl V2WALRecord

Source

pub fn record_type(&self) -> V2WALRecordType

Get the record type

Source

pub fn cluster_key(&self) -> Option<i64>

Get the cluster key for cluster-affinity logging (if applicable)

Source

pub fn serialized_size(&self) -> usize

Estimate the serialized size of this record

Source

pub fn modifies_data(&self) -> bool

Check if this record modifies data (requires checkpointing)

Source

pub fn is_transaction_control(&self) -> bool

Check if this record is transaction control

Trait Implementations§

Source§

impl Clone for V2WALRecord

Source§

fn clone(&self) -> V2WALRecord

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for V2WALRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V