Skip to content

Conversation

@poljar
Copy link
Contributor

@poljar poljar commented Nov 14, 2025

This PR follows from #5746 and concludes #3872.

We still have a bit of logic left in the timeline, to handle the UTD hook and to handle explicit redecryption requests that come from the application or in case the redecryptor missed some room keys due to lagging broadcast channels.

There's still a bit more work to be done, mainly to check that #5474 and #5798 have been fixed or fix them if they were not yet fixed by the new and more robust architecture we have for redecryption.

This task is still necessary because the redecryptor in the event cache
might miss some room keys.

In this case the timeline can tell the redecryptor which events it
should retry to decrypt.

We're collecting all the UTDs in the timeline and telling the
redecryptor to do its best.
@poljar poljar requested a review from a team as a code owner November 14, 2025 12:35
@poljar poljar requested review from andybalaam and removed request for a team November 14, 2025 12:35
Comment on lines -677 to -678
#[async_test]
async fn test_retry_fetching_encryption_info() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is not gone, it was reimplemented in the event cache: 4a519bd.

@poljar poljar requested a review from Hywan November 14, 2025 12:37
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 98.11321% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.60%. Comparing base (4fbc83a) to head (e9c8f10).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...i/src/timeline/controller/decryption_retry_task.rs 97.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5869      +/-   ##
==========================================
+ Coverage   88.58%   88.60%   +0.01%     
==========================================
  Files         363      362       -1     
  Lines      102782   102512     -270     
  Branches   102782   102512     -270     
==========================================
- Hits        91050    90830     -220     
+ Misses       7493     7453      -40     
+ Partials     4239     4229      -10     

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

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 14, 2025

CodSpeed Performance Report

Merging #5869 will not alter performance

Comparing poljar/event-cache/remove-timeline-redecrypion-logic (e9c8f10) with main (9ab886f)

Summary

✅ 50 untouched

Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

Looks good, with the relatively limited context I have.

Does this mean we persist the redecrypted event in the event cache instead of redecrypting it every time we want to display it?

@poljar
Copy link
Contributor Author

poljar commented Nov 14, 2025

Looks good, with the relatively limited context I have.

Does this mean we persist the redecrypted event in the event cache instead of redecrypting it every time we want to display it?

That's correct, yes. Redecrypting an event replaces the event in storage.

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.

3 participants