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

server: Enforce a minimum timeout for segment upload #2541

Merged
merged 3 commits into from
Jul 28, 2022

Conversation

victorges
Copy link
Member

@victorges victorges commented Jul 27, 2022

What does this pull request do? Explain your changes. (required)
This is to fix the segment upload timeout for really short segments, which I
found to be an issue when investigating frequent timeouts in VOD tests.

In this case (logs), there is a frequent header timeout happening in the tests,
and even by increasing the retries and adding some backoff logic, it seems to keep
happening pretty often.

I then noticed that it always happened with the same segment of the test video, and
when segmenting it locally with the same code I found that this segment has a duration
of 533ms (and only so short cause it's the last seg in the file).

This means that the upload timeout given to it would be a mere 250ms, which
can easily be hit for longer round-trip times to orchestrators even if they would be able to
respond healthily.

Specific updates (required)

  • Make MinSegmentUploadTimeout be a minimum instead of just a default

How did you test each of these updates (required)
Ran automatic tests.

Does this pull request close any open issues?
No.

Checklist:

@victorges victorges requested a review from leszko July 27, 2022 22:49
Copy link
Contributor

@leszko leszko left a comment

Choose a reason for hiding this comment

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

Good fix, thanks @victorges 👍

@thomshutt thomshutt requested a review from cyberj0g July 28, 2022 12:06
@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #2541 (4d8d907) into master (6a212e7) will increase coverage by 0.01511%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #2541         +/-   ##
===================================================
+ Coverage   54.69427%   54.70938%   +0.01510%     
===================================================
  Files             95          95                 
  Lines          19854       19854                 
===================================================
+ Hits           10859       10862          +3     
+ Misses          8390        8387          -3     
  Partials         605         605                 
Impacted Files Coverage Δ
common/util.go 61.58537% <ø> (ø)
server/segment_rpc.go 78.72969% <100.00000%> (ø)
discovery/db_discovery.go 70.75812% <0.00000%> (+1.08303%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a212e7...4d8d907. Read the comment docs.

@victorges victorges merged commit 2f306f6 into master Jul 28, 2022
@victorges victorges deleted the vg/fix/upload-timeout branch July 28, 2022 13:50
ad-astra-video pushed a commit to ad-astra-video/go-livepeer that referenced this pull request Aug 23, 2022
* server: Enforce a minimum timeout for segment upload

* CHANGELOG: Change changelog

* server: Fix tests with new upload timeout logic
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

2 participants