-
Notifications
You must be signed in to change notification settings - Fork 195
Description
I’ve been testing --minimum-buffer-size=0 --maximum-buffer-size=0 in order to not lock jobs when there aren't enough free workers to run them immediately. The poller had an issue with this which was reported in #235 and fixed by 1736d3a and the same issue seems to exist with the listen code path.
Jobs run with a buffer size set to 0 thanks to the poller picking them up but they don’t start run immediately on NOTIFY like they do if the minimum buffer size is at least 1. The problem appears to be the job_available message resolver dropping jobs when the buffer has no room to accept any.
If I am understanding the buffer code correctly, maybe JobBuffer#accept? should always allow up to waiting_count jobs to be accepted? Alternatively, special case when the buffer size is 0 to allow one job if there’s any workers waiting?