-
Notifications
You must be signed in to change notification settings - Fork 258
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): Implement event_cache::Deduplicator
#3580
Conversation
I have notice we have a growable bloom filter in our direct deps already, we should use it instead of introducing a new one: Line 39 in 9aa2774
|
bb7fcd1
to
713cc08
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3580 +/- ##
==========================================
- Coverage 84.70% 84.56% -0.14%
==========================================
Files 269 270 +1
Lines 28766 28862 +96
==========================================
+ Hits 24366 24407 +41
- Misses 4400 4455 +55 ☔ View full report in Codecov by Sentry. |
134d7f6
to
b5224aa
Compare
6fecc07
to
5b1949c
Compare
This patch adds an `Event` type alias to `SyncTimelineEvent` to (i) make the code shorter, (ii) remove some cognitive effort, (iii) make things more convenient.
This patch adds unit tests for the `RoomEvents`' methods.
This patch adds the `LinkedChunk::remove_item_at` method, along with `Update::RemoveItem` variant.
This is only code move, nothing has changed.
This is a clean up patch, nothing fancy.
This is another clean up patch.
This patch fixes a bug in an optimisation inside `UpdateToVectorDiff` when an `Update::PushItems` is handled. It can sometimes create `VectorDiff::Append` instead of a `VectorDiff::Insert`. The tests will be part of the next patch.
…ateToVectorDiff`. This patch implements the support of `Update::RemoveItem` inside `UpdateToVectorDiff` to emit a `VectorDiff::Remove`.
e75192f
to
b578f38
Compare
This is WIP of an event deduplicator implemented on top of a Bloom filter. It works great, but it doesn't solve all issues we have right now. Right now, it filters duplicated events; instead, it should collect duplicated events with their positions, so that they can be removed from the
LinkedChunk
before being re-inserted. It's the basis to implement a naive reconciliation in theEventCache
.EventCache
storage #3280