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

vrepl: improve some failure handling #5792

Merged
merged 3 commits into from
Feb 7, 2020

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Feb 5, 2020

Tablet dialers were set to not fail fast. This was causing grpc
to redial the same tablet indefinitely eventhough it was permanently
down. This has now been changed to fail fast.

The tablet picker was only taking health errors into account, which
happens when tablets report themseleves as unhealthy. But if a tablet
is unreachable, we have to check LastError.

It's possible that vrepication can be ahead of a source repica.
In those cases, the vstreamer of the source should fail requests.
There are situations where mysql has unpredictable behavior,
especially if the requested position is one above the current one.

Also fixed some staticcheck errors.

Tablet dialers were set to not fail fast. This was causing grpc
to redial the same tablet indefinitely eventhough it was permanently
down. This has now been changed to fail fast.

The tablet picker was only taking health errors into account, which
happens when tablets report themseleves as unhealthy. But if a tablet
is unreachable, we have to check LastError.

Also fixed some staticcheck errors.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
It's possible that vrepication can be ahead of a source repica.
In those cases, the vstreamer of the source should fail requests.
There are situations where mysql has unpredictable behavior,
especially if the requested position is one above the current one.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested a review from deepthi February 5, 2020 19:42
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -125,15 +125,20 @@ func (vs *vstreamer) Cancel() {
func (vs *vstreamer) Stream() error {
defer vs.cancel()

curpos, err := vs.currentPosition()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this will be more readable as curPos

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou merged commit 68a701c into vitessio:master Feb 7, 2020
@sougou sougou deleted the ss-vrepl-fixes branch February 7, 2020 16:57
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