Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(event cache): deduplicate using a store when available #4662

Merged
merged 5 commits into from
Feb 13, 2025

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Feb 12, 2025

Based on the glorious work of #4659 and #4656, this introduces a new way to deduplicate events, whether we have enabled storage or not, using a plain old sum type 🤓 When storage is enabled by default for everyone, we can get rid of the BloomFilterDeduplicator and replace Deduplicator with the store-based one.

Part of #3280.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 93.02326% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.76%. Comparing base (1918bd5) to head (33f5621).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/event_cache/deduplicator.rs 91.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4662      +/-   ##
==========================================
+ Coverage   85.74%   85.76%   +0.01%     
==========================================
  Files         292      292              
  Lines       33723    33733      +10     
==========================================
+ Hits        28917    28932      +15     
+ Misses       4806     4801       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Greeeeaaat! Can we have a couple of tests for the store based deduplicator? We already test filter_duplicated_events but one test to ensure the behaviour of retain works as expected would be nice :-). Thanks!

@bnjbvr bnjbvr enabled auto-merge (rebase) February 13, 2025 09:38
@bnjbvr bnjbvr merged commit 8a64922 into main Feb 13, 2025
41 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/deduplicate-with-database-if-possible branch February 13, 2025 09:53
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