Skip to content

Bug 2062257 - sqlite: Use an in-memory database when delay_ping_lifetime_io=true - #3590

Draft
badboy wants to merge 1 commit into
mainfrom
sqlite-use-an-in-memory-databa/wnzovuusnvwz
Draft

Bug 2062257 - sqlite: Use an in-memory database when delay_ping_lifetime_io=true#3590
badboy wants to merge 1 commit into
mainfrom
sqlite-use-an-in-memory-databa/wnzovuusnvwz

Conversation

@badboy

@badboy badboy commented Aug 17, 2026

Copy link
Copy Markdown
Member

This restores delay_ping_lifetime_io behavior (not touching disk until persist_ping_lifetime_data is called, or in auto-mode when the counter/time is hitting the limit)

The local benchmark shows it's twice as fast compared to current main (so compared to always hitting disk).


Not yet ready for use. Should get some testing (and fixing at least one clippy lint).
Also some refactoring to not use the same string constant everywhere (and instead use a const for that)

Ok(())
}

fn persist_ping_lifetime_data_if_full(&self, tx: &mut Transaction) -> Result<()> {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Except for the actual INSERT INTO at the end this is exactly the same as the old implementation that was removed.

Comment thread glean-core/src/database/sqlite.rs Outdated
Comment thread glean-core/src/database/sqlite.rs Outdated
@badboy
badboy force-pushed the sqlite-use-an-in-memory-databa/wnzovuusnvwz branch from f6c2260 to 5a3cac5 Compare August 17, 2026 16:01
@badboy badboy added the sqlite Any changes to the new SQLite storage backend label Aug 18, 2026
@badboy
badboy force-pushed the sqlite-use-an-in-memory-databa/wnzovuusnvwz branch from 5a3cac5 to 111153b Compare August 18, 2026 10:57
This restores `delay_ping_lifetime_io` behavior (not touching disk until
`persist_ping_lifetime_data` is called, or in auto-mode when the
counter/time is hitting the limit)

The local benchmark shows it's twice as fast compared to current `main`
(so compared to always hitting disk).
@badboy
badboy force-pushed the sqlite-use-an-in-memory-databa/wnzovuusnvwz branch from 111153b to 80d13ea Compare August 18, 2026 11:02
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.

1 participant