Skip to content

messenger: use ackWaitTimeout in postpone query#6114

Merged
sougou merged 2 commits intovitessio:masterfrom
derekperkins:messages-ackWait
Apr 27, 2020
Merged

messenger: use ackWaitTimeout in postpone query#6114
sougou merged 2 commits intovitessio:masterfrom
derekperkins:messages-ackWait

Conversation

@derekperkins
Copy link
Copy Markdown
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 requested a review from sougou as a code owner April 26, 2020 14:45
@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