Skip to content

vttablet: seq: make nextval more robust#5591

Merged
sougou merged 2 commits intovitessio:masterfrom
planetscale:ss-bug-nextval
Jan 21, 2020
Merged

vttablet: seq: make nextval more robust#5591
sougou merged 2 commits intovitessio:masterfrom
planetscale:ss-bug-nextval

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Dec 18, 2019

Fixes #5590

Previously the nextval code assumed that next_id will be changed
externally. As explained in the bug, this can now happen with the
new use cases.

This change ensures that vttablet will work correctly even if
next_id was changed.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

@sougou sougou requested review from systay and tirsen December 18, 2019 21:44
@tirsen
Copy link
Copy Markdown
Collaborator

tirsen commented Dec 19, 2019

@kalfonso can you patch this into our staging environment and verify if it works please?

Fixes vitessio#5590

Previously the nextval code assumed that next_id will be changed
externally. As explained in the bug, this can now happen with the
new use cases.

This change ensures that vttablet will work correctly even if
next_id was changed.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou
Copy link
Copy Markdown
Contributor Author

sougou commented Jan 8, 2020

@tirsen @kalfonso ping

Copy link
Copy Markdown
Collaborator

@systay systay left a comment

Choose a reason for hiding this comment

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

LGTM

@kalfonso
Copy link
Copy Markdown
Contributor

kalfonso commented Jan 8, 2020

we haven't tested this change in our staging environment yet but it should happen in the next couple of days.

@kalfonso
Copy link
Copy Markdown
Contributor

@sougou I've tested successfully your change using our chaos tests in a setting where there could be more than one master vttablet for a short period of time.

@sougou sougou merged commit ff516c6 into vitessio:master Jan 21, 2020
@sougou sougou deleted the ss-bug-nextval branch January 21, 2020 19:18
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.

vttablet sequence: next N values can return overlapping values under certain circumstances

4 participants