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(sdk): event_cache::Deduplicator is able to learn without scanning #4652

Closed

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Feb 11, 2025

This patch adds the Deduplicator::learn method to learn only without scanning new events. This is useful to rebuild a Deduplicator iteratively.


…nning.

This patch adds the `Deduplicator::learn` method to learn only without
scanning new events. This is useful to rebuild a `Deduplicator`
iteratively.
@Hywan Hywan marked this pull request as ready for review February 11, 2025 14:03
@Hywan Hywan requested a review from a team as a code owner February 11, 2025 14:03
@Hywan Hywan requested review from jmartinesp and bnjbvr and removed request for a team and jmartinesp February 11, 2025 14:03
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.69%. Comparing base (69588d5) to head (8d4f44c).
Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4652      +/-   ##
==========================================
+ Coverage   85.68%   85.69%   +0.01%     
==========================================
  Files         292      292              
  Lines       33570    33570              
==========================================
+ Hits        28763    28767       +4     
+ Misses       4807     4803       -4     

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

Comment on lines 213 to 216
// `RoomEvents` is used to check false-positive from the bloom filter. `event_0`
// and `event_2` are going to be detected as positive (duplicated), so
// `RoomEvents` will be used. We need to insert `event_0` and `event_2` in it
// too.
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this comment at all, sorry. Can you reformulate it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure! It's a bit confusing indeed. I've reformulate entirely.

crates/matrix-sdk/src/event_cache/deduplicator.rs Outdated Show resolved Hide resolved
@Hywan Hywan requested a review from bnjbvr February 11, 2025 16:01
@bnjbvr
Copy link
Member

bnjbvr commented Feb 12, 2025

Turns out we don't need this, thanks to #4662 🥳

@bnjbvr bnjbvr closed this Feb 12, 2025
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