Closed felixbuenemann closed 9 years ago
If I try to enqueue a job with MAXLEN 1, queueing fails for the third instead of the second job.
This seems to be due to an off by one error in job.c where the length is compared with > instead of >=.
>
>=
Example:
127.0.0.1:7711> ADDJOB foo bar 1000 MAXLEN 1 DI1dcc90feebc8085a2e65bc0d41c1d49b46cf357c05a0SQ 127.0.0.1:7711> ADDJOB foo bar 1000 MAXLEN 1 DI1dcc90fe8de6220e6339debc3b3a9ff630b4aa7805a0SQ 127.0.0.1:7711> ADDJOB foo bar 1000 MAXLEN 1 (error) MAXLEN Queue is already longer than the specified MAXLEN count 127.0.0.1:7711>
Expected the failure on the second ADDJOB invocation instead of on the third.
LGTM
Thank you @felixbuenemann and @sunheehnus, I merged the PR fixing this.
If I try to enqueue a job with MAXLEN 1, queueing fails for the third instead of the second job.
This seems to be due to an off by one error in job.c where the length is compared with
>
instead of>=
.Example:
Expected the failure on the second ADDJOB invocation instead of on the third.