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: VReplication based OnlineDDL gets stuck on subsequent migrations until --queryserver-config-schema-reload-time #15852

Closed
mattlord opened this issue May 6, 2024 · 0 comments · Fixed by #15912

Comments

@mattlord
Copy link
Contributor

mattlord commented May 6, 2024

Overview of the Issue

We seem to be missing a schema refresh somewhere when performing a sequence of OnlineDDL migrations (via VReplication). The second one gets stuck until we hit the --queryserver-config-schema-reload-time, which defaults to 30 minutes.

Reproduction Steps

git checkout main && make build

pushd examples/local

./101_initial_cluster.sh

func exec_migration() {
  ddl=${1}
  echo "Executing: ${ddl}..."
  uuid=$(command mysql --no-defaults -N -h 127.0.0.1 -P 15306 -e "set @@ddl_strategy=vitess; ${ddl};")

  while command mysql --no-defaults -N -h 127.0.0.1 -P 15306 -e "show vitess_migrations like '${uuid}'" commerce 2> /dev/null | grep -q -v "complete"; do
    echo -e "\twaiting for migration to complete"
    sleep 1
  done
}

exec_migration "CREATE TABLE commerce.mytt (id int unsigned not null, name varchar(120) not null, js1 JSON, PRIMARY KEY (id))"
exec_migration "ALTER TABLE commerce.mytt ADD COLUMN js2 JSON"
exec_migration "ALTER TABLE commerce.mytt MODIFY name VARCHAR(60) NULL"

Binary Version

❯ vtgate --version
vtgate version Version: 20.0.0-SNAPSHOT (Git revision f27d287e0873d139ad2f71588068256e28a16f6a branch 'vrepl_onlineddl_schema') built on Mon May  6 14:58:53 EDT 2024 by matt@pslord.local using go1.22.2 darwin/arm64

Operating System and Environment details

N/A

Log Fragments

No response

@mattlord mattlord self-assigned this May 6, 2024
@mattlord mattlord added this to Backlog in VReplication via automation May 6, 2024
@mattlord mattlord moved this from Backlog to In progress in VReplication May 6, 2024
VReplication automation moved this from In progress to Done May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant