Skip to content
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

messenger: use ackWaitTimeout in postpone query #6114

Merged
merged 2 commits into from
Apr 27, 2020

Conversation

derekperkins
Copy link
Member

@derekperkins derekperkins commented Apr 26, 2020

Since messages are immediately postponed upon sending, we need to add exponential backoff on top of the ackWaitTime, otherwise messages will be resent too quickly.

This also simplifies the query by pulling out the time_now addition to the front of the query and leaving the IF statement to only calculate backoff.

In the second commit, I move the jitter calculation from SQL into Go. This makes the postpone sql easier to follow, and it will make it easier to allow for user provided jitter % in the future

without this, messages will be resent too quickly

Signed-off-by: Derek Perkins <derek@nozzle.io>
@derekperkins derekperkins added this to the v6.0 milestone Apr 26, 2020
this makes the postpone sql easier to follow, and it will make it easier to allow for user provided jitter % in the future

Signed-off-by: Derek Perkins <derek@nozzle.io>
@sougou sougou merged commit 66386cc into vitessio:master Apr 27, 2020
@systay systay changed the title messager: use ackWaitTimeout in postpone query messenger: use ackWaitTimeout in postpone query May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants