VEuPathDB / lib-compute-platform

Async compute platform core.
1 stars 0 forks source link

Race condition with job status checks #49

Open Foxcapades opened 1 year ago

Foxcapades commented 1 year ago

There is a race condition here between these 2 lines:

https://github.com/VEuPathDB/lib-compute-platform/blob/dbeb289f979fc082888b9b1dc405acecc490570e/lib/src/main/kotlin/org/veupathdb/lib/compute/platform/AsyncPlatform.kt#L195

https://github.com/VEuPathDB/lib-compute-platform/blob/dbeb289f979fc082888b9b1dc405acecc490570e/lib/src/main/kotlin/org/veupathdb/lib/compute/platform/AsyncPlatform.kt#L199

The status may change between the queue db check on line 195 and the s3 check on line 199, which could cause this exact issue.

Originally posted by @Foxcapades in https://github.com/VEuPathDB/lib-compute-platform/issues/48#issuecomment-1540235548