-
Notifications
You must be signed in to change notification settings - Fork 175
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
Serialize writes of JSON playlist #1932
Conversation
4e0618e
to
f7ae625
Compare
9f70115
to
9dd88db
Compare
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.
Before merge, would it be feasible to test it out in a local dev environment and/or staging, aside from the unit tests?
LGTM otherwise. Will let somebody else mark it as approved, as this is my first dive into this part of the codebase.
f0c59f4
to
980d789
Compare
4a25547
to
5382941
Compare
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.
LGTM 🚢
What does this pull request do? Explain your changes. (required)
Fixes
Error saving json playlist
error.We're making a lot of writes (to object store) to same json playlist file during stream.
Each write starts in own goroutine, so often new writes starts before previous completed.
In that case request to Google Cloud Storage often takes more than 10s, which is our timeout.
This PR fixes problem by serializing write requests.
Specific updates (required)
OvewriteQueue
class that serializes writes to the same file in OS.OvewriteQueue
for writing JSON playlists.How did you test each of these updates (required)
Unit tests
Does this pull request close any open issues?
Fixes #1924
Checklist:
make
runs successfully./test.sh
pass