-
Notifications
You must be signed in to change notification settings - Fork 358
feat(room): make load_event_with_relations also load relations when falling back to the network #5930
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
base: main
Are you sure you want to change the base?
feat(room): make load_event_with_relations also load relations when falling back to the network #5930
Conversation
97559da to
6704df8
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5930 +/- ##
=======================================
Coverage 88.50% 88.50%
=======================================
Files 362 362
Lines 103291 103351 +60
Branches 103291 103351 +60
=======================================
+ Hits 91413 91471 +58
+ Misses 7535 7533 -2
- Partials 4343 4347 +4 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #5930 will not alter performanceComparing Summary
|
andybalaam
left a comment
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.
Good catch. Looks good to me but I'm going to ask someone from the Rust team to have a quick check, especially on your question about limiting the number to fetch.
6704df8 to
64aee66
Compare
…alling back to the network Signed-off-by: Johannes Marbach <[email protected]>
64aee66 to
956c6d7
Compare
andybalaam
left a comment
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.
A couple of questions to resolve.
… when falling back to the network Change limit to 256 Signed-off-by: Johannes Marbach <[email protected]>
… when falling back to the network Cache related events after loading them Signed-off-by: Johannes Marbach <[email protected]>
… when falling back to the network Try loading relations from the cache before falling back to the server Signed-off-by: Johannes Marbach <[email protected]>
Room::load_event_with_relationscurrently tries to load the event and any known relations from the cache first. If that fails,/eventis called to retrieve the event itself. Nothing is done to also load the relations, however.This PR extends
load_event_with_relationsto also issue/relationsrequests to load any relations when the cache look-up failed.