Only track pending client resets done by the same core version #7944
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.
If the previous attempt at performing a client reset was done with a different core version than the current one, then attempting the client reset again is not yet a cycle as something significant has changed between the two attempts. This means that we don't actually need the ability to read old client reset tracker schemas; if the schema isn't an exact match we can just discard the existing data.
Running with the idea that retrying the client reset if the core version has changed is not only acceptable but desirable, I also made it store the exact core version which wrote the tracker entry and discard it if the version has changed even if the schema hasn't.
Since I was touching the schema for this anyway, I removed the unused primary key and made the error fields required - we never actually used a null error, and the code reading the tracker entry crashed if it encountered one (
obj.get<int64_t>()
requires that you check for null first, which the code didn't do).