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

Fix for transactions not allowed to finish during PlannedReparentShard #8099

Merged
merged 1 commit into from
May 12, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented May 11, 2021

If PRS is going on, then Query serving will fail with the recent change in reserved connection fix. Before sending to tablet there was check introduce to see if the tablet is serving and the target has not changed then send the query to vttablet.
This is not true for transaction as we want the query which is in transaction to be sent down to get the transaction completed, also the PRS is waiting for any outstanding transaction to get completed.

So, this change is to remove the logic around it and the reserved connection will reset the shard session only when the error is received from the vttablet and there is no pre-check for it.


This is a combination of 3 commits.

  • remove precheck of tablet serving and target
  • remove the additional logic and return error if queryservice not found to serve query
  • fix test as per new change

Related Issue(s)

Backport of #8089

Backport of vitessio#8089
This is a combination of 3 commits.

* remove precheck of tablet serving and target
* remove the additional logic and return error if queryservice not found to serve query
* fix test as per new change

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@deepthi deepthi changed the title Queryservice fix [10.0] Queryservice fix May 11, 2021
@harshit-gangal harshit-gangal merged commit afeeaf1 into vitessio:release-10.0 May 12, 2021
@harshit-gangal harshit-gangal deleted the 10-8089 branch May 12, 2021 17:53
Comment on lines +568 to +572
// ChangeTabletType changes the tablet type.
func (sbc *SandboxConn) ChangeTabletType(typ topodatapb.TabletType) {
sbc.tablet.Type = typ
}

Copy link
Member

Choose a reason for hiding this comment

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

Where is this being used?

@systay systay changed the title [10.0] Queryservice fix Fix for issue with information_schema queries with both table name and schema name predicates #8096 May 27, 2021
@systay systay changed the title Fix for issue with information_schema queries with both table name and schema name predicates #8096 Fix for issue with information_schema queries with both table name and schema name predicates May 27, 2021
@deepthi deepthi changed the title Fix for issue with information_schema queries with both table name and schema name predicates Fix for transactions not allowed to finish during PlannedReparentShard Jun 1, 2021
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.

None yet

3 participants