-
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: VTGate does not rollback open transactions on shutdown #16840
Comments
It looks like there's a race between Line 369 in 60d8927
and vitess/go/cmd/vtgate/cli/cli.go Lines 192 to 194 in 60d8927
This causes vitess/go/vt/vtgate/tx_conn.go Line 427 in 60d8927
|
As far as fixing this, it seems like Would it make sense to call |
The impact of this bug is likely reduced in v19+ due to #14219 |
As suggested, looks like If #14219 reduces the issue for you, I would hold off any changes in this area for this issue. |
Overview of the Issue
On shutdown, vtgate will log messages indicating that it has rolled back open transactions, but they're not being rolled back.
The rollback on shutdown functionality was introduced in #5659 but I don't know if it ever worked. The test accompanying that PR doesn't actually assert transaction rollback, it's just asserting that a new transaction can't see rows written by the other open transaction, which is expected behavior at the default isolation level.
I've updated that test in #16839 which now fails with
Reproduction Steps
1. Setup (shell terminal 1)
2. Start a transaction (mysql terminal)
3. Shut down vtgate (shell terminal 2)
Results
After 10 seconds the vtgate-down script will exit after the vtgate process terminates
After 30 seconds you'll see a vttablet log like
But the vtgate log will contain a message like
Binary Version
Tested on main (`83b37b8e8fbc2353dd511f0e1223271e5879556c`) and v18
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: