MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / mark_rolled_back

Method mark_rolled_back

graphlite/src/txn/wal.rs:538–550  ·  view source on GitHub ↗

ROADMAP v0.3.0 - WAL entry for ROLLBACK durability (write rollback marker to WAL)

(&self, transaction_id: TransactionId)

Source from the content-addressed store, hash-verified

536 /// Mark a transaction as rolled back
537 #[allow(dead_code)] // ROADMAP v0.3.0 - WAL entry for ROLLBACK durability (write rollback marker to WAL)
538 pub fn mark_rolled_back(&self, transaction_id: TransactionId) -> Result<(), WALError> {
539 let seq = self.next_global_sequence();
540 let entry = WALEntry::new(
541 WALEntryType::Rollback,
542 transaction_id,
543 seq,
544 0, // Rollback doesn't have a txn sequence
545 Some(OperationType::Rollback),
546 format!("Transaction {} rolled back", transaction_id.id()),
547 );
548
549 self.write_entry(entry)
550 }
551
552 /// Rotate to a new WAL file
553 fn rotate_wal_file(&self) -> Result<(), WALError> {

Callers

nothing calls this directly

Calls 2

next_global_sequenceMethod · 0.80
write_entryMethod · 0.80

Tested by

no test coverage detected