This fixes an issue where checkpoints which were promoted to snapshots would become empty. We need to file:open/2 the checkpoint file with the read option as well as write since write without read truncates the file.
We also add another server restart to the checkpoint promotion case which catches the failure - the servers failed to restart since the promoted snapshot is empty.
This fixes an issue where checkpoints which were promoted to snapshots would become empty. We need to
file:open/2
the checkpoint file with theread
option as well aswrite
sincewrite
withoutread
truncates the file.We also add another server restart to the checkpoint promotion case which catches the failure - the servers failed to restart since the promoted snapshot is empty.