Skip to main content

Module visibility

Module visibility 

Source
Expand description

MVCC Visibility Check Kernel

This module provides SIMD-accelerated visibility checking for MVCC (Multi-Version Concurrency Control) operations.

§Algorithm

A row is visible if:

visible[i] = (commit_ts[i] != 0) && (commit_ts[i] < snapshot_ts)

With transaction ID awareness:

visible[i] = ((commit_ts[i] != 0) && (commit_ts[i] < snapshot_ts)) || (txn_id[i] == current_txn)

§Boolean Logic

visible = (commit ≠ 0) ∧ (commit < snapshot)
        = ¬(commit = 0) ∧ (commit < snapshot)

§SIMD Strategy

  • AVX2: Process 4 u64 timestamps per 256-bit register
  • NEON: Process 2 u64 timestamps per 128-bit register

Functions§

visibility_check
Check visibility for a batch of rows based on commit timestamps.
visibility_check_with_txn
Check visibility with transaction ID awareness (for self-visibility).