anchore-engine icon indicating copy to clipboard operation
anchore-engine copied to clipboard

Analyzer should not wait for queue check interval if analysis task is an error or image was deleted

Open zhill opened this issue 2 years ago • 0 comments

In the current system, if the analyzer gets an analysis task that errors out, or is for an image record that was deleted while waiting in the queue (use case of "oops, cancel image analysis"), it will end and wait the configured cycle time (seconds) before checking the queue again for a job.

This results in a maximum check throughput for the system and can block progress when the queue is very large but full of cancelled/deleted image jobs.

The fix is to immediately try another job after each job and only do backoff if no job is found to process. That way each analyzer will operate at maximum pace while there is work to be done.

zhill avatar Aug 20 '21 19:08 zhill