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

Use correct next users with keys query #1726

Merged
merged 1 commit into from
Mar 2, 2023
Merged

Use correct next users with keys query #1726

merged 1 commit into from
Mar 2, 2023

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Feb 27, 2023

Fix a minor bug where starting the next pending keys/query would use the wrong list of users used to deduplicate requests. The consequence of this bug is that we may be executing slightly more requests than necessary

@Anderas Anderas force-pushed the andy/fix_query branch 2 times, most recently from e1b0a0a to 6f83902 Compare February 27, 2023 14:22
@Anderas Anderas requested review from a team and Velin92 and removed request for a team February 27, 2023 14:24
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Patch coverage: 97.82% and project coverage change: +0.02 🎉

Comparison is base (29e3713) 37.38% compared to head (6f83902) 37.40%.

❗ Current head 6f83902 differs from pull request most recent head a266f2a. Consider uploading reports for the commit a266f2a to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1726      +/-   ##
===========================================
+ Coverage    37.38%   37.40%   +0.02%     
===========================================
  Files          612      612              
  Lines        96171    96206      +35     
  Branches     41586    41596      +10     
===========================================
+ Hits         35952    35986      +34     
+ Misses       59164    59162       -2     
- Partials      1055     1058       +3     
Impacted Files Coverage Δ
...DK/Crypto/CryptoMachine/MXKeysQueryScheduler.swift 92.64% <91.66%> (-1.39%) ⬇️
.../CryptoMachine/MXKeysQuerySchedulerUnitTests.swift 99.03% <100.00%> (+0.08%) ⬆️
...cretStorage/JSONModels/MXSecretStorageKeyContent.m 91.48% <0.00%> (-8.52%) ⬇️
MatrixSDK/JSONModels/MXJSONModel.h 90.62% <0.00%> (-3.13%) ⬇️
MatrixSDK/Space/MXSpaceService.swift 41.40% <0.00%> (-0.61%) ⬇️
MatrixSDK/MXSession.m 39.89% <0.00%> (-0.03%) ⬇️
MatrixSDK/Crypto/MXCrypto.m 64.46% <0.00%> (+0.48%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

currentQuery = .init(users: users, task: next)
if let nextTask = nextTask {
log("... query for \(users) completed, starting next pending query.")
currentQuery = .init(users: nextUsers, task: nextTask)
Copy link
Member

Choose a reason for hiding this comment

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

maybe is a personal thing, but I don't like inferred constructor, could we use the constructor directly?

Copy link
Member

@Velin92 Velin92 left a comment

Choose a reason for hiding this comment

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

LGTM just one comment

@Anderas Anderas merged commit f52a4d2 into develop Mar 2, 2023
@Anderas Anderas deleted the andy/fix_query branch March 2, 2023 09:25
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.

2 participants