Skip to content

Add temp ping storage for rkv - #3661

Open
jeddai wants to merge 3 commits into
mozilla:mainfrom
jeddai:add-temp-ping-storage-for-rkv
Open

jeddai wants to merge 3 commits into
mozilla:mainfrom
jeddai:add-temp-ping-storage-for-rkv

Conversation

@jeddai

@jeddai jeddai commented Sep 24, 2026

Copy link
Copy Markdown
Member

This updates the RKV database to temporarily store submitted pings in memory when storing submitted pings is enabled.

@jeddai jeddai self-assigned this Sep 24, 2026
@jeddai
jeddai requested a review from a team as a code owner September 24, 2026 13:14

@travis79 travis79 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's be sure and mark this as a temporary solution pending sqlite being reinstated, either as a comment, changelog, or both. Other than that, there were a couple of important things, and a couple of things that were more nit-sized remarks, but this is looking pretty good!

Comment thread glean-core/src/database/rkv.rs
Comment thread glean-core/src/lib.rs

#[cfg(not(feature = "sqlite"))]
Vec::new()
block_on_dispatcher();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a subtle change in behavior from before that will still be here if we go back to sqlite. Is this blocking so you can get any pings submitted right before the getter is called? Might be worth a comment as it will make any calling threads block (potentially).

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.

Yep, it's blocking because I ran into issues with testing. It should have been included the first time and I just missed it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, let's add to the fn doc then calling out specifically that this blocks on the dispatcher so anyone calling it might see that in intellisense/etc and wouldn't have to go looking for it. Something like this would better document the behavior in a visible way:

/// Blocks and awaits the Glean Dispatcher before returning a Vec containing the stored pings

Comment thread glean-core/src/database/mod.rs Outdated
Comment thread glean-core/src/lib.rs Outdated
Comment thread glean-core/src/database/rkv.rs
@jeddai
jeddai requested a review from travis79 September 25, 2026 15:08

This branch has not been deployed

No deployments
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