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

Make TwoPC engine initialization async. #8048

Merged
merged 6 commits into from
May 12, 2021

Conversation

aquarapid
Copy link
Contributor

There was a "deadlock" here if you use semi-sync and
twopc during a failover, because we open the twopc
engine first, and it immediately tries to create its
metadata tables in _vt. On the PRS target, that
then hangs if using semi-sync, and since the code
to do the repointing of the replicas to the new master
sits "behind" the twopc engine open, the PRS would
never complete.

Signed-off-by: Jacques Grove aquarapid@gmail.com

Signed-off-by: Jacques Grove <aquarapid@gmail.com>
sufficient.

Signed-off-by: Jacques Grove <aquarapid@gmail.com>
@aquarapid aquarapid changed the title Make TwoPC engine initialization async, retrying forever. Make TwoPC engine initialization async. May 6, 2021
@aquarapid aquarapid requested a review from sougou May 6, 2021 00:50
@aquarapid aquarapid marked this pull request as ready for review May 6, 2021 00:51
@harshit-gangal
Copy link
Member

Some of the TwoPC tests are failing now.

@aquarapid
Copy link
Contributor Author

Some of the TwoPC tests are failing now.

Yeah, I guess since they start issuing TXes immediately. I'll take a look.

Signed-off-by: Jacques Grove <aquarapid@gmail.com>
Signed-off-by: Jacques Grove <aquarapid@gmail.com>
tests

Signed-off-by: Jacques Grove <aquarapid@gmail.com>
Signed-off-by: Jacques Grove <aquarapid@gmail.com>
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.

This is a clever idea. I have only one nit.
LGTM but let's have @sougou review as well.

@@ -453,6 +453,11 @@ func (tsv *TabletServer) TableGC() *gc.TableGC {
return tsv.tableGC
}

// TwoPCEngineWait waits until the TwoPC engine has been opened, and the redo read
func (tsv *TabletServer) TwoPCEngineWait() {
Copy link
Member

Choose a reason for hiding this comment

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

nit: rename to WaitForTwoPCEngine

@deepthi
Copy link
Member

deepthi commented May 7, 2021

Also need a corresponding issue.

@hallaroo hallaroo linked an issue May 11, 2021 that may be closed by this pull request
@deepthi deepthi merged commit 40665d4 into vitessio:master May 12, 2021
@deepthi deepthi deleted the jg_twopcsemisync branch May 12, 2021 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PRS non-functional when using semi-sync and twopc
4 participants