Fix a race condition when starting spontaneous jobs
When starting any job we should always explicitly compare the status of the current level of detail. Just the fact that there is no merge/stroke jobs in the updater context is not enough. It happens because an update job transitions into an empty state in three stages. Firstly, it is marked as WAITING, then its lod ticket is removed from the updater context, and, finally, if it is not assigned with any nice task again, it switches into EMPTY state. Between the first and the second states there is a short fragile period when getJobsSnapshot() will return nothing, but currentLevelOfDetail() will still return LoD of the latest job. This state is "okay", we just need to restart queue processing in this case. BUG:434648
Loading
Please register or sign in to comment