play: exit if binary version mismatches latest epoch's #649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The invariant that replay should not occur across binary versions was previously unenforced. This enforces it by setting a flag in the disk struct to indicate version mismatch between ourselves and the latest epoch's binary version number (saved in
vere.txt
).Then, in the synchronous replay function, we exit if the same flag is set.
Questions:
_disk_epoc_meta
public (i.e.u3_disk_epoc_meta
) so we can provide the specific version to revert to in the error message?Note: Whitespace is cleaned up here automatically thanks to my editor and I don't see why not to include them in this PR. Happy to revert with request though as I don't really care either way.