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

Possible race condition trying to transcode files before the direct upload to S3 has completed (Aws::S3::Errors::NoSuchKey) #114

Open
floehopper opened this issue Dec 23, 2023 · 0 comments

Comments

@floehopper
Copy link
Member

See this exception.

I think this is most likely a race condition where the track has been saved and so the relevant TranscodeJobs have been queued in the after_save callback on Track. However, the direct upload of the original WAV file for the track hasn't yet completed. Thus when the TranscodeJob tries to fetch the file from S3, we see these Aws::S3::Errors::NoSuchKey exceptions. Since there were only two occurrences each for different TranscodeJob IDs, I suspect they were both retried and succeeded the 2nd time round.

I wonder whether we could use the direct-upload:end or direct-uploads:end Direct Upload JavaScript Events to send an XHR request to the Rails app to indicate that the relevant file is available in S3...?

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

No branches or pull requests

1 participant