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

feat(send queue): retry uploads #4232

Merged
merged 2 commits into from
Nov 12, 2024
Merged

feat(send queue): retry uploads #4232

merged 2 commits into from
Nov 12, 2024

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Nov 7, 2024

A small foresight from the initial PR:

  • make it possible to define a RequestConfig for upload, plain or encrypted
  • use that to request a short retry of uploads, in the send queue

Part of #1732.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 12 lines in your changes missing coverage. Please review.

Project coverage is 84.95%. Comparing base (66a7972) to head (e1b77f6).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/encryption/futures.rs 0.00% 8 Missing ⚠️
crates/matrix-sdk/src/send_queue.rs 42.85% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4232      +/-   ##
==========================================
+ Coverage   84.93%   84.95%   +0.02%     
==========================================
  Files         274      274              
  Lines       29726    29742      +16     
==========================================
+ Hits        25247    25268      +21     
+ Misses       4479     4474       -5     

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

@bnjbvr bnjbvr marked this pull request as ready for review November 7, 2024 16:54
@bnjbvr bnjbvr requested a review from a team as a code owner November 7, 2024 16:54
@bnjbvr bnjbvr requested review from Hywan and removed request for a team November 7, 2024 16:54
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Looks reasonable, good work.

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.

Great!

self.client.send(request, Some(request_config))
}

/// Returns a reasonable upload timeout for an upload, based on the size of
/// the data to be uploaded.
pub(crate) fn reasonable_upload_timeout(data: &[u8]) -> Duration {
Copy link
Member

Choose a reason for hiding this comment

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

I like the name 👍

@bnjbvr bnjbvr enabled auto-merge (rebase) November 12, 2024 10:04
@bnjbvr bnjbvr merged commit 982c6ea into main Nov 12, 2024
40 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/send-q-retry-upload branch November 12, 2024 10:19
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