In the book “Designing Data Intensive Applications”, it says Concurrency and crash recovery are simpler if segment files are append-only or immutable. For crash recovery, you don't need to worry if a crash happened while a value was being overwritten, leaving you with part of old data and part of new data.
But what if we crash while appending? wouldn’t it leave the segment file to have only part of the data we intend to append? Do they use checksum on the segment file and discard the whole segment file?