Skip to content

Listener won't enqueue jobs when buffer size is 0 #307

Description

@jasoncodes

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions