pub fn write_checkpoint(
dir: &Path,
end_offset: i64,
epoch: i32,
bytes: &[u8],
) -> Result<(), RaftError>Expand description
Write a KIP-630 .checkpoint artifact (bytes only) atomically and
durably: the temporary file is synced before the rename and the directory
after it, as Kafka’s FileRawSnapshotWriter.freeze does.
§Errors
Returns an error when the directory cannot be created, or the temporary file cannot be written, synced or renamed into place.