Don't lock on QueryJobs, by using the disk version
We move from querying the in-memory version to loading all jobs from the disk. Since the jobs are written/deleted on disk in an atomic manner, we don't need to lock at all. Also, since we're just looking at the contents of a directory, we don't need to check that the job queue is "open". If some jobs are removed between when we listed them and us loading them, we need to be able to cope: if we were asked to load those jobs specifically, we must report the failure, but if we were just asked to "load all" we shall just not consider them as part of the "all" set, since they were deleted. Signed-off-by:Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment