You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the answer to the previous question was yes, are the changes available on GitHub? No
Have you checked your service quotas for the sevices this solution uses? n/a
Were there any errors in the CloudWatch Logs? No
Screenshots
n/a
Additional context
The whole logic around jobs-manifest.json (JM) seems to invite different kinds of race condition; most relevant for this issue:
event with status INPUT_INFORMATION triggers
read JM
append data
write JM
event with status COMPLETE triggers
read JM
use information from JM for input details
If both events fire in quick succession (more likely for short/fast jobs), the COMPLETE may read the JM before input data was written to it, triggering the "no entry found" if block, which sets InputDetails to an empty object and does not set InputFile at all:
console.log(`no entry found for jobId: ${jobDetails.Id}, creating new entry`);
jobDetails.InputDetails={};
manifest.Jobs.push(jobDetails);
results=jobDetails;
}else{
The missing data could be filled in from a mediaconvert:GetJob call (that is happening anyway).
Suspected additional issue
I have not tested this, but from reading the code, it seems highly likely that concurrent processing of jobs leads to missing entries in the JM (data written by one Lambda may be overwritten by a second Lambda that has read JM before the write).
The text was updated successfully, but these errors were encountered:
Describe the bug
Sometimes, the SNS notification is missing details on the job input (
InputFile
andInputDetails
) – e.g.:To Reproduce
Upload video files repeatedly; due to the nature of the race condition (see below), it should trigger easily with very short video files.
Expected behavior
Notifications always contain input data.
Please complete the following information about the solution:
Screenshots
n/a
Additional context
The whole logic around
jobs-manifest.json
(JM) seems to invite different kinds of race condition; most relevant for this issue:INPUT_INFORMATION
triggersCOMPLETE
triggersIf both events fire in quick succession (more likely for short/fast jobs), the
COMPLETE
may read the JM before input data was written to it, triggering the "no entry found"if
block, which setsInputDetails
to an empty object and does not setInputFile
at all:video-on-demand-on-aws-foundation/source/job-complete/lib/utils.js
Lines 44 to 50 in 4c0275a
The missing data could be filled in from a
mediaconvert:GetJob
call (that is happening anyway).Suspected additional issue
I have not tested this, but from reading the code, it seems highly likely that concurrent processing of jobs leads to missing entries in the JM (data written by one Lambda may be overwritten by a second Lambda that has read JM before the write).
The text was updated successfully, but these errors were encountered: