refactor(keystore): MlsPendingMessage has no real primary key#1810
Merged
coriolinus merged 7 commits intomainfrom Feb 2, 2026
Merged
refactor(keystore): MlsPendingMessage has no real primary key#1810coriolinus merged 7 commits intomainfrom
MlsPendingMessage has no real primary key#1810coriolinus merged 7 commits intomainfrom
Conversation
8a0c253 to
5c188e8
Compare
MlsPendingMessage has no primary keyMlsPendingMessage has no real primary key
5c188e8 to
aa16b14
Compare
istankovic
reviewed
Feb 2, 2026
fewerner
approved these changes
Feb 2, 2026
Contributor
fewerner
left a comment
There was a problem hiding this comment.
To me this looks fine, ty!
This trait let us delete entities in batches corresponding to the search key for which the trait is implemented. Mostly it's here as special-case handling for `MlsPendingMessage`s, but adding it as a trait generalizes things and overall reduces special handling.
…`MlsPendingMessage` This opens the door to a more general solution for this type.
Originally I'd hoped we could eliminate a non-unit key entirely, but it turns out that we cannot. So a better solution is to compute a fast deterministic hash of the content. This is more space-efficient than run-length-encoding for obvious reasons, and also avoids keeping copies of sensitive data in more places in memory than are strictly required. Given 128 bits of hashed data, the chance of a collision should be infinitesimal.
5126f51 to
4818bbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's new in this PR
We'd been faking it with an inefficient workaround, but we now have the trait infrastructure to handle this properly.
PR Submission Checklist for internal contributors
SQPIT-764feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.