Bug 1894064: remove migration code #1935
Merged
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 only documentation that we had of this was in the CHANGELOG, so there are no accompanying doc changes.
Why this existed
We are removing this migration code since it is no longer needed. The reason for this code was to help move
client_id
s andfirst_run_date
s over from our previous storage solution from when Glean.js was asynchronous. Newer versions of Glean.js uselocalStorage
which allows synchronous read/writes. Glean.js used to useIndexedDB
which forced asynchronous read/writes.Synchronous is necessary so that we can ensure read/writes execute before pages are unloaded. If we start to write to storage async and the page unloads, that process never finishes and we incur data loss.
Why it can go away
The only product that used Glean.js in production that was migrating to our new storage solution was MDN. They have been the only ever consumer of this feature. We have had the migration code running for ~9 months in MDN, so the majority of users would have migrated over their data by now.
We are removing it because of an error we are seeing when submitting the first ping for any user before they have migrated. A ping is submitted missing both the
client_id
and thefirst_run_date
since they get lost in a race condition. This is causing a lot of schema ingestion errors.We've run the migration code for long enough and now it is safe to turn it off. This will also stop the large amount of
first_run_date
errors that we have been seeing.Pull Request checklist
glean/
folder, run:npm run test
Runs all testsnpm run lint
Runs all lintersCHANGELOG.md
or an explanation of why it does not need onemozilla/glean
repository