-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bug Report: Demote Primary stuck #14760
Comments
#14939 might not be the correct bug fix. We still merged it, cause its a good change regardless, but we'll keep the issue open until the follow up on #14939 (review) has completed |
I've been looking at the code to follow up on the comment from @vmg #14939 (review) and I believe I have found where we are breaking the contract for gRPC! Take a look at this specific go routine -
If we see the specific comment in https://github.com/vitessio/vitess/blob/main/go/vt/vtgate/grpcvtgateservice/server.go#L191-L192 we see that we expect the vtgate to not break the contract of calling the callback in multiple go routines. But this is being broken in the code in https://github.com/vitessio/vitess/blob/main/go/vt/vtgate/scatter_conn.go#L666-L669. This code eventually leads to calling |
I misunderstood the docs and as it turns out that #14760 (comment) isn't really an issue. I thought that when the doc said |
Overview of the Issue
It has been noticed that DemotePrimary is still getting stuck waiting for requests to be empty.
vttablets are stuck trying to send a message back to vtgates -
and the same goes for vtgates, they are stuck trying to send a message back to the clients -
Since the client is using the grpc protocol and sending a stream execute call that has no timeout, we can't control the client and make it receive more packets.
This however blocks DemotePrimary from going through, since a go-routine is stuck running
execRequest
Reproduction Steps
Run stream execute grpc call and don't read the messages
Run PRS
Binary Version
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: