-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consumer stall after RequeueWithoutBackoff #128
Consumer stall after RequeueWithoutBackoff #128
Conversation
🔥 |
RFR @mreiferson |
I'm not following the need for jehiah@f0be171 |
I moved the lock so that it covered both the As i read it, that potential race could allow simultaneous finishes on more than one message/connection (this is fed by per-connection goroutines) to update rdy and backoff unexpectedly. |
@jehiah that's |
Yes, backoffCounter updates need to be protected, but that update also needs to also include the check and update for ie: pathalogical current case is you have 10 messages on different connections req to trigger backoff; they all pass the |
Ahh, I thought you meant a "data" race. Gonna read through again, thanks for the info... |
OK - I think you're right, nice catch. While I was reading the code I cleaned up some other related things (pushed here). My suggestion is - can't we use |
(I'm going to give that a try) |
31cb33f
to
ba79f30
Compare
@jehiah check those |
@mreiferson changes look good. two more small tweaks pushed. If you are good i'll squash this down. |
👍 🔨 |
P.S. bump go versions in travis too? |
Does backoff with a MaxBackoffDuration of 0 not race with resume? The I might be reading it wrong, though; I've not yet finished reading all of conn/consumer/delegates to see how it all fits together. |
Not sending |
* expand locking to cover updating backoffDuration * use atomic ops for backoffCounter * set RDY 0 before setting backoff timer (for cases when timer is 0) * clarify/consolidated backoff/resume functions
a44589f
to
b592d58
Compare
3516a9b
to
8923105
Compare
Consumer stall after RequeueWithoutBackoff
If a consumer is in backoff and attempts to recover with RDY 1 and then a message, but response with RequeueWithoutBackoff it will stall and not exit backoff. (failing test attached)
cc: @georgicodes