Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version_generator: check that get_next_version is called on shard 0
The get_next_version function can only be safely called from shard 0, but this constraint is not enforced in any way. As evidenced in the previous commit, it is easy to accidentally call it from a non-zero shard. Introduce a runtime check to get_next_version which calls on_fatal_internal_error if it detects that the function was called form the wrong shard. This will let us detect cross-shard use issues in runtime.
- Loading branch information