inspectDeleteBitmap now rejects an unsupported version before allocating the
body buffer, mirroring DeleteBitmap::deserialize (magic -> version -> body_size
bound -> allocate). read-bitmap reports the header then throws
UNKNOWN_FORMAT_VERSION. Trailing-bytes-after-CRC stays deliberately tolerant.
Trim verbose comments across the touched files; functional test gains an
unsupported-version case.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Inspect a per-part Roaring delete-bitmap (.rbm) sidecar and print a header +
stats summary: format magic/version, CRC validity, cardinality (deleted-row
count), row range, and -- with --values -- a dump of all set bits (the deleted
row offsets) in ascending order.
Tolerant of corruption: a bad CRC still prints the header and flags CORRUPT, a
non-.rbm file reports bad magic, a malformed roaring body is reported rather
than crashed on, and a missing path is rejected up front (FILE_DOESNT_EXIST).
The non-throwing inspector (inspectDeleteBitmap) is declared in DeleteBitmap.h
and implemented in DeleteBitmap.cpp next to serialize/deserialize, so the .rbm
byte layout keeps one authority. clickhouse-disks is a symlink to the unified
clickhouse binary, which links dbms, so the command resolves it directly.
Tests: tests/queries/0_stateless/04400_clickhouse_disks_read_bitmap.sh and
DeleteBitmapInspectTest unit cases.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>