pub struct DebugInstrumentation;Expand description
Debug instrumentation utilities for GraphFile operations
Implementations§
Source§impl DebugInstrumentation
impl DebugInstrumentation
Sourcepub fn verify_header_written_immediately(
file: &mut File,
expected_bytes: &[u8],
) -> NativeResult<()>
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.
Sourcepub fn print_cluster_layout_debug(
header: &PersistentHeaderV2,
node_region_end: u64,
base_cluster_start: u64,
cluster_floor: u64,
)
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.
Sourcepub fn print_final_cluster_layout(header: &PersistentHeaderV2)
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.
Sourcepub fn log_cluster_offset_fix(
cluster_type: &str,
old_offset: u64,
new_offset: u64,
)
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.
Sourcepub fn log_transaction_phase(phase: &str, tx_id: u64)
pub fn log_transaction_phase(phase: &str, tx_id: u64)
Log transaction phase transitions
Records the beginning and end of transaction phases for debugging.
Sourcepub fn log_rollback_info(
rollback_floor: u64,
enhanced_rollback_floor: u64,
final_rollback_size: u64,
)
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.
Sourcepub 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,
)
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)
Sourcepub fn log_slot_corruption_check(
operation: &str,
current_size: u64,
final_rollback_size: u64,
difference: u64,
)
pub fn log_slot_corruption_check( operation: &str, current_size: u64, final_rollback_size: u64, difference: u64, )
Log slot corruption checks
Sourcepub fn log_post_truncate_slot_check(node_id: u64, slot_offset: u64, version: u8)
pub fn log_post_truncate_slot_check(node_id: u64, slot_offset: u64, version: u8)
Log post-truncate slot verification
Sourcepub fn log_rollback_completion(final_rollback_size: u64)
pub fn log_rollback_completion(final_rollback_size: u64)
Log rollback completion
Sourcepub fn log_v2_header_initialization()
pub fn log_v2_header_initialization()
Log V2 header initialization
Sourcepub fn get_v2_magic() -> [u8; 8]
pub fn get_v2_magic() -> [u8; 8]
Get V2 magic bytes for header initialization
Sourcepub fn get_v2_format_version() -> u32
pub fn get_v2_format_version() -> u32
Get V2 format version for header initialization
Auto Trait Implementations§
impl Freeze for DebugInstrumentation
impl RefUnwindSafe for DebugInstrumentation
impl Send for DebugInstrumentation
impl Sync for DebugInstrumentation
impl Unpin for DebugInstrumentation
impl UnwindSafe for DebugInstrumentation
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> 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