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

Bug Report: show vitess_migrations not supported from inside a transaction #16242

Open
pawandubey opened this issue Jun 20, 2024 · 0 comments
Open
Labels
Needs Triage This issue needs to be correctly labelled and triaged Type: Bug

Comments

@pawandubey
Copy link

Overview of the Issue

Since #13726, vtgates are forwarding show vitess_migrations queries to the tablet instead of executing selects on the MySQLs.

However, as txConnExec does not support PlanShowMigrations, if executed from within a transaction, the queries fail with something like:

vttablet: rpc error: code = Internal desc = [BUG] ShowMigrations unexpected plan type (CallerID: userData1)

This is a regression from the previous behaviour where show vitess_migrations would succeed from within a transaction.

It is not unreasonable for this to be ran from within a transaction (and txConExec already accounts for some other read types like selects and shows), e.g. in Rails, each ActiveSupport::TestCase test is wrapped in an implicit transaction and this regression makes any assertions on the result of this query impossible without turning off transactional testing.

Would it be worth supporting this new plan type from within the context of a transaction on the tablet?

Reproduction Steps

On any schema, with v18.0.0, on a vtgate console

USE <keyspace>;
START TRANSACTION;
SHOW VITESS_MIGRATIONS;

Should fail with the error described above.

On v17 and earlier, it would succeed.

Binary Version

It should be reproducible on v18.0.0 onwards (or with https://github.com/vitessio/vitess/commit/25af35f743d69e7245ce63fb158da8b4e42fbeeb and later).

Operating System and Environment details

Linux 69eaf41a9693 6.8.8-300.fc40.aarch64 #1 SMP PREEMPT_DYNAMIC Sat Apr 27 18:11:03 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Log Fragments

No response

@pawandubey pawandubey added Needs Triage This issue needs to be correctly labelled and triaged Type: Bug labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage This issue needs to be correctly labelled and triaged Type: Bug
Projects
None yet
Development

No branches or pull requests

1 participant