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
NodeUpdate
Node modification/update
NodeDelete
Node deletion (logical) with complete before-image capture
Fields
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
EdgeInsert
Edge insertion into cluster
EdgeUpdate
Edge modification within cluster
EdgeDelete
Edge deletion (logical)
StringInsert
String table entry creation
FreeSpaceAllocate
Free space block allocation
FreeSpaceDeallocate
Free space block deallocation
TransactionBegin
Transaction begin marker
TransactionCommit
Transaction commit marker
TransactionRollback
Transaction rollback marker
Checkpoint
Checkpoint marker
HeaderUpdate
Database header update
SegmentEnd
End of WAL segment marker
TransactionPrepare
Transaction prepare phase marker (two-phase commit)
TransactionAbort
Transaction abort marker (two-phase commit)
SavepointCreate
Savepoint creation marker
SavepointRollback
Savepoint rollback marker
SavepointRelease
Savepoint release marker
BackupCreate
Backup creation marker
BackupRestore
Backup restore marker
LockAcquire
Lock acquisition marker
LockRelease
Lock release marker
IndexUpdate
Index update marker
StatisticsUpdate
Statistics update marker
AllocateContiguous
Contiguous region allocation
CommitContiguous
Contiguous region commit
RollbackContiguous
Contiguous region rollback
Fields
region: ContiguousRegionKvSet
KV key-value set operation
KvDelete
KV key delete operation
Implementations§
Source§impl V2WALRecord
impl V2WALRecord
Sourcepub fn record_type(&self) -> V2WALRecordType
pub fn record_type(&self) -> V2WALRecordType
Get the record type
Sourcepub fn cluster_key(&self) -> Option<i64>
pub fn cluster_key(&self) -> Option<i64>
Get the cluster key for cluster-affinity logging (if applicable)
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Estimate the serialized size of this record
Sourcepub fn modifies_data(&self) -> bool
pub fn modifies_data(&self) -> bool
Check if this record modifies data (requires checkpointing)
Sourcepub fn is_transaction_control(&self) -> bool
pub fn is_transaction_control(&self) -> bool
Check if this record is transaction control
Trait Implementations§
Source§impl Clone for V2WALRecord
impl Clone for V2WALRecord
Source§fn clone(&self) -> V2WALRecord
fn clone(&self) -> V2WALRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for V2WALRecord
impl RefUnwindSafe for V2WALRecord
impl Send for V2WALRecord
impl Sync for V2WALRecord
impl Unpin for V2WALRecord
impl UnwindSafe for V2WALRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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