Skip to content

Import sqlite storage as separate module#3449

Merged
badboy merged 3 commits into
main-sqlitefrom
sqlite/initial-import
Jun 3, 2026
Merged

Import sqlite storage as separate module#3449
badboy merged 3 commits into
main-sqlitefrom
sqlite/initial-import

Conversation

@badboy

@badboy badboy commented May 6, 2026

Copy link
Copy Markdown
Member

My plan over the next few weeks is to split up #3405 into reviewable pieces and merge them piece by piece.
For that I created the main-sqlite branch, which currently is the same as main. This way any feature work/bug fixes against the current Glean can continue to go to main without issues.
Over time I can rebase/merge that branch against main to keep-up-to-date, but keep further sqlite work reviewable.


this very first part is merely adding the first pieces of code, but none of that is actually part of the compilation yet (wouldn't work because it's not fully usable yet).
The details about the sqlite setup will change in later commits. Re-arranging that into a single commit that has the perfect setup would be a lot of work of splitting and rebasing commits (and squashing and merge conflicts), so doing it this way seemed easier.

@badboy badboy requested a review from a team as a code owner May 6, 2026 13:02
@badboy badboy requested review from chutten and removed request for a team May 6, 2026 13:02
@badboy badboy force-pushed the sqlite/initial-import branch from b65fc42 to d3d4e1b Compare May 6, 2026 13:04
Comment thread glean-core/src/database/sqlite/schema.rs Outdated
Comment thread glean-core/src/database/sqlite/schema.rs
Comment thread glean-core/src/database/sqlite.rs
Comment thread glean-core/src/database/sqlite.rs
Comment thread glean-core/src/database/sqlite.rs
Comment thread glean-core/src/database/sqlite/schema.rs
Comment thread glean-core/src/database/sqlite.rs
Comment thread glean-core/src/database/sqlite.rs Outdated
@badboy badboy requested a review from chutten May 27, 2026 14:23
badboy added 3 commits May 27, 2026 16:39
This is a modified version of the kvstore/skv implementation:
https://searchfox.org/firefox-main/rev/cced10961b53e0d29e22e635404fec37728b2644/toolkit/components/kvstore/src/skv/connection.rs
Which itself is based on application-service's sql-support.

It's stripped down to what we need in Glean:
* A file-backed database
* A schema set up on start, potentially applying migrations if we need that
* A read-write connection, which is re-used for all access.
@badboy badboy force-pushed the sqlite/initial-import branch from 09f39e8 to a643cd3 Compare May 27, 2026 14:41
@badboy

badboy commented May 27, 2026

Copy link
Copy Markdown
Member Author

Woops, I initially pushed 3 changes as 3 separate commits, but then locally already squashed them and repushed accidentally. Only the 3 changes can be seen here: d3d4e1b...09f39e8

@badboy badboy added the sqlite Any changes to the new SQLite storage backend label May 27, 2026
@badboy badboy merged commit 09de4ac into main-sqlite Jun 3, 2026
28 of 29 checks passed
@badboy badboy deleted the sqlite/initial-import branch June 3, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqlite Any changes to the new SQLite storage backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants