-
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 | UTD will never be reported if the timeline controller is dropped before the max_delay
#4267
Comments
Thanks for opening an issue. Since we've also discussed that in private: IMO it would be fine to NOT drop the pending tasks in the |
The problem is that in that case there will be no attempt to retry decryption in case of late keys (or from backup) |
The UtdHookManager isn't responsible for retrying decryption anyway, is it? |
No that's right. It is the timeline controller doing it at the moment. |
So to be clear: the problem with Benji's suggestion is not so much that there will be no attempt to retry decryption (that is the case anyway). The problem is that, given there will be no attempt to retry decryption, then dropping the pending tasks will mean we report the UTD anyway, even if we could have decrypted the event. |
For what it's worth, this is another good reason to move the retry-decryption + UTD-reporting logic over to the event cache, since it would make this problem nonexistent (the event cache's lifetime is the entire app's lifetime, after you've subscribed to it). |
When a UTD is reported, the hook manager will spawn a task to be executed after
max_delay
:matrix-rust-sdk/crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs
Lines 233 to 236 in 9b6de4e
However, if the hook is dropped before the expiration of this timer the UTD will never be reported:
matrix-rust-sdk/crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs
Lines 315 to 318 in 9b6de4e
The current default for that delay is 60s. This particularly affects clients like EXI that don't keep timelines around; EXA has a LRU cache of the last 16 opened timelines.
Some notes:
The text was updated successfully, but these errors were encountered: