Skip to content
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: Make store requests in batch for Room::get_members #2021

Merged
merged 7 commits into from
Jun 14, 2023

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Jun 6, 2023

Each commit can be viewed separately. The first commits add the methods to retrieve events in batch to the StateStore trait and the last one uses the new methods for Room::get_members.

Should fix part of #1979. What is left is to be able to paginate to not request all the results at once.

  • Public API changes documented in changelogs (optional)

Signed-off-by: Kévin Commaille zecakeh@tedomum.fr

@zecakeh zecakeh requested a review from a team as a code owner June 6, 2023 14:57
@zecakeh zecakeh requested review from jplatte and removed request for a team June 6, 2023 14:57
@zecakeh zecakeh force-pushed the members-batch branch 2 times, most recently from 142fead to 587770c Compare June 6, 2023 15:14
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 97.11% and project coverage change: +0.47 🎉

Comparison is base (eb5af42) 75.50% compared to head (21fa3e5) 75.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2021      +/-   ##
==========================================
+ Coverage   75.50%   75.98%   +0.47%     
==========================================
  Files         151      151              
  Lines       16211    16550     +339     
==========================================
+ Hits        12240    12575     +335     
- Misses       3971     3975       +4     
Impacted Files Coverage Δ
crates/matrix-sdk/src/room/common.rs 77.12% <0.00%> (-0.58%) ⬇️
crates/matrix-sdk-base/src/store/traits.rs 73.68% <83.33%> (+1.80%) ⬆️
crates/matrix-sdk-sqlite/src/state_store.rs 91.63% <94.62%> (+1.54%) ⬆️
crates/matrix-sdk-base/src/rooms/normal.rs 71.05% <97.29%> (+0.56%) ⬆️
crates/matrix-sdk-base/src/store/memory_store.rs 86.58% <98.03%> (+1.17%) ⬆️
...ates/matrix-sdk-base/src/deserialized_responses.rs 66.12% <100.00%> (+2.33%) ⬆️
crates/matrix-sdk-base/src/rooms/members.rs 58.46% <100.00%> (+12.46%) ⬆️
...tes/matrix-sdk-base/src/store/integration_tests.rs 97.88% <100.00%> (+0.76%) ⬆️
crates/matrix-sdk-sqlite/src/utils.rs 93.47% <100.00%> (+0.29%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Excellent work, thank you for your time on this!

It looks good to me. Although a second review from @jplatte might not be superflous.

crates/matrix-sdk-base/src/store/memory_store.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-base/src/store/memory_store.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-base/src/store/memory_store.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Quick comment, might review more in-depth later.

crates/matrix-sdk/src/room/common.rs Outdated Show resolved Hide resolved
@jplatte
Copy link
Collaborator

jplatte commented Jun 14, 2023

Let's get the conflicts fixed and merge this, I haven't reviewed everything but since Ivan did and this PR even increases test coverage, I don't think I need to.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh
Copy link
Collaborator Author

zecakeh commented Jun 14, 2023

Rebased on main and history cleaned up 🙂

@jplatte jplatte enabled auto-merge (rebase) June 14, 2023 10:44
@jplatte jplatte merged commit b4fdfee into matrix-org:main Jun 14, 2023
47 checks passed
@zecakeh zecakeh deleted the members-batch branch June 14, 2023 13:58
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.

None yet

3 participants