{"id":"corruption-terminates-scan","text":"In `_scan_segment`, a CRC mismatch or short read stops scanning the entire segment; records after the corrupt point are silently lost from the index even if they are individually valid.","truth_value":"IN","source":"entries/2026/05/28/log-structured-hash-table-bitcask-_scan_segment.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"expected_crc = zlib.crc32(payload) & 0xFFFFFFFF\nif crc != expected_crc:\n    raise CorruptionError(f\"CRC mismatch\")\n# caller breaks on CorruptionError, losing remaining records"},"explanation":{"steps":[{"node":"corruption-terminates-scan","truth_value":"IN","reason":"premise"}]}}