The Wayback Machine - https://web.archive.org/web/20210917035713/https://github.com/vitessio/vitess/issues/8150
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

Default transaction_mode shows UNSPECIFIED but documentation says MULTI #8150

Open
bolt-leandro opened this issue May 19, 2021 · 0 comments
Open

Comments

@bolt-leandro
Copy link

@bolt-leandro bolt-leandro commented May 19, 2021

Overview of the Issue

The docs say default is MULTI:

The atomicity policy is controlled by the transaction_mode flag. The default value is multi, and will set it in multi-database mode.
https://vitess.io/docs/reference/features/two-phase-commit/#configuring-vtgate

But when I start up cluster and check, it says UNSPECIFIED. This mode is not documented and doesn't correspond to what docs state.

It would be nice either to fix vtgate default to MULTI or to update the documentation with description of UNSPECIFIED.

Reproduction Steps

Steps to reproduce this issue, example:

  1. Deploy local example until you have sharded customer keyspace (eg: until step 307_delete_shard_0.sh)

  2. Connect to vtgate and check default transaction_mode

mysql> select @@transaction_mode;
+--------------------+
| @@transaction_mode |
+--------------------+
| UNSPECIFIED        |
+--------------------+
1 row in set (0.00 sec)

mysql> set transaction_mode='multi';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@transaction_mode;
+--------------------+
| @@transaction_mode |
+--------------------+
| MULTI              |
+--------------------+
1 row in set (0.00 sec)

Binary version

vagrant@ubuntu-bionic:~/vitess-9.0.0-daa6085/examples/local$ vtgate --version
Version: daa6085 (Git branch 'HEAD') built on Tue Jan 26 09:37:50 UTC 2021 by runner@fv-az195-520 using go1.15.7 linux/amd64

Operating system and Environment details

  • Operating system (output of cat /etc/os-release):
vagrant@ubuntu-bionic:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • Kernel version (output of uname -sr):
vagrant@ubuntu-bionic:~$ uname -sr
Linux 4.15.0-143-generic
  • Architecture (output of uname -m):
vagrant@ubuntu-bionic:~$ uname -m
x86_64

Log Fragments

Not much it seems:

vagrant@ubuntu-bionic:~/vitess-9.0.0-daa6085/examples/local/vtdataroot$ grep -i transaction_mode tmp/*
tmp/vtgate_querylog.txt:Execute	127.0.0.1:40840	vagrant	'userData1'	'vagrant'	2021-05-19 15:40:52.061379	2021-05-19 15:40:52.061488	0.000109	0.000101	0.000007	0.000000	SELECT	"select :__vttransaction_mode as `@@transaction_mode` from dual"	map[__vttransaction_mode:type:VARBINARY value:"UNSPECIFIED" ]	0	1	""	""	""	"MASTER"
tmp/vtgate_querylog.txt:Execute	127.0.0.1:40840	vagrant	'userData1'	'vagrant'	2021-05-19 15:53:56.251677	2021-05-19 15:53:56.251826	0.000149	0.000138	0.000009	0.000000	SET	"set session transaction_mode = 'multi'"	map[]	0	0	""	""	""	"MASTER"
tmp/vtgate_querylog.txt:Execute	127.0.0.1:40840	vagrant	'userData1'	'vagrant'	2021-05-19 15:53:57.730034	2021-05-19 15:53:57.730234	0.000200	0.000186	0.000012	0.000000	SELECT	"select :__vttransaction_mode as `@@transaction_mode` from dual"	map[__vttransaction_mode:type:VARBINARY value:"MULTI" ]	0	1	""	""	""	"MASTER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment