Skip to content
Commit 4af39228 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

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
parent d2add0bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment