What is happening
The MCAP format consists of magic, a header, data records, optional summary sections, a footer, and final magic. The official recover command reads a corrupt or truncated source and writes a new valid copy, reporting when records were discarded or a record ended mid-write.