Skip to content

messages: fix second part of vttablet bug#3163

Merged
sougou merged 1 commit intovitessio:masterfrom
sougou:messages
Sep 13, 2017
Merged

messages: fix second part of vttablet bug#3163
sougou merged 1 commit intovitessio:masterfrom
sougou:messages

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Sep 11, 2017

BUG=65416566
When vttablet tries to send a new message to vtgate and receives EOF
error, vttablet considers that as a real error and does an exponential
back-off for retries. That means when vttablet sits idle for a long time
(there are no new messages), and all clients reopened their
MessageStream RPCs (which means a lot of dead RPCs due to point #1
above), then when new message arrives vttablet will receive a lot of EOF
errors while it tries to send the message over dead RPCs. Due to
exponential back-off real delivery of this message will be delayed
significantly.

If a send returns EOF, the sender does not postpone the messages.
Instead, it turns on the messages pending flag and returns. This
will cause the poller to be woken up by the send loop as soon as it
gets through the cache.

BUG=65416566
When vttablet tries to send a new message to vtgate and receives EOF
error, vttablet considers that as a real error and does an exponential
back-off for retries. That means when vttablet sits idle for a long time
(there are no new messages), and all clients reopened their
MessageStream RPCs (which means a lot of dead RPCs due to point #1
above), then when new message arrives vttablet will receive a lot of EOF
errors while it tries to send the message over dead RPCs. Due to
exponential back-off real delivery of this message will be delayed
significantly.

If a send returns EOF, the sender does not postpone the messages.
Instead, it turns on the messages pending flag and returns. This
will cause the poller to be woken up by the send loop as soon as it
gets through the cache.
@alainjobart
Copy link
Copy Markdown
Contributor

alainjobart commented Sep 12, 2017

LGTM

Approved with PullApprove

@sougou sougou merged commit d2e2882 into vitessio:master Sep 13, 2017
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.

3 participants