Skip to content

Conversation

@brizental
Copy link
Contributor

@brizental brizental commented Aug 30, 2021

Pull Request checklist

  • Quality: Make sure this PR builds and runs cleanly.
    • Inside the glean/ folder, run:
      • npm run test Runs all tests
      • npm run lint Runs all linters
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
  • Documentation: This PR includes documentation changes, an explanation of why it does not need that or a follow-up bug has been filed to do that work

I remember we were hesistant to alllow getting the whole stire and that
is the reason why it was put into a special function and the underline
was added. Initially the idea was that it would be used only in tests.
The `get` should then throw an error when it got an empty index.

Turns out not all store implementations (namely webext and tests) were
throwing this error and there were two places in the code (outside of tests)
where we were getting the whole store. These places were the events database,
when getting all store names, and the pings database, when scanning the database.

The cause of the initialization error in Qt was that in the events
database code we were trying to get the whole store by passing an empty
index to the `get` API. Qt being the only spec compliant, was throwing
an error when that happened.
@brizental brizental requested a review from Dexterp37 August 30, 2021 15:50
Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh gee, Bea. Great commit messages. Thank you.

r+ with a changelog entry added.

@brizental
Copy link
Contributor Author

Oh gee, Bea. Great commit messages. Thank you.

Thanks!

Quick note, the changes in this PR fix on partially the issues I mentioned in todays meeting related to the events sorting not working properly (or at all) in the samples. I have filed a bug to investigate that tomorrow.

@brizental brizental merged commit 69febd3 into mozilla:main Aug 30, 2021
@brizental brizental deleted the 1727349-qml-storage-errors branch August 30, 2021 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants