Skip to main content

DebugInstrumentation

Struct DebugInstrumentation 

Source
pub struct DebugInstrumentation;
Expand description

Debug instrumentation utilities for GraphFile operations

Implementations§

Source§

impl DebugInstrumentation

Source

pub fn verify_header_written_immediately( file: &mut File, expected_bytes: &[u8], ) -> NativeResult<()>

Verify header was written correctly (temporary instrumentation)

Reads back the header immediately after writing to ensure persistence integrity. Used for detecting write coherence issues during development.

Source

pub fn print_cluster_layout_debug( header: &PersistentHeaderV2, node_region_end: u64, base_cluster_start: u64, cluster_floor: u64, )

Print cluster layout debugging information

Outputs detailed layout invariants for cluster offset calculations. Essential for debugging node/cluster collision issues.

Source

pub fn print_final_cluster_layout(header: &PersistentHeaderV2)

Print final cluster layout after corrections

Shows the final state after all cluster offset corrections have been applied.

Source

pub fn log_cluster_offset_fix( cluster_type: &str, old_offset: u64, new_offset: u64, )

Log critical cluster offset fixes

Records when cluster offsets are moved to prevent node slot corruption.

Source

pub fn log_transaction_phase(phase: &str, tx_id: u64)

Log transaction phase transitions

Records the beginning and end of transaction phases for debugging.

Source

pub fn log_rollback_info( rollback_floor: u64, enhanced_rollback_floor: u64, final_rollback_size: u64, )

Log rollback information

Outputs detailed rollback metrics for debugging transaction failures.

Source

pub fn log_truncation_operation( current_size: u64, intended_rollback_size: u64, rollback_floor: u64, enhanced_rollback_floor: u64, final_rollback_size: u64, will_truncate: bool, )

Log file truncation operations (TRUNC_AUDIT)

Source

pub fn log_slot_corruption_check( operation: &str, current_size: u64, final_rollback_size: u64, difference: u64, )

Log slot corruption checks

Source

pub fn log_post_truncate_slot_check(node_id: u64, slot_offset: u64, version: u8)

Log post-truncate slot verification

Source

pub fn log_rollback_completion(final_rollback_size: u64)

Log rollback completion

Source

pub fn log_v2_header_initialization()

Log V2 header initialization

Source

pub fn get_v2_magic() -> [u8; 8]

Get V2 magic bytes for header initialization

Source

pub fn get_v2_format_version() -> u32

Get V2 format version for header initialization

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> 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, 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