-
Notifications
You must be signed in to change notification settings - Fork 260
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
UTD hook: stop re-reporting of UTDs on app relaunch #3519
Conversation
We'll need this for persisting the data to storage.
We're going to add some more stuff here, and it's going to be async, so a separate function will be helpful.
This isn't all that much use at the moment: we need to add persistence to the store. To limit the growth rate of reported_utds, use a bloom filter instead of a set.
This is now redundant.
515a8c8
to
21bc95e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3519 +/- ##
==========================================
+ Coverage 83.79% 83.81% +0.01%
==========================================
Files 254 254
Lines 25723 25765 +42
==========================================
+ Hits 21555 21595 +40
- Misses 4168 4170 +2 ☔ View full report in Codecov by Sentry. |
21bc95e
to
1b7f05f
Compare
@@ -9,7 +9,14 @@ Breaking changes: | |||
Bug fixes: | |||
|
|||
- `UtdHookManager` no longer re-reports UTD events as late decryptions. | |||
([#3840](https://github.com/matrix-org/matrix-rust-sdk/pull/3840)) | |||
([#3480](https://github.com/matrix-org/matrix-rust-sdk/pull/3480)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing a typo while I'm here 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice commits, lgtm, thanks
This is a fix to #3374, and a re-do of #3490.
The principle remains to use a Bloom filter to keep track of which events we have already reported to the parent UTD hook. We load the data from database on startup; we now flush it out immediately on every update.