Revisit some TODO items around keys_changed_at consistency checks. #176
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.
Past-rfkelly helpfully left a
TODO
item in the code for checking consistency ofkeys_changed_at
, which I went to revisit in light of Bug 1613032.Unfortunately for Past-rfkelly, his reasoning that we could add this check once all servers are running the latest code is not sound. There's a (very very small) chance that a user could have:
keys_changed_at
timestampkeys_changed_at
feature, recording an updatedgeneration
but leaving the oldkeys_changed_at
.When this user suddenly comes back and syncs against a server with the proposed additional consistency checks, we would see an update to
keys_changed_at
but no corresponding update togeneration
, and incorrectly lock them out of their sync data.I briefly toyed with the idea of adding a check that says "for records created after X date, ensure that a change to
keys_changed_at
is accompanied by a change togeneration
. But it seemed like too much effort for too little gain, so instead I have:keys_changed_at
that is outright ahead of the correspondinggeneration
.