Closed caleb-johnson closed 1 year ago
This one is difficult to fix :-)
This seems a concurrency issue between the gateway and the scheduler for the job record.
I believe what's happening is:
I believe what's happening is:
- the scheduler gets the job record for the job https://github.com/Qiskit-Extensions/quantum-serverless/blob/db829650b2b9339d650326a84c30257e4848bcbc/gateway/api/management/commands/update_jobs_statuses.py#L22
- the gateway gets the result request and update the job record with it https://github.com/Qiskit-Extensions/quantum-serverless/blob/db829650b2b9339d650326a84c30257e4848bcbc/gateway/api/views.py#L145
- the scheduler detects the job status change (PENDING -> SUCCEDED) https://github.com/Qiskit-Extensions/quantum-serverless/blob/db829650b2b9339d650326a84c30257e4848bcbc/gateway/api/management/commands/update_jobs_statuses.py#L45
- the scheduler updates the job record with the new status -- this override the result field of the job record. https://github.com/Qiskit-Extensions/quantum-serverless/blob/db829650b2b9339d650326a84c30257e4848bcbc/gateway/api/management/commands/update_jobs_statuses.py#L57
Thank you for this explanation!
The following remote program sometimes returns an empty dictionary as the result
<Job | b90b6513-4a93-451b-871f-39681b26cbb7> returned an empty dictionary