On Fri, Jan 22, 2021 at 11:19 PM Александр Рябов <
ar1...@gmail.com> wrote:
> I found a bug. When producer adds a new job when consumer is running
> in parallel, beanstalk gives newly added job to consumer and returns reply
> to producer only after sent job to consumer.
The protocol spec and the documentation for beanstalkd do
not specify an order in which these events must occur. The
implementation is free to choose. So I would say the observed
behavior conforms to the spec.
In general, it is good for specifications not to overly constrain
the software that implements them. They should specify only
what they need to, and otherwise leave implementations (such
as beanstalkd) free to choose an approach that suits them and
satisfies other constraints they may be facing.
That said, if you think it would be useful for the specification to
determine this ordering, we should weigh the trade-off of that
on the one hand vs letting the implementation retain more
flexibility on the other hand. Maybe we should update the spec.