diff --git a/.github/docker/cluster_test_vtorc/Dockerfile b/.github/docker/cluster_test_vtorc/Dockerfile index 0497e4112d9..8042d96eb1a 100644 --- a/.github/docker/cluster_test_vtorc/Dockerfile +++ b/.github/docker/cluster_test_vtorc/Dockerfile @@ -1,7 +1,7 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" ARG bootstrap_version=11 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" +ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" diff --git a/.github/docker/cluster_test_vtorc_8.0/Dockerfile b/.github/docker/cluster_test_vtorc_mysql57/Dockerfile similarity index 92% rename from .github/docker/cluster_test_vtorc_8.0/Dockerfile rename to .github/docker/cluster_test_vtorc_mysql57/Dockerfile index 8042d96eb1a..0497e4112d9 100644 --- a/.github/docker/cluster_test_vtorc_8.0/Dockerfile +++ b/.github/docker/cluster_test_vtorc_mysql57/Dockerfile @@ -1,7 +1,7 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" ARG bootstrap_version=11 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" +ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index 7f794c840ce..c44c34d2d07 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (12) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index 63efb4f54f6..97241444e19 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (13) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index 80796dfca56..3d8e22ea659 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (15) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index 08086ca7c03..9913dbd59a2 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (18) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -101,7 +109,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index 8e03016fdf8..cfa90240080 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (21) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_22.yml b/.github/workflows/cluster_endtoend_22.yml index 5bbc69bbbd4..add0cbc0a54 100644 --- a/.github/workflows/cluster_endtoend_22.yml +++ b/.github/workflows/cluster_endtoend_22.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (22) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_26.yml b/.github/workflows/cluster_endtoend_26.yml index ae9fd9c1ce1..ddaab899bfb 100644 --- a/.github/workflows/cluster_endtoend_26.yml +++ b/.github/workflows/cluster_endtoend_26.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (26) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml index a25522fb5e5..17ac8cac8c8 100644 --- a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml +++ b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (ers_prs_newfeatures_heavy) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index 22eccbd3443..2d92a6d03d3 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -15,7 +15,6 @@ jobs: build: name: Run endtoend tests on Cluster (mysql80) runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -105,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_mysql_server_vault.yml b/.github/workflows/cluster_endtoend_mysql_server_vault.yml index d1f8114aab2..a8fef50ea6f 100644 --- a/.github/workflows/cluster_endtoend_mysql_server_vault.yml +++ b/.github/workflows/cluster_endtoend_mysql_server_vault.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (mysql_server_vault) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -101,7 +109,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_declarative.yml b/.github/workflows/cluster_endtoend_onlineddl_declarative.yml index ccd2f87ef94..94855bfb3a1 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_declarative.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_declarative.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_declarative) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_declarative_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_declarative_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_declarative_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_declarative_mysql57.yml index 5a14ad0b0c2..3c7fca00d06 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_declarative_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_declarative_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_declarative) mysql80 +name: Cluster (onlineddl_declarative) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_declarative) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_declarative) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_declarative) mysql80 + name: Run endtoend tests on Cluster (onlineddl_declarative) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_declarative_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_declarative_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml index 54fe873084c..269db6e959d 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_ghost) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml similarity index 76% rename from .github/workflows/cluster_endtoend_onlineddl_ghost_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml index b92f85501d0..c10dab28517 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_ghost) mysql80 +name: Cluster (onlineddl_ghost) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_ghost) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_ghost) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_ghost) mysql80 + name: Run endtoend tests on Cluster (onlineddl_ghost) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_ghost_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index 6b3385fd73a..ca3329096d6 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_revert) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_revert_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml index a8da027a820..0835553d39a 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_revert) mysql80 +name: Cluster (onlineddl_revert) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revert) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revert) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_revert) mysql80 + name: Run endtoend tests on Cluster (onlineddl_revert) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_revert_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_revertible.yml b/.github/workflows/cluster_endtoend_onlineddl_revertible.yml index 54765fab30d..a750825d3e9 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revertible.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revertible.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_revertible) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_revertible_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_revertible_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_revertible_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_revertible_mysql57.yml index 657cca80499..cfce8ad2eab 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revertible_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revertible_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_revertible) mysql80 +name: Cluster (onlineddl_revertible) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revertible) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revertible) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_revertible) mysql80 + name: Run endtoend tests on Cluster (onlineddl_revertible) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_revertible_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_revertible_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml index edd2916cb71..b51711df734 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_scheduler) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_scheduler_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml index 86c1ed05b3d..dec20500256 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_scheduler) mysql80 +name: Cluster (onlineddl_scheduler) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_scheduler) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_scheduler) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_scheduler) mysql80 + name: Run endtoend tests on Cluster (onlineddl_scheduler) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml b/.github/workflows/cluster_endtoend_onlineddl_singleton.yml index 36a0b7e7dbc..054fc039cdf 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_singleton.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_singleton) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_singleton_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_singleton_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_singleton_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_singleton_mysql57.yml index 7ddc34793ce..40ae6050d35 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_singleton_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_singleton_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_singleton) mysql80 +name: Cluster (onlineddl_singleton) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_singleton) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_singleton) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_singleton) mysql80 + name: Run endtoend tests on Cluster (onlineddl_singleton) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_singleton_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_singleton_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index 8b35c551baf..1ad7306f34b 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml similarity index 76% rename from .github/workflows/cluster_endtoend_onlineddl_vrepl_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml index b1339a446bf..b82d19217d7 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_vrepl) mysql80 +name: Cluster (onlineddl_vrepl) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_vrepl) mysql80 + name: Run endtoend tests on Cluster (onlineddl_vrepl) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index e2ca9dad508..ffe0cf531b1 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml index ac118fc0e8b..0e38ecf0e70 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_vrepl_stress) mysql80 +name: Cluster (onlineddl_vrepl_stress) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_vrepl_stress) mysql80 + name: Run endtoend tests on Cluster (onlineddl_vrepl_stress) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index 03ce3949cfb..9d684ec9ea7 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml index 1a4d63de99b..81c586269a0 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_vrepl_stress_suite) mysql80 +name: Cluster (onlineddl_vrepl_stress_suite) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress_suite) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress_suite) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) mysql80 + name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index 70a96ed18d6..74f40632d58 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_suite) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql80.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql80.yml rename to .github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml index 4bd31820327..6e358a6261f 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql80.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (onlineddl_vrepl_suite) mysql80 +name: Cluster (onlineddl_vrepl_suite) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_suite) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_suite) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (onlineddl_vrepl_suite) mysql80 + name: Run endtoend tests on Cluster (onlineddl_vrepl_suite) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql80.yml' + - '.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml index 64ad3d0afeb..22ef9c7932e 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (schemadiff_vrepl) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql80.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_schemadiff_vrepl_mysql80.yml rename to .github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml index be7a774fc7d..b33417798d6 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql80.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (schemadiff_vrepl) mysql80 +name: Cluster (schemadiff_vrepl) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (schemadiff_vrepl) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (schemadiff_vrepl) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (schemadiff_vrepl) mysql80 + name: Run endtoend tests on Cluster (schemadiff_vrepl) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql80.yml' + - '.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index 142c2eabd31..47bce7c735f 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -101,7 +109,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index 59d8b826225..89434ba98d5 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql80.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml similarity index 77% rename from .github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql80.yml rename to .github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml index 5a1d6116c90..bf62b36b26b 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql80.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (tabletmanager_tablegc) mysql80 +name: Cluster (tabletmanager_tablegc) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_tablegc) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_tablegc) mysql57') cancel-in-progress: true env: @@ -13,9 +13,8 @@ env: jobs: build: - name: Run endtoend tests on Cluster (tabletmanager_tablegc) mysql80 + name: Run endtoend tests on Cluster (tabletmanager_tablegc) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +48,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql80.yml' + - '.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,21 +71,35 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD @@ -105,7 +118,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml index 236ade08cf2..8da831878a6 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml index 70e2d2d7962..2c72908622e 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_topo_connection_cache.yml b/.github/workflows/cluster_endtoend_topo_connection_cache.yml index d651890e55c..49e4226c7e7 100644 --- a/.github/workflows/cluster_endtoend_topo_connection_cache.yml +++ b/.github/workflows/cluster_endtoend_topo_connection_cache.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (topo_connection_cache) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml index b07950025e0..3a09023463e 100644 --- a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml +++ b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml @@ -15,7 +15,6 @@ jobs: build: name: Run endtoend tests on Cluster (vreplication_across_db_versions) runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -105,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index f3b1409720b..5b836239342 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_basic) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 225361d375b..fadf85c0bfe 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_cellalias) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml index 83a889b5830..ac914da2a43 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_migrate_vdiff2_convert_tz) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vreplication_multicell.yml b/.github/workflows/cluster_endtoend_vreplication_multicell.yml index 2bd2ceb9172..96427323190 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multicell.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multicell.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_multicell) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 5d91ff8b0ff..7e81ef4d409 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_v2) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vstream_failover.yml b/.github/workflows/cluster_endtoend_vstream_failover.yml index 382390986bf..77d283a46dc 100644 --- a/.github/workflows/cluster_endtoend_vstream_failover.yml +++ b/.github/workflows/cluster_endtoend_vstream_failover.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vstream_failover) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml b/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml index 3934ea36b6a..432a2c3ec39 100644 --- a/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml +++ b/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vstream_stoponreshard_false) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml b/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml index 1f6434284bb..f91b8ad230f 100644 --- a/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml +++ b/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vstream_stoponreshard_true) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml b/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml index 57c0ff3aa6c..b270a350977 100644 --- a/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml +++ b/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vstream_with_keyspaces_to_watch) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtbackup_transform.yml b/.github/workflows/cluster_endtoend_vtbackup_transform.yml index 4a91368695c..e7d12c33484 100644 --- a/.github/workflows/cluster_endtoend_vtbackup_transform.yml +++ b/.github/workflows/cluster_endtoend_vtbackup_transform.yml @@ -15,7 +15,6 @@ jobs: build: name: Run endtoend tests on Cluster (vtbackup_transform) runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -105,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml index 8f324a726e0..3b4f432c113 100644 --- a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml @@ -15,7 +15,6 @@ jobs: build: name: Run endtoend tests on Cluster (vtctlbackup_sharded_clustertest_heavy) runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -105,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index a4d1cc629b1..dee1595a8c0 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index 70819120c7e..be3370466ff 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml index 9e5cb3ed91c..634fb1c8302 100644 --- a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vtgate_godriver.yml b/.github/workflows/cluster_endtoend_vtgate_godriver.yml index 688857aada2..bf2fc291e33 100644 --- a/.github/workflows/cluster_endtoend_vtgate_godriver.yml +++ b/.github/workflows/cluster_endtoend_vtgate_godriver.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml index 954f139c16c..d5436a25868 100644 --- a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml +++ b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml @@ -15,7 +15,6 @@ jobs: build: name: Run endtoend tests on Cluster (vtgate_partial_keyspace) runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -105,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index 6cd95b30ab5..e71808afb5c 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index 71fbc4d94b1..f0f488a736c 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index 01bd835ddff..ef1ea86d716 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index 209c441bd17..09272396754 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index 34d7ca67763..912df7ba811 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml index d7f0d1eee72..aa2df3b6717 100644 --- a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml +++ b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index 895c82240d2..b7a235f70d4 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index c79799e6d7d..5ea52a9c797 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -101,7 +109,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index 726eeb42ffd..72a3f72e8ab 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index ebea5ad0487..d28fc5fe582 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index 9c20c792194..2f8c871260a 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml index 5cd2dbab361..6a8c96a8e69 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -109,8 +117,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index 5210c5dd764..7026c374fc6 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -71,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -96,7 +104,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index 3878bdcf90d..981446f6070 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -1,14 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (vtorc) +name: Cluster (vtorc)(mysql80) on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtorc)') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtorc)(mysql80)') cancel-in-progress: true jobs: build: - name: Run endtoend tests on Cluster (vtorc) + name: Run endtoend tests on Cluster (vtorc)(mysql80) runs-on: self-hosted steps: diff --git a/.github/workflows/cluster_endtoend_vtorc_8.0.yml b/.github/workflows/cluster_endtoend_vtorc_mysql57.yml similarity index 76% rename from .github/workflows/cluster_endtoend_vtorc_8.0.yml rename to .github/workflows/cluster_endtoend_vtorc_mysql57.yml index a6b3fb661fe..cebe62cbe75 100644 --- a/.github/workflows/cluster_endtoend_vtorc_8.0.yml +++ b/.github/workflows/cluster_endtoend_vtorc_mysql57.yml @@ -1,14 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (vtorc_8.0) +name: Cluster (vtorc)(mysql57) on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtorc_8.0)') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtorc)(mysql57)') cancel-in-progress: true jobs: build: - name: Run endtoend tests on Cluster (vtorc_8.0) + name: Run endtoend tests on Cluster (vtorc)(mysql57) runs-on: self-hosted steps: @@ -44,33 +44,33 @@ jobs: - 'config/**' - '.github/docker/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_vtorc_8.0.yml' + - '.github/workflows/cluster_endtoend_vtorc_mysql57.yml' - name: Build Docker Image if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - run: docker build -f ./.github/docker/cluster_test_vtorc_8.0/Dockerfile -t cluster_test_vtorc_8.0:$GITHUB_SHA . + run: docker build -f ./.github/docker/cluster_test_vtorc_mysql57/Dockerfile -t cluster_test_vtorc_mysql57:$GITHUB_SHA . - name: Run test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 30 - run: docker run --name "cluster_test_vtorc_8.0_$GITHUB_SHA" cluster_test_vtorc_8.0:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard vtorc_8.0 -- -- --keep-data=true' + run: docker run --name "cluster_test_vtorc_mysql57_$GITHUB_SHA" cluster_test_vtorc_mysql57:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard vtorc -- -- --keep-data=true' - name: Print Volume Used if: always() && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' cluster_test_vtorc_8.0_$GITHUB_SHA + docker inspect -f '{{ (index .Mounts 0).Name }}' cluster_test_vtorc_mysql57_$GITHUB_SHA - name: Cleanup Docker Volume if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - docker rm -v cluster_test_vtorc_8.0_$GITHUB_SHA + docker rm -v cluster_test_vtorc_mysql57_$GITHUB_SHA - name: Cleanup Docker Container if: always() && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - docker rm -f cluster_test_vtorc_8.0_$GITHUB_SHA + docker rm -f cluster_test_vtorc_mysql57_$GITHUB_SHA - name: Cleanup Docker Image if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - docker image rm cluster_test_vtorc_8.0:$GITHUB_SHA + docker image rm cluster_test_vtorc_mysql57:$GITHUB_SHA diff --git a/.github/workflows/cluster_endtoend_xb_backup.yml b/.github/workflows/cluster_endtoend_xb_backup.yml index 309b2f5c22e..8c9b344bf07 100644 --- a/.github/workflows/cluster_endtoend_xb_backup.yml +++ b/.github/workflows/cluster_endtoend_xb_backup.yml @@ -11,14 +11,10 @@ env: LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" - # This is used if we need to pin the xtrabackup version used in tests. - # If this is NOT set then the latest version available will be used. - #XTRABACKUP_VERSION: "2.4.24-1" - jobs: build: name: Run endtoend tests on Cluster (xb_backup) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -75,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 + sudo apt-get update + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -86,17 +90,7 @@ jobs: # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD - wget "https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb" - sudo apt-get install -y gnupg2 - sudo dpkg -i "percona-release_latest.$(lsb_release -sc)_all.deb" - sudo apt-get update - if [[ -n $XTRABACKUP_VERSION ]]; then - debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" - wget "https://repo.percona.com/pxb-24/apt/pool/main/p/percona-xtrabackup-24/$debfile" - sudo apt install -y "./$debfile" - else - sudo apt-get install -y percona-xtrabackup-24 - fi + sudo apt-get install percona-xtrabackup-80 lz4 - name: Setup launchable dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -112,7 +106,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_xb_backup_mysql80.yml b/.github/workflows/cluster_endtoend_xb_backup_mysql57.yml similarity index 68% rename from .github/workflows/cluster_endtoend_xb_backup_mysql80.yml rename to .github/workflows/cluster_endtoend_xb_backup_mysql57.yml index 7d45f2430ff..e4bbc8c12b2 100644 --- a/.github/workflows/cluster_endtoend_xb_backup_mysql80.yml +++ b/.github/workflows/cluster_endtoend_xb_backup_mysql57.yml @@ -1,9 +1,9 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" -name: Cluster (xb_backup) mysql80 +name: Cluster (xb_backup) mysql57 on: [push, pull_request] concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (xb_backup) mysql80') + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (xb_backup) mysql57') cancel-in-progress: true env: @@ -11,11 +11,14 @@ env: LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + # This is used if we need to pin the xtrabackup version used in tests. + # If this is NOT set then the latest version available will be used. + #XTRABACKUP_VERSION: "2.4.24-1" + jobs: build: - name: Run endtoend tests on Cluster (xb_backup) mysql80 + name: Run endtoend tests on Cluster (xb_backup) mysql57 runs-on: ubuntu-20.04 - timeout-minutes: 45 steps: - name: Check if workflow needs to be skipped @@ -49,7 +52,7 @@ jobs: - 'tools/**' - 'config/**' - 'bootstrap.sh' - - '.github/workflows/cluster_endtoend_xb_backup_mysql80.yml' + - '.github/workflows/cluster_endtoend_xb_backup_mysql57.yml' - name: Set up Go if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -72,26 +75,50 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD - sudo apt-get install percona-xtrabackup-80 lz4 + wget "https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb" + sudo apt-get install -y gnupg2 + sudo dpkg -i "percona-release_latest.$(lsb_release -sc)_all.deb" + sudo apt-get update + if [[ -n $XTRABACKUP_VERSION ]]; then + debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" + wget "https://repo.percona.com/pxb-24/apt/pool/main/p/percona-xtrabackup-24/$debfile" + sudo apt install -y "./$debfile" + else + sudo apt-get install -y percona-xtrabackup-24 + fi - name: Setup launchable dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -107,7 +134,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index cc393e9d239..88fcde631d1 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -11,14 +11,10 @@ env: LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" - # This is used if we need to pin the xtrabackup version used in tests. - # If this is NOT set then the latest version available will be used. - #XTRABACKUP_VERSION: "2.4.24-1" - jobs: build: name: Run endtoend tests on Cluster (xb_recovery) - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -75,8 +71,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 + sudo apt-get update + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -86,17 +90,7 @@ jobs: # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD - wget "https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb" - sudo apt-get install -y gnupg2 - sudo dpkg -i "percona-release_latest.$(lsb_release -sc)_all.deb" - sudo apt-get update - if [[ -n $XTRABACKUP_VERSION ]]; then - debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" - wget "https://repo.percona.com/pxb-24/apt/pool/main/p/percona-xtrabackup-24/$debfile" - sudo apt install -y "./$debfile" - else - sudo apt-get install -y percona-xtrabackup-24 - fi + sudo apt-get install percona-xtrabackup-80 lz4 - name: Setup launchable dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' @@ -112,7 +106,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. diff --git a/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml b/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml new file mode 100644 index 00000000000..ae656927322 --- /dev/null +++ b/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml @@ -0,0 +1,156 @@ +# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" + +name: Cluster (xb_recovery) mysql57 +on: [push, pull_request] +concurrency: + group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (xb_recovery) mysql57') + cancel-in-progress: true + +env: + LAUNCHABLE_ORGANIZATION: "vitess" + LAUNCHABLE_WORKSPACE: "vitess-app" + GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + + # This is used if we need to pin the xtrabackup version used in tests. + # If this is NOT set then the latest version available will be used. + #XTRABACKUP_VERSION: "2.4.24-1" + +jobs: + build: + name: Run endtoend tests on Cluster (xb_recovery) mysql57 + runs-on: ubuntu-20.04 + + steps: + - name: Check if workflow needs to be skipped + id: skip-workflow + run: | + skip='false' + if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + skip='true' + fi + echo Skip ${skip} + echo "::set-output name=skip-workflow::${skip}" + + - name: Check out code + if: steps.skip-workflow.outputs.skip-workflow == 'false' + uses: actions/checkout@v2 + + - name: Check for changes in relevant files + if: steps.skip-workflow.outputs.skip-workflow == 'false' + uses: frouioui/paths-filter@main + id: changes + with: + token: '' + filters: | + end_to_end: + - 'go/**/*.go' + - 'test.go' + - 'Makefile' + - 'build.env' + - 'go.[sumod]' + - 'proto/*.proto' + - 'tools/**' + - 'config/**' + - 'bootstrap.sh' + - '.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml' + + - name: Set up Go + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + uses: actions/setup-go@v2 + with: + go-version: 1.18.5 + + - name: Set up python + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + uses: actions/setup-python@v2 + + - name: Tune the OS + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio + echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf + sudo sysctl -p /etc/sysctl.conf + + - name: Get dependencies + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + sudo apt-get update + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* + sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* + + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata + sudo service mysql stop + sudo service etcd stop + + # install JUnit report formatter + go install github.com/vitessio/go-junit-report@HEAD + + wget "https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb" + sudo apt-get install -y gnupg2 + sudo dpkg -i "percona-release_latest.$(lsb_release -sc)_all.deb" + sudo apt-get update + if [[ -n $XTRABACKUP_VERSION ]]; then + debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" + wget "https://repo.percona.com/pxb-24/apt/pool/main/p/percona-xtrabackup-24/$debfile" + sudo apt install -y "./$debfile" + else + sudo apt-get install -y percona-xtrabackup-24 + fi + + - name: Setup launchable dependencies + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up + pip3 install --user launchable~=1.0 > /dev/null + + # verify that launchable setup is all correct. + launchable verify || true + + # Tell Launchable about the build you are producing and testing + launchable record build --name "$GITHUB_RUN_ID" --source . + + - name: Run cluster endtoend test + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + timeout-minutes: 45 + run: | + # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file + # which musn't be more than 107 characters long. + export VTDATAROOT="/tmp/" + source build.env + + set -x + + # run the tests however you normally do, then produce a JUnit XML file + eatmydata -- go run test.go -docker=false -follow -shard xb_recovery | tee -a output.txt | go-junit-report -set-exit-code > report.xml + + - name: Print test output and Record test result in launchable + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + run: | + # send recorded tests to launchable + launchable record tests --build "$GITHUB_RUN_ID" go-test . || true + + # print test output + cat output.txt diff --git a/.github/workflows/code_freeze.yml b/.github/workflows/code_freeze.yml index 381793fa84d..b6dde0a0220 100644 --- a/.github/workflows/code_freeze.yml +++ b/.github/workflows/code_freeze.yml @@ -9,4 +9,4 @@ jobs: steps: - name: Fail if Code Freeze is enabled run: | - exit 0 + exit 1 diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index 34d0ca3cebe..49b07e77cab 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -32,7 +32,7 @@ jobs: timeout-minutes: 60 if: always() && needs.get_previous_release.result == 'success' name: Run Upgrade Downgrade Test - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 needs: - get_previous_release diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml index 98d298d3834..882b09f3f53 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -32,7 +32,7 @@ jobs: timeout-minutes: 60 if: always() && needs.get_next_release.result == 'success' name: Run Upgrade Downgrade Test - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 needs: - get_next_release diff --git a/doc/releasenotes/14_0_3_changelog.md b/doc/releasenotes/14_0_3_changelog.md new file mode 100644 index 00000000000..ac2c815cdf7 --- /dev/null +++ b/doc/releasenotes/14_0_3_changelog.md @@ -0,0 +1,21 @@ +# Changelog of Vitess v14.0.3 + +### Bug fixes +#### Query Serving + * [release-14.0] bugfix: Truncate columns even when sorting on vtgate (#11265) [#11324](https://github.com/vitessio/vitess/pull/11324) + * [release-14.0] Fix complex predicates being pulled into `ON` conditions for `LEFT JOIN` statements [#11333](https://github.com/vitessio/vitess/pull/11333) + * Fix: DML engine multiequal support [#11395](https://github.com/vitessio/vitess/pull/11395) +#### VReplication + * Backport-v14: VReplication: Handle DECIMAL 0 Value Edge Case #11212 [#11232](https://github.com/vitessio/vitess/pull/11232) +#### VTorc + * Fix VTOrc Discovery to also retry discovering tablets which aren't present in database_instance table [#10662](https://github.com/vitessio/vitess/pull/10662) +### Release +#### Documentation + * Update the release documentation [#11174](https://github.com/vitessio/vitess/pull/11174) + * Add hyperlink in the release changelog [#11241](https://github.com/vitessio/vitess/pull/11241) + * Addition of the release summary for `v14.0.3` [#11396](https://github.com/vitessio/vitess/pull/11396) +#### General + * Release `v14.0.2` [#11159](https://github.com/vitessio/vitess/pull/11159) + * [release-14.0] Simple code freeze script and workflow (#11178) [#11198](https://github.com/vitessio/vitess/pull/11198) + * [release-14.0] Improve the `do_release` script to have two different Pull Requests instead of one during a release [#11230](https://github.com/vitessio/vitess/pull/11230) + diff --git a/doc/releasenotes/14_0_3_release_notes.md b/doc/releasenotes/14_0_3_release_notes.md new file mode 100644 index 00000000000..d9cd4ac7a61 --- /dev/null +++ b/doc/releasenotes/14_0_3_release_notes.md @@ -0,0 +1,16 @@ +# Release of Vitess v14.0.3 +## Major Changes + +### Fix VTOrc Discovery + +In patch releases prior to release 14.0.3, if VTOrc is unable to reach the MySQL instance of a vttablet, it was never able to read discover that tablet again. +This problem could be resolved by restarting the VTOrc so that it discovers all the tablets again, but in a kubernetes cluster where the pods are eviced +frequently, this posed a greater challenge, since some pods when evicted and rescheduled on a different node, would sometimes fail to be discovered by VTOrc. +This has problem has been addressed in this patch by the fix https://github.com/vitessio/vitess/pull/10662. +------------ +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/14_0_3_changelog.md). + +The release includes 12 commits (excluding merges) + +Thanks to all our contributors: @GuptaManan100, @frouioui, @harshit-gangal, @mattlord, @vitess-bot[bot] + diff --git a/doc/releasenotes/14_0_3_summary.md b/doc/releasenotes/14_0_3_summary.md new file mode 100644 index 00000000000..9d9364f67b3 --- /dev/null +++ b/doc/releasenotes/14_0_3_summary.md @@ -0,0 +1,8 @@ +## Major Changes + +### Fix VTOrc Discovery + +In patch releases prior to release 14.0.3, if VTOrc is unable to reach the MySQL instance of a vttablet, it was never able to read discover that tablet again. +This problem could be resolved by restarting the VTOrc so that it discovers all the tablets again, but in a kubernetes cluster where the pods are eviced +frequently, this posed a greater challenge, since some pods when evicted and rescheduled on a different node, would sometimes fail to be discovered by VTOrc. +This has problem has been addressed in this patch by the fix https://github.com/vitessio/vitess/pull/10662. \ No newline at end of file diff --git a/doc/releasenotes/15_0_0_summary.md b/doc/releasenotes/15_0_0_summary.md index 315ab69002c..0ca9ccee6c6 100644 --- a/doc/releasenotes/15_0_0_summary.md +++ b/doc/releasenotes/15_0_0_summary.md @@ -24,6 +24,7 @@ - The deprecated `--mutex-profile-fraction` flag has been removed. Please use `--pprof=mutex` instead. - The deprecated vtgate/vtexplain/vtcombo flag `--planner_version` has been removed. Please use `--planner-version` instead. - The deprecated flag `--master_connect_retry` has been removed. Please use `--replication_connect_retry` instead. +- `vtctl` commands that take shard names and ranges as positional arguments (e.g. `vtctl Reshard ks.workflow -80 -40,40-80`) need to have their positional arguments separated from their flag arguments by a double-dash separator to avoid the new parsing library from mistaking them as flags (e.g. `vtctl Reshard ks.workflow -- -80 -40,40-80`). #### Vindex Interface @@ -72,6 +73,7 @@ The following VTTablet flags were deprecated in 7.0. They have now been deleted #### vttablet startup flag deprecations - --enable-query-plan-field-caching is now deprecated. It will be removed in v16. - --enable_semi_sync is now deprecated. It will be removed in v16. Instead, set the correct durability policy using `SetKeyspaceDurabilityPolicy` +- --queryserver-config-pool-prefill-parallelism, --queryserver-config-stream-pool-prefill-parallelism and --queryserver-config-transaction-prefill-parallelism have all been deprecated. They will be removed in v16. ### New command line flags and behavior @@ -84,10 +86,10 @@ connections, similar to the way pooling happens for write buffers. Defaults to o We introduced the ability to resume a VDiff2 workflow: ``` -$ vtctlclient --server=localhost:15999 VDiff -- --v2 customer.commerce2customer resume 4c664dc2-eba9-11ec-9ef7-920702940ee0 +$ vtctlclient --server=localhost:15999 VDiff --v2 customer.commerce2customer resume 4c664dc2-eba9-11ec-9ef7-920702940ee0 VDiff 4c664dc2-eba9-11ec-9ef7-920702940ee0 resumed on target shards, use show to view progress -$ vtctlclient --server=localhost:15999 VDiff -- --v2 customer.commerce2customer show last +$ vtctlclient --server=localhost:15999 VDiff --v2 customer.commerce2customer show last VDiff Summary for customer.commerce2customer (4c664dc2-eba9-11ec-9ef7-920702940ee0) State: completed @@ -98,7 +100,7 @@ CompletedAt: 2022-06-26 22:44:31 Use "--format=json" for more detailed output. -$ vtctlclient --server=localhost:15999 VDiff -- --v2 --format=json customer.commerce2customer show last +$ vtctlclient --server=localhost:15999 VDiff --v2 --format=json customer.commerce2customer show last { "Workflow": "commerce2customer", "Keyspace": "customer", diff --git a/examples/local/scripts/consul-up.sh b/examples/local/scripts/consul-up.sh index 44c15d62dc2..4a69d1e1902 100755 --- a/examples/local/scripts/consul-up.sh +++ b/examples/local/scripts/consul-up.sh @@ -43,7 +43,7 @@ sleep 5 echo "add $cell CellInfo" set +e # shellcheck disable=SC2086 -vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo -- \ +vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo \ --root "vitess/$cell" \ --server-address "${CONSUL_SERVER}:${consul_http_port}" \ "$cell" diff --git a/examples/local/scripts/etcd-up.sh b/examples/local/scripts/etcd-up.sh index 1eac151ec6c..5d262217c88 100755 --- a/examples/local/scripts/etcd-up.sh +++ b/examples/local/scripts/etcd-up.sh @@ -40,7 +40,7 @@ etcdctl --endpoints "http://${ETCD_SERVER}" mkdir /vitess/$cell & echo "add $cell CellInfo" set +e # shellcheck disable=SC2086 -vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo -- \ +vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo \ --root /vitess/$cell \ --server-address "${ETCD_SERVER}" \ $cell diff --git a/examples/local/scripts/k3s-up.sh b/examples/local/scripts/k3s-up.sh index 52797e18c67..b2ead1a86d6 100755 --- a/examples/local/scripts/k3s-up.sh +++ b/examples/local/scripts/k3s-up.sh @@ -52,7 +52,7 @@ $KUBECTL create -f ../../go/vt/topo/k8stopo/VitessTopoNodes-crd.yaml # Add the CellInfo description for the cell set +e echo "add $cell CellInfo" -vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo -- \ +vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo \ --root /vitess/$cell \ $cell set -e diff --git a/examples/local/scripts/zk-up.sh b/examples/local/scripts/zk-up.sh index a762436b69d..d689e167988 100755 --- a/examples/local/scripts/zk-up.sh +++ b/examples/local/scripts/zk-up.sh @@ -53,7 +53,7 @@ echo "Started zk servers." # If the node already exists, it's fine, means we used existing data. set +e # shellcheck disable=SC2086 -vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo -- \ +vtctl $TOPOLOGY_FLAGS VtctldCommand AddCellInfo \ --root /vitess/$cell \ --server-address $ZK_SERVER \ $cell diff --git a/go.mod b/go.mod index eb9adac907d..3651a42d026 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,6 @@ require ( github.com/prometheus/client_golang v1.11.0 github.com/prometheus/common v0.29.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 - github.com/samuel/go-zookeeper v0.0.0-20200724154423-2164a8ac840e github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 github.com/soheilhy/cmux v0.1.4 github.com/spf13/cobra v1.4.0 @@ -116,7 +115,10 @@ require ( sigs.k8s.io/yaml v1.2.0 ) -require github.com/bndr/gotabulate v1.1.2 +require ( + github.com/bndr/gotabulate v1.1.2 + github.com/openark/golib v0.0.0-20210531070646-355f37940af8 +) require ( cloud.google.com/go v0.81.0 // indirect diff --git a/go.sum b/go.sum index ddf3582b83b..19fe3502a7c 100644 --- a/go.sum +++ b/go.sum @@ -577,6 +577,8 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/openark/golib v0.0.0-20210531070646-355f37940af8 h1:9ciIHNuyFqRWi9NpMNw9sVLB6z1ItpP5ZhTY9Q1xVu4= +github.com/openark/golib v0.0.0-20210531070646-355f37940af8/go.mod h1:1jj8x1eDVZxgc/Z4VyamX4qTbAdHPUQA6NeVtCd8Sl8= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02 h1:0R5mDLI66Qw13qN80TRz85zthQ2nf2+uDyiV23w6c3Q= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= @@ -646,8 +648,6 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20200724154423-2164a8ac840e h1:CGjiMQ0wMH4wtNWrlj6kiTbkPt2F3rbYnhGX6TWLfco= -github.com/samuel/go-zookeeper v0.0.0-20200724154423-2164a8ac840e/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= diff --git a/go/cmd/vtbackup/plugin_prometheusbackend.go b/go/cmd/vtbackup/plugin_prometheusbackend.go new file mode 100644 index 00000000000..de4ecbb5e9f --- /dev/null +++ b/go/cmd/vtbackup/plugin_prometheusbackend.go @@ -0,0 +1,31 @@ +/* +Copyright 2022 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +// This plugin imports Prometheus to allow for instrumentation +// with the Prometheus client library + +import ( + "vitess.io/vitess/go/stats/prometheusbackend" + "vitess.io/vitess/go/vt/servenv" +) + +func init() { + servenv.OnRun(func() { + prometheusbackend.Init("vtbackup") + }) +} diff --git a/go/cmd/vtbackup/vtbackup.go b/go/cmd/vtbackup/vtbackup.go index fd1aedcb3b0..3c595f6ae67 100644 --- a/go/cmd/vtbackup/vtbackup.go +++ b/go/cmd/vtbackup/vtbackup.go @@ -64,7 +64,6 @@ import ( "math" "math/big" "os" - "os/signal" "strings" "syscall" "time" @@ -113,11 +112,12 @@ var ( initShard string concurrency = 4 // mysqlctld-like flags - mysqlPort = 3306 - mysqlSocket string - mysqlTimeout = 5 * time.Minute - initDBSQLFile string - detachedMode bool + mysqlPort = 3306 + mysqlSocket string + mysqlTimeout = 5 * time.Minute + initDBSQLFile string + detachedMode bool + keepAliveTimeout = 0 * time.Second ) func registerFlags(fs *pflag.FlagSet) { @@ -138,19 +138,36 @@ func registerFlags(fs *pflag.FlagSet) { fs.DurationVar(&mysqlTimeout, "mysql_timeout", mysqlTimeout, "how long to wait for mysqld startup") fs.StringVar(&initDBSQLFile, "init_db_sql_file", initDBSQLFile, "path to .sql file to run after mysql_install_db") fs.BoolVar(&detachedMode, "detach", detachedMode, "detached mode - run backups detached from the terminal") + fs.DurationVar(&keepAliveTimeout, "keep-alive-timeout", keepAliveTimeout, "Wait until timeout elapses after a successful backup before shutting down.") acl.RegisterFlags(fs) } func init() { + servenv.RegisterDefaultFlags() + dbconfigs.RegisterFlags(dbconfigs.All...) + mysqlctl.RegisterFlags() servenv.OnParse(registerFlags) } func main() { defer exit.Recover() - dbconfigs.RegisterFlags(dbconfigs.All...) - mysqlctl.RegisterFlags() + servenv.ParseFlags("vtbackup") + servenv.Init() + + ctx, cancel := context.WithCancel(context.Background()) + servenv.OnClose(func() { + cancel() + }) + + defer func() { + servenv.ExitChan <- syscall.SIGTERM + <-ctx.Done() + }() + + go servenv.RunDefault() + if detachedMode { // this method will call os.Exit and kill this process cmd.DetachFromTerminalAndExit() @@ -163,16 +180,6 @@ func main() { exit.Return(1) } - // Catch SIGTERM and SIGINT so we get a chance to clean up. - ctx, cancel := context.WithCancel(context.Background()) - sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM) - go func() { - sig := <-sigChan - log.Infof("Cancelling due to signal: %v", sig) - cancel() - }() - // Open connection backup storage. backupStorage, err := backupstorage.GetBackupStorage() if err != nil { @@ -205,6 +212,15 @@ func main() { log.Errorf("Couldn't prune old backups: %v", err) exit.Return(1) } + + if keepAliveTimeout > 0 { + log.Infof("Backup was successful, waiting %s before exiting (or until context expires).", keepAliveTimeout) + select { + case <-time.After(keepAliveTimeout): + case <-ctx.Done(): + } + } + log.Info("Exiting.") } func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage backupstorage.BackupStorage) error { diff --git a/go/cmd/vtctl/vtctl.go b/go/cmd/vtctl/vtctl.go index d0ca5777ff2..45f63026982 100644 --- a/go/cmd/vtctl/vtctl.go +++ b/go/cmd/vtctl/vtctl.go @@ -52,6 +52,29 @@ var ( func init() { servenv.OnParse(func(fs *pflag.FlagSet) { + // N.B. This is necessary for subcommand pflag parsing when not using + // cobra (cobra is where we're headed, but for `vtctl` it's a big lift + // before the RC cut). + // + // Essentially, the situation we have here is that commands look like: + // + // `vtctl [global flags] [subcommand flags]` + // + // Since the default behavior of pflag is to allow "interspersed" flag + // and positional arguments, this means that the initial servenv parse + // will complain if _any_ subocmmand's flag is provided; for example, if + // you were to invoke + // + // `vtctl AddCellInfo --root /vitess/global --server_address "1.2.3.4" global + // + // then you would get the error "unknown flag --root", even though that + // is a valid flag for the AddCellInfo flag. + // + // By disabling interspersal on the top-level parse, anything after the + // command name ("AddCellInfo", in this example) will be forwarded to + // the subcommand's flag set for further parsing. + fs.SetInterspersed(false) + logger := logutil.NewConsoleLogger() fs.SetOutput(logutil.NewLoggerWriter(logger)) fs.Usage = func() { @@ -156,12 +179,14 @@ func main() { default: log.Warningf("WARNING: vtctl should only be used for VDiff workflows. Consider using vtctldclient for all other commands.") + wr := wrangler.New(logutil.NewConsoleLogger(), ts, tmclient.NewTabletManagerClient()) + if args[0] == "--" { + vtctl.PrintDoubleDashDeprecationNotice(wr) args = args[1:] } action = args[0] - wr := wrangler.New(logutil.NewConsoleLogger(), ts, tmclient.NewTabletManagerClient()) err := vtctl.RunCommand(ctx, wr, args) cancel() switch err { diff --git a/go/cmd/vtctlclient/main.go b/go/cmd/vtctlclient/main.go index c3bc05e4d43..55da4d21f93 100644 --- a/go/cmd/vtctlclient/main.go +++ b/go/cmd/vtctlclient/main.go @@ -60,7 +60,8 @@ func init() { // VEP-4 will replace the need for this function. See https://github.com/vitessio/enhancements/blob/main/veps/vep-4.md func checkDeprecations(args []string) { // utility: - findSubstring := func(s string) (arg string, ok bool) { + // name this to findSubstring if you need to use it + _ = func(s string) (arg string, ok bool) { for _, arg := range args { if strings.Contains(arg, s) { return arg, true @@ -68,13 +69,6 @@ func checkDeprecations(args []string) { } return "", false } - if _, ok := findSubstring("ApplySchema"); ok { - if arg, ok := findSubstring("ddl_strategy"); ok { - if strings.Contains(arg, "-skip-topo") { - log.Warning("-skip-topo is deprecated and will be removed in future versions") - } - } - } } func main() { diff --git a/go/cmd/vtctldclient/command/reparents.go b/go/cmd/vtctldclient/command/reparents.go index b2a4df2e19a..985cd227607 100644 --- a/go/cmd/vtctldclient/command/reparents.go +++ b/go/cmd/vtctldclient/command/reparents.go @@ -277,7 +277,7 @@ func commandTabletExternallyReparented(cmd *cobra.Command, args []string) error } func init() { - EmergencyReparentShard.Flags().DurationVar(&emergencyReparentShardOptions.WaitReplicasTimeout, "wait-replicas-timeout", *topo.RemoteOperationTimeout, "Time to wait for replicas to catch up in reparenting.") + EmergencyReparentShard.Flags().DurationVar(&emergencyReparentShardOptions.WaitReplicasTimeout, "wait-replicas-timeout", topo.RemoteOperationTimeout, "Time to wait for replicas to catch up in reparenting.") EmergencyReparentShard.Flags().StringVar(&emergencyReparentShardOptions.NewPrimaryAliasStr, "new-primary", "", "Alias of a tablet that should be the new primary. If not specified, the vtctld will select the best candidate to promote.") EmergencyReparentShard.Flags().BoolVar(&emergencyReparentShardOptions.PreventCrossCellPromotion, "prevent-cross-cell-promotion", false, "Only promotes a new primary from the same cell as the previous primary.") EmergencyReparentShard.Flags().StringSliceVarP(&emergencyReparentShardOptions.IgnoreReplicaAliasStrList, "ignore-replicas", "i", nil, "Comma-separated, repeated list of replica tablet aliases to ignore during the emergency reparent.") @@ -287,7 +287,7 @@ func init() { InitShardPrimary.Flags().BoolVar(&initShardPrimaryOptions.Force, "force", false, "Force the reparent even if the provided tablet is not writable or the shard primary.") Root.AddCommand(InitShardPrimary) - PlannedReparentShard.Flags().DurationVar(&plannedReparentShardOptions.WaitReplicasTimeout, "wait-replicas-timeout", *topo.RemoteOperationTimeout, "Time to wait for replicas to catch up on replication both before and after reparenting.") + PlannedReparentShard.Flags().DurationVar(&plannedReparentShardOptions.WaitReplicasTimeout, "wait-replicas-timeout", topo.RemoteOperationTimeout, "Time to wait for replicas to catch up on replication both before and after reparenting.") PlannedReparentShard.Flags().StringVar(&plannedReparentShardOptions.NewPrimaryAliasStr, "new-primary", "", "Alias of a tablet that should be the new primary.") PlannedReparentShard.Flags().StringVar(&plannedReparentShardOptions.AvoidPrimaryAliasStr, "avoid-primary", "", "Alias of a tablet that should not be the primary; i.e. \"reparent to any other tablet if this one is the primary\".") Root.AddCommand(PlannedReparentShard) diff --git a/go/cmd/vtorc/main.go b/go/cmd/vtorc/main.go index 7123b408c20..f5418819a05 100644 --- a/go/cmd/vtorc/main.go +++ b/go/cmd/vtorc/main.go @@ -28,7 +28,6 @@ import ( "vitess.io/vitess/go/acl" "vitess.io/vitess/go/vt/grpccommon" "vitess.io/vitess/go/vt/log" - vtlog "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vtorc/config" @@ -100,7 +99,7 @@ func main() { // directly. fs := pflag.NewFlagSet("vtorc", pflag.ExitOnError) grpccommon.RegisterFlags(fs) - vtlog.RegisterFlags(fs) + log.RegisterFlags(fs) logutil.RegisterFlags(fs) logic.RegisterFlags(fs) server.RegisterFlags(fs) diff --git a/go/flags/endtoend/mysqlctl.txt b/go/flags/endtoend/mysqlctl.txt index a13d9e35158..cd2758007e2 100644 --- a/go/flags/endtoend/mysqlctl.txt +++ b/go/flags/endtoend/mysqlctl.txt @@ -24,19 +24,6 @@ Global flags: --catch-sigpipe catch and ignore SIGPIPE on stdout and stderr if specified --compression-engine-name string compressor engine used for compression. (default "pargzip") --compression-level int what level to pass to the compressor. (default 1) - --db-config-dba-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-dba-flags uint deprecated: use db_flags - --db-config-dba-flavor string deprecated: use db_flavor - --db-config-dba-host string deprecated: use db_host - --db-config-dba-pass string db dba deprecated: use db_dba_password - --db-config-dba-port int deprecated: use db_port - --db-config-dba-server_name string deprecated: use db_server_name - --db-config-dba-ssl-ca string deprecated: use db_ssl_ca - --db-config-dba-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-dba-ssl-cert string deprecated: use db_ssl_cert - --db-config-dba-ssl-key string deprecated: use db_ssl_key - --db-config-dba-uname string deprecated: use db_dba_user (default "vt_dba") - --db-config-dba-unixsocket string deprecated: use db_socket --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -116,7 +103,6 @@ Global flags: --port int port for the server --pprof strings enable profiling --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --remote_operation_timeout duration time to wait for a remote operation (default 30s) --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) --security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) --service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice @@ -124,9 +110,6 @@ Global flags: --stderrthreshold severity logs at or above this threshold go to stderr (default 1) --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet_uid uint Tablet UID (default 41983) - --topo_global_root string the path of the global topology data in the global topology server - --topo_global_server_address string the address of the global topology server - --topo_implementation string the topology implementation to use -v, --v Level log level for V logs --version print binary version --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging diff --git a/go/flags/endtoend/mysqlctld.txt b/go/flags/endtoend/mysqlctld.txt index 6efc20e18e3..6ac669ed9c9 100644 --- a/go/flags/endtoend/mysqlctld.txt +++ b/go/flags/endtoend/mysqlctld.txt @@ -12,19 +12,6 @@ Usage of mysqlctld: --catch-sigpipe catch and ignore SIGPIPE on stdout and stderr if specified --compression-engine-name string compressor engine used for compression. (default "pargzip") --compression-level int what level to pass to the compressor. (default 1) - --db-config-dba-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-dba-flags uint deprecated: use db_flags - --db-config-dba-flavor string deprecated: use db_flavor - --db-config-dba-host string deprecated: use db_host - --db-config-dba-pass string db dba deprecated: use db_dba_password - --db-config-dba-port int deprecated: use db_port - --db-config-dba-server_name string deprecated: use db_server_name - --db-config-dba-ssl-ca string deprecated: use db_ssl_ca - --db-config-dba-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-dba-ssl-cert string deprecated: use db_ssl_cert - --db-config-dba-ssl-key string deprecated: use db_ssl_key - --db-config-dba-uname string deprecated: use db_dba_user (default "vt_dba") - --db-config-dba-unixsocket string deprecated: use db_socket --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -104,7 +91,6 @@ Usage of mysqlctld: --port int port for the server --pprof strings enable profiling --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --remote_operation_timeout duration time to wait for a remote operation (default 30s) --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) --security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) --service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice @@ -112,9 +98,6 @@ Usage of mysqlctld: --stderrthreshold severity logs at or above this threshold go to stderr (default 1) --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet_uid uint Tablet UID (default 41983) - --topo_global_root string the path of the global topology data in the global topology server - --topo_global_server_address string the address of the global topology server - --topo_implementation string the topology implementation to use -v, --v Level log level for V logs --version print binary version --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging diff --git a/go/flags/endtoend/vtbackup.txt b/go/flags/endtoend/vtbackup.txt index 888a266d6c7..98f145904fa 100644 --- a/go/flags/endtoend/vtbackup.txt +++ b/go/flags/endtoend/vtbackup.txt @@ -6,102 +6,15 @@ Usage of vtbackup: --azblob_backup_container_name string Azure Blob Container Name. --azblob_backup_parallelism int Azure Blob operation parallelism (requires extra memory when increased). (default 1) --azblob_backup_storage_root string Root prefix for all backup-related Azure Blobs; this should exclude both initial and trailing '/' (e.g. just 'a/b' not '/a/b/'). + --backup_engine_implementation string Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin") + --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) + --backup_storage_compress if set, the backup files will be compressed (default is true). Set to false for instance if a backup_storage_hook is specified and it compresses the data. (default true) + --backup_storage_hook string if set, we send the contents of the backup files through this hook. --backup_storage_implementation string Which backup storage implementation to use for creating and restoring backups. + --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) --ceph_backup_storage_config string Path to JSON config file for ceph backup storage. (default "ceph_backup_config.json") --concurrency int (init restore parameter) how many concurrent files to restore at once (default 4) --consul_auth_static_file string JSON File to read the topos/tokens from. - --db-config-allprivs-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-allprivs-flags uint deprecated: use db_flags - --db-config-allprivs-flavor string deprecated: use db_flavor - --db-config-allprivs-host string deprecated: use db_host - --db-config-allprivs-pass string db allprivs deprecated: use db_allprivs_password - --db-config-allprivs-port int deprecated: use db_port - --db-config-allprivs-server_name string deprecated: use db_server_name - --db-config-allprivs-ssl-ca string deprecated: use db_ssl_ca - --db-config-allprivs-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-allprivs-ssl-cert string deprecated: use db_ssl_cert - --db-config-allprivs-ssl-key string deprecated: use db_ssl_key - --db-config-allprivs-uname string deprecated: use db_allprivs_user (default "vt_allprivs") - --db-config-allprivs-unixsocket string deprecated: use db_socket - --db-config-app-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-app-flags uint deprecated: use db_flags - --db-config-app-flavor string deprecated: use db_flavor - --db-config-app-host string deprecated: use db_host - --db-config-app-pass string db app deprecated: use db_app_password - --db-config-app-port int deprecated: use db_port - --db-config-app-server_name string deprecated: use db_server_name - --db-config-app-ssl-ca string deprecated: use db_ssl_ca - --db-config-app-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-app-ssl-cert string deprecated: use db_ssl_cert - --db-config-app-ssl-key string deprecated: use db_ssl_key - --db-config-app-uname string deprecated: use db_app_user (default "vt_app") - --db-config-app-unixsocket string deprecated: use db_socket - --db-config-appdebug-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-appdebug-flags uint deprecated: use db_flags - --db-config-appdebug-flavor string deprecated: use db_flavor - --db-config-appdebug-host string deprecated: use db_host - --db-config-appdebug-pass string db appdebug deprecated: use db_appdebug_password - --db-config-appdebug-port int deprecated: use db_port - --db-config-appdebug-server_name string deprecated: use db_server_name - --db-config-appdebug-ssl-ca string deprecated: use db_ssl_ca - --db-config-appdebug-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-appdebug-ssl-cert string deprecated: use db_ssl_cert - --db-config-appdebug-ssl-key string deprecated: use db_ssl_key - --db-config-appdebug-uname string deprecated: use db_appdebug_user (default "vt_appdebug") - --db-config-appdebug-unixsocket string deprecated: use db_socket - --db-config-dba-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-dba-flags uint deprecated: use db_flags - --db-config-dba-flavor string deprecated: use db_flavor - --db-config-dba-host string deprecated: use db_host - --db-config-dba-pass string db dba deprecated: use db_dba_password - --db-config-dba-port int deprecated: use db_port - --db-config-dba-server_name string deprecated: use db_server_name - --db-config-dba-ssl-ca string deprecated: use db_ssl_ca - --db-config-dba-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-dba-ssl-cert string deprecated: use db_ssl_cert - --db-config-dba-ssl-key string deprecated: use db_ssl_key - --db-config-dba-uname string deprecated: use db_dba_user (default "vt_dba") - --db-config-dba-unixsocket string deprecated: use db_socket - --db-config-erepl-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-erepl-dbname string deprecated: dbname does not need to be explicitly configured - --db-config-erepl-flags uint deprecated: use db_flags - --db-config-erepl-flavor string deprecated: use db_flavor - --db-config-erepl-host string deprecated: use db_host - --db-config-erepl-pass string db erepl deprecated: use db_erepl_password - --db-config-erepl-port int deprecated: use db_port - --db-config-erepl-server_name string deprecated: use db_server_name - --db-config-erepl-ssl-ca string deprecated: use db_ssl_ca - --db-config-erepl-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-erepl-ssl-cert string deprecated: use db_ssl_cert - --db-config-erepl-ssl-key string deprecated: use db_ssl_key - --db-config-erepl-uname string deprecated: use db_erepl_user (default "vt_erepl") - --db-config-erepl-unixsocket string deprecated: use db_socket - --db-config-filtered-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-filtered-flags uint deprecated: use db_flags - --db-config-filtered-flavor string deprecated: use db_flavor - --db-config-filtered-host string deprecated: use db_host - --db-config-filtered-pass string db filtered deprecated: use db_filtered_password - --db-config-filtered-port int deprecated: use db_port - --db-config-filtered-server_name string deprecated: use db_server_name - --db-config-filtered-ssl-ca string deprecated: use db_ssl_ca - --db-config-filtered-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-filtered-ssl-cert string deprecated: use db_ssl_cert - --db-config-filtered-ssl-key string deprecated: use db_ssl_key - --db-config-filtered-uname string deprecated: use db_filtered_user (default "vt_filtered") - --db-config-filtered-unixsocket string deprecated: use db_socket - --db-config-repl-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-repl-flags uint deprecated: use db_flags - --db-config-repl-flavor string deprecated: use db_flavor - --db-config-repl-host string deprecated: use db_host - --db-config-repl-pass string db repl deprecated: use db_repl_password - --db-config-repl-port int deprecated: use db_port - --db-config-repl-server_name string deprecated: use db_server_name - --db-config-repl-ssl-ca string deprecated: use db_ssl_ca - --db-config-repl-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-repl-ssl-cert string deprecated: use db_ssl_cert - --db-config-repl-ssl-key string deprecated: use db_ssl_key - --db-config-repl-uname string deprecated: use db_repl_user (default "vt_repl") - --db-config-repl-unixsocket string deprecated: use db_socket --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -168,6 +81,7 @@ Usage of vtbackup: --init_keyspace string (init parameter) keyspace to use for this tablet --init_shard string (init parameter) shard to use for this tablet --initial_backup Instead of restoring from backup, initialize an empty database with the provided init_db_sql_file and upload a backup of that for the shard, if the shard has no backups yet. This can be used to seed a brand new shard with an initial, empty backup. If any backups already exist for the shard, this will be considered a successful no-op. This can only be done before the shard exists in topology (i.e. before any tablets are deployed). + --keep-alive-timeout duration Wait until timeout elapses after a successful backup before shutting down. --keep_logs duration keep logs for this long (using ctime) (zero to keep forever) --keep_logs_by_mtime duration keep logs for this long (using mtime) (zero to keep forever) --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) @@ -200,6 +114,7 @@ Usage of vtbackup: --mysql_server_version string MySQL server version to advertise. --mysql_socket string path to the mysql socket --mysql_timeout duration how long to wait for mysqld startup (default 5m0s) + --port int port for the server --pprof strings enable profiling --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) --remote_operation_timeout duration time to wait for a remote operation (default 30s) @@ -245,3 +160,11 @@ Usage of vtbackup: -v, --v Level log level for V logs --version print binary version --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging + --xbstream_restore_flags string flags to pass to xbstream command during restore. These should be space separated and will be added to the end of the command. These need to match the ones used for backup e.g. --compress / --decompress, --encrypt / --decrypt + --xtrabackup_backup_flags string flags to pass to backup command. These should be space separated and will be added to the end of the command + --xtrabackup_prepare_flags string flags to pass to prepare command. These should be space separated and will be added to the end of the command + --xtrabackup_root_path string directory location of the xtrabackup and xbstream executables, e.g., /usr/bin + --xtrabackup_stream_mode string which mode to use if streaming, valid values are tar and xbstream (default "tar") + --xtrabackup_stripe_block_size uint Size in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400) + --xtrabackup_stripes uint If greater than 0, use data striping across this many destination files to parallelize data transfer and decompression + --xtrabackup_user string User that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation. diff --git a/go/flags/endtoend/vtctld.txt b/go/flags/endtoend/vtctld.txt index 69de8887a3b..5895327dc5f 100644 --- a/go/flags/endtoend/vtctld.txt +++ b/go/flags/endtoend/vtctld.txt @@ -25,17 +25,6 @@ Usage of vtctld: --consul_auth_static_file string JSON File to read the topos/tokens from. --datadog-agent-host string host to send spans to. if empty, no tracing will be done --datadog-agent-port string port to send spans to. if empty, no tracing will be done - --db-credentials-file string db credentials file; send SIGHUP to reload this file - --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") - --db-credentials-vault-addr string URL to Vault server - --db-credentials-vault-path string Vault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds - --db-credentials-vault-role-mountpoint string Vault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable (default "approle") - --db-credentials-vault-role-secretidfile string Path to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable - --db-credentials-vault-roleid string Vault AppRole id; can also be passed using VAULT_ROLEID environment variable - --db-credentials-vault-timeout duration Timeout for vault API operations (default 10s) - --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate - --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable - --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) --dba_pool_size int Size of the connection pool for dba connections (default 20) --disable_active_reparents if set, do not allow active reparents. Use this to protect a cluster using external reparents. diff --git a/go/flags/endtoend/vtctldclient.txt b/go/flags/endtoend/vtctldclient.txt index a8f4b927d74..3c27875d0da 100644 --- a/go/flags/endtoend/vtctldclient.txt +++ b/go/flags/endtoend/vtctldclient.txt @@ -87,58 +87,43 @@ Available Commands: help Help about any command Flags: - --action_timeout duration timeout for the total command (default 1h0m0s) - --alsologtostderr log to standard error as well as files - --db-credentials-file string db credentials file; send SIGHUP to reload this file - --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") - --db-credentials-vault-addr string URL to Vault server - --db-credentials-vault-path string Vault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds - --db-credentials-vault-role-mountpoint string Vault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable (default "approle") - --db-credentials-vault-role-secretidfile string Path to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable - --db-credentials-vault-roleid string Vault AppRole id; can also be passed using VAULT_ROLEID environment variable - --db-credentials-vault-timeout duration Timeout for vault API operations (default 10s) - --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate - --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable - --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --emit_stats If set, emit stats to push-based monitoring and stats backends - --grpc_auth_static_client_creds string When using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server. - --grpc_compression string Which protocol to use for compressing gRPC. Default: nothing. Supported: snappy - --grpc_enable_tracing Enable gRPC tracing. - --grpc_initial_conn_window_size int gRPC initial connection window size - --grpc_initial_window_size int gRPC initial window size - --grpc_keepalive_time duration After a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive. (default 10s) - --grpc_keepalive_timeout duration After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) - --grpc_max_message_size int Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216) - --grpc_prometheus Enable gRPC monitoring with Prometheus. - -h, --help help for vtctldclient - --keep_logs duration keep logs for this long (using ctime) (zero to keep forever) - --keep_logs_by_mtime duration keep logs for this long (using mtime) (zero to keep forever) - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) - --logtostderr log to standard error instead of files - --mysql_server_version string MySQL server version to advertise. - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --remote_operation_timeout duration time to wait for a remote operation (default 30s) - --security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) - --server string server to use for connection (required) - --stats_backend string The name of the registered push-based monitoring/stats backend to use - --stats_combine_dimensions string List of dimensions to be combined into a single "all" value in exported stats vars - --stats_common_tags strings Comma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2 - --stats_drop_variables string Variables to be dropped from the list of exported variables. - --stats_emit_period duration Interval between emitting stats to all registered backends (default 1m0s) - --stderrthreshold severity logs at or above this threshold go to stderr (default 1) - --topo_global_root string the path of the global topology data in the global topology server - --topo_global_server_address string the address of the global topology server - --topo_implementation string the topology implementation to use - -v, --v Level log level for V logs - --version version for vtctldclient - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging - --vtctl_client_protocol string Protocol to use to talk to the vtctl server. (default "grpc") - --vtctld_grpc_ca string the server ca to use to validate servers when connecting - --vtctld_grpc_cert string the cert to use to connect - --vtctld_grpc_crl string the server crl to use to validate server certificates when connecting - --vtctld_grpc_key string the key to use to connect - --vtctld_grpc_server_name string the server name to use to validate server certificate + --action_timeout duration timeout for the total command (default 1h0m0s) + --alsologtostderr log to standard error as well as files + --emit_stats If set, emit stats to push-based monitoring and stats backends + --grpc_auth_static_client_creds string When using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server. + --grpc_compression string Which protocol to use for compressing gRPC. Default: nothing. Supported: snappy + --grpc_enable_tracing Enable gRPC tracing. + --grpc_initial_conn_window_size int gRPC initial connection window size + --grpc_initial_window_size int gRPC initial window size + --grpc_keepalive_time duration After a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive. (default 10s) + --grpc_keepalive_timeout duration After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) + --grpc_max_message_size int Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216) + --grpc_prometheus Enable gRPC monitoring with Prometheus. + -h, --help help for vtctldclient + --keep_logs duration keep logs for this long (using ctime) (zero to keep forever) + --keep_logs_by_mtime duration keep logs for this long (using mtime) (zero to keep forever) + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) + --logtostderr log to standard error instead of files + --mysql_server_version string MySQL server version to advertise. + --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) + --server string server to use for connection (required) + --stats_backend string The name of the registered push-based monitoring/stats backend to use + --stats_combine_dimensions string List of dimensions to be combined into a single "all" value in exported stats vars + --stats_common_tags strings Comma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2 + --stats_drop_variables string Variables to be dropped from the list of exported variables. + --stats_emit_period duration Interval between emitting stats to all registered backends (default 1m0s) + --stderrthreshold severity logs at or above this threshold go to stderr (default 1) + -v, --v Level log level for V logs + --version version for vtctldclient + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging + --vtctl_client_protocol string Protocol to use to talk to the vtctl server. (default "grpc") + --vtctld_grpc_ca string the server ca to use to validate servers when connecting + --vtctld_grpc_cert string the cert to use to connect + --vtctld_grpc_crl string the server crl to use to validate server certificates when connecting + --vtctld_grpc_key string the key to use to connect + --vtctld_grpc_server_name string the server name to use to validate server certificate Use "vtctldclient [command] --help" for more information about a command. diff --git a/go/flags/endtoend/vtexplain.txt b/go/flags/endtoend/vtexplain.txt index 114d1febdba..df5fea9d1d6 100644 --- a/go/flags/endtoend/vtexplain.txt +++ b/go/flags/endtoend/vtexplain.txt @@ -1,105 +1,94 @@ Usage of vtexplain: - --alsologtostderr log to standard error as well as files - --app_idle_timeout duration Idle timeout for app connections (default 1m0s) - --app_pool_size int Size of the connection pool for app connections (default 40) - --backup_engine_implementation string Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin") - --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) - --backup_storage_compress if set, the backup files will be compressed (default is true). Set to false for instance if a backup_storage_hook is specified and it compresses the data. (default true) - --backup_storage_hook string if set, we send the contents of the backup files through this hook. - --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) - --batch-interval duration Interval between logical time slots. (default 10ms) - --builtinbackup_mysqld_timeout duration how long to wait for mysqld to shutdown at the start of the backup. (default 10m0s) - --builtinbackup_progress duration how often to send progress updates when backing up large files. (default 5s) - --compression-engine-name string compressor engine used for compression. (default "pargzip") - --compression-level int what level to pass to the compressor. (default 1) - --db-credentials-file string db credentials file; send SIGHUP to reload this file - --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") - --db-credentials-vault-addr string URL to Vault server - --db-credentials-vault-path string Vault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds - --db-credentials-vault-role-mountpoint string Vault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable (default "approle") - --db-credentials-vault-role-secretidfile string Path to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable - --db-credentials-vault-roleid string Vault AppRole id; can also be passed using VAULT_ROLEID environment variable - --db-credentials-vault-timeout duration Timeout for vault API operations (default 10s) - --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate - --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable - --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) - --dba_pool_size int Size of the connection pool for dba connections (default 20) - --dbname string Optional database target to override normal routing - --default_tablet_type topodatapb.TabletType The default tablet type to set for queries, when one is not explicitly selected. (default PRIMARY) - --disable_active_reparents if set, do not allow active reparents. Use this to protect a cluster using external reparents. - --execution-mode string The execution mode to simulate -- must be set to multi, legacy-autocommit, or twopc (default "multi") - --external-compressor string command with arguments to use when compressing a backup. - --external-compressor-extension string extension to use when using an external compressor. - --external-decompressor string command with arguments to use when decompressing a backup. - -h, --help display usage and exit - --keep_logs duration keep logs for this long (using ctime) (zero to keep forever) - --keep_logs_by_mtime duration keep logs for this long (using mtime) (zero to keep forever) - --ks-shard-map string JSON map of keyspace name -> shard name -> ShardReference object. The inner map is the same as the output of FindAllShardsInKeyspace - --ks-shard-map-file string File containing json blob of keyspace name -> shard name -> ShardReference object - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --log_err_stacks log stack traces for errors - --log_queries_to_file string Enable query logging to the specified file - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) - --logtostderr log to standard error instead of files - --message_stream_grace_period duration the amount of time to give for a vttablet to resume if it ends a message stream, usually because of a reparent. (default 30s) - --mysql-server-pool-conn-read-buffers If set, the server will pool incoming connection read buffers - --mysql_allow_clear_text_without_tls If set, the server will allow the use of a clear text password over non-SSL connections. - --mysql_auth_server_impl string Which auth server implementation to use. Options: none, ldap, clientcert, static, vault. (default "static") - --mysql_default_workload string Default session workload (OLTP, OLAP, DBA) (default "OLTP") - --mysql_server_bind_address string Binds on this address when listening to MySQL binary protocol. Useful to restrict listening to 'localhost' only for instance. - --mysql_server_port int If set, also listen for MySQL binary protocol connections on this port. (default -1) - --mysql_server_query_timeout duration mysql query timeout (default 0s) - --mysql_server_read_timeout duration connection read timeout (default 0s) - --mysql_server_require_secure_transport Reject insecure connections but only if mysql_server_ssl_cert and mysql_server_ssl_key are provided - --mysql_server_socket_path string This option specifies the Unix socket file to use when listening for local connections. By default it will be empty and it won't listen to a unix socket - --mysql_server_ssl_ca string Path to ssl CA for mysql server plugin SSL. If specified, server will require and validate client certs. - --mysql_server_ssl_cert string Path to the ssl cert for mysql server plugin SSL - --mysql_server_ssl_crl string Path to ssl CRL for mysql server plugin SSL - --mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL - --mysql_server_ssl_server_ca string path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients - --mysql_server_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. - --mysql_server_version string MySQL server version to advertise. - --mysql_server_write_timeout duration connection write timeout (default 0s) - --mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish (default 0s) - --mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp") - --mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init - --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) - --normalize Whether to enable vtgate normalization - --output-mode string Output in human-friendly text or json (default "text") - --planner-version string Sets the query planner version to use when generating the explain output. Valid values are V3 and Gen4 - --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) - --pprof strings enable profiling - --proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --querylog-buffer-size int Maximum number of buffered query logs before throttling log output (default 10) - --remote_operation_timeout duration time to wait for a remote operation (default 30s) - --replication-mode string The replication mode to simulate -- must be set to either ROW or STATEMENT (default "ROW") - --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) - --schema string The SQL table schema - --schema-file string Identifies the file that contains the SQL table schema - --security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) - --shards int Number of shards per keyspace. Passing --ks-shard-map/--ks-shard-map-file causes this flag to be ignored. (default 2) - --sql string A list of semicolon-delimited SQL commands to analyze - --sql-file string Identifies the file that contains the SQL commands to analyze - --sql-max-length-errors int truncate queries in error logs to the given length (default unlimited) - --sql-max-length-ui int truncate queries in debug UIs to the given length (default 512) (default 512) - --stderrthreshold severity logs at or above this threshold go to stderr (default 1) - --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. - --topo_global_root string the path of the global topology data in the global topology server - --topo_global_server_address string the address of the global topology server - --topo_implementation string the topology implementation to use - -v, --v Level log level for V logs - --version print binary version - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging - --vschema string Identifies the VTGate routing schema - --vschema-file string Identifies the VTGate routing schema file - --xbstream_restore_flags string flags to pass to xbstream command during restore. These should be space separated and will be added to the end of the command. These need to match the ones used for backup e.g. --compress / --decompress, --encrypt / --decrypt - --xtrabackup_backup_flags string flags to pass to backup command. These should be space separated and will be added to the end of the command - --xtrabackup_prepare_flags string flags to pass to prepare command. These should be space separated and will be added to the end of the command - --xtrabackup_root_path string directory location of the xtrabackup and xbstream executables, e.g., /usr/bin - --xtrabackup_stream_mode string which mode to use if streaming, valid values are tar and xbstream (default "tar") - --xtrabackup_stripe_block_size uint Size in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400) - --xtrabackup_stripes uint If greater than 0, use data striping across this many destination files to parallelize data transfer and decompression - --xtrabackup_user string User that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation. + --alsologtostderr log to standard error as well as files + --app_idle_timeout duration Idle timeout for app connections (default 1m0s) + --app_pool_size int Size of the connection pool for app connections (default 40) + --backup_engine_implementation string Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin") + --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) + --backup_storage_compress if set, the backup files will be compressed (default is true). Set to false for instance if a backup_storage_hook is specified and it compresses the data. (default true) + --backup_storage_hook string if set, we send the contents of the backup files through this hook. + --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) + --batch-interval duration Interval between logical time slots. (default 10ms) + --builtinbackup_mysqld_timeout duration how long to wait for mysqld to shutdown at the start of the backup. (default 10m0s) + --builtinbackup_progress duration how often to send progress updates when backing up large files. (default 5s) + --compression-engine-name string compressor engine used for compression. (default "pargzip") + --compression-level int what level to pass to the compressor. (default 1) + --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) + --dba_pool_size int Size of the connection pool for dba connections (default 20) + --dbname string Optional database target to override normal routing + --default_tablet_type topodatapb.TabletType The default tablet type to set for queries, when one is not explicitly selected. (default PRIMARY) + --disable_active_reparents if set, do not allow active reparents. Use this to protect a cluster using external reparents. + --execution-mode string The execution mode to simulate -- must be set to multi, legacy-autocommit, or twopc (default "multi") + --external-compressor string command with arguments to use when compressing a backup. + --external-compressor-extension string extension to use when using an external compressor. + --external-decompressor string command with arguments to use when decompressing a backup. + -h, --help display usage and exit + --keep_logs duration keep logs for this long (using ctime) (zero to keep forever) + --keep_logs_by_mtime duration keep logs for this long (using mtime) (zero to keep forever) + --ks-shard-map string JSON map of keyspace name -> shard name -> ShardReference object. The inner map is the same as the output of FindAllShardsInKeyspace + --ks-shard-map-file string File containing json blob of keyspace name -> shard name -> ShardReference object + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --log_err_stacks log stack traces for errors + --log_queries_to_file string Enable query logging to the specified file + --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) + --logtostderr log to standard error instead of files + --message_stream_grace_period duration the amount of time to give for a vttablet to resume if it ends a message stream, usually because of a reparent. (default 30s) + --mysql-server-pool-conn-read-buffers If set, the server will pool incoming connection read buffers + --mysql_allow_clear_text_without_tls If set, the server will allow the use of a clear text password over non-SSL connections. + --mysql_auth_server_impl string Which auth server implementation to use. Options: none, ldap, clientcert, static, vault. (default "static") + --mysql_default_workload string Default session workload (OLTP, OLAP, DBA) (default "OLTP") + --mysql_server_bind_address string Binds on this address when listening to MySQL binary protocol. Useful to restrict listening to 'localhost' only for instance. + --mysql_server_port int If set, also listen for MySQL binary protocol connections on this port. (default -1) + --mysql_server_query_timeout duration mysql query timeout (default 0s) + --mysql_server_read_timeout duration connection read timeout (default 0s) + --mysql_server_require_secure_transport Reject insecure connections but only if mysql_server_ssl_cert and mysql_server_ssl_key are provided + --mysql_server_socket_path string This option specifies the Unix socket file to use when listening for local connections. By default it will be empty and it won't listen to a unix socket + --mysql_server_ssl_ca string Path to ssl CA for mysql server plugin SSL. If specified, server will require and validate client certs. + --mysql_server_ssl_cert string Path to the ssl cert for mysql server plugin SSL + --mysql_server_ssl_crl string Path to ssl CRL for mysql server plugin SSL + --mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL + --mysql_server_ssl_server_ca string path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients + --mysql_server_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. + --mysql_server_version string MySQL server version to advertise. + --mysql_server_write_timeout duration connection write timeout (default 0s) + --mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish (default 0s) + --mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp") + --mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init + --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) + --normalize Whether to enable vtgate normalization + --output-mode string Output in human-friendly text or json (default "text") + --planner-version string Sets the query planner version to use when generating the explain output. Valid values are V3 and Gen4 + --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) + --pprof strings enable profiling + --proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket + --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --querylog-buffer-size int Maximum number of buffered query logs before throttling log output (default 10) + --remote_operation_timeout duration time to wait for a remote operation (default 30s) + --replication-mode string The replication mode to simulate -- must be set to either ROW or STATEMENT (default "ROW") + --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) + --schema string The SQL table schema + --schema-file string Identifies the file that contains the SQL table schema + --security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) + --shards int Number of shards per keyspace. Passing --ks-shard-map/--ks-shard-map-file causes this flag to be ignored. (default 2) + --sql string A list of semicolon-delimited SQL commands to analyze + --sql-file string Identifies the file that contains the SQL commands to analyze + --sql-max-length-errors int truncate queries in error logs to the given length (default unlimited) + --sql-max-length-ui int truncate queries in debug UIs to the given length (default 512) (default 512) + --stderrthreshold severity logs at or above this threshold go to stderr (default 1) + --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --topo_global_root string the path of the global topology data in the global topology server + --topo_global_server_address string the address of the global topology server + --topo_implementation string the topology implementation to use + -v, --v Level log level for V logs + --version print binary version + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging + --vschema string Identifies the VTGate routing schema + --vschema-file string Identifies the VTGate routing schema file + --xbstream_restore_flags string flags to pass to xbstream command during restore. These should be space separated and will be added to the end of the command. These need to match the ones used for backup e.g. --compress / --decompress, --encrypt / --decrypt + --xtrabackup_backup_flags string flags to pass to backup command. These should be space separated and will be added to the end of the command + --xtrabackup_prepare_flags string flags to pass to prepare command. These should be space separated and will be added to the end of the command + --xtrabackup_root_path string directory location of the xtrabackup and xbstream executables, e.g., /usr/bin + --xtrabackup_stream_mode string which mode to use if streaming, valid values are tar and xbstream (default "tar") + --xtrabackup_stripe_block_size uint Size in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400) + --xtrabackup_stripes uint If greater than 0, use data striping across this many destination files to parallelize data transfer and decompression + --xtrabackup_user string User that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation. diff --git a/go/flags/endtoend/vtorc.txt b/go/flags/endtoend/vtorc.txt index 140f6a2a1fb..e8270b9f5e7 100644 --- a/go/flags/endtoend/vtorc.txt +++ b/go/flags/endtoend/vtorc.txt @@ -7,6 +7,7 @@ Usage of vtorc: --catch-sigpipe catch and ignore SIGPIPE on stdout and stderr if specified --clusters_to_watch strings Comma-separated list of keyspaces or keyspace/shards that this instance will monitor and repair. Defaults to all clusters in the topology. Example: "ks1,ks2/-80" --config string config file name + --consul_auth_static_file string JSON File to read the topos/tokens from. --grpc_auth_static_client_creds string When using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server. --grpc_compression string Which protocol to use for compressing gRPC. Default: nothing. Supported: snappy --grpc_enable_tracing Enable gRPC tracing. @@ -52,6 +53,10 @@ Usage of vtorc: --tablet_manager_grpc_server_name string the server name to use to validate server certificate --tablet_manager_protocol string Protocol to use to make tabletmanager RPCs to vttablets. (default "grpc") --topo-information-refresh-duration duration Timer duration on which VTOrc refreshes the keyspace and vttablet records from the topology server (default 15s) + --topo_consul_lock_delay duration LockDelay for consul session. (default 15s) + --topo_consul_lock_session_checks string List of checks for consul session. (default "serfHealth") + --topo_consul_lock_session_ttl string TTL for consul session. + --topo_consul_watch_poll_duration duration time of the long poll for watch queries. (default 30s) --topo_etcd_lease_ttl int Lease TTL for locks and leader election. The client will use KeepAlive to keep the lease going. (default 30) --topo_etcd_tls_ca string path to the ca to use to validate the server cert when connecting to the etcd topo server --topo_etcd_tls_cert string path to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS diff --git a/go/flags/endtoend/vttablet.txt b/go/flags/endtoend/vttablet.txt index b64c7bc88e8..9340e5a0c01 100644 --- a/go/flags/endtoend/vttablet.txt +++ b/go/flags/endtoend/vttablet.txt @@ -38,98 +38,6 @@ Usage of vttablet: --consul_auth_static_file string JSON File to read the topos/tokens from. --datadog-agent-host string host to send spans to. if empty, no tracing will be done --datadog-agent-port string port to send spans to. if empty, no tracing will be done - --db-config-allprivs-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-allprivs-flags uint deprecated: use db_flags - --db-config-allprivs-flavor string deprecated: use db_flavor - --db-config-allprivs-host string deprecated: use db_host - --db-config-allprivs-pass string db allprivs deprecated: use db_allprivs_password - --db-config-allprivs-port int deprecated: use db_port - --db-config-allprivs-server_name string deprecated: use db_server_name - --db-config-allprivs-ssl-ca string deprecated: use db_ssl_ca - --db-config-allprivs-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-allprivs-ssl-cert string deprecated: use db_ssl_cert - --db-config-allprivs-ssl-key string deprecated: use db_ssl_key - --db-config-allprivs-uname string deprecated: use db_allprivs_user (default "vt_allprivs") - --db-config-allprivs-unixsocket string deprecated: use db_socket - --db-config-app-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-app-flags uint deprecated: use db_flags - --db-config-app-flavor string deprecated: use db_flavor - --db-config-app-host string deprecated: use db_host - --db-config-app-pass string db app deprecated: use db_app_password - --db-config-app-port int deprecated: use db_port - --db-config-app-server_name string deprecated: use db_server_name - --db-config-app-ssl-ca string deprecated: use db_ssl_ca - --db-config-app-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-app-ssl-cert string deprecated: use db_ssl_cert - --db-config-app-ssl-key string deprecated: use db_ssl_key - --db-config-app-uname string deprecated: use db_app_user (default "vt_app") - --db-config-app-unixsocket string deprecated: use db_socket - --db-config-appdebug-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-appdebug-flags uint deprecated: use db_flags - --db-config-appdebug-flavor string deprecated: use db_flavor - --db-config-appdebug-host string deprecated: use db_host - --db-config-appdebug-pass string db appdebug deprecated: use db_appdebug_password - --db-config-appdebug-port int deprecated: use db_port - --db-config-appdebug-server_name string deprecated: use db_server_name - --db-config-appdebug-ssl-ca string deprecated: use db_ssl_ca - --db-config-appdebug-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-appdebug-ssl-cert string deprecated: use db_ssl_cert - --db-config-appdebug-ssl-key string deprecated: use db_ssl_key - --db-config-appdebug-uname string deprecated: use db_appdebug_user (default "vt_appdebug") - --db-config-appdebug-unixsocket string deprecated: use db_socket - --db-config-dba-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-dba-flags uint deprecated: use db_flags - --db-config-dba-flavor string deprecated: use db_flavor - --db-config-dba-host string deprecated: use db_host - --db-config-dba-pass string db dba deprecated: use db_dba_password - --db-config-dba-port int deprecated: use db_port - --db-config-dba-server_name string deprecated: use db_server_name - --db-config-dba-ssl-ca string deprecated: use db_ssl_ca - --db-config-dba-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-dba-ssl-cert string deprecated: use db_ssl_cert - --db-config-dba-ssl-key string deprecated: use db_ssl_key - --db-config-dba-uname string deprecated: use db_dba_user (default "vt_dba") - --db-config-dba-unixsocket string deprecated: use db_socket - --db-config-erepl-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-erepl-dbname string deprecated: dbname does not need to be explicitly configured - --db-config-erepl-flags uint deprecated: use db_flags - --db-config-erepl-flavor string deprecated: use db_flavor - --db-config-erepl-host string deprecated: use db_host - --db-config-erepl-pass string db erepl deprecated: use db_erepl_password - --db-config-erepl-port int deprecated: use db_port - --db-config-erepl-server_name string deprecated: use db_server_name - --db-config-erepl-ssl-ca string deprecated: use db_ssl_ca - --db-config-erepl-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-erepl-ssl-cert string deprecated: use db_ssl_cert - --db-config-erepl-ssl-key string deprecated: use db_ssl_key - --db-config-erepl-uname string deprecated: use db_erepl_user (default "vt_erepl") - --db-config-erepl-unixsocket string deprecated: use db_socket - --db-config-filtered-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-filtered-flags uint deprecated: use db_flags - --db-config-filtered-flavor string deprecated: use db_flavor - --db-config-filtered-host string deprecated: use db_host - --db-config-filtered-pass string db filtered deprecated: use db_filtered_password - --db-config-filtered-port int deprecated: use db_port - --db-config-filtered-server_name string deprecated: use db_server_name - --db-config-filtered-ssl-ca string deprecated: use db_ssl_ca - --db-config-filtered-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-filtered-ssl-cert string deprecated: use db_ssl_cert - --db-config-filtered-ssl-key string deprecated: use db_ssl_key - --db-config-filtered-uname string deprecated: use db_filtered_user (default "vt_filtered") - --db-config-filtered-unixsocket string deprecated: use db_socket - --db-config-repl-charset string deprecated: use db_charset (default "utf8mb4") - --db-config-repl-flags uint deprecated: use db_flags - --db-config-repl-flavor string deprecated: use db_flavor - --db-config-repl-host string deprecated: use db_host - --db-config-repl-pass string db repl deprecated: use db_repl_password - --db-config-repl-port int deprecated: use db_port - --db-config-repl-server_name string deprecated: use db_server_name - --db-config-repl-ssl-ca string deprecated: use db_ssl_ca - --db-config-repl-ssl-ca-path string deprecated: use db_ssl_ca_path - --db-config-repl-ssl-cert string deprecated: use db_ssl_cert - --db-config-repl-ssl-key string deprecated: use db_ssl_key - --db-config-repl-uname string deprecated: use db_repl_user (default "vt_repl") - --db-config-repl-unixsocket string deprecated: use db_socket --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server diff --git a/go/flags/endtoend/vttestserver.txt b/go/flags/endtoend/vttestserver.txt index 145807a8e1a..384ebd7fe06 100644 --- a/go/flags/endtoend/vttestserver.txt +++ b/go/flags/endtoend/vttestserver.txt @@ -16,17 +16,6 @@ Usage of vttestserver: --compression-level int what level to pass to the compressor. (default 1) --consul_auth_static_file string JSON File to read the topos/tokens from. --data_dir string Directory where the data files will be placed, defaults to a random directory under /vt/vtdataroot - --db-credentials-file string db credentials file; send SIGHUP to reload this file - --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") - --db-credentials-vault-addr string URL to Vault server - --db-credentials-vault-path string Vault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds - --db-credentials-vault-role-mountpoint string Vault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable (default "approle") - --db-credentials-vault-role-secretidfile string Path to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable - --db-credentials-vault-roleid string Vault AppRole id; can also be passed using VAULT_ROLEID environment variable - --db-credentials-vault-timeout duration Timeout for vault API operations (default 10s) - --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate - --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable - --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) --dba_pool_size int Size of the connection pool for dba connections (default 20) --default_schema_dir string Default directory for initial schema files. If no schema is found in schema_dir, default to this location. @@ -99,7 +88,6 @@ Usage of vttestserver: --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) --queryserver-config-transaction-timeout float query server transaction timeout (in seconds), a transaction will be killed if it takes longer than this value --rdonly_count int Rdonly tablets per shard (default 1) - --remote_operation_timeout duration time to wait for a remote operation (default 30s) --replica_count int Replica tablets per shard (includes primary) (default 2) --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) --rng_seed int The random number generator seed to use when initializing with random data (see also --initialize_with_random_data). Multiple runs with the same seed will result with the same initial data. (default 123) @@ -124,13 +112,6 @@ Usage of vttestserver: --topo_consul_lock_session_checks string List of checks for consul session. (default "serfHealth") --topo_consul_lock_session_ttl string TTL for consul session. --topo_consul_watch_poll_duration duration time of the long poll for watch queries. (default 30s) - --topo_etcd_lease_ttl int Lease TTL for locks and leader election. The client will use KeepAlive to keep the lease going. (default 30) - --topo_etcd_tls_ca string path to the ca to use to validate the server cert when connecting to the etcd topo server - --topo_etcd_tls_cert string path to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS - --topo_etcd_tls_key string path to the client key to use to connect to the etcd topo server, enables TLS - --topo_global_root string the path of the global topology data in the global topology server - --topo_global_server_address string the address of the global topology server - --topo_implementation string the topology implementation to use --topo_zk_auth_file string auth to use when connecting to the zk topo server, file contents should be :, e.g., digest:user:pass --topo_zk_base_timeout duration zk base timeout (see zk.Connect) (default 30s) --topo_zk_max_concurrency int maximum number of pending requests to send to a Zookeeper server. (default 64) diff --git a/go/pools/resource_pool_test.go b/go/pools/resource_pool_test.go index 1303ffc58da..4798e150718 100644 --- a/go/pools/resource_pool_test.go +++ b/go/pools/resource_pool_test.go @@ -17,6 +17,7 @@ limitations under the License. package pools import ( + "context" "errors" "fmt" "testing" @@ -25,8 +26,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "context" - "vitess.io/vitess/go/sync2" ) @@ -576,9 +575,14 @@ func TestIdleTimeoutCreateFail(t *testing.T) { // try to use it. p.factory = FailFactory p.Put(r) - time.Sleep(15 * time.Millisecond) - assert.Zero(t, p.Active()) - + timeout := time.After(1 * time.Second) + for p.Active() != 0 { + select { + case <-timeout: + t.Errorf("Timed out waiting for resource to be closed by idle timeout") + default: + } + } // reset factory for next run. p.factory = PoolFactory } diff --git a/go/test/endtoend/backup/vtctlbackup/backup_utils.go b/go/test/endtoend/backup/vtctlbackup/backup_utils.go index 6527b0c176f..e862e1cd52c 100644 --- a/go/test/endtoend/backup/vtctlbackup/backup_utils.go +++ b/go/test/endtoend/backup/vtctlbackup/backup_utils.go @@ -763,10 +763,21 @@ func terminatedRestore(t *testing.T) { // Args: // tablet_type: 'replica' or 'rdonly'. func vtctlBackup(t *testing.T, tabletType string) { - restoreWaitForBackup(t, tabletType, nil, true) + // Start vtorc before running backups + vtorcProcess := localCluster.NewVTOrcProcess(cluster.VTOrcConfiguration{}) + err := vtorcProcess.Setup() + require.NoError(t, err) + localCluster.VTOrcProcesses = append(localCluster.VTOrcProcesses, vtorcProcess) + + // StopReplication on replica1. We verify that the replication works fine later in + // verifyInitialReplication. So this will also check that VTOrc is running. + err = localCluster.VtctlclientProcess.ExecuteCommand("StopReplication", replica1.Alias) + require.Nil(t, err) + verifyInitialReplication(t) + restoreWaitForBackup(t, tabletType, nil, true) - err := localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica1.Alias) + err = localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica1.Alias) require.Nil(t, err) backups := localCluster.VerifyBackupCount(t, shardKsName, 1) @@ -781,6 +792,11 @@ func vtctlBackup(t *testing.T, tabletType string) { cluster.VerifyLocalMetadata(t, replica2, keyspaceName, shardName, cell) verifyAfterRemovingBackupNoBackupShouldBePresent(t, backups) + // Stop VTOrc + err = localCluster.VTOrcProcesses[0].TearDown() + localCluster.VTOrcProcesses = nil + require.NoError(t, err) + err = replica2.VttabletProcess.TearDown() require.Nil(t, err) diff --git a/go/test/endtoend/cluster/cluster_process.go b/go/test/endtoend/cluster/cluster_process.go index b4978396ed6..cb6fbb4fd40 100644 --- a/go/test/endtoend/cluster/cluster_process.go +++ b/go/test/endtoend/cluster/cluster_process.go @@ -583,7 +583,6 @@ func (cluster *LocalProcessCluster) StartKeyspaceLegacy(keyspace Keyspace, shard // This does not start any process and user have to explicitly start all // the required services (ex topo, vtgate, mysql and vttablet) func (cluster *LocalProcessCluster) SetupCluster(keyspace *Keyspace, shards []Shard) (err error) { - log.Infof("Starting keyspace: %v", keyspace.Name) if !cluster.ReusingVTDATAROOT { @@ -598,7 +597,6 @@ func (cluster *LocalProcessCluster) SetupCluster(keyspace *Keyspace, shards []Sh // Create shard for _, shard := range shards { for _, tablet := range shard.Vttablets { - // Setup MysqlctlProcess tablet.MysqlctlProcess = *MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory) // Setup VttabletProcess diff --git a/go/test/endtoend/cluster/cluster_util.go b/go/test/endtoend/cluster/cluster_util.go index ba689dbed64..1134e51d40d 100644 --- a/go/test/endtoend/cluster/cluster_util.go +++ b/go/test/endtoend/cluster/cluster_util.go @@ -94,7 +94,7 @@ func GetPrimaryPosition(t *testing.T, vttablet Vttablet, hostname string) (strin // VerifyRowsInTabletForTable verifies the total number of rows in a table. // This is used to check that replication has caught up with the changes on primary. func VerifyRowsInTabletForTable(t *testing.T, vttablet *Vttablet, ksName string, expectedRows int, tableName string) { - timeout := time.Now().Add(10 * time.Second) + timeout := time.Now().Add(1 * time.Minute) for time.Now().Before(timeout) { // ignoring the error check, if the newly created table is not replicated, then there might be error and we should ignore it // but eventually it will catch up and if not caught up in required time, testcase will fail diff --git a/go/test/endtoend/cluster/vtorc_process.go b/go/test/endtoend/cluster/vtorc_process.go index ed7cc1572b5..14f475fa48c 100644 --- a/go/test/endtoend/cluster/vtorc_process.go +++ b/go/test/endtoend/cluster/vtorc_process.go @@ -112,6 +112,8 @@ func (orc *VTOrcProcess) Setup() (err error) { // This parameter is overriden from the config file, added here to just verify that we indeed use the config file paramter over the flag "--recovery-period-block-duration", "10h", "--instance-poll-time", "1s", + // Faster topo information refresh speeds up the tests. This doesn't add any significant load either + "--topo-information-refresh-duration", "3s", "--orc_web_dir", path.Join(os.Getenv("VTROOT"), "web", "vtorc"), ) if *isCoverage { diff --git a/go/test/endtoend/recovery/pitr/shardedpitr_test.go b/go/test/endtoend/recovery/pitr/shardedpitr_test.go index a8aa20af66d..6ae2e72b1a9 100644 --- a/go/test/endtoend/recovery/pitr/shardedpitr_test.go +++ b/go/test/endtoend/recovery/pitr/shardedpitr_test.go @@ -299,13 +299,13 @@ func performResharding(t *testing.T) { require.NoError(t, err) } - err = clusterInstance.VtctlclientProcess.ExecuteCommand("Reshard", "--", "--v1", "ks.reshardWorkflow", "0", "-80,80-") + err = clusterInstance.VtctlclientProcess.ExecuteCommand("Reshard", "--", "--v1", "ks.reshardWorkflow", "0", "--", "-80,80-") require.NoError(t, err) - err = clusterInstance.VtctlclientProcess.ExecuteCommand("SwitchReads", "--", "--tablet_type=rdonly", "ks.reshardWorkflow") + err = clusterInstance.VtctlclientProcess.ExecuteCommand("SwitchReads", "--", "--tablet_types=rdonly", "ks.reshardWorkflow") require.NoError(t, err) - err = clusterInstance.VtctlclientProcess.ExecuteCommand("SwitchReads", "--", "--tablet_type=replica", "ks.reshardWorkflow") + err = clusterInstance.VtctlclientProcess.ExecuteCommand("SwitchReads", "--", "--tablet_types=replica", "ks.reshardWorkflow") require.NoError(t, err) // then serve primary from the split shards diff --git a/go/test/endtoend/recovery/pitrtls/shardedpitr_tls_test.go b/go/test/endtoend/recovery/pitrtls/shardedpitr_tls_test.go index f323333ce1e..ab0020d3734 100644 --- a/go/test/endtoend/recovery/pitrtls/shardedpitr_tls_test.go +++ b/go/test/endtoend/recovery/pitrtls/shardedpitr_tls_test.go @@ -418,7 +418,7 @@ func tlsPerformResharding(t *testing.T) { require.NoError(t, err) } - err = clusterInstance.VtctlclientProcess.ExecuteCommand("Reshard", "ks.reshardWorkflow", "0", "-80,80-") + err = clusterInstance.VtctlclientProcess.ExecuteCommand("Reshard", "ks.reshardWorkflow", "0", "--", "-80,80-") require.NoError(t, err) err = clusterInstance.VtctlclientProcess.ExecuteCommand("SwitchReads", "--", "--tablet_type=rdonly", "ks.reshardWorkflow") diff --git a/go/test/endtoend/vreplication/vreplication_test.go b/go/test/endtoend/vreplication/vreplication_test.go index aa12d0998cc..40e34bbfce4 100644 --- a/go/test/endtoend/vreplication/vreplication_test.go +++ b/go/test/endtoend/vreplication/vreplication_test.go @@ -841,7 +841,7 @@ func reshard(t *testing.T, ksName string, tableName string, workflow string, sou t.Fatal(err) } } - if err := vc.VtctlClient.ExecuteCommand("Reshard", "--", "--v1", "--cells="+sourceCellOrAlias, "--tablet_types=replica,primary", ksWorkflow, sourceShards, targetShards); err != nil { + if err := vc.VtctlClient.ExecuteCommand("Reshard", "--", "--v1", "--cells="+sourceCellOrAlias, "--tablet_types=replica,primary", ksWorkflow, "--", sourceShards, targetShards); err != nil { t.Fatalf("Reshard command failed with %+v\n", err) } tablets := vc.getVttabletsInKeyspace(t, defaultCell, ksName, "primary") @@ -1191,7 +1191,7 @@ func applyVSchema(t *testing.T, vschema, keyspace string) { } func switchReadsDryRun(t *testing.T, cells, ksWorkflow string, dryRunResults []string) { - output, err := vc.VtctlClient.ExecuteCommandWithOutput("SwitchReads", "--", "--cells="+cells, "--tablet_type=replica", "--dry_run", ksWorkflow) + output, err := vc.VtctlClient.ExecuteCommandWithOutput("SwitchReads", "--", "--cells="+cells, "--tablet_types=replica", "--dry_run", ksWorkflow) require.NoError(t, err, fmt.Sprintf("SwitchReads DryRun Error: %s: %s", err, output)) validateDryRunResults(t, output, dryRunResults) } @@ -1199,9 +1199,9 @@ func switchReadsDryRun(t *testing.T, cells, ksWorkflow string, dryRunResults []s func switchReads(t *testing.T, cells, ksWorkflow string) { var output string var err error - output, err = vc.VtctlClient.ExecuteCommandWithOutput("SwitchReads", "--", "--cells="+cells, "--tablet_type=rdonly", ksWorkflow) + output, err = vc.VtctlClient.ExecuteCommandWithOutput("SwitchReads", "--", "--cells="+cells, "--tablet_types=rdonly", ksWorkflow) require.NoError(t, err, fmt.Sprintf("SwitchReads Error: %s: %s", err, output)) - output, err = vc.VtctlClient.ExecuteCommandWithOutput("SwitchReads", "--", "--cells="+cells, "--tablet_type=replica", ksWorkflow) + output, err = vc.VtctlClient.ExecuteCommandWithOutput("SwitchReads", "--", "--cells="+cells, "--tablet_types=replica", ksWorkflow) require.NoError(t, err, fmt.Sprintf("SwitchReads Error: %s: %s", err, output)) } diff --git a/go/test/endtoend/vtctldweb/vtctld_web_test.go b/go/test/endtoend/vtctldweb/vtctld_web_test.go index 8c798c0bdea..fed8a98320f 100644 --- a/go/test/endtoend/vtctldweb/vtctld_web_test.go +++ b/go/test/endtoend/vtctldweb/vtctld_web_test.go @@ -120,11 +120,11 @@ func TestCreateKs(t *testing.T) { case 0: err := ele.SendKeys("test_keyspace3") require.Nil(t, err) - assertDialogCommand(t, dialog, []string{"CreateKeyspace", "-force=false", "test_keyspace3"}) + assertDialogCommand(t, dialog, []string{"CreateKeyspace", "--force=false", "test_keyspace3"}) } } - assertDialogCommand(t, dialog, []string{"CreateKeyspace", "-force=false", "test_keyspace3"}) + assertDialogCommand(t, dialog, []string{"CreateKeyspace", "--force=false", "test_keyspace3"}) create, err := dialog.FindElement(selenium.ByID, "vt-action") require.Nil(t, err) @@ -195,14 +195,14 @@ func TestDashboardValidate(t *testing.T) { dialog, err := dashboardContent.FindElement(selenium.ByTagName, "vt-dialog") require.Nil(t, err) - assertDialogCommand(t, dialog, []string{"Validate", "-ping-tablets=false"}) + assertDialogCommand(t, dialog, []string{"Validate", "--ping-tablets=false"}) checkBoxes, err := dialog.FindElements(selenium.ByClassName, "md-checkbox-inner-container") require.Nil(t, err) click(t, checkBoxes[0]) - assertDialogCommand(t, dialog, []string{"Validate", "-ping-tablets"}) + assertDialogCommand(t, dialog, []string{"Validate", "--ping-tablets"}) validate, err := dialog.FindElement(selenium.ByID, "vt-action") require.Nil(t, err) diff --git a/go/test/endtoend/vtgate/schema/schema_test.go b/go/test/endtoend/vtgate/schema/schema_test.go index a452f66b2b5..38cc74514df 100644 --- a/go/test/endtoend/vtgate/schema/schema_test.go +++ b/go/test/endtoend/vtgate/schema/schema_test.go @@ -230,7 +230,7 @@ func testDropNonExistentTables(t *testing.T) { func testCreateInvalidView(t *testing.T) { for _, ddlStrategy := range []string{"direct", "direct -allow-zero-in-date"} { createInvalidView := "CREATE OR REPLACE VIEW invalid_view AS SELECT * FROM nonexistent_table;" - output, err := clusterInstance.VtctlclientProcess.ExecuteCommandWithOutput("ApplySchema", "--", "-skip_preflight", "-ddl_strategy", ddlStrategy, "--sql", createInvalidView, keyspaceName) + output, err := clusterInstance.VtctlclientProcess.ExecuteCommandWithOutput("ApplySchema", "--", "--skip_preflight", "--ddl_strategy", ddlStrategy, "--sql", createInvalidView, keyspaceName) require.Error(t, err) assert.Contains(t, output, "doesn't exist (errno 1146)") } diff --git a/go/test/endtoend/vtorc/readtopologyinstance/main_test.go b/go/test/endtoend/vtorc/readtopologyinstance/main_test.go index 0eaa4cdff35..c6426021d6c 100644 --- a/go/test/endtoend/vtorc/readtopologyinstance/main_test.go +++ b/go/test/endtoend/vtorc/readtopologyinstance/main_test.go @@ -17,20 +17,20 @@ limitations under the License. package readtopologyinstance import ( - "flag" "fmt" + "os" "testing" "time" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/vtorc/utils" + "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/inst" "vitess.io/vitess/go/vt/vtorc/server" _ "github.com/go-sql-driver/mysql" _ "github.com/mattn/go-sqlite3" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -42,13 +42,19 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { }() keyspace := &clusterInfo.ClusterInstance.Keyspaces[0] shard0 := &keyspace.Shards[0] + oldArgs := os.Args + defer func() { + // Restore the old args after the test + os.Args = oldArgs + }() - err := flag.Set("topo_global_server_address", clusterInfo.ClusterInstance.VtctlProcess.TopoGlobalAddress) - require.NoError(t, err) - err = flag.Set("topo_implementation", clusterInfo.ClusterInstance.VtctlProcess.TopoImplementation) - require.NoError(t, err) - err = flag.Set("topo_global_root", clusterInfo.ClusterInstance.VtctlProcess.TopoGlobalRoot) - require.NoError(t, err) + // Change the args such that they match how we would invoke VTOrc + os.Args = []string{"vtorc", + "--topo_global_server_address", clusterInfo.ClusterInstance.VtctlProcess.TopoGlobalAddress, + "--topo_implementation", clusterInfo.ClusterInstance.VtctlProcess.TopoImplementation, + "--topo_global_root", clusterInfo.ClusterInstance.VtctlProcess.TopoGlobalRoot, + } + servenv.ParseFlags("vtorc") config.Config.RecoveryPeriodBlockSeconds = 1 config.Config.InstancePollSeconds = 1 config.MarkConfigurationLoaded() @@ -73,7 +79,7 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { assert.Contains(t, primaryInstance.InstanceAlias, "zone1") assert.NotEqual(t, 0, primaryInstance.ServerID) assert.Greater(t, len(primaryInstance.ServerUUID), 10) - assert.Contains(t, primaryInstance.Version, "5.7") + assert.Regexp(t, "[58].[70].*", primaryInstance.Version) assert.NotEmpty(t, primaryInstance.VersionComment) assert.False(t, primaryInstance.ReadOnly) assert.True(t, primaryInstance.LogBinEnabled) @@ -112,7 +118,7 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { assert.Contains(t, replicaInstance.InstanceAlias, "zone1") assert.NotEqual(t, 0, replicaInstance.ServerID) assert.Greater(t, len(replicaInstance.ServerUUID), 10) - assert.Contains(t, replicaInstance.Version, "5.7") + assert.Regexp(t, "[58].[70].*", replicaInstance.Version) assert.NotEmpty(t, replicaInstance.VersionComment) assert.True(t, replicaInstance.ReadOnly) assert.True(t, replicaInstance.LogBinEnabled) diff --git a/go/vt/dbconfigs/credentials.go b/go/vt/dbconfigs/credentials.go index 1ed3928d008..1f0a0bbb0e2 100644 --- a/go/vt/dbconfigs/credentials.go +++ b/go/vt/dbconfigs/credentials.go @@ -33,32 +33,38 @@ import ( "time" vaultapi "github.com/aquarapid/vaultlib" + "github.com/spf13/pflag" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/servenv" ) var ( - // generic flags - dbCredentialsServer = flag.String("db-credentials-server", "file", "db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation)") - - // 'file' implementation flags - dbCredentialsFile = flag.String("db-credentials-file", "", "db credentials file; send SIGHUP to reload this file") - - // 'vault' implementation flags - vaultAddr = flag.String("db-credentials-vault-addr", "", "URL to Vault server") - vaultTimeout = flag.Duration("db-credentials-vault-timeout", 10*time.Second, "Timeout for vault API operations") - vaultCACert = flag.String("db-credentials-vault-tls-ca", "", "Path to CA PEM for validating Vault server certificate") - vaultPath = flag.String("db-credentials-vault-path", "", "Vault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds") - vaultCacheTTL = flag.Duration("db-credentials-vault-ttl", 30*time.Minute, "How long to cache DB credentials from the Vault server") - vaultTokenFile = flag.String("db-credentials-vault-tokenfile", "", "Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable") - vaultRoleID = flag.String("db-credentials-vault-roleid", "", "Vault AppRole id; can also be passed using VAULT_ROLEID environment variable") - vaultRoleSecretIDFile = flag.String("db-credentials-vault-role-secretidfile", "", "Path to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable") - vaultRoleMountPoint = flag.String("db-credentials-vault-role-mountpoint", "approle", "Vault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable") + dbCredentialsServer = "file" + dbCredentialsFile string + vaultAddr string + vaultTimeout = 10 * time.Second + vaultCACert string + vaultPath string + vaultCacheTTL = 30 * time.Minute + vaultTokenFile string + vaultRoleID string + vaultRoleSecretIDFile string + vaultRoleMountPoint = "approle" // ErrUnknownUser is returned by credential server when the // user doesn't exist ErrUnknownUser = errors.New("unknown user") + + cmdsWithDBCredentials = []string{ + "mysqlctl", + "mysqlctld", + "vtbackup", + "vtcombo", + "vtgr", + "vttablet", + } ) // CredentialsServer is the interface for a credential server @@ -76,12 +82,55 @@ type CredentialsServer interface { // been parsed. var AllCredentialsServers = make(map[string]CredentialsServer) +func init() { + AllCredentialsServers["file"] = &FileCredentialsServer{} + AllCredentialsServers["vault"] = &VaultCredentialsServer{} + + sigChan := make(chan os.Signal, 1) + signal.Notify(sigChan, syscall.SIGHUP) + go func() { + for range sigChan { + if fcs, ok := AllCredentialsServers["file"].(*FileCredentialsServer); ok { + fcs.mu.Lock() + fcs.dbCredentials = nil + fcs.mu.Unlock() + } + if vcs, ok := AllCredentialsServers["vault"].(*VaultCredentialsServer); ok { + vcs.mu.Lock() + vcs.dbCredsCache = nil + vcs.mu.Unlock() + } + } + }() + + for _, cmd := range cmdsWithDBCredentials { + servenv.OnParseFor(cmd, func(fs *pflag.FlagSet) { + // generic flags + fs.StringVar(&dbCredentialsServer, "db-credentials-server", dbCredentialsServer, "db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation)") + + // 'file' implementation flags + fs.StringVar(&dbCredentialsFile, "db-credentials-file", dbCredentialsFile, "db credentials file; send SIGHUP to reload this file") + + // 'vault' implementation flags + flag.StringVar(&vaultAddr, "db-credentials-vault-addr", vaultAddr, "URL to Vault server") + flag.DurationVar(&vaultTimeout, "db-credentials-vault-timeout", vaultTimeout, "Timeout for vault API operations") + flag.StringVar(&vaultCACert, "db-credentials-vault-tls-ca", vaultCACert, "Path to CA PEM for validating Vault server certificate") + flag.StringVar(&vaultPath, "db-credentials-vault-path", vaultPath, "Vault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds") + flag.DurationVar(&vaultCacheTTL, "db-credentials-vault-ttl", vaultCacheTTL, "How long to cache DB credentials from the Vault server") + flag.StringVar(&vaultTokenFile, "db-credentials-vault-tokenfile", vaultTokenFile, "Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable") + flag.StringVar(&vaultRoleID, "db-credentials-vault-roleid", vaultRoleID, "Vault AppRole id; can also be passed using VAULT_ROLEID environment variable") + flag.StringVar(&vaultRoleSecretIDFile, "db-credentials-vault-role-secretidfile", vaultRoleSecretIDFile, "Path to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable") + flag.StringVar(&vaultRoleMountPoint, "db-credentials-vault-role-mountpoint", vaultRoleMountPoint, "Vault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable") + }) + } +} + // GetCredentialsServer returns the current CredentialsServer. Only valid // after flag.Init was called. func GetCredentialsServer() CredentialsServer { - cs, ok := AllCredentialsServers[*dbCredentialsServer] + cs, ok := AllCredentialsServers[dbCredentialsServer] if !ok { - log.Exitf("Invalid credential server: %v", *dbCredentialsServer) + log.Exitf("Invalid credential server: %v", dbCredentialsServer) } return cs } @@ -110,7 +159,7 @@ func (fcs *FileCredentialsServer) GetUserAndPassword(user string) (string, strin fcs.mu.Lock() defer fcs.mu.Unlock() - if *dbCredentialsFile == "" { + if dbCredentialsFile == "" { return "", "", ErrUnknownUser } @@ -118,14 +167,14 @@ func (fcs *FileCredentialsServer) GetUserAndPassword(user string) (string, strin if fcs.dbCredentials == nil { fcs.dbCredentials = make(map[string][]string) - data, err := os.ReadFile(*dbCredentialsFile) + data, err := os.ReadFile(dbCredentialsFile) if err != nil { - log.Warningf("Failed to read dbCredentials file: %v", *dbCredentialsFile) + log.Warningf("Failed to read dbCredentials file: %v", dbCredentialsFile) return "", "", err } if err = json.Unmarshal(data, &fcs.dbCredentials); err != nil { - log.Warningf("Failed to parse dbCredentials file: %v", *dbCredentialsFile) + log.Warningf("Failed to parse dbCredentials file: %v", dbCredentialsFile) return "", "", err } } @@ -143,7 +192,7 @@ func (vcs *VaultCredentialsServer) GetUserAndPassword(user string) (string, stri defer vcs.mu.Unlock() if vcs.vaultCacheExpireTicker == nil { - vcs.vaultCacheExpireTicker = time.NewTicker(*vaultCacheTTL) + vcs.vaultCacheExpireTicker = time.NewTicker(vaultCacheTTL) go func() { for range vcs.vaultCacheExpireTicker.C { if vcs, ok := AllCredentialsServers["vault"].(*VaultCredentialsServer); ok { @@ -161,15 +210,15 @@ func (vcs *VaultCredentialsServer) GetUserAndPassword(user string) (string, stri return user, vcs.dbCredsCache[user][0], nil } - if *vaultAddr == "" { + if vaultAddr == "" { return "", "", errors.New("No Vault server specified") } - token, err := readFromFile(*vaultTokenFile) + token, err := readFromFile(vaultTokenFile) if err != nil { return "", "", errors.New("No Vault token in provided filename") } - secretID, err := readFromFile(*vaultRoleSecretIDFile) + secretID, err := readFromFile(vaultRoleSecretIDFile) if err != nil { return "", "", errors.New("No Vault secret_id in provided filename") } @@ -182,25 +231,25 @@ func (vcs *VaultCredentialsServer) GetUserAndPassword(user string) (string, stri // All these can be overriden by environment // so we need to check if they have been set by NewConfig if config.Address == "" { - config.Address = *vaultAddr + config.Address = vaultAddr } if config.Timeout == (0 * time.Second) { - config.Timeout = *vaultTimeout + config.Timeout = vaultTimeout } if config.CACert == "" { - config.CACert = *vaultCACert + config.CACert = vaultCACert } if config.Token == "" { config.Token = token } if config.AppRoleCredentials.RoleID == "" { - config.AppRoleCredentials.RoleID = *vaultRoleID + config.AppRoleCredentials.RoleID = vaultRoleID } if config.AppRoleCredentials.SecretID == "" { config.AppRoleCredentials.SecretID = secretID } if config.AppRoleCredentials.MountPoint == "" { - config.AppRoleCredentials.MountPoint = *vaultRoleMountPoint + config.AppRoleCredentials.MountPoint = vaultRoleMountPoint } if config.CACert != "" { @@ -217,7 +266,7 @@ func (vcs *VaultCredentialsServer) GetUserAndPassword(user string) (string, stri } } - secret, err := vcs.vaultClient.GetSecret(*vaultPath) + secret, err := vcs.vaultClient.GetSecret(vaultPath) if err != nil { log.Errorf("Error in Vault server params: %v", err) return "", "", ErrUnknownUser @@ -272,25 +321,3 @@ func withCredentials(cp *mysql.ConnParams) (*mysql.ConnParams, error) { } return &result, err } - -func init() { - AllCredentialsServers["file"] = &FileCredentialsServer{} - AllCredentialsServers["vault"] = &VaultCredentialsServer{} - - sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, syscall.SIGHUP) - go func() { - for range sigChan { - if fcs, ok := AllCredentialsServers["file"].(*FileCredentialsServer); ok { - fcs.mu.Lock() - fcs.dbCredentials = nil - fcs.mu.Unlock() - } - if vcs, ok := AllCredentialsServers["vault"].(*VaultCredentialsServer); ok { - vcs.mu.Lock() - vcs.dbCredsCache = nil - vcs.mu.Unlock() - } - } - }() -} diff --git a/go/vt/dbconfigs/dbconfigs.go b/go/vt/dbconfigs/dbconfigs.go index 250c54a46f6..5ab5e7a9356 100644 --- a/go/vt/dbconfigs/dbconfigs.go +++ b/go/vt/dbconfigs/dbconfigs.go @@ -23,8 +23,10 @@ package dbconfigs import ( "context" "encoding/json" - "flag" + "github.com/spf13/pflag" + + "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vttls" "vitess.io/vitess/go/mysql" @@ -49,7 +51,7 @@ const ( ) var ( - // GlobalDBConfigs contains the initial values of dbconfgis from flags. + // GlobalDBConfigs contains the initial values of dbconfigs from flags. GlobalDBConfigs DBConfigs // All can be used to register all flags: RegisterFlags(All...) @@ -113,64 +115,47 @@ type UserConfig struct { UseTCP bool `json:"useTcp,omitempty"` } -// RegisterFlags registers the flags for the given DBConfigFlag. -// For instance, vttablet will register client, dba and repl. -// Returns all registered flags. +// RegisterFlags registers the base DBFlags, credentials flags, and the user +// specific ones for the specified system users for the requesting command. +// For instance, the vttablet command will register flags for all users +// as defined in the dbconfigs.All variable. func RegisterFlags(userKeys ...string) { - registerBaseFlags() - for _, userKey := range userKeys { - uc, cp := GlobalDBConfigs.getParams(userKey, &GlobalDBConfigs) - registerPerUserFlags(userKey, uc, cp) - } -} - -func registerBaseFlags() { - flag.StringVar(&GlobalDBConfigs.Socket, "db_socket", "", "The unix socket to connect on. If this is specified, host and port will not be used.") - flag.StringVar(&GlobalDBConfigs.Host, "db_host", "", "The host name for the tcp connection.") - flag.IntVar(&GlobalDBConfigs.Port, "db_port", 0, "tcp port") - flag.StringVar(&GlobalDBConfigs.Charset, "db_charset", "utf8mb4", "Character set used for this tablet.") - flag.Uint64Var(&GlobalDBConfigs.Flags, "db_flags", 0, "Flag values as defined by MySQL.") - flag.StringVar(&GlobalDBConfigs.Flavor, "db_flavor", "", "Flavor overrid. Valid value is FilePos.") - flag.Var(&GlobalDBConfigs.SslMode, "db_ssl_mode", "SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity.") - flag.StringVar(&GlobalDBConfigs.SslCa, "db_ssl_ca", "", "connection ssl ca") - flag.StringVar(&GlobalDBConfigs.SslCaPath, "db_ssl_ca_path", "", "connection ssl ca path") - flag.StringVar(&GlobalDBConfigs.SslCert, "db_ssl_cert", "", "connection ssl certificate") - flag.StringVar(&GlobalDBConfigs.SslKey, "db_ssl_key", "", "connection ssl key") - flag.StringVar(&GlobalDBConfigs.TLSMinVersion, "db_tls_min_version", "", "Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3.") - flag.StringVar(&GlobalDBConfigs.ServerName, "db_server_name", "", "server name of the DB we are connecting to.") - flag.IntVar(&GlobalDBConfigs.ConnectTimeoutMilliseconds, "db_connect_timeout_ms", 0, "connection timeout to mysqld in milliseconds (0 for no timeout)") - flag.BoolVar(&GlobalDBConfigs.EnableQueryInfo, "db_conn_query_info", false, "enable parsing and processing of QUERY_OK info fields") + servenv.OnParse(func(fs *pflag.FlagSet) { + registerBaseFlags(fs) + for _, userKey := range userKeys { + uc, cp := GlobalDBConfigs.getParams(userKey, &GlobalDBConfigs) + registerPerUserFlags(fs, userKey, uc, cp) + } + }) +} + +func registerBaseFlags(fs *pflag.FlagSet) { + fs.StringVar(&GlobalDBConfigs.Socket, "db_socket", "", "The unix socket to connect on. If this is specified, host and port will not be used.") + fs.StringVar(&GlobalDBConfigs.Host, "db_host", "", "The host name for the tcp connection.") + fs.IntVar(&GlobalDBConfigs.Port, "db_port", 0, "tcp port") + fs.StringVar(&GlobalDBConfigs.Charset, "db_charset", "utf8mb4", "Character set used for this tablet.") + fs.Uint64Var(&GlobalDBConfigs.Flags, "db_flags", 0, "Flag values as defined by MySQL.") + fs.StringVar(&GlobalDBConfigs.Flavor, "db_flavor", "", "Flavor overrid. Valid value is FilePos.") + fs.Var(&GlobalDBConfigs.SslMode, "db_ssl_mode", "SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity.") + fs.StringVar(&GlobalDBConfigs.SslCa, "db_ssl_ca", "", "connection ssl ca") + fs.StringVar(&GlobalDBConfigs.SslCaPath, "db_ssl_ca_path", "", "connection ssl ca path") + fs.StringVar(&GlobalDBConfigs.SslCert, "db_ssl_cert", "", "connection ssl certificate") + fs.StringVar(&GlobalDBConfigs.SslKey, "db_ssl_key", "", "connection ssl key") + fs.StringVar(&GlobalDBConfigs.TLSMinVersion, "db_tls_min_version", "", "Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3.") + fs.StringVar(&GlobalDBConfigs.ServerName, "db_server_name", "", "server name of the DB we are connecting to.") + fs.IntVar(&GlobalDBConfigs.ConnectTimeoutMilliseconds, "db_connect_timeout_ms", 0, "connection timeout to mysqld in milliseconds (0 for no timeout)") + fs.BoolVar(&GlobalDBConfigs.EnableQueryInfo, "db_conn_query_info", false, "enable parsing and processing of QUERY_OK info fields") } // The flags will change the global singleton -// TODO(sougou): deprecate the legacy flags. -func registerPerUserFlags(userKey string, uc *UserConfig, cp *mysql.ConnParams) { +func registerPerUserFlags(fs *pflag.FlagSet, userKey string, uc *UserConfig, cp *mysql.ConnParams) { newUserFlag := "db_" + userKey + "_user" - flag.StringVar(&uc.User, "db-config-"+userKey+"-uname", "vt_"+userKey, "deprecated: use "+newUserFlag) - flag.StringVar(&uc.User, newUserFlag, "vt_"+userKey, "db "+userKey+" user userKey") + fs.StringVar(&uc.User, newUserFlag, "vt_"+userKey, "db "+userKey+" user userKey") newPasswordFlag := "db_" + userKey + "_password" - flag.StringVar(&uc.Password, "db-config-"+userKey+"-pass", "", "db "+userKey+" deprecated: use "+newPasswordFlag) - flag.StringVar(&uc.Password, newPasswordFlag, "", "db "+userKey+" password") - - flag.BoolVar(&uc.UseSSL, "db_"+userKey+"_use_ssl", true, "Set this flag to false to make the "+userKey+" connection to not use ssl") - - flag.StringVar(&cp.Host, "db-config-"+userKey+"-host", "", "deprecated: use db_host") - flag.IntVar(&cp.Port, "db-config-"+userKey+"-port", 0, "deprecated: use db_port") - flag.StringVar(&cp.UnixSocket, "db-config-"+userKey+"-unixsocket", "", "deprecated: use db_socket") - flag.StringVar(&cp.Charset, "db-config-"+userKey+"-charset", "utf8mb4", "deprecated: use db_charset") - flag.Uint64Var(&cp.Flags, "db-config-"+userKey+"-flags", 0, "deprecated: use db_flags") - flag.StringVar(&cp.SslCa, "db-config-"+userKey+"-ssl-ca", "", "deprecated: use db_ssl_ca") - flag.StringVar(&cp.SslCaPath, "db-config-"+userKey+"-ssl-ca-path", "", "deprecated: use db_ssl_ca_path") - flag.StringVar(&cp.SslCert, "db-config-"+userKey+"-ssl-cert", "", "deprecated: use db_ssl_cert") - flag.StringVar(&cp.SslKey, "db-config-"+userKey+"-ssl-key", "", "deprecated: use db_ssl_key") - flag.StringVar(&cp.ServerName, "db-config-"+userKey+"-server_name", "", "deprecated: use db_server_name") - flag.StringVar(&cp.Flavor, "db-config-"+userKey+"-flavor", "", "deprecated: use db_flavor") - - if userKey == ExternalRepl { - flag.StringVar(&cp.DeprecatedDBName, "db-config-"+userKey+"-dbname", "", "deprecated: dbname does not need to be explicitly configured") - } + fs.StringVar(&uc.Password, newPasswordFlag, "", "db "+userKey+" password") + fs.BoolVar(&uc.UseSSL, "db_"+userKey+"_use_ssl", true, "Set this flag to false to make the "+userKey+" connection to not use ssl") } // Connector contains Connection Parameters for mysql connection diff --git a/go/vt/dbconfigs/dbconfigs_test.go b/go/vt/dbconfigs/dbconfigs_test.go index 1d415a4e5ce..a97f2526c17 100644 --- a/go/vt/dbconfigs/dbconfigs_test.go +++ b/go/vt/dbconfigs/dbconfigs_test.go @@ -264,8 +264,8 @@ func TestCredentialsFileHUP(t *testing.T) { t.Fatalf("couldn't create temp file: %v", err) } defer os.Remove(tmpFile.Name()) - *dbCredentialsFile = tmpFile.Name() - *dbCredentialsServer = "file" + dbCredentialsFile = tmpFile.Name() + dbCredentialsServer = "file" oldStr := "str1" jsonConfig := fmt.Sprintf("{\"%s\": [\"%s\"]}", oldStr, oldStr) if err := os.WriteFile(tmpFile.Name(), []byte(jsonConfig), 0600); err != nil { diff --git a/go/vt/discovery/tablet_picker.go b/go/vt/discovery/tablet_picker.go index 225b3c50b7e..cb0449c6191 100644 --- a/go/vt/discovery/tablet_picker.go +++ b/go/vt/discovery/tablet_picker.go @@ -172,7 +172,7 @@ func (tp *TabletPicker) GetMatchingTablets(ctx context.Context) []*topo.TabletIn // Since there is only one primary, we ignore cell and find the primary aliases := make([]*topodatapb.TabletAlias, 0) if len(tp.tabletTypes) == 1 && tp.tabletTypes[0] == topodatapb.TabletType_PRIMARY { - shortCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() si, err := tp.ts.GetShard(shortCtx, tp.keyspace, tp.shard) if err != nil { @@ -185,12 +185,12 @@ func (tp *TabletPicker) GetMatchingTablets(ctx context.Context) []*topo.TabletIn for _, cell := range tp.cells { // check if cell is actually an alias // non-blocking read so that this is fast - shortCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() _, err := tp.ts.GetCellInfo(shortCtx, cell, false) if err != nil { // not a valid cell, check whether it is a cell alias - shortCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() alias, err := tp.ts.GetCellsAlias(shortCtx, cell, false) // if we get an error, either cellAlias doesn't exist or it isn't a cell alias at all. Ignore and continue @@ -205,7 +205,7 @@ func (tp *TabletPicker) GetMatchingTablets(ctx context.Context) []*topo.TabletIn } } for _, cell := range actualCells { - shortCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() // match cell, keyspace and shard sri, err := tp.ts.GetShardReplication(shortCtx, cell, tp.keyspace, tp.shard) @@ -222,7 +222,7 @@ func (tp *TabletPicker) GetMatchingTablets(ctx context.Context) []*topo.TabletIn if len(aliases) == 0 { return nil } - shortCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() tabletMap, err := tp.ts.GetTabletMap(shortCtx, aliases) if err != nil { diff --git a/go/vt/mysqlctl/backup.go b/go/vt/mysqlctl/backup.go index c6d791bed7e..63868bf48ac 100644 --- a/go/vt/mysqlctl/backup.go +++ b/go/vt/mysqlctl/backup.go @@ -97,7 +97,7 @@ var ( ) func init() { - for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} { + for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtbackup", "vtctld", "vtctldclient", "vtexplain"} { servenv.OnParseFor(cmd, registerBackupFlags) } } diff --git a/go/vt/mysqlctl/backupengine.go b/go/vt/mysqlctl/backupengine.go index 9b2c671a5d4..dceb34e3d40 100644 --- a/go/vt/mysqlctl/backupengine.go +++ b/go/vt/mysqlctl/backupengine.go @@ -112,7 +112,7 @@ type BackupRestoreEngine interface { var BackupRestoreEngineMap = make(map[string]BackupRestoreEngine) func init() { - for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} { + for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain", "vtbackup"} { servenv.OnParseFor(cmd, registerBackupEngineFlags) } } diff --git a/go/vt/mysqlctl/builtinbackupengine.go b/go/vt/mysqlctl/builtinbackupengine.go index b5e5652cda9..09323c9387b 100644 --- a/go/vt/mysqlctl/builtinbackupengine.go +++ b/go/vt/mysqlctl/builtinbackupengine.go @@ -269,7 +269,7 @@ func (be *BuiltinBackupEngine) ExecuteBackup(ctx context.Context, params BackupP // the saved replicationPosition before proceeding tmc := tmclient.NewTabletManagerClient() defer tmc.Close() - remoteCtx, remoteCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + remoteCtx, remoteCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer remoteCancel() pos, err := getPrimaryPosition(remoteCtx, tmc, params.TopoServer, params.Keyspace, params.Shard) diff --git a/go/vt/mysqlctl/s3backupstorage/s3.go b/go/vt/mysqlctl/s3backupstorage/s3.go index 8dc3bc33dcd..75f3a5d3eb5 100644 --- a/go/vt/mysqlctl/s3backupstorage/s3.go +++ b/go/vt/mysqlctl/s3backupstorage/s3.go @@ -288,7 +288,7 @@ func (bs *S3BackupStorage) ListBackups(ctx context.Context, dir string) ([]backu } else { searchPrefix = objName(dir, "") } - log.Infof("objName: %v", searchPrefix) + log.Infof("objName: %v", *searchPrefix) query := &s3.ListObjectsV2Input{ Bucket: &bucket, diff --git a/go/vt/mysqlctl/xtrabackupengine.go b/go/vt/mysqlctl/xtrabackupengine.go index 55f913630d2..d0d131e3cee 100644 --- a/go/vt/mysqlctl/xtrabackupengine.go +++ b/go/vt/mysqlctl/xtrabackupengine.go @@ -105,7 +105,7 @@ type xtraBackupManifest struct { } func init() { - for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} { + for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vtbackup", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} { servenv.OnParseFor(cmd, registerXtraBackupEngineFlags) } } diff --git a/go/vt/proto/vtadmin/vtadmin.pb.go b/go/vt/proto/vtadmin/vtadmin.pb.go index c9f075b54c9..45f93931a61 100644 --- a/go/vt/proto/vtadmin/vtadmin.pb.go +++ b/go/vt/proto/vtadmin/vtadmin.pb.go @@ -2081,6 +2081,61 @@ func (x *GetClustersResponse) GetClusters() []*Cluster { return nil } +type GetFullStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` + Alias *topodata.TabletAlias `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` +} + +func (x *GetFullStatusRequest) Reset() { + *x = GetFullStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vtadmin_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFullStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFullStatusRequest) ProtoMessage() {} + +func (x *GetFullStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_vtadmin_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFullStatusRequest.ProtoReflect.Descriptor instead. +func (*GetFullStatusRequest) Descriptor() ([]byte, []int) { + return file_vtadmin_proto_rawDescGZIP(), []int{33} +} + +func (x *GetFullStatusRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +func (x *GetFullStatusRequest) GetAlias() *topodata.TabletAlias { + if x != nil { + return x.Alias + } + return nil +} + type GetGatesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2092,7 +2147,7 @@ type GetGatesRequest struct { func (x *GetGatesRequest) Reset() { *x = GetGatesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[33] + mi := &file_vtadmin_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2105,7 +2160,7 @@ func (x *GetGatesRequest) String() string { func (*GetGatesRequest) ProtoMessage() {} func (x *GetGatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[33] + mi := &file_vtadmin_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2118,7 +2173,7 @@ func (x *GetGatesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGatesRequest.ProtoReflect.Descriptor instead. func (*GetGatesRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{33} + return file_vtadmin_proto_rawDescGZIP(), []int{34} } func (x *GetGatesRequest) GetClusterIds() []string { @@ -2139,7 +2194,7 @@ type GetGatesResponse struct { func (x *GetGatesResponse) Reset() { *x = GetGatesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[34] + mi := &file_vtadmin_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2152,7 +2207,7 @@ func (x *GetGatesResponse) String() string { func (*GetGatesResponse) ProtoMessage() {} func (x *GetGatesResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[34] + mi := &file_vtadmin_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2165,7 +2220,7 @@ func (x *GetGatesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGatesResponse.ProtoReflect.Descriptor instead. func (*GetGatesResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{34} + return file_vtadmin_proto_rawDescGZIP(), []int{35} } func (x *GetGatesResponse) GetGates() []*VTGate { @@ -2187,7 +2242,7 @@ type GetKeyspaceRequest struct { func (x *GetKeyspaceRequest) Reset() { *x = GetKeyspaceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[35] + mi := &file_vtadmin_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2200,7 +2255,7 @@ func (x *GetKeyspaceRequest) String() string { func (*GetKeyspaceRequest) ProtoMessage() {} func (x *GetKeyspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[35] + mi := &file_vtadmin_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2213,7 +2268,7 @@ func (x *GetKeyspaceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeyspaceRequest.ProtoReflect.Descriptor instead. func (*GetKeyspaceRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{35} + return file_vtadmin_proto_rawDescGZIP(), []int{36} } func (x *GetKeyspaceRequest) GetClusterId() string { @@ -2241,7 +2296,7 @@ type GetKeyspacesRequest struct { func (x *GetKeyspacesRequest) Reset() { *x = GetKeyspacesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[36] + mi := &file_vtadmin_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2254,7 +2309,7 @@ func (x *GetKeyspacesRequest) String() string { func (*GetKeyspacesRequest) ProtoMessage() {} func (x *GetKeyspacesRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[36] + mi := &file_vtadmin_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2267,7 +2322,7 @@ func (x *GetKeyspacesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeyspacesRequest.ProtoReflect.Descriptor instead. func (*GetKeyspacesRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{36} + return file_vtadmin_proto_rawDescGZIP(), []int{37} } func (x *GetKeyspacesRequest) GetClusterIds() []string { @@ -2288,7 +2343,7 @@ type GetKeyspacesResponse struct { func (x *GetKeyspacesResponse) Reset() { *x = GetKeyspacesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[37] + mi := &file_vtadmin_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2301,7 +2356,7 @@ func (x *GetKeyspacesResponse) String() string { func (*GetKeyspacesResponse) ProtoMessage() {} func (x *GetKeyspacesResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[37] + mi := &file_vtadmin_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2314,7 +2369,7 @@ func (x *GetKeyspacesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeyspacesResponse.ProtoReflect.Descriptor instead. func (*GetKeyspacesResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{37} + return file_vtadmin_proto_rawDescGZIP(), []int{38} } func (x *GetKeyspacesResponse) GetKeyspaces() []*Keyspace { @@ -2338,7 +2393,7 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[38] + mi := &file_vtadmin_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2351,7 +2406,7 @@ func (x *GetSchemaRequest) String() string { func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[38] + mi := &file_vtadmin_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2364,7 +2419,7 @@ func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead. func (*GetSchemaRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{38} + return file_vtadmin_proto_rawDescGZIP(), []int{39} } func (x *GetSchemaRequest) GetClusterId() string { @@ -2407,7 +2462,7 @@ type GetSchemasRequest struct { func (x *GetSchemasRequest) Reset() { *x = GetSchemasRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[39] + mi := &file_vtadmin_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2420,7 +2475,7 @@ func (x *GetSchemasRequest) String() string { func (*GetSchemasRequest) ProtoMessage() {} func (x *GetSchemasRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[39] + mi := &file_vtadmin_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2433,7 +2488,7 @@ func (x *GetSchemasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemasRequest.ProtoReflect.Descriptor instead. func (*GetSchemasRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{39} + return file_vtadmin_proto_rawDescGZIP(), []int{40} } func (x *GetSchemasRequest) GetClusterIds() []string { @@ -2461,7 +2516,7 @@ type GetSchemasResponse struct { func (x *GetSchemasResponse) Reset() { *x = GetSchemasResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[40] + mi := &file_vtadmin_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2474,7 +2529,7 @@ func (x *GetSchemasResponse) String() string { func (*GetSchemasResponse) ProtoMessage() {} func (x *GetSchemasResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[40] + mi := &file_vtadmin_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2487,7 +2542,7 @@ func (x *GetSchemasResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemasResponse.ProtoReflect.Descriptor instead. func (*GetSchemasResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{40} + return file_vtadmin_proto_rawDescGZIP(), []int{41} } func (x *GetSchemasResponse) GetSchemas() []*Schema { @@ -2517,7 +2572,7 @@ type GetShardReplicationPositionsRequest struct { func (x *GetShardReplicationPositionsRequest) Reset() { *x = GetShardReplicationPositionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[41] + mi := &file_vtadmin_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2530,7 +2585,7 @@ func (x *GetShardReplicationPositionsRequest) String() string { func (*GetShardReplicationPositionsRequest) ProtoMessage() {} func (x *GetShardReplicationPositionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[41] + mi := &file_vtadmin_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2543,7 +2598,7 @@ func (x *GetShardReplicationPositionsRequest) ProtoReflect() protoreflect.Messag // Deprecated: Use GetShardReplicationPositionsRequest.ProtoReflect.Descriptor instead. func (*GetShardReplicationPositionsRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{41} + return file_vtadmin_proto_rawDescGZIP(), []int{42} } func (x *GetShardReplicationPositionsRequest) GetClusterIds() []string { @@ -2578,7 +2633,7 @@ type GetShardReplicationPositionsResponse struct { func (x *GetShardReplicationPositionsResponse) Reset() { *x = GetShardReplicationPositionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[42] + mi := &file_vtadmin_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2591,7 +2646,7 @@ func (x *GetShardReplicationPositionsResponse) String() string { func (*GetShardReplicationPositionsResponse) ProtoMessage() {} func (x *GetShardReplicationPositionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[42] + mi := &file_vtadmin_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2604,7 +2659,7 @@ func (x *GetShardReplicationPositionsResponse) ProtoReflect() protoreflect.Messa // Deprecated: Use GetShardReplicationPositionsResponse.ProtoReflect.Descriptor instead. func (*GetShardReplicationPositionsResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{42} + return file_vtadmin_proto_rawDescGZIP(), []int{43} } func (x *GetShardReplicationPositionsResponse) GetReplicationPositions() []*ClusterShardReplicationPosition { @@ -2626,7 +2681,7 @@ type GetSrvVSchemaRequest struct { func (x *GetSrvVSchemaRequest) Reset() { *x = GetSrvVSchemaRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[43] + mi := &file_vtadmin_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2639,7 +2694,7 @@ func (x *GetSrvVSchemaRequest) String() string { func (*GetSrvVSchemaRequest) ProtoMessage() {} func (x *GetSrvVSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[43] + mi := &file_vtadmin_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2652,7 +2707,7 @@ func (x *GetSrvVSchemaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSrvVSchemaRequest.ProtoReflect.Descriptor instead. func (*GetSrvVSchemaRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{43} + return file_vtadmin_proto_rawDescGZIP(), []int{44} } func (x *GetSrvVSchemaRequest) GetClusterId() string { @@ -2681,7 +2736,7 @@ type GetSrvVSchemasRequest struct { func (x *GetSrvVSchemasRequest) Reset() { *x = GetSrvVSchemasRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[44] + mi := &file_vtadmin_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2694,7 +2749,7 @@ func (x *GetSrvVSchemasRequest) String() string { func (*GetSrvVSchemasRequest) ProtoMessage() {} func (x *GetSrvVSchemasRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[44] + mi := &file_vtadmin_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2707,7 +2762,7 @@ func (x *GetSrvVSchemasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSrvVSchemasRequest.ProtoReflect.Descriptor instead. func (*GetSrvVSchemasRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{44} + return file_vtadmin_proto_rawDescGZIP(), []int{45} } func (x *GetSrvVSchemasRequest) GetClusterIds() []string { @@ -2735,7 +2790,7 @@ type GetSrvVSchemasResponse struct { func (x *GetSrvVSchemasResponse) Reset() { *x = GetSrvVSchemasResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[45] + mi := &file_vtadmin_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2748,7 +2803,7 @@ func (x *GetSrvVSchemasResponse) String() string { func (*GetSrvVSchemasResponse) ProtoMessage() {} func (x *GetSrvVSchemasResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[45] + mi := &file_vtadmin_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2761,7 +2816,7 @@ func (x *GetSrvVSchemasResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSrvVSchemasResponse.ProtoReflect.Descriptor instead. func (*GetSrvVSchemasResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{45} + return file_vtadmin_proto_rawDescGZIP(), []int{46} } func (x *GetSrvVSchemasResponse) GetSrvVSchemas() []*SrvVSchema { @@ -2783,7 +2838,7 @@ type GetSchemaTableSizeOptions struct { func (x *GetSchemaTableSizeOptions) Reset() { *x = GetSchemaTableSizeOptions{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[46] + mi := &file_vtadmin_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2796,7 +2851,7 @@ func (x *GetSchemaTableSizeOptions) String() string { func (*GetSchemaTableSizeOptions) ProtoMessage() {} func (x *GetSchemaTableSizeOptions) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[46] + mi := &file_vtadmin_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2809,7 +2864,7 @@ func (x *GetSchemaTableSizeOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemaTableSizeOptions.ProtoReflect.Descriptor instead. func (*GetSchemaTableSizeOptions) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{46} + return file_vtadmin_proto_rawDescGZIP(), []int{47} } func (x *GetSchemaTableSizeOptions) GetAggregateSizes() bool { @@ -2842,7 +2897,7 @@ type GetTabletRequest struct { func (x *GetTabletRequest) Reset() { *x = GetTabletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[47] + mi := &file_vtadmin_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2855,7 +2910,7 @@ func (x *GetTabletRequest) String() string { func (*GetTabletRequest) ProtoMessage() {} func (x *GetTabletRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[47] + mi := &file_vtadmin_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2868,7 +2923,7 @@ func (x *GetTabletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTabletRequest.ProtoReflect.Descriptor instead. func (*GetTabletRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{47} + return file_vtadmin_proto_rawDescGZIP(), []int{48} } func (x *GetTabletRequest) GetAlias() *topodata.TabletAlias { @@ -2896,7 +2951,7 @@ type GetTabletsRequest struct { func (x *GetTabletsRequest) Reset() { *x = GetTabletsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[48] + mi := &file_vtadmin_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2909,7 +2964,7 @@ func (x *GetTabletsRequest) String() string { func (*GetTabletsRequest) ProtoMessage() {} func (x *GetTabletsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[48] + mi := &file_vtadmin_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2922,7 +2977,7 @@ func (x *GetTabletsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTabletsRequest.ProtoReflect.Descriptor instead. func (*GetTabletsRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{48} + return file_vtadmin_proto_rawDescGZIP(), []int{49} } func (x *GetTabletsRequest) GetClusterIds() []string { @@ -2943,7 +2998,7 @@ type GetTabletsResponse struct { func (x *GetTabletsResponse) Reset() { *x = GetTabletsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[49] + mi := &file_vtadmin_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2956,7 +3011,7 @@ func (x *GetTabletsResponse) String() string { func (*GetTabletsResponse) ProtoMessage() {} func (x *GetTabletsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[49] + mi := &file_vtadmin_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2969,7 +3024,7 @@ func (x *GetTabletsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTabletsResponse.ProtoReflect.Descriptor instead. func (*GetTabletsResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{49} + return file_vtadmin_proto_rawDescGZIP(), []int{50} } func (x *GetTabletsResponse) GetTablets() []*Tablet { @@ -2991,7 +3046,7 @@ type GetVSchemaRequest struct { func (x *GetVSchemaRequest) Reset() { *x = GetVSchemaRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[50] + mi := &file_vtadmin_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3004,7 +3059,7 @@ func (x *GetVSchemaRequest) String() string { func (*GetVSchemaRequest) ProtoMessage() {} func (x *GetVSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[50] + mi := &file_vtadmin_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3017,7 +3072,7 @@ func (x *GetVSchemaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVSchemaRequest.ProtoReflect.Descriptor instead. func (*GetVSchemaRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{50} + return file_vtadmin_proto_rawDescGZIP(), []int{51} } func (x *GetVSchemaRequest) GetClusterId() string { @@ -3045,7 +3100,7 @@ type GetVSchemasRequest struct { func (x *GetVSchemasRequest) Reset() { *x = GetVSchemasRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[51] + mi := &file_vtadmin_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3058,7 +3113,7 @@ func (x *GetVSchemasRequest) String() string { func (*GetVSchemasRequest) ProtoMessage() {} func (x *GetVSchemasRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[51] + mi := &file_vtadmin_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3071,7 +3126,7 @@ func (x *GetVSchemasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVSchemasRequest.ProtoReflect.Descriptor instead. func (*GetVSchemasRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{51} + return file_vtadmin_proto_rawDescGZIP(), []int{52} } func (x *GetVSchemasRequest) GetClusterIds() []string { @@ -3092,7 +3147,7 @@ type GetVSchemasResponse struct { func (x *GetVSchemasResponse) Reset() { *x = GetVSchemasResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[52] + mi := &file_vtadmin_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3105,7 +3160,7 @@ func (x *GetVSchemasResponse) String() string { func (*GetVSchemasResponse) ProtoMessage() {} func (x *GetVSchemasResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[52] + mi := &file_vtadmin_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3118,7 +3173,7 @@ func (x *GetVSchemasResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVSchemasResponse.ProtoReflect.Descriptor instead. func (*GetVSchemasResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{52} + return file_vtadmin_proto_rawDescGZIP(), []int{53} } func (x *GetVSchemasResponse) GetVSchemas() []*VSchema { @@ -3139,7 +3194,7 @@ type GetVtctldsRequest struct { func (x *GetVtctldsRequest) Reset() { *x = GetVtctldsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[53] + mi := &file_vtadmin_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3152,7 +3207,7 @@ func (x *GetVtctldsRequest) String() string { func (*GetVtctldsRequest) ProtoMessage() {} func (x *GetVtctldsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[53] + mi := &file_vtadmin_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3165,7 +3220,7 @@ func (x *GetVtctldsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVtctldsRequest.ProtoReflect.Descriptor instead. func (*GetVtctldsRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{53} + return file_vtadmin_proto_rawDescGZIP(), []int{54} } func (x *GetVtctldsRequest) GetClusterIds() []string { @@ -3186,7 +3241,7 @@ type GetVtctldsResponse struct { func (x *GetVtctldsResponse) Reset() { *x = GetVtctldsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[54] + mi := &file_vtadmin_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3199,7 +3254,7 @@ func (x *GetVtctldsResponse) String() string { func (*GetVtctldsResponse) ProtoMessage() {} func (x *GetVtctldsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[54] + mi := &file_vtadmin_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3212,7 +3267,7 @@ func (x *GetVtctldsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVtctldsResponse.ProtoReflect.Descriptor instead. func (*GetVtctldsResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{54} + return file_vtadmin_proto_rawDescGZIP(), []int{55} } func (x *GetVtctldsResponse) GetVtctlds() []*Vtctld { @@ -3236,7 +3291,7 @@ type GetWorkflowRequest struct { func (x *GetWorkflowRequest) Reset() { *x = GetWorkflowRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[55] + mi := &file_vtadmin_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3249,7 +3304,7 @@ func (x *GetWorkflowRequest) String() string { func (*GetWorkflowRequest) ProtoMessage() {} func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[55] + mi := &file_vtadmin_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3262,7 +3317,7 @@ func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWorkflowRequest.ProtoReflect.Descriptor instead. func (*GetWorkflowRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{55} + return file_vtadmin_proto_rawDescGZIP(), []int{56} } func (x *GetWorkflowRequest) GetClusterId() string { @@ -3322,7 +3377,7 @@ type GetWorkflowsRequest struct { func (x *GetWorkflowsRequest) Reset() { *x = GetWorkflowsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[56] + mi := &file_vtadmin_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3335,7 +3390,7 @@ func (x *GetWorkflowsRequest) String() string { func (*GetWorkflowsRequest) ProtoMessage() {} func (x *GetWorkflowsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[56] + mi := &file_vtadmin_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3348,7 +3403,7 @@ func (x *GetWorkflowsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWorkflowsRequest.ProtoReflect.Descriptor instead. func (*GetWorkflowsRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{56} + return file_vtadmin_proto_rawDescGZIP(), []int{57} } func (x *GetWorkflowsRequest) GetClusterIds() []string { @@ -3390,7 +3445,7 @@ type GetWorkflowsResponse struct { func (x *GetWorkflowsResponse) Reset() { *x = GetWorkflowsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[57] + mi := &file_vtadmin_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3403,7 +3458,7 @@ func (x *GetWorkflowsResponse) String() string { func (*GetWorkflowsResponse) ProtoMessage() {} func (x *GetWorkflowsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[57] + mi := &file_vtadmin_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3416,7 +3471,7 @@ func (x *GetWorkflowsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWorkflowsResponse.ProtoReflect.Descriptor instead. func (*GetWorkflowsResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{57} + return file_vtadmin_proto_rawDescGZIP(), []int{58} } func (x *GetWorkflowsResponse) GetWorkflowsByCluster() map[string]*ClusterWorkflows { @@ -3442,7 +3497,7 @@ type PingTabletRequest struct { func (x *PingTabletRequest) Reset() { *x = PingTabletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[58] + mi := &file_vtadmin_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3455,7 +3510,7 @@ func (x *PingTabletRequest) String() string { func (*PingTabletRequest) ProtoMessage() {} func (x *PingTabletRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[58] + mi := &file_vtadmin_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3468,7 +3523,7 @@ func (x *PingTabletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingTabletRequest.ProtoReflect.Descriptor instead. func (*PingTabletRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{58} + return file_vtadmin_proto_rawDescGZIP(), []int{59} } func (x *PingTabletRequest) GetAlias() *topodata.TabletAlias { @@ -3497,7 +3552,7 @@ type PingTabletResponse struct { func (x *PingTabletResponse) Reset() { *x = PingTabletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[59] + mi := &file_vtadmin_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3510,7 +3565,7 @@ func (x *PingTabletResponse) String() string { func (*PingTabletResponse) ProtoMessage() {} func (x *PingTabletResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[59] + mi := &file_vtadmin_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3523,7 +3578,7 @@ func (x *PingTabletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PingTabletResponse.ProtoReflect.Descriptor instead. func (*PingTabletResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{59} + return file_vtadmin_proto_rawDescGZIP(), []int{60} } func (x *PingTabletResponse) GetStatus() string { @@ -3552,7 +3607,7 @@ type PlannedFailoverShardRequest struct { func (x *PlannedFailoverShardRequest) Reset() { *x = PlannedFailoverShardRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[60] + mi := &file_vtadmin_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3565,7 +3620,7 @@ func (x *PlannedFailoverShardRequest) String() string { func (*PlannedFailoverShardRequest) ProtoMessage() {} func (x *PlannedFailoverShardRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[60] + mi := &file_vtadmin_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3578,7 +3633,7 @@ func (x *PlannedFailoverShardRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PlannedFailoverShardRequest.ProtoReflect.Descriptor instead. func (*PlannedFailoverShardRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{60} + return file_vtadmin_proto_rawDescGZIP(), []int{61} } func (x *PlannedFailoverShardRequest) GetClusterId() string { @@ -3614,7 +3669,7 @@ type PlannedFailoverShardResponse struct { func (x *PlannedFailoverShardResponse) Reset() { *x = PlannedFailoverShardResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[61] + mi := &file_vtadmin_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3627,7 +3682,7 @@ func (x *PlannedFailoverShardResponse) String() string { func (*PlannedFailoverShardResponse) ProtoMessage() {} func (x *PlannedFailoverShardResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[61] + mi := &file_vtadmin_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3640,7 +3695,7 @@ func (x *PlannedFailoverShardResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PlannedFailoverShardResponse.ProtoReflect.Descriptor instead. func (*PlannedFailoverShardResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{61} + return file_vtadmin_proto_rawDescGZIP(), []int{62} } func (x *PlannedFailoverShardResponse) GetCluster() *Cluster { @@ -3692,7 +3747,7 @@ type RebuildKeyspaceGraphRequest struct { func (x *RebuildKeyspaceGraphRequest) Reset() { *x = RebuildKeyspaceGraphRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[62] + mi := &file_vtadmin_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3705,7 +3760,7 @@ func (x *RebuildKeyspaceGraphRequest) String() string { func (*RebuildKeyspaceGraphRequest) ProtoMessage() {} func (x *RebuildKeyspaceGraphRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[62] + mi := &file_vtadmin_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3718,7 +3773,7 @@ func (x *RebuildKeyspaceGraphRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RebuildKeyspaceGraphRequest.ProtoReflect.Descriptor instead. func (*RebuildKeyspaceGraphRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{62} + return file_vtadmin_proto_rawDescGZIP(), []int{63} } func (x *RebuildKeyspaceGraphRequest) GetClusterId() string { @@ -3760,7 +3815,7 @@ type RebuildKeyspaceGraphResponse struct { func (x *RebuildKeyspaceGraphResponse) Reset() { *x = RebuildKeyspaceGraphResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[63] + mi := &file_vtadmin_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3773,7 +3828,7 @@ func (x *RebuildKeyspaceGraphResponse) String() string { func (*RebuildKeyspaceGraphResponse) ProtoMessage() {} func (x *RebuildKeyspaceGraphResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[63] + mi := &file_vtadmin_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3786,7 +3841,7 @@ func (x *RebuildKeyspaceGraphResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RebuildKeyspaceGraphResponse.ProtoReflect.Descriptor instead. func (*RebuildKeyspaceGraphResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{63} + return file_vtadmin_proto_rawDescGZIP(), []int{64} } func (x *RebuildKeyspaceGraphResponse) GetStatus() string { @@ -3808,7 +3863,7 @@ type RefreshStateRequest struct { func (x *RefreshStateRequest) Reset() { *x = RefreshStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[64] + mi := &file_vtadmin_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3821,7 +3876,7 @@ func (x *RefreshStateRequest) String() string { func (*RefreshStateRequest) ProtoMessage() {} func (x *RefreshStateRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[64] + mi := &file_vtadmin_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3834,7 +3889,7 @@ func (x *RefreshStateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshStateRequest.ProtoReflect.Descriptor instead. func (*RefreshStateRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{64} + return file_vtadmin_proto_rawDescGZIP(), []int{65} } func (x *RefreshStateRequest) GetAlias() *topodata.TabletAlias { @@ -3863,7 +3918,7 @@ type RefreshStateResponse struct { func (x *RefreshStateResponse) Reset() { *x = RefreshStateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[65] + mi := &file_vtadmin_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3876,7 +3931,7 @@ func (x *RefreshStateResponse) String() string { func (*RefreshStateResponse) ProtoMessage() {} func (x *RefreshStateResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[65] + mi := &file_vtadmin_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3889,7 +3944,7 @@ func (x *RefreshStateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshStateResponse.ProtoReflect.Descriptor instead. func (*RefreshStateResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{65} + return file_vtadmin_proto_rawDescGZIP(), []int{66} } func (x *RefreshStateResponse) GetStatus() string { @@ -3958,7 +4013,7 @@ type ReloadSchemasRequest struct { func (x *ReloadSchemasRequest) Reset() { *x = ReloadSchemasRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[66] + mi := &file_vtadmin_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3971,7 +4026,7 @@ func (x *ReloadSchemasRequest) String() string { func (*ReloadSchemasRequest) ProtoMessage() {} func (x *ReloadSchemasRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[66] + mi := &file_vtadmin_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3984,7 +4039,7 @@ func (x *ReloadSchemasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReloadSchemasRequest.ProtoReflect.Descriptor instead. func (*ReloadSchemasRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{66} + return file_vtadmin_proto_rawDescGZIP(), []int{67} } func (x *ReloadSchemasRequest) GetKeyspaces() []string { @@ -4058,7 +4113,7 @@ type ReloadSchemasResponse struct { func (x *ReloadSchemasResponse) Reset() { *x = ReloadSchemasResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[67] + mi := &file_vtadmin_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4071,7 +4126,7 @@ func (x *ReloadSchemasResponse) String() string { func (*ReloadSchemasResponse) ProtoMessage() {} func (x *ReloadSchemasResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[67] + mi := &file_vtadmin_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4084,7 +4139,7 @@ func (x *ReloadSchemasResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReloadSchemasResponse.ProtoReflect.Descriptor instead. func (*ReloadSchemasResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{67} + return file_vtadmin_proto_rawDescGZIP(), []int{68} } func (x *ReloadSchemasResponse) GetKeyspaceResults() []*ReloadSchemasResponse_KeyspaceResult { @@ -4124,7 +4179,7 @@ type ReloadSchemaShardRequest struct { func (x *ReloadSchemaShardRequest) Reset() { *x = ReloadSchemaShardRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[68] + mi := &file_vtadmin_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4137,7 +4192,7 @@ func (x *ReloadSchemaShardRequest) String() string { func (*ReloadSchemaShardRequest) ProtoMessage() {} func (x *ReloadSchemaShardRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[68] + mi := &file_vtadmin_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4150,7 +4205,7 @@ func (x *ReloadSchemaShardRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReloadSchemaShardRequest.ProtoReflect.Descriptor instead. func (*ReloadSchemaShardRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{68} + return file_vtadmin_proto_rawDescGZIP(), []int{69} } func (x *ReloadSchemaShardRequest) GetClusterId() string { @@ -4206,7 +4261,7 @@ type ReloadSchemaShardResponse struct { func (x *ReloadSchemaShardResponse) Reset() { *x = ReloadSchemaShardResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[69] + mi := &file_vtadmin_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4219,7 +4274,7 @@ func (x *ReloadSchemaShardResponse) String() string { func (*ReloadSchemaShardResponse) ProtoMessage() {} func (x *ReloadSchemaShardResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[69] + mi := &file_vtadmin_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4232,7 +4287,7 @@ func (x *ReloadSchemaShardResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReloadSchemaShardResponse.ProtoReflect.Descriptor instead. func (*ReloadSchemaShardResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{69} + return file_vtadmin_proto_rawDescGZIP(), []int{70} } func (x *ReloadSchemaShardResponse) GetEvents() []*logutil.Event { @@ -4254,7 +4309,7 @@ type RefreshTabletReplicationSourceRequest struct { func (x *RefreshTabletReplicationSourceRequest) Reset() { *x = RefreshTabletReplicationSourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[70] + mi := &file_vtadmin_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4267,7 +4322,7 @@ func (x *RefreshTabletReplicationSourceRequest) String() string { func (*RefreshTabletReplicationSourceRequest) ProtoMessage() {} func (x *RefreshTabletReplicationSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[70] + mi := &file_vtadmin_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4280,7 +4335,7 @@ func (x *RefreshTabletReplicationSourceRequest) ProtoReflect() protoreflect.Mess // Deprecated: Use RefreshTabletReplicationSourceRequest.ProtoReflect.Descriptor instead. func (*RefreshTabletReplicationSourceRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{70} + return file_vtadmin_proto_rawDescGZIP(), []int{71} } func (x *RefreshTabletReplicationSourceRequest) GetAlias() *topodata.TabletAlias { @@ -4311,7 +4366,7 @@ type RefreshTabletReplicationSourceResponse struct { func (x *RefreshTabletReplicationSourceResponse) Reset() { *x = RefreshTabletReplicationSourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[71] + mi := &file_vtadmin_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4324,7 +4379,7 @@ func (x *RefreshTabletReplicationSourceResponse) String() string { func (*RefreshTabletReplicationSourceResponse) ProtoMessage() {} func (x *RefreshTabletReplicationSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[71] + mi := &file_vtadmin_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4337,7 +4392,7 @@ func (x *RefreshTabletReplicationSourceResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use RefreshTabletReplicationSourceResponse.ProtoReflect.Descriptor instead. func (*RefreshTabletReplicationSourceResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{71} + return file_vtadmin_proto_rawDescGZIP(), []int{72} } func (x *RefreshTabletReplicationSourceResponse) GetKeyspace() string { @@ -4383,7 +4438,7 @@ type RemoveKeyspaceCellRequest struct { func (x *RemoveKeyspaceCellRequest) Reset() { *x = RemoveKeyspaceCellRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[72] + mi := &file_vtadmin_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4396,7 +4451,7 @@ func (x *RemoveKeyspaceCellRequest) String() string { func (*RemoveKeyspaceCellRequest) ProtoMessage() {} func (x *RemoveKeyspaceCellRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[72] + mi := &file_vtadmin_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4409,7 +4464,7 @@ func (x *RemoveKeyspaceCellRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveKeyspaceCellRequest.ProtoReflect.Descriptor instead. func (*RemoveKeyspaceCellRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{72} + return file_vtadmin_proto_rawDescGZIP(), []int{73} } func (x *RemoveKeyspaceCellRequest) GetClusterId() string { @@ -4458,7 +4513,7 @@ type RemoveKeyspaceCellResponse struct { func (x *RemoveKeyspaceCellResponse) Reset() { *x = RemoveKeyspaceCellResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[73] + mi := &file_vtadmin_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4471,7 +4526,7 @@ func (x *RemoveKeyspaceCellResponse) String() string { func (*RemoveKeyspaceCellResponse) ProtoMessage() {} func (x *RemoveKeyspaceCellResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[73] + mi := &file_vtadmin_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4484,7 +4539,7 @@ func (x *RemoveKeyspaceCellResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveKeyspaceCellResponse.ProtoReflect.Descriptor instead. func (*RemoveKeyspaceCellResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{73} + return file_vtadmin_proto_rawDescGZIP(), []int{74} } func (x *RemoveKeyspaceCellResponse) GetStatus() string { @@ -4506,7 +4561,7 @@ type RunHealthCheckRequest struct { func (x *RunHealthCheckRequest) Reset() { *x = RunHealthCheckRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[74] + mi := &file_vtadmin_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4519,7 +4574,7 @@ func (x *RunHealthCheckRequest) String() string { func (*RunHealthCheckRequest) ProtoMessage() {} func (x *RunHealthCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[74] + mi := &file_vtadmin_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4532,7 +4587,7 @@ func (x *RunHealthCheckRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RunHealthCheckRequest.ProtoReflect.Descriptor instead. func (*RunHealthCheckRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{74} + return file_vtadmin_proto_rawDescGZIP(), []int{75} } func (x *RunHealthCheckRequest) GetAlias() *topodata.TabletAlias { @@ -4561,7 +4616,7 @@ type RunHealthCheckResponse struct { func (x *RunHealthCheckResponse) Reset() { *x = RunHealthCheckResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[75] + mi := &file_vtadmin_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4574,7 +4629,7 @@ func (x *RunHealthCheckResponse) String() string { func (*RunHealthCheckResponse) ProtoMessage() {} func (x *RunHealthCheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[75] + mi := &file_vtadmin_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4587,7 +4642,7 @@ func (x *RunHealthCheckResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RunHealthCheckResponse.ProtoReflect.Descriptor instead. func (*RunHealthCheckResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{75} + return file_vtadmin_proto_rawDescGZIP(), []int{76} } func (x *RunHealthCheckResponse) GetStatus() string { @@ -4616,7 +4671,7 @@ type SetReadOnlyRequest struct { func (x *SetReadOnlyRequest) Reset() { *x = SetReadOnlyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[76] + mi := &file_vtadmin_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4629,7 +4684,7 @@ func (x *SetReadOnlyRequest) String() string { func (*SetReadOnlyRequest) ProtoMessage() {} func (x *SetReadOnlyRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[76] + mi := &file_vtadmin_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4642,7 +4697,7 @@ func (x *SetReadOnlyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetReadOnlyRequest.ProtoReflect.Descriptor instead. func (*SetReadOnlyRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{76} + return file_vtadmin_proto_rawDescGZIP(), []int{77} } func (x *SetReadOnlyRequest) GetAlias() *topodata.TabletAlias { @@ -4668,7 +4723,7 @@ type SetReadOnlyResponse struct { func (x *SetReadOnlyResponse) Reset() { *x = SetReadOnlyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[77] + mi := &file_vtadmin_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4681,7 +4736,7 @@ func (x *SetReadOnlyResponse) String() string { func (*SetReadOnlyResponse) ProtoMessage() {} func (x *SetReadOnlyResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[77] + mi := &file_vtadmin_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4694,7 +4749,7 @@ func (x *SetReadOnlyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetReadOnlyResponse.ProtoReflect.Descriptor instead. func (*SetReadOnlyResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{77} + return file_vtadmin_proto_rawDescGZIP(), []int{78} } type SetReadWriteRequest struct { @@ -4709,7 +4764,7 @@ type SetReadWriteRequest struct { func (x *SetReadWriteRequest) Reset() { *x = SetReadWriteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[78] + mi := &file_vtadmin_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4722,7 +4777,7 @@ func (x *SetReadWriteRequest) String() string { func (*SetReadWriteRequest) ProtoMessage() {} func (x *SetReadWriteRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[78] + mi := &file_vtadmin_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4735,7 +4790,7 @@ func (x *SetReadWriteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetReadWriteRequest.ProtoReflect.Descriptor instead. func (*SetReadWriteRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{78} + return file_vtadmin_proto_rawDescGZIP(), []int{79} } func (x *SetReadWriteRequest) GetAlias() *topodata.TabletAlias { @@ -4761,7 +4816,7 @@ type SetReadWriteResponse struct { func (x *SetReadWriteResponse) Reset() { *x = SetReadWriteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[79] + mi := &file_vtadmin_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4774,7 +4829,7 @@ func (x *SetReadWriteResponse) String() string { func (*SetReadWriteResponse) ProtoMessage() {} func (x *SetReadWriteResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[79] + mi := &file_vtadmin_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4787,7 +4842,7 @@ func (x *SetReadWriteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetReadWriteResponse.ProtoReflect.Descriptor instead. func (*SetReadWriteResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{79} + return file_vtadmin_proto_rawDescGZIP(), []int{80} } type StartReplicationRequest struct { @@ -4802,7 +4857,7 @@ type StartReplicationRequest struct { func (x *StartReplicationRequest) Reset() { *x = StartReplicationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[80] + mi := &file_vtadmin_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4815,7 +4870,7 @@ func (x *StartReplicationRequest) String() string { func (*StartReplicationRequest) ProtoMessage() {} func (x *StartReplicationRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[80] + mi := &file_vtadmin_proto_msgTypes[81] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4828,7 +4883,7 @@ func (x *StartReplicationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StartReplicationRequest.ProtoReflect.Descriptor instead. func (*StartReplicationRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{80} + return file_vtadmin_proto_rawDescGZIP(), []int{81} } func (x *StartReplicationRequest) GetAlias() *topodata.TabletAlias { @@ -4857,7 +4912,7 @@ type StartReplicationResponse struct { func (x *StartReplicationResponse) Reset() { *x = StartReplicationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[81] + mi := &file_vtadmin_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4870,7 +4925,7 @@ func (x *StartReplicationResponse) String() string { func (*StartReplicationResponse) ProtoMessage() {} func (x *StartReplicationResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[81] + mi := &file_vtadmin_proto_msgTypes[82] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4883,7 +4938,7 @@ func (x *StartReplicationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StartReplicationResponse.ProtoReflect.Descriptor instead. func (*StartReplicationResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{81} + return file_vtadmin_proto_rawDescGZIP(), []int{82} } func (x *StartReplicationResponse) GetStatus() string { @@ -4912,7 +4967,7 @@ type StopReplicationRequest struct { func (x *StopReplicationRequest) Reset() { *x = StopReplicationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[82] + mi := &file_vtadmin_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4925,7 +4980,7 @@ func (x *StopReplicationRequest) String() string { func (*StopReplicationRequest) ProtoMessage() {} func (x *StopReplicationRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[82] + mi := &file_vtadmin_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4938,7 +4993,7 @@ func (x *StopReplicationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StopReplicationRequest.ProtoReflect.Descriptor instead. func (*StopReplicationRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{82} + return file_vtadmin_proto_rawDescGZIP(), []int{83} } func (x *StopReplicationRequest) GetAlias() *topodata.TabletAlias { @@ -4967,7 +5022,7 @@ type StopReplicationResponse struct { func (x *StopReplicationResponse) Reset() { *x = StopReplicationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[83] + mi := &file_vtadmin_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4980,7 +5035,7 @@ func (x *StopReplicationResponse) String() string { func (*StopReplicationResponse) ProtoMessage() {} func (x *StopReplicationResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[83] + mi := &file_vtadmin_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4993,7 +5048,7 @@ func (x *StopReplicationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StopReplicationResponse.ProtoReflect.Descriptor instead. func (*StopReplicationResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{83} + return file_vtadmin_proto_rawDescGZIP(), []int{84} } func (x *StopReplicationResponse) GetStatus() string { @@ -5024,7 +5079,7 @@ type TabletExternallyPromotedRequest struct { func (x *TabletExternallyPromotedRequest) Reset() { *x = TabletExternallyPromotedRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[84] + mi := &file_vtadmin_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5037,7 +5092,7 @@ func (x *TabletExternallyPromotedRequest) String() string { func (*TabletExternallyPromotedRequest) ProtoMessage() {} func (x *TabletExternallyPromotedRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[84] + mi := &file_vtadmin_proto_msgTypes[85] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5050,7 +5105,7 @@ func (x *TabletExternallyPromotedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TabletExternallyPromotedRequest.ProtoReflect.Descriptor instead. func (*TabletExternallyPromotedRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{84} + return file_vtadmin_proto_rawDescGZIP(), []int{85} } func (x *TabletExternallyPromotedRequest) GetAlias() *topodata.TabletAlias { @@ -5082,7 +5137,7 @@ type TabletExternallyPromotedResponse struct { func (x *TabletExternallyPromotedResponse) Reset() { *x = TabletExternallyPromotedResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[85] + mi := &file_vtadmin_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5095,7 +5150,7 @@ func (x *TabletExternallyPromotedResponse) String() string { func (*TabletExternallyPromotedResponse) ProtoMessage() {} func (x *TabletExternallyPromotedResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[85] + mi := &file_vtadmin_proto_msgTypes[86] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5108,7 +5163,7 @@ func (x *TabletExternallyPromotedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TabletExternallyPromotedResponse.ProtoReflect.Descriptor instead. func (*TabletExternallyPromotedResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{85} + return file_vtadmin_proto_rawDescGZIP(), []int{86} } func (x *TabletExternallyPromotedResponse) GetCluster() *Cluster { @@ -5158,7 +5213,7 @@ type TabletExternallyReparentedRequest struct { func (x *TabletExternallyReparentedRequest) Reset() { *x = TabletExternallyReparentedRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[86] + mi := &file_vtadmin_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5171,7 +5226,7 @@ func (x *TabletExternallyReparentedRequest) String() string { func (*TabletExternallyReparentedRequest) ProtoMessage() {} func (x *TabletExternallyReparentedRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[86] + mi := &file_vtadmin_proto_msgTypes[87] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5184,7 +5239,7 @@ func (x *TabletExternallyReparentedRequest) ProtoReflect() protoreflect.Message // Deprecated: Use TabletExternallyReparentedRequest.ProtoReflect.Descriptor instead. func (*TabletExternallyReparentedRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{86} + return file_vtadmin_proto_rawDescGZIP(), []int{87} } func (x *TabletExternallyReparentedRequest) GetAlias() *topodata.TabletAlias { @@ -5201,6 +5256,61 @@ func (x *TabletExternallyReparentedRequest) GetClusterIds() []string { return nil } +type ValidateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` + PingTablets bool `protobuf:"varint,2,opt,name=ping_tablets,json=pingTablets,proto3" json:"ping_tablets,omitempty"` +} + +func (x *ValidateRequest) Reset() { + *x = ValidateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vtadmin_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateRequest) ProtoMessage() {} + +func (x *ValidateRequest) ProtoReflect() protoreflect.Message { + mi := &file_vtadmin_proto_msgTypes[88] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead. +func (*ValidateRequest) Descriptor() ([]byte, []int) { + return file_vtadmin_proto_rawDescGZIP(), []int{88} +} + +func (x *ValidateRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +func (x *ValidateRequest) GetPingTablets() bool { + if x != nil { + return x.PingTablets + } + return false +} + type ValidateKeyspaceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5214,7 +5324,7 @@ type ValidateKeyspaceRequest struct { func (x *ValidateKeyspaceRequest) Reset() { *x = ValidateKeyspaceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[87] + mi := &file_vtadmin_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5227,7 +5337,7 @@ func (x *ValidateKeyspaceRequest) String() string { func (*ValidateKeyspaceRequest) ProtoMessage() {} func (x *ValidateKeyspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[87] + mi := &file_vtadmin_proto_msgTypes[89] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5240,7 +5350,7 @@ func (x *ValidateKeyspaceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateKeyspaceRequest.ProtoReflect.Descriptor instead. func (*ValidateKeyspaceRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{87} + return file_vtadmin_proto_rawDescGZIP(), []int{89} } func (x *ValidateKeyspaceRequest) GetClusterId() string { @@ -5276,7 +5386,7 @@ type ValidateSchemaKeyspaceRequest struct { func (x *ValidateSchemaKeyspaceRequest) Reset() { *x = ValidateSchemaKeyspaceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[88] + mi := &file_vtadmin_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5289,7 +5399,7 @@ func (x *ValidateSchemaKeyspaceRequest) String() string { func (*ValidateSchemaKeyspaceRequest) ProtoMessage() {} func (x *ValidateSchemaKeyspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[88] + mi := &file_vtadmin_proto_msgTypes[90] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5302,7 +5412,7 @@ func (x *ValidateSchemaKeyspaceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateSchemaKeyspaceRequest.ProtoReflect.Descriptor instead. func (*ValidateSchemaKeyspaceRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{88} + return file_vtadmin_proto_rawDescGZIP(), []int{90} } func (x *ValidateSchemaKeyspaceRequest) GetClusterId() string { @@ -5319,6 +5429,77 @@ func (x *ValidateSchemaKeyspaceRequest) GetKeyspace() string { return "" } +type ValidateShardRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` + Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"` + Shard string `protobuf:"bytes,3,opt,name=shard,proto3" json:"shard,omitempty"` + PingTablets bool `protobuf:"varint,4,opt,name=ping_tablets,json=pingTablets,proto3" json:"ping_tablets,omitempty"` +} + +func (x *ValidateShardRequest) Reset() { + *x = ValidateShardRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vtadmin_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateShardRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateShardRequest) ProtoMessage() {} + +func (x *ValidateShardRequest) ProtoReflect() protoreflect.Message { + mi := &file_vtadmin_proto_msgTypes[91] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateShardRequest.ProtoReflect.Descriptor instead. +func (*ValidateShardRequest) Descriptor() ([]byte, []int) { + return file_vtadmin_proto_rawDescGZIP(), []int{91} +} + +func (x *ValidateShardRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +func (x *ValidateShardRequest) GetKeyspace() string { + if x != nil { + return x.Keyspace + } + return "" +} + +func (x *ValidateShardRequest) GetShard() string { + if x != nil { + return x.Shard + } + return "" +} + +func (x *ValidateShardRequest) GetPingTablets() bool { + if x != nil { + return x.PingTablets + } + return false +} + type ValidateVersionKeyspaceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5331,7 +5512,7 @@ type ValidateVersionKeyspaceRequest struct { func (x *ValidateVersionKeyspaceRequest) Reset() { *x = ValidateVersionKeyspaceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[89] + mi := &file_vtadmin_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5344,7 +5525,7 @@ func (x *ValidateVersionKeyspaceRequest) String() string { func (*ValidateVersionKeyspaceRequest) ProtoMessage() {} func (x *ValidateVersionKeyspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[89] + mi := &file_vtadmin_proto_msgTypes[92] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5357,7 +5538,7 @@ func (x *ValidateVersionKeyspaceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateVersionKeyspaceRequest.ProtoReflect.Descriptor instead. func (*ValidateVersionKeyspaceRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{89} + return file_vtadmin_proto_rawDescGZIP(), []int{92} } func (x *ValidateVersionKeyspaceRequest) GetClusterId() string { @@ -5387,7 +5568,7 @@ type VTExplainRequest struct { func (x *VTExplainRequest) Reset() { *x = VTExplainRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[90] + mi := &file_vtadmin_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5400,7 +5581,7 @@ func (x *VTExplainRequest) String() string { func (*VTExplainRequest) ProtoMessage() {} func (x *VTExplainRequest) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[90] + mi := &file_vtadmin_proto_msgTypes[93] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5413,7 +5594,7 @@ func (x *VTExplainRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VTExplainRequest.ProtoReflect.Descriptor instead. func (*VTExplainRequest) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{90} + return file_vtadmin_proto_rawDescGZIP(), []int{93} } func (x *VTExplainRequest) GetCluster() string { @@ -5448,7 +5629,7 @@ type VTExplainResponse struct { func (x *VTExplainResponse) Reset() { *x = VTExplainResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[91] + mi := &file_vtadmin_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5461,7 +5642,7 @@ func (x *VTExplainResponse) String() string { func (*VTExplainResponse) ProtoMessage() {} func (x *VTExplainResponse) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[91] + mi := &file_vtadmin_proto_msgTypes[94] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5474,7 +5655,7 @@ func (x *VTExplainResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VTExplainResponse.ProtoReflect.Descriptor instead. func (*VTExplainResponse) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{91} + return file_vtadmin_proto_rawDescGZIP(), []int{94} } func (x *VTExplainResponse) GetResponse() string { @@ -5496,7 +5677,7 @@ type Schema_ShardTableSize struct { func (x *Schema_ShardTableSize) Reset() { *x = Schema_ShardTableSize{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[95] + mi := &file_vtadmin_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5509,7 +5690,7 @@ func (x *Schema_ShardTableSize) String() string { func (*Schema_ShardTableSize) ProtoMessage() {} func (x *Schema_ShardTableSize) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[95] + mi := &file_vtadmin_proto_msgTypes[98] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5554,7 +5735,7 @@ type Schema_TableSize struct { func (x *Schema_TableSize) Reset() { *x = Schema_TableSize{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[96] + mi := &file_vtadmin_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5567,7 +5748,7 @@ func (x *Schema_TableSize) String() string { func (*Schema_TableSize) ProtoMessage() {} func (x *Schema_TableSize) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[96] + mi := &file_vtadmin_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5622,7 +5803,7 @@ type ReloadSchemasResponse_KeyspaceResult struct { func (x *ReloadSchemasResponse_KeyspaceResult) Reset() { *x = ReloadSchemasResponse_KeyspaceResult{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[99] + mi := &file_vtadmin_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5635,7 +5816,7 @@ func (x *ReloadSchemasResponse_KeyspaceResult) String() string { func (*ReloadSchemasResponse_KeyspaceResult) ProtoMessage() {} func (x *ReloadSchemasResponse_KeyspaceResult) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[99] + mi := &file_vtadmin_proto_msgTypes[102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5648,7 +5829,7 @@ func (x *ReloadSchemasResponse_KeyspaceResult) ProtoReflect() protoreflect.Messa // Deprecated: Use ReloadSchemasResponse_KeyspaceResult.ProtoReflect.Descriptor instead. func (*ReloadSchemasResponse_KeyspaceResult) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{67, 0} + return file_vtadmin_proto_rawDescGZIP(), []int{68, 0} } func (x *ReloadSchemasResponse_KeyspaceResult) GetKeyspace() *Keyspace { @@ -5683,7 +5864,7 @@ type ReloadSchemasResponse_ShardResult struct { func (x *ReloadSchemasResponse_ShardResult) Reset() { *x = ReloadSchemasResponse_ShardResult{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[100] + mi := &file_vtadmin_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5696,7 +5877,7 @@ func (x *ReloadSchemasResponse_ShardResult) String() string { func (*ReloadSchemasResponse_ShardResult) ProtoMessage() {} func (x *ReloadSchemasResponse_ShardResult) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[100] + mi := &file_vtadmin_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5709,7 +5890,7 @@ func (x *ReloadSchemasResponse_ShardResult) ProtoReflect() protoreflect.Message // Deprecated: Use ReloadSchemasResponse_ShardResult.ProtoReflect.Descriptor instead. func (*ReloadSchemasResponse_ShardResult) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{67, 1} + return file_vtadmin_proto_rawDescGZIP(), []int{68, 1} } func (x *ReloadSchemasResponse_ShardResult) GetShard() *Shard { @@ -5745,7 +5926,7 @@ type ReloadSchemasResponse_TabletResult struct { func (x *ReloadSchemasResponse_TabletResult) Reset() { *x = ReloadSchemasResponse_TabletResult{} if protoimpl.UnsafeEnabled { - mi := &file_vtadmin_proto_msgTypes[101] + mi := &file_vtadmin_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5758,7 +5939,7 @@ func (x *ReloadSchemasResponse_TabletResult) String() string { func (*ReloadSchemasResponse_TabletResult) ProtoMessage() {} func (x *ReloadSchemasResponse_TabletResult) ProtoReflect() protoreflect.Message { - mi := &file_vtadmin_proto_msgTypes[101] + mi := &file_vtadmin_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5771,7 +5952,7 @@ func (x *ReloadSchemasResponse_TabletResult) ProtoReflect() protoreflect.Message // Deprecated: Use ReloadSchemasResponse_TabletResult.ProtoReflect.Descriptor instead. func (*ReloadSchemasResponse_TabletResult) Descriptor() ([]byte, []int) { - return file_vtadmin_proto_rawDescGZIP(), []int{67, 2} + return file_vtadmin_proto_rawDescGZIP(), []int{68, 2} } func (x *ReloadSchemasResponse_TabletResult) GetTablet() *Tablet { @@ -6089,667 +6270,702 @@ var file_vtadmin_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0x32, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, - 0x39, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x67, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x54, 0x47, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x67, 0x61, 0x74, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x47, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x72, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0x62, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, + 0x32, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0xb5, 0x01, 0x0a, - 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x10, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x8d, - 0x01, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x49, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x67, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x52, 0x05, 0x67, 0x61, 0x74, 0x65, 0x73, 0x22, 0x4f, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, + 0x36, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x85, - 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, - 0x6c, 0x22, 0x4e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x22, 0xb5, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, + 0x50, 0x0a, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, - 0x73, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x73, - 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x72, 0x76, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0b, 0x73, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x6e, 0x67, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x60, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, + 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x4e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x37, 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0b, 0x73, 0x72, 0x76, + 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x73, 0x12, + 0x3b, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x60, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x34, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x4e, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x44, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x08, 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x22, 0x34, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x07, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x52, 0x07, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, + 0x22, 0xa0, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x67, 0x6e, 0x6f, + 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x22, 0xe1, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x14, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x73, 0x42, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x42, 0x79, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x60, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x42, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x61, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, + 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x34, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x58, 0x0a, 0x12, 0x50, 0x69, + 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x22, 0x7e, 0x0a, 0x1b, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x46, + 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, + 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x93, 0x01, + 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x61, 0x6c, 0x22, 0x36, 0x0a, 0x1c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, - 0x22, 0x3f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x73, 0x22, 0x4e, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x44, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2d, 0x0a, 0x09, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x08, 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x34, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x49, 0x64, 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x52, 0x07, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xa0, 0x01, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, - 0xe1, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x42, - 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x42, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x1a, 0x60, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x42, 0x79, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x61, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x58, 0x0a, 0x12, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x22, 0x7e, 0x0a, 0x1b, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x6f, - 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x40, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x6e, - 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xe6, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x46, 0x61, 0x69, 0x6c, - 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, - 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x1b, 0x52, 0x65, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, - 0x36, 0x0a, 0x1c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, - 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x22, 0x5a, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x9f, 0x02, 0x0a, + 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x07, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x5a, 0x0a, 0x14, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x9f, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x6c, - 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x23, 0x0a, 0x0d, - 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xad, + 0x04, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, + 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x67, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, + 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x1a, 0x5b, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x24, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x4f, 0x0a, + 0x0c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x27, 0x0a, + 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xdb, + 0x01, 0x0a, 0x18, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xad, 0x04, 0x0a, 0x15, 0x52, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x4f, - 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, - 0x52, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x1a, 0x67, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x5b, 0x0a, 0x0b, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x74, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x4f, 0x0a, 0x0c, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xdb, 0x01, 0x0a, 0x18, 0x52, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, - 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, - 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x75, 0x0a, - 0x25, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x49, 0x64, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x26, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x19, + 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, + 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x22, 0x75, 0x0a, 0x25, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x26, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x70, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, + 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, + 0x69, 0x76, 0x65, 0x22, 0x34, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x65, 0x0a, 0x15, 0x52, 0x75, 0x6e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, + 0x22, 0x5c, 0x0a, 0x16, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x9e, - 0x01, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, - 0x34, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x65, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, - 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x5c, 0x0a, 0x16, - 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, - 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x62, 0x0a, 0x12, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x62, + 0x0a, 0x12, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x15, - 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x67, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, - 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x5e, 0x0a, 0x18, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x66, 0x0a, 0x16, 0x53, - 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x73, 0x22, 0x5d, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x22, 0x6f, 0x0a, 0x1f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x20, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, - 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x36, - 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x71, 0x0a, 0x21, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x77, 0x0a, 0x17, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x16, + 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, + 0x5e, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, + 0x66, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x5d, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x6f, 0x0a, 0x1f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x20, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, + 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x36, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, + 0x6f, 0x6c, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x71, 0x0a, 0x21, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x53, 0x0a, + 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x73, 0x22, 0x5a, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5b, - 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x73, 0x22, 0x77, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x5a, 0x0a, 0x1d, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x56, - 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x2f, 0x0a, 0x11, 0x56, 0x54, 0x45, 0x78, 0x70, - 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf9, 0x1c, 0x0a, 0x07, 0x56, 0x54, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x53, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, - 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, - 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, - 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4d, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, - 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, - 0x0a, 0x16, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x6f, - 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x26, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x46, 0x61, 0x69, 0x6c, - 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x65, 0x72, 0x67, - 0x65, 0x6e, 0x63, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0a, 0x46, - 0x69, 0x6e, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x56, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, - 0x12, 0x18, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x74, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x73, 0x22, 0x5b, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x2f, 0x0a, + 0x11, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe6, + 0x1e, 0x0a, 0x07, 0x56, 0x54, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x53, 0x0a, 0x0e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x76, + 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, + 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4c, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1b, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, + 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x16, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, + 0x79, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x26, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, + 0x63, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, + 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3b, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x00, 0x12, 0x47, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x1a, 0x2e, 0x76, + 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x65, + 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, + 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x76, 0x74, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, + 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x39, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, + 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x1e, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x39, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x19, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, + 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x12, 0x1a, 0x2e, 0x76, + 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, - 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, - 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1c, 0x47, - 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1d, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x76, 0x74, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, - 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x12, 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, - 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x12, - 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x73, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x74, 0x63, 0x74, - 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x76, - 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x00, 0x12, 0x4d, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x1c, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, - 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, - 0x0a, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x14, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, - 0x64, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x24, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x50, 0x69, 0x6e, 0x67, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x69, 0x6e, 0x67, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x65, 0x0a, 0x14, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x6f, + 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, + 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, - 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, - 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, - 0x14, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x24, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x14, 0x52, 0x65, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, + 0x24, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, 0x1e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x52, 0x65, 0x6c, - 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x76, 0x74, 0x61, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, + 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, + 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, + 0x0a, 0x1e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x2e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, + 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x21, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x11, 0x52, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x12, 0x21, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, - 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x12, - 0x22, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x52, 0x75, - 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x76, - 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, - 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4a, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1b, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, - 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x10, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, - 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, - 0x18, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, - 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x28, 0x2e, 0x76, 0x74, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, + 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1b, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x56, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x18, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x65, 0x64, 0x12, 0x28, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, - 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5b, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, - 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x17, + 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x08, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x5b, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x16, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1d, 0x2e, 0x76, + 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x70, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x2e, 0x76, 0x74, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, - 0x0a, 0x09, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x76, 0x74, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, - 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x44, 0x0a, 0x09, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x19, + 0x2e, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x74, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x54, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x76, 0x69, 0x74, 0x65, 0x73, + 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, + 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6765,7 +6981,7 @@ func file_vtadmin_proto_rawDescGZIP() []byte { } var file_vtadmin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_vtadmin_proto_msgTypes = make([]protoimpl.MessageInfo, 102) +var file_vtadmin_proto_msgTypes = make([]protoimpl.MessageInfo, 105) var file_vtadmin_proto_goTypes = []interface{}{ (Tablet_ServingState)(0), // 0: vtadmin.Tablet.ServingState (*Cluster)(nil), // 1: vtadmin.Cluster @@ -6801,293 +7017,306 @@ var file_vtadmin_proto_goTypes = []interface{}{ (*GetCellsAliasesResponse)(nil), // 31: vtadmin.GetCellsAliasesResponse (*GetClustersRequest)(nil), // 32: vtadmin.GetClustersRequest (*GetClustersResponse)(nil), // 33: vtadmin.GetClustersResponse - (*GetGatesRequest)(nil), // 34: vtadmin.GetGatesRequest - (*GetGatesResponse)(nil), // 35: vtadmin.GetGatesResponse - (*GetKeyspaceRequest)(nil), // 36: vtadmin.GetKeyspaceRequest - (*GetKeyspacesRequest)(nil), // 37: vtadmin.GetKeyspacesRequest - (*GetKeyspacesResponse)(nil), // 38: vtadmin.GetKeyspacesResponse - (*GetSchemaRequest)(nil), // 39: vtadmin.GetSchemaRequest - (*GetSchemasRequest)(nil), // 40: vtadmin.GetSchemasRequest - (*GetSchemasResponse)(nil), // 41: vtadmin.GetSchemasResponse - (*GetShardReplicationPositionsRequest)(nil), // 42: vtadmin.GetShardReplicationPositionsRequest - (*GetShardReplicationPositionsResponse)(nil), // 43: vtadmin.GetShardReplicationPositionsResponse - (*GetSrvVSchemaRequest)(nil), // 44: vtadmin.GetSrvVSchemaRequest - (*GetSrvVSchemasRequest)(nil), // 45: vtadmin.GetSrvVSchemasRequest - (*GetSrvVSchemasResponse)(nil), // 46: vtadmin.GetSrvVSchemasResponse - (*GetSchemaTableSizeOptions)(nil), // 47: vtadmin.GetSchemaTableSizeOptions - (*GetTabletRequest)(nil), // 48: vtadmin.GetTabletRequest - (*GetTabletsRequest)(nil), // 49: vtadmin.GetTabletsRequest - (*GetTabletsResponse)(nil), // 50: vtadmin.GetTabletsResponse - (*GetVSchemaRequest)(nil), // 51: vtadmin.GetVSchemaRequest - (*GetVSchemasRequest)(nil), // 52: vtadmin.GetVSchemasRequest - (*GetVSchemasResponse)(nil), // 53: vtadmin.GetVSchemasResponse - (*GetVtctldsRequest)(nil), // 54: vtadmin.GetVtctldsRequest - (*GetVtctldsResponse)(nil), // 55: vtadmin.GetVtctldsResponse - (*GetWorkflowRequest)(nil), // 56: vtadmin.GetWorkflowRequest - (*GetWorkflowsRequest)(nil), // 57: vtadmin.GetWorkflowsRequest - (*GetWorkflowsResponse)(nil), // 58: vtadmin.GetWorkflowsResponse - (*PingTabletRequest)(nil), // 59: vtadmin.PingTabletRequest - (*PingTabletResponse)(nil), // 60: vtadmin.PingTabletResponse - (*PlannedFailoverShardRequest)(nil), // 61: vtadmin.PlannedFailoverShardRequest - (*PlannedFailoverShardResponse)(nil), // 62: vtadmin.PlannedFailoverShardResponse - (*RebuildKeyspaceGraphRequest)(nil), // 63: vtadmin.RebuildKeyspaceGraphRequest - (*RebuildKeyspaceGraphResponse)(nil), // 64: vtadmin.RebuildKeyspaceGraphResponse - (*RefreshStateRequest)(nil), // 65: vtadmin.RefreshStateRequest - (*RefreshStateResponse)(nil), // 66: vtadmin.RefreshStateResponse - (*ReloadSchemasRequest)(nil), // 67: vtadmin.ReloadSchemasRequest - (*ReloadSchemasResponse)(nil), // 68: vtadmin.ReloadSchemasResponse - (*ReloadSchemaShardRequest)(nil), // 69: vtadmin.ReloadSchemaShardRequest - (*ReloadSchemaShardResponse)(nil), // 70: vtadmin.ReloadSchemaShardResponse - (*RefreshTabletReplicationSourceRequest)(nil), // 71: vtadmin.RefreshTabletReplicationSourceRequest - (*RefreshTabletReplicationSourceResponse)(nil), // 72: vtadmin.RefreshTabletReplicationSourceResponse - (*RemoveKeyspaceCellRequest)(nil), // 73: vtadmin.RemoveKeyspaceCellRequest - (*RemoveKeyspaceCellResponse)(nil), // 74: vtadmin.RemoveKeyspaceCellResponse - (*RunHealthCheckRequest)(nil), // 75: vtadmin.RunHealthCheckRequest - (*RunHealthCheckResponse)(nil), // 76: vtadmin.RunHealthCheckResponse - (*SetReadOnlyRequest)(nil), // 77: vtadmin.SetReadOnlyRequest - (*SetReadOnlyResponse)(nil), // 78: vtadmin.SetReadOnlyResponse - (*SetReadWriteRequest)(nil), // 79: vtadmin.SetReadWriteRequest - (*SetReadWriteResponse)(nil), // 80: vtadmin.SetReadWriteResponse - (*StartReplicationRequest)(nil), // 81: vtadmin.StartReplicationRequest - (*StartReplicationResponse)(nil), // 82: vtadmin.StartReplicationResponse - (*StopReplicationRequest)(nil), // 83: vtadmin.StopReplicationRequest - (*StopReplicationResponse)(nil), // 84: vtadmin.StopReplicationResponse - (*TabletExternallyPromotedRequest)(nil), // 85: vtadmin.TabletExternallyPromotedRequest - (*TabletExternallyPromotedResponse)(nil), // 86: vtadmin.TabletExternallyPromotedResponse - (*TabletExternallyReparentedRequest)(nil), // 87: vtadmin.TabletExternallyReparentedRequest - (*ValidateKeyspaceRequest)(nil), // 88: vtadmin.ValidateKeyspaceRequest - (*ValidateSchemaKeyspaceRequest)(nil), // 89: vtadmin.ValidateSchemaKeyspaceRequest - (*ValidateVersionKeyspaceRequest)(nil), // 90: vtadmin.ValidateVersionKeyspaceRequest - (*VTExplainRequest)(nil), // 91: vtadmin.VTExplainRequest - (*VTExplainResponse)(nil), // 92: vtadmin.VTExplainResponse - nil, // 93: vtadmin.ClusterCellsAliases.AliasesEntry - nil, // 94: vtadmin.Keyspace.ShardsEntry - nil, // 95: vtadmin.Schema.TableSizesEntry - (*Schema_ShardTableSize)(nil), // 96: vtadmin.Schema.ShardTableSize - (*Schema_TableSize)(nil), // 97: vtadmin.Schema.TableSize - nil, // 98: vtadmin.Schema.TableSize.ByShardEntry - nil, // 99: vtadmin.GetWorkflowsResponse.WorkflowsByClusterEntry - (*ReloadSchemasResponse_KeyspaceResult)(nil), // 100: vtadmin.ReloadSchemasResponse.KeyspaceResult - (*ReloadSchemasResponse_ShardResult)(nil), // 101: vtadmin.ReloadSchemasResponse.ShardResult - (*ReloadSchemasResponse_TabletResult)(nil), // 102: vtadmin.ReloadSchemasResponse.TabletResult - (*mysqlctl.BackupInfo)(nil), // 103: mysqlctl.BackupInfo - (*topodata.CellInfo)(nil), // 104: topodata.CellInfo - (*vtctldata.ShardReplicationPositionsResponse)(nil), // 105: vtctldata.ShardReplicationPositionsResponse - (*vtctldata.Keyspace)(nil), // 106: vtctldata.Keyspace - (*tabletmanagerdata.TableDefinition)(nil), // 107: tabletmanagerdata.TableDefinition - (*vtctldata.Shard)(nil), // 108: vtctldata.Shard - (*vschema.SrvVSchema)(nil), // 109: vschema.SrvVSchema - (*topodata.Tablet)(nil), // 110: topodata.Tablet - (*vschema.Keyspace)(nil), // 111: vschema.Keyspace - (*vtctldata.Workflow)(nil), // 112: vtctldata.Workflow - (*vtctldata.CreateKeyspaceRequest)(nil), // 113: vtctldata.CreateKeyspaceRequest - (*vtctldata.CreateShardRequest)(nil), // 114: vtctldata.CreateShardRequest - (*vtctldata.DeleteKeyspaceRequest)(nil), // 115: vtctldata.DeleteKeyspaceRequest - (*vtctldata.DeleteShardsRequest)(nil), // 116: vtctldata.DeleteShardsRequest - (*topodata.TabletAlias)(nil), // 117: topodata.TabletAlias - (*vtctldata.EmergencyReparentShardRequest)(nil), // 118: vtctldata.EmergencyReparentShardRequest - (*logutil.Event)(nil), // 119: logutil.Event - (*vtctldata.GetBackupsRequest)(nil), // 120: vtctldata.GetBackupsRequest - (*vtctldata.PlannedReparentShardRequest)(nil), // 121: vtctldata.PlannedReparentShardRequest - (*topodata.CellsAlias)(nil), // 122: topodata.CellsAlias - (*vtctldata.CreateShardResponse)(nil), // 123: vtctldata.CreateShardResponse - (*vtctldata.DeleteKeyspaceResponse)(nil), // 124: vtctldata.DeleteKeyspaceResponse - (*vtctldata.DeleteShardsResponse)(nil), // 125: vtctldata.DeleteShardsResponse - (*vtctldata.ValidateKeyspaceResponse)(nil), // 126: vtctldata.ValidateKeyspaceResponse - (*vtctldata.ValidateSchemaKeyspaceResponse)(nil), // 127: vtctldata.ValidateSchemaKeyspaceResponse - (*vtctldata.ValidateVersionKeyspaceResponse)(nil), // 128: vtctldata.ValidateVersionKeyspaceResponse + (*GetFullStatusRequest)(nil), // 34: vtadmin.GetFullStatusRequest + (*GetGatesRequest)(nil), // 35: vtadmin.GetGatesRequest + (*GetGatesResponse)(nil), // 36: vtadmin.GetGatesResponse + (*GetKeyspaceRequest)(nil), // 37: vtadmin.GetKeyspaceRequest + (*GetKeyspacesRequest)(nil), // 38: vtadmin.GetKeyspacesRequest + (*GetKeyspacesResponse)(nil), // 39: vtadmin.GetKeyspacesResponse + (*GetSchemaRequest)(nil), // 40: vtadmin.GetSchemaRequest + (*GetSchemasRequest)(nil), // 41: vtadmin.GetSchemasRequest + (*GetSchemasResponse)(nil), // 42: vtadmin.GetSchemasResponse + (*GetShardReplicationPositionsRequest)(nil), // 43: vtadmin.GetShardReplicationPositionsRequest + (*GetShardReplicationPositionsResponse)(nil), // 44: vtadmin.GetShardReplicationPositionsResponse + (*GetSrvVSchemaRequest)(nil), // 45: vtadmin.GetSrvVSchemaRequest + (*GetSrvVSchemasRequest)(nil), // 46: vtadmin.GetSrvVSchemasRequest + (*GetSrvVSchemasResponse)(nil), // 47: vtadmin.GetSrvVSchemasResponse + (*GetSchemaTableSizeOptions)(nil), // 48: vtadmin.GetSchemaTableSizeOptions + (*GetTabletRequest)(nil), // 49: vtadmin.GetTabletRequest + (*GetTabletsRequest)(nil), // 50: vtadmin.GetTabletsRequest + (*GetTabletsResponse)(nil), // 51: vtadmin.GetTabletsResponse + (*GetVSchemaRequest)(nil), // 52: vtadmin.GetVSchemaRequest + (*GetVSchemasRequest)(nil), // 53: vtadmin.GetVSchemasRequest + (*GetVSchemasResponse)(nil), // 54: vtadmin.GetVSchemasResponse + (*GetVtctldsRequest)(nil), // 55: vtadmin.GetVtctldsRequest + (*GetVtctldsResponse)(nil), // 56: vtadmin.GetVtctldsResponse + (*GetWorkflowRequest)(nil), // 57: vtadmin.GetWorkflowRequest + (*GetWorkflowsRequest)(nil), // 58: vtadmin.GetWorkflowsRequest + (*GetWorkflowsResponse)(nil), // 59: vtadmin.GetWorkflowsResponse + (*PingTabletRequest)(nil), // 60: vtadmin.PingTabletRequest + (*PingTabletResponse)(nil), // 61: vtadmin.PingTabletResponse + (*PlannedFailoverShardRequest)(nil), // 62: vtadmin.PlannedFailoverShardRequest + (*PlannedFailoverShardResponse)(nil), // 63: vtadmin.PlannedFailoverShardResponse + (*RebuildKeyspaceGraphRequest)(nil), // 64: vtadmin.RebuildKeyspaceGraphRequest + (*RebuildKeyspaceGraphResponse)(nil), // 65: vtadmin.RebuildKeyspaceGraphResponse + (*RefreshStateRequest)(nil), // 66: vtadmin.RefreshStateRequest + (*RefreshStateResponse)(nil), // 67: vtadmin.RefreshStateResponse + (*ReloadSchemasRequest)(nil), // 68: vtadmin.ReloadSchemasRequest + (*ReloadSchemasResponse)(nil), // 69: vtadmin.ReloadSchemasResponse + (*ReloadSchemaShardRequest)(nil), // 70: vtadmin.ReloadSchemaShardRequest + (*ReloadSchemaShardResponse)(nil), // 71: vtadmin.ReloadSchemaShardResponse + (*RefreshTabletReplicationSourceRequest)(nil), // 72: vtadmin.RefreshTabletReplicationSourceRequest + (*RefreshTabletReplicationSourceResponse)(nil), // 73: vtadmin.RefreshTabletReplicationSourceResponse + (*RemoveKeyspaceCellRequest)(nil), // 74: vtadmin.RemoveKeyspaceCellRequest + (*RemoveKeyspaceCellResponse)(nil), // 75: vtadmin.RemoveKeyspaceCellResponse + (*RunHealthCheckRequest)(nil), // 76: vtadmin.RunHealthCheckRequest + (*RunHealthCheckResponse)(nil), // 77: vtadmin.RunHealthCheckResponse + (*SetReadOnlyRequest)(nil), // 78: vtadmin.SetReadOnlyRequest + (*SetReadOnlyResponse)(nil), // 79: vtadmin.SetReadOnlyResponse + (*SetReadWriteRequest)(nil), // 80: vtadmin.SetReadWriteRequest + (*SetReadWriteResponse)(nil), // 81: vtadmin.SetReadWriteResponse + (*StartReplicationRequest)(nil), // 82: vtadmin.StartReplicationRequest + (*StartReplicationResponse)(nil), // 83: vtadmin.StartReplicationResponse + (*StopReplicationRequest)(nil), // 84: vtadmin.StopReplicationRequest + (*StopReplicationResponse)(nil), // 85: vtadmin.StopReplicationResponse + (*TabletExternallyPromotedRequest)(nil), // 86: vtadmin.TabletExternallyPromotedRequest + (*TabletExternallyPromotedResponse)(nil), // 87: vtadmin.TabletExternallyPromotedResponse + (*TabletExternallyReparentedRequest)(nil), // 88: vtadmin.TabletExternallyReparentedRequest + (*ValidateRequest)(nil), // 89: vtadmin.ValidateRequest + (*ValidateKeyspaceRequest)(nil), // 90: vtadmin.ValidateKeyspaceRequest + (*ValidateSchemaKeyspaceRequest)(nil), // 91: vtadmin.ValidateSchemaKeyspaceRequest + (*ValidateShardRequest)(nil), // 92: vtadmin.ValidateShardRequest + (*ValidateVersionKeyspaceRequest)(nil), // 93: vtadmin.ValidateVersionKeyspaceRequest + (*VTExplainRequest)(nil), // 94: vtadmin.VTExplainRequest + (*VTExplainResponse)(nil), // 95: vtadmin.VTExplainResponse + nil, // 96: vtadmin.ClusterCellsAliases.AliasesEntry + nil, // 97: vtadmin.Keyspace.ShardsEntry + nil, // 98: vtadmin.Schema.TableSizesEntry + (*Schema_ShardTableSize)(nil), // 99: vtadmin.Schema.ShardTableSize + (*Schema_TableSize)(nil), // 100: vtadmin.Schema.TableSize + nil, // 101: vtadmin.Schema.TableSize.ByShardEntry + nil, // 102: vtadmin.GetWorkflowsResponse.WorkflowsByClusterEntry + (*ReloadSchemasResponse_KeyspaceResult)(nil), // 103: vtadmin.ReloadSchemasResponse.KeyspaceResult + (*ReloadSchemasResponse_ShardResult)(nil), // 104: vtadmin.ReloadSchemasResponse.ShardResult + (*ReloadSchemasResponse_TabletResult)(nil), // 105: vtadmin.ReloadSchemasResponse.TabletResult + (*mysqlctl.BackupInfo)(nil), // 106: mysqlctl.BackupInfo + (*topodata.CellInfo)(nil), // 107: topodata.CellInfo + (*vtctldata.ShardReplicationPositionsResponse)(nil), // 108: vtctldata.ShardReplicationPositionsResponse + (*vtctldata.Keyspace)(nil), // 109: vtctldata.Keyspace + (*tabletmanagerdata.TableDefinition)(nil), // 110: tabletmanagerdata.TableDefinition + (*vtctldata.Shard)(nil), // 111: vtctldata.Shard + (*vschema.SrvVSchema)(nil), // 112: vschema.SrvVSchema + (*topodata.Tablet)(nil), // 113: topodata.Tablet + (*vschema.Keyspace)(nil), // 114: vschema.Keyspace + (*vtctldata.Workflow)(nil), // 115: vtctldata.Workflow + (*vtctldata.CreateKeyspaceRequest)(nil), // 116: vtctldata.CreateKeyspaceRequest + (*vtctldata.CreateShardRequest)(nil), // 117: vtctldata.CreateShardRequest + (*vtctldata.DeleteKeyspaceRequest)(nil), // 118: vtctldata.DeleteKeyspaceRequest + (*vtctldata.DeleteShardsRequest)(nil), // 119: vtctldata.DeleteShardsRequest + (*topodata.TabletAlias)(nil), // 120: topodata.TabletAlias + (*vtctldata.EmergencyReparentShardRequest)(nil), // 121: vtctldata.EmergencyReparentShardRequest + (*logutil.Event)(nil), // 122: logutil.Event + (*vtctldata.GetBackupsRequest)(nil), // 123: vtctldata.GetBackupsRequest + (*vtctldata.PlannedReparentShardRequest)(nil), // 124: vtctldata.PlannedReparentShardRequest + (*topodata.CellsAlias)(nil), // 125: topodata.CellsAlias + (*vtctldata.CreateShardResponse)(nil), // 126: vtctldata.CreateShardResponse + (*vtctldata.DeleteKeyspaceResponse)(nil), // 127: vtctldata.DeleteKeyspaceResponse + (*vtctldata.DeleteShardsResponse)(nil), // 128: vtctldata.DeleteShardsResponse + (*vtctldata.GetFullStatusResponse)(nil), // 129: vtctldata.GetFullStatusResponse + (*vtctldata.ValidateResponse)(nil), // 130: vtctldata.ValidateResponse + (*vtctldata.ValidateKeyspaceResponse)(nil), // 131: vtctldata.ValidateKeyspaceResponse + (*vtctldata.ValidateSchemaKeyspaceResponse)(nil), // 132: vtctldata.ValidateSchemaKeyspaceResponse + (*vtctldata.ValidateShardResponse)(nil), // 133: vtctldata.ValidateShardResponse + (*vtctldata.ValidateVersionKeyspaceResponse)(nil), // 134: vtctldata.ValidateVersionKeyspaceResponse } var file_vtadmin_proto_depIdxs = []int32{ 1, // 0: vtadmin.ClusterBackup.cluster:type_name -> vtadmin.Cluster - 103, // 1: vtadmin.ClusterBackup.backup:type_name -> mysqlctl.BackupInfo + 106, // 1: vtadmin.ClusterBackup.backup:type_name -> mysqlctl.BackupInfo 1, // 2: vtadmin.ClusterCellsAliases.cluster:type_name -> vtadmin.Cluster - 93, // 3: vtadmin.ClusterCellsAliases.aliases:type_name -> vtadmin.ClusterCellsAliases.AliasesEntry + 96, // 3: vtadmin.ClusterCellsAliases.aliases:type_name -> vtadmin.ClusterCellsAliases.AliasesEntry 1, // 4: vtadmin.ClusterCellInfo.cluster:type_name -> vtadmin.Cluster - 104, // 5: vtadmin.ClusterCellInfo.cell_info:type_name -> topodata.CellInfo + 107, // 5: vtadmin.ClusterCellInfo.cell_info:type_name -> topodata.CellInfo 1, // 6: vtadmin.ClusterShardReplicationPosition.cluster:type_name -> vtadmin.Cluster - 105, // 7: vtadmin.ClusterShardReplicationPosition.position_info:type_name -> vtctldata.ShardReplicationPositionsResponse + 108, // 7: vtadmin.ClusterShardReplicationPosition.position_info:type_name -> vtctldata.ShardReplicationPositionsResponse 15, // 8: vtadmin.ClusterWorkflows.workflows:type_name -> vtadmin.Workflow 1, // 9: vtadmin.Keyspace.cluster:type_name -> vtadmin.Cluster - 106, // 10: vtadmin.Keyspace.keyspace:type_name -> vtctldata.Keyspace - 94, // 11: vtadmin.Keyspace.shards:type_name -> vtadmin.Keyspace.ShardsEntry + 109, // 10: vtadmin.Keyspace.keyspace:type_name -> vtctldata.Keyspace + 97, // 11: vtadmin.Keyspace.shards:type_name -> vtadmin.Keyspace.ShardsEntry 1, // 12: vtadmin.Schema.cluster:type_name -> vtadmin.Cluster - 107, // 13: vtadmin.Schema.table_definitions:type_name -> tabletmanagerdata.TableDefinition - 95, // 14: vtadmin.Schema.table_sizes:type_name -> vtadmin.Schema.TableSizesEntry + 110, // 13: vtadmin.Schema.table_definitions:type_name -> tabletmanagerdata.TableDefinition + 98, // 14: vtadmin.Schema.table_sizes:type_name -> vtadmin.Schema.TableSizesEntry 1, // 15: vtadmin.Shard.cluster:type_name -> vtadmin.Cluster - 108, // 16: vtadmin.Shard.shard:type_name -> vtctldata.Shard + 111, // 16: vtadmin.Shard.shard:type_name -> vtctldata.Shard 1, // 17: vtadmin.SrvVSchema.cluster:type_name -> vtadmin.Cluster - 109, // 18: vtadmin.SrvVSchema.srv_v_schema:type_name -> vschema.SrvVSchema + 112, // 18: vtadmin.SrvVSchema.srv_v_schema:type_name -> vschema.SrvVSchema 1, // 19: vtadmin.Tablet.cluster:type_name -> vtadmin.Cluster - 110, // 20: vtadmin.Tablet.tablet:type_name -> topodata.Tablet + 113, // 20: vtadmin.Tablet.tablet:type_name -> topodata.Tablet 0, // 21: vtadmin.Tablet.state:type_name -> vtadmin.Tablet.ServingState 1, // 22: vtadmin.VSchema.cluster:type_name -> vtadmin.Cluster - 111, // 23: vtadmin.VSchema.v_schema:type_name -> vschema.Keyspace + 114, // 23: vtadmin.VSchema.v_schema:type_name -> vschema.Keyspace 1, // 24: vtadmin.Vtctld.cluster:type_name -> vtadmin.Cluster 1, // 25: vtadmin.VTGate.cluster:type_name -> vtadmin.Cluster 1, // 26: vtadmin.Workflow.cluster:type_name -> vtadmin.Cluster - 112, // 27: vtadmin.Workflow.workflow:type_name -> vtctldata.Workflow - 113, // 28: vtadmin.CreateKeyspaceRequest.options:type_name -> vtctldata.CreateKeyspaceRequest + 115, // 27: vtadmin.Workflow.workflow:type_name -> vtctldata.Workflow + 116, // 28: vtadmin.CreateKeyspaceRequest.options:type_name -> vtctldata.CreateKeyspaceRequest 7, // 29: vtadmin.CreateKeyspaceResponse.keyspace:type_name -> vtadmin.Keyspace - 114, // 30: vtadmin.CreateShardRequest.options:type_name -> vtctldata.CreateShardRequest - 115, // 31: vtadmin.DeleteKeyspaceRequest.options:type_name -> vtctldata.DeleteKeyspaceRequest - 116, // 32: vtadmin.DeleteShardsRequest.options:type_name -> vtctldata.DeleteShardsRequest - 117, // 33: vtadmin.DeleteTabletRequest.alias:type_name -> topodata.TabletAlias + 117, // 30: vtadmin.CreateShardRequest.options:type_name -> vtctldata.CreateShardRequest + 118, // 31: vtadmin.DeleteKeyspaceRequest.options:type_name -> vtctldata.DeleteKeyspaceRequest + 119, // 32: vtadmin.DeleteShardsRequest.options:type_name -> vtctldata.DeleteShardsRequest + 120, // 33: vtadmin.DeleteTabletRequest.alias:type_name -> topodata.TabletAlias 1, // 34: vtadmin.DeleteTabletResponse.cluster:type_name -> vtadmin.Cluster - 118, // 35: vtadmin.EmergencyFailoverShardRequest.options:type_name -> vtctldata.EmergencyReparentShardRequest + 121, // 35: vtadmin.EmergencyFailoverShardRequest.options:type_name -> vtctldata.EmergencyReparentShardRequest 1, // 36: vtadmin.EmergencyFailoverShardResponse.cluster:type_name -> vtadmin.Cluster - 117, // 37: vtadmin.EmergencyFailoverShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 119, // 38: vtadmin.EmergencyFailoverShardResponse.events:type_name -> logutil.Event - 47, // 39: vtadmin.FindSchemaRequest.table_size_options:type_name -> vtadmin.GetSchemaTableSizeOptions - 120, // 40: vtadmin.GetBackupsRequest.request_options:type_name -> vtctldata.GetBackupsRequest + 120, // 37: vtadmin.EmergencyFailoverShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 122, // 38: vtadmin.EmergencyFailoverShardResponse.events:type_name -> logutil.Event + 48, // 39: vtadmin.FindSchemaRequest.table_size_options:type_name -> vtadmin.GetSchemaTableSizeOptions + 123, // 40: vtadmin.GetBackupsRequest.request_options:type_name -> vtctldata.GetBackupsRequest 2, // 41: vtadmin.GetBackupsResponse.backups:type_name -> vtadmin.ClusterBackup 4, // 42: vtadmin.GetCellInfosResponse.cell_infos:type_name -> vtadmin.ClusterCellInfo 3, // 43: vtadmin.GetCellsAliasesResponse.aliases:type_name -> vtadmin.ClusterCellsAliases 1, // 44: vtadmin.GetClustersResponse.clusters:type_name -> vtadmin.Cluster - 14, // 45: vtadmin.GetGatesResponse.gates:type_name -> vtadmin.VTGate - 7, // 46: vtadmin.GetKeyspacesResponse.keyspaces:type_name -> vtadmin.Keyspace - 47, // 47: vtadmin.GetSchemaRequest.table_size_options:type_name -> vtadmin.GetSchemaTableSizeOptions - 47, // 48: vtadmin.GetSchemasRequest.table_size_options:type_name -> vtadmin.GetSchemaTableSizeOptions - 8, // 49: vtadmin.GetSchemasResponse.schemas:type_name -> vtadmin.Schema - 5, // 50: vtadmin.GetShardReplicationPositionsResponse.replication_positions:type_name -> vtadmin.ClusterShardReplicationPosition - 10, // 51: vtadmin.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtadmin.SrvVSchema - 117, // 52: vtadmin.GetTabletRequest.alias:type_name -> topodata.TabletAlias - 11, // 53: vtadmin.GetTabletsResponse.tablets:type_name -> vtadmin.Tablet - 12, // 54: vtadmin.GetVSchemasResponse.v_schemas:type_name -> vtadmin.VSchema - 13, // 55: vtadmin.GetVtctldsResponse.vtctlds:type_name -> vtadmin.Vtctld - 99, // 56: vtadmin.GetWorkflowsResponse.workflows_by_cluster:type_name -> vtadmin.GetWorkflowsResponse.WorkflowsByClusterEntry - 117, // 57: vtadmin.PingTabletRequest.alias:type_name -> topodata.TabletAlias - 1, // 58: vtadmin.PingTabletResponse.cluster:type_name -> vtadmin.Cluster - 121, // 59: vtadmin.PlannedFailoverShardRequest.options:type_name -> vtctldata.PlannedReparentShardRequest - 1, // 60: vtadmin.PlannedFailoverShardResponse.cluster:type_name -> vtadmin.Cluster - 117, // 61: vtadmin.PlannedFailoverShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 119, // 62: vtadmin.PlannedFailoverShardResponse.events:type_name -> logutil.Event - 117, // 63: vtadmin.RefreshStateRequest.alias:type_name -> topodata.TabletAlias - 1, // 64: vtadmin.RefreshStateResponse.cluster:type_name -> vtadmin.Cluster - 117, // 65: vtadmin.ReloadSchemasRequest.tablets:type_name -> topodata.TabletAlias - 100, // 66: vtadmin.ReloadSchemasResponse.keyspace_results:type_name -> vtadmin.ReloadSchemasResponse.KeyspaceResult - 101, // 67: vtadmin.ReloadSchemasResponse.shard_results:type_name -> vtadmin.ReloadSchemasResponse.ShardResult - 102, // 68: vtadmin.ReloadSchemasResponse.tablet_results:type_name -> vtadmin.ReloadSchemasResponse.TabletResult - 119, // 69: vtadmin.ReloadSchemaShardResponse.events:type_name -> logutil.Event - 117, // 70: vtadmin.RefreshTabletReplicationSourceRequest.alias:type_name -> topodata.TabletAlias - 117, // 71: vtadmin.RefreshTabletReplicationSourceResponse.primary:type_name -> topodata.TabletAlias - 1, // 72: vtadmin.RefreshTabletReplicationSourceResponse.cluster:type_name -> vtadmin.Cluster - 117, // 73: vtadmin.RunHealthCheckRequest.alias:type_name -> topodata.TabletAlias - 1, // 74: vtadmin.RunHealthCheckResponse.cluster:type_name -> vtadmin.Cluster - 117, // 75: vtadmin.SetReadOnlyRequest.alias:type_name -> topodata.TabletAlias - 117, // 76: vtadmin.SetReadWriteRequest.alias:type_name -> topodata.TabletAlias - 117, // 77: vtadmin.StartReplicationRequest.alias:type_name -> topodata.TabletAlias - 1, // 78: vtadmin.StartReplicationResponse.cluster:type_name -> vtadmin.Cluster - 117, // 79: vtadmin.StopReplicationRequest.alias:type_name -> topodata.TabletAlias - 1, // 80: vtadmin.StopReplicationResponse.cluster:type_name -> vtadmin.Cluster - 117, // 81: vtadmin.TabletExternallyPromotedRequest.alias:type_name -> topodata.TabletAlias - 1, // 82: vtadmin.TabletExternallyPromotedResponse.cluster:type_name -> vtadmin.Cluster - 117, // 83: vtadmin.TabletExternallyPromotedResponse.new_primary:type_name -> topodata.TabletAlias - 117, // 84: vtadmin.TabletExternallyPromotedResponse.old_primary:type_name -> topodata.TabletAlias - 117, // 85: vtadmin.TabletExternallyReparentedRequest.alias:type_name -> topodata.TabletAlias - 122, // 86: vtadmin.ClusterCellsAliases.AliasesEntry.value:type_name -> topodata.CellsAlias - 108, // 87: vtadmin.Keyspace.ShardsEntry.value:type_name -> vtctldata.Shard - 97, // 88: vtadmin.Schema.TableSizesEntry.value:type_name -> vtadmin.Schema.TableSize - 98, // 89: vtadmin.Schema.TableSize.by_shard:type_name -> vtadmin.Schema.TableSize.ByShardEntry - 96, // 90: vtadmin.Schema.TableSize.ByShardEntry.value:type_name -> vtadmin.Schema.ShardTableSize - 6, // 91: vtadmin.GetWorkflowsResponse.WorkflowsByClusterEntry.value:type_name -> vtadmin.ClusterWorkflows - 7, // 92: vtadmin.ReloadSchemasResponse.KeyspaceResult.keyspace:type_name -> vtadmin.Keyspace - 119, // 93: vtadmin.ReloadSchemasResponse.KeyspaceResult.events:type_name -> logutil.Event - 9, // 94: vtadmin.ReloadSchemasResponse.ShardResult.shard:type_name -> vtadmin.Shard - 119, // 95: vtadmin.ReloadSchemasResponse.ShardResult.events:type_name -> logutil.Event - 11, // 96: vtadmin.ReloadSchemasResponse.TabletResult.tablet:type_name -> vtadmin.Tablet - 16, // 97: vtadmin.VTAdmin.CreateKeyspace:input_type -> vtadmin.CreateKeyspaceRequest - 18, // 98: vtadmin.VTAdmin.CreateShard:input_type -> vtadmin.CreateShardRequest - 19, // 99: vtadmin.VTAdmin.DeleteKeyspace:input_type -> vtadmin.DeleteKeyspaceRequest - 20, // 100: vtadmin.VTAdmin.DeleteShards:input_type -> vtadmin.DeleteShardsRequest - 21, // 101: vtadmin.VTAdmin.DeleteTablet:input_type -> vtadmin.DeleteTabletRequest - 23, // 102: vtadmin.VTAdmin.EmergencyFailoverShard:input_type -> vtadmin.EmergencyFailoverShardRequest - 25, // 103: vtadmin.VTAdmin.FindSchema:input_type -> vtadmin.FindSchemaRequest - 26, // 104: vtadmin.VTAdmin.GetBackups:input_type -> vtadmin.GetBackupsRequest - 28, // 105: vtadmin.VTAdmin.GetCellInfos:input_type -> vtadmin.GetCellInfosRequest - 30, // 106: vtadmin.VTAdmin.GetCellsAliases:input_type -> vtadmin.GetCellsAliasesRequest - 32, // 107: vtadmin.VTAdmin.GetClusters:input_type -> vtadmin.GetClustersRequest - 34, // 108: vtadmin.VTAdmin.GetGates:input_type -> vtadmin.GetGatesRequest - 36, // 109: vtadmin.VTAdmin.GetKeyspace:input_type -> vtadmin.GetKeyspaceRequest - 37, // 110: vtadmin.VTAdmin.GetKeyspaces:input_type -> vtadmin.GetKeyspacesRequest - 39, // 111: vtadmin.VTAdmin.GetSchema:input_type -> vtadmin.GetSchemaRequest - 40, // 112: vtadmin.VTAdmin.GetSchemas:input_type -> vtadmin.GetSchemasRequest - 42, // 113: vtadmin.VTAdmin.GetShardReplicationPositions:input_type -> vtadmin.GetShardReplicationPositionsRequest - 44, // 114: vtadmin.VTAdmin.GetSrvVSchema:input_type -> vtadmin.GetSrvVSchemaRequest - 45, // 115: vtadmin.VTAdmin.GetSrvVSchemas:input_type -> vtadmin.GetSrvVSchemasRequest - 48, // 116: vtadmin.VTAdmin.GetTablet:input_type -> vtadmin.GetTabletRequest - 49, // 117: vtadmin.VTAdmin.GetTablets:input_type -> vtadmin.GetTabletsRequest - 51, // 118: vtadmin.VTAdmin.GetVSchema:input_type -> vtadmin.GetVSchemaRequest - 52, // 119: vtadmin.VTAdmin.GetVSchemas:input_type -> vtadmin.GetVSchemasRequest - 54, // 120: vtadmin.VTAdmin.GetVtctlds:input_type -> vtadmin.GetVtctldsRequest - 56, // 121: vtadmin.VTAdmin.GetWorkflow:input_type -> vtadmin.GetWorkflowRequest - 57, // 122: vtadmin.VTAdmin.GetWorkflows:input_type -> vtadmin.GetWorkflowsRequest - 59, // 123: vtadmin.VTAdmin.PingTablet:input_type -> vtadmin.PingTabletRequest - 61, // 124: vtadmin.VTAdmin.PlannedFailoverShard:input_type -> vtadmin.PlannedFailoverShardRequest - 63, // 125: vtadmin.VTAdmin.RebuildKeyspaceGraph:input_type -> vtadmin.RebuildKeyspaceGraphRequest - 65, // 126: vtadmin.VTAdmin.RefreshState:input_type -> vtadmin.RefreshStateRequest - 71, // 127: vtadmin.VTAdmin.RefreshTabletReplicationSource:input_type -> vtadmin.RefreshTabletReplicationSourceRequest - 67, // 128: vtadmin.VTAdmin.ReloadSchemas:input_type -> vtadmin.ReloadSchemasRequest - 69, // 129: vtadmin.VTAdmin.ReloadSchemaShard:input_type -> vtadmin.ReloadSchemaShardRequest - 73, // 130: vtadmin.VTAdmin.RemoveKeyspaceCell:input_type -> vtadmin.RemoveKeyspaceCellRequest - 75, // 131: vtadmin.VTAdmin.RunHealthCheck:input_type -> vtadmin.RunHealthCheckRequest - 77, // 132: vtadmin.VTAdmin.SetReadOnly:input_type -> vtadmin.SetReadOnlyRequest - 79, // 133: vtadmin.VTAdmin.SetReadWrite:input_type -> vtadmin.SetReadWriteRequest - 81, // 134: vtadmin.VTAdmin.StartReplication:input_type -> vtadmin.StartReplicationRequest - 83, // 135: vtadmin.VTAdmin.StopReplication:input_type -> vtadmin.StopReplicationRequest - 85, // 136: vtadmin.VTAdmin.TabletExternallyPromoted:input_type -> vtadmin.TabletExternallyPromotedRequest - 88, // 137: vtadmin.VTAdmin.ValidateKeyspace:input_type -> vtadmin.ValidateKeyspaceRequest - 89, // 138: vtadmin.VTAdmin.ValidateSchemaKeyspace:input_type -> vtadmin.ValidateSchemaKeyspaceRequest - 90, // 139: vtadmin.VTAdmin.ValidateVersionKeyspace:input_type -> vtadmin.ValidateVersionKeyspaceRequest - 91, // 140: vtadmin.VTAdmin.VTExplain:input_type -> vtadmin.VTExplainRequest - 17, // 141: vtadmin.VTAdmin.CreateKeyspace:output_type -> vtadmin.CreateKeyspaceResponse - 123, // 142: vtadmin.VTAdmin.CreateShard:output_type -> vtctldata.CreateShardResponse - 124, // 143: vtadmin.VTAdmin.DeleteKeyspace:output_type -> vtctldata.DeleteKeyspaceResponse - 125, // 144: vtadmin.VTAdmin.DeleteShards:output_type -> vtctldata.DeleteShardsResponse - 22, // 145: vtadmin.VTAdmin.DeleteTablet:output_type -> vtadmin.DeleteTabletResponse - 24, // 146: vtadmin.VTAdmin.EmergencyFailoverShard:output_type -> vtadmin.EmergencyFailoverShardResponse - 8, // 147: vtadmin.VTAdmin.FindSchema:output_type -> vtadmin.Schema - 27, // 148: vtadmin.VTAdmin.GetBackups:output_type -> vtadmin.GetBackupsResponse - 29, // 149: vtadmin.VTAdmin.GetCellInfos:output_type -> vtadmin.GetCellInfosResponse - 31, // 150: vtadmin.VTAdmin.GetCellsAliases:output_type -> vtadmin.GetCellsAliasesResponse - 33, // 151: vtadmin.VTAdmin.GetClusters:output_type -> vtadmin.GetClustersResponse - 35, // 152: vtadmin.VTAdmin.GetGates:output_type -> vtadmin.GetGatesResponse - 7, // 153: vtadmin.VTAdmin.GetKeyspace:output_type -> vtadmin.Keyspace - 38, // 154: vtadmin.VTAdmin.GetKeyspaces:output_type -> vtadmin.GetKeyspacesResponse - 8, // 155: vtadmin.VTAdmin.GetSchema:output_type -> vtadmin.Schema - 41, // 156: vtadmin.VTAdmin.GetSchemas:output_type -> vtadmin.GetSchemasResponse - 43, // 157: vtadmin.VTAdmin.GetShardReplicationPositions:output_type -> vtadmin.GetShardReplicationPositionsResponse - 10, // 158: vtadmin.VTAdmin.GetSrvVSchema:output_type -> vtadmin.SrvVSchema - 46, // 159: vtadmin.VTAdmin.GetSrvVSchemas:output_type -> vtadmin.GetSrvVSchemasResponse - 11, // 160: vtadmin.VTAdmin.GetTablet:output_type -> vtadmin.Tablet - 50, // 161: vtadmin.VTAdmin.GetTablets:output_type -> vtadmin.GetTabletsResponse - 12, // 162: vtadmin.VTAdmin.GetVSchema:output_type -> vtadmin.VSchema - 53, // 163: vtadmin.VTAdmin.GetVSchemas:output_type -> vtadmin.GetVSchemasResponse - 55, // 164: vtadmin.VTAdmin.GetVtctlds:output_type -> vtadmin.GetVtctldsResponse - 15, // 165: vtadmin.VTAdmin.GetWorkflow:output_type -> vtadmin.Workflow - 58, // 166: vtadmin.VTAdmin.GetWorkflows:output_type -> vtadmin.GetWorkflowsResponse - 60, // 167: vtadmin.VTAdmin.PingTablet:output_type -> vtadmin.PingTabletResponse - 62, // 168: vtadmin.VTAdmin.PlannedFailoverShard:output_type -> vtadmin.PlannedFailoverShardResponse - 64, // 169: vtadmin.VTAdmin.RebuildKeyspaceGraph:output_type -> vtadmin.RebuildKeyspaceGraphResponse - 66, // 170: vtadmin.VTAdmin.RefreshState:output_type -> vtadmin.RefreshStateResponse - 72, // 171: vtadmin.VTAdmin.RefreshTabletReplicationSource:output_type -> vtadmin.RefreshTabletReplicationSourceResponse - 68, // 172: vtadmin.VTAdmin.ReloadSchemas:output_type -> vtadmin.ReloadSchemasResponse - 70, // 173: vtadmin.VTAdmin.ReloadSchemaShard:output_type -> vtadmin.ReloadSchemaShardResponse - 74, // 174: vtadmin.VTAdmin.RemoveKeyspaceCell:output_type -> vtadmin.RemoveKeyspaceCellResponse - 76, // 175: vtadmin.VTAdmin.RunHealthCheck:output_type -> vtadmin.RunHealthCheckResponse - 78, // 176: vtadmin.VTAdmin.SetReadOnly:output_type -> vtadmin.SetReadOnlyResponse - 80, // 177: vtadmin.VTAdmin.SetReadWrite:output_type -> vtadmin.SetReadWriteResponse - 82, // 178: vtadmin.VTAdmin.StartReplication:output_type -> vtadmin.StartReplicationResponse - 84, // 179: vtadmin.VTAdmin.StopReplication:output_type -> vtadmin.StopReplicationResponse - 86, // 180: vtadmin.VTAdmin.TabletExternallyPromoted:output_type -> vtadmin.TabletExternallyPromotedResponse - 126, // 181: vtadmin.VTAdmin.ValidateKeyspace:output_type -> vtctldata.ValidateKeyspaceResponse - 127, // 182: vtadmin.VTAdmin.ValidateSchemaKeyspace:output_type -> vtctldata.ValidateSchemaKeyspaceResponse - 128, // 183: vtadmin.VTAdmin.ValidateVersionKeyspace:output_type -> vtctldata.ValidateVersionKeyspaceResponse - 92, // 184: vtadmin.VTAdmin.VTExplain:output_type -> vtadmin.VTExplainResponse - 141, // [141:185] is the sub-list for method output_type - 97, // [97:141] is the sub-list for method input_type - 97, // [97:97] is the sub-list for extension type_name - 97, // [97:97] is the sub-list for extension extendee - 0, // [0:97] is the sub-list for field type_name + 120, // 45: vtadmin.GetFullStatusRequest.alias:type_name -> topodata.TabletAlias + 14, // 46: vtadmin.GetGatesResponse.gates:type_name -> vtadmin.VTGate + 7, // 47: vtadmin.GetKeyspacesResponse.keyspaces:type_name -> vtadmin.Keyspace + 48, // 48: vtadmin.GetSchemaRequest.table_size_options:type_name -> vtadmin.GetSchemaTableSizeOptions + 48, // 49: vtadmin.GetSchemasRequest.table_size_options:type_name -> vtadmin.GetSchemaTableSizeOptions + 8, // 50: vtadmin.GetSchemasResponse.schemas:type_name -> vtadmin.Schema + 5, // 51: vtadmin.GetShardReplicationPositionsResponse.replication_positions:type_name -> vtadmin.ClusterShardReplicationPosition + 10, // 52: vtadmin.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtadmin.SrvVSchema + 120, // 53: vtadmin.GetTabletRequest.alias:type_name -> topodata.TabletAlias + 11, // 54: vtadmin.GetTabletsResponse.tablets:type_name -> vtadmin.Tablet + 12, // 55: vtadmin.GetVSchemasResponse.v_schemas:type_name -> vtadmin.VSchema + 13, // 56: vtadmin.GetVtctldsResponse.vtctlds:type_name -> vtadmin.Vtctld + 102, // 57: vtadmin.GetWorkflowsResponse.workflows_by_cluster:type_name -> vtadmin.GetWorkflowsResponse.WorkflowsByClusterEntry + 120, // 58: vtadmin.PingTabletRequest.alias:type_name -> topodata.TabletAlias + 1, // 59: vtadmin.PingTabletResponse.cluster:type_name -> vtadmin.Cluster + 124, // 60: vtadmin.PlannedFailoverShardRequest.options:type_name -> vtctldata.PlannedReparentShardRequest + 1, // 61: vtadmin.PlannedFailoverShardResponse.cluster:type_name -> vtadmin.Cluster + 120, // 62: vtadmin.PlannedFailoverShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 122, // 63: vtadmin.PlannedFailoverShardResponse.events:type_name -> logutil.Event + 120, // 64: vtadmin.RefreshStateRequest.alias:type_name -> topodata.TabletAlias + 1, // 65: vtadmin.RefreshStateResponse.cluster:type_name -> vtadmin.Cluster + 120, // 66: vtadmin.ReloadSchemasRequest.tablets:type_name -> topodata.TabletAlias + 103, // 67: vtadmin.ReloadSchemasResponse.keyspace_results:type_name -> vtadmin.ReloadSchemasResponse.KeyspaceResult + 104, // 68: vtadmin.ReloadSchemasResponse.shard_results:type_name -> vtadmin.ReloadSchemasResponse.ShardResult + 105, // 69: vtadmin.ReloadSchemasResponse.tablet_results:type_name -> vtadmin.ReloadSchemasResponse.TabletResult + 122, // 70: vtadmin.ReloadSchemaShardResponse.events:type_name -> logutil.Event + 120, // 71: vtadmin.RefreshTabletReplicationSourceRequest.alias:type_name -> topodata.TabletAlias + 120, // 72: vtadmin.RefreshTabletReplicationSourceResponse.primary:type_name -> topodata.TabletAlias + 1, // 73: vtadmin.RefreshTabletReplicationSourceResponse.cluster:type_name -> vtadmin.Cluster + 120, // 74: vtadmin.RunHealthCheckRequest.alias:type_name -> topodata.TabletAlias + 1, // 75: vtadmin.RunHealthCheckResponse.cluster:type_name -> vtadmin.Cluster + 120, // 76: vtadmin.SetReadOnlyRequest.alias:type_name -> topodata.TabletAlias + 120, // 77: vtadmin.SetReadWriteRequest.alias:type_name -> topodata.TabletAlias + 120, // 78: vtadmin.StartReplicationRequest.alias:type_name -> topodata.TabletAlias + 1, // 79: vtadmin.StartReplicationResponse.cluster:type_name -> vtadmin.Cluster + 120, // 80: vtadmin.StopReplicationRequest.alias:type_name -> topodata.TabletAlias + 1, // 81: vtadmin.StopReplicationResponse.cluster:type_name -> vtadmin.Cluster + 120, // 82: vtadmin.TabletExternallyPromotedRequest.alias:type_name -> topodata.TabletAlias + 1, // 83: vtadmin.TabletExternallyPromotedResponse.cluster:type_name -> vtadmin.Cluster + 120, // 84: vtadmin.TabletExternallyPromotedResponse.new_primary:type_name -> topodata.TabletAlias + 120, // 85: vtadmin.TabletExternallyPromotedResponse.old_primary:type_name -> topodata.TabletAlias + 120, // 86: vtadmin.TabletExternallyReparentedRequest.alias:type_name -> topodata.TabletAlias + 125, // 87: vtadmin.ClusterCellsAliases.AliasesEntry.value:type_name -> topodata.CellsAlias + 111, // 88: vtadmin.Keyspace.ShardsEntry.value:type_name -> vtctldata.Shard + 100, // 89: vtadmin.Schema.TableSizesEntry.value:type_name -> vtadmin.Schema.TableSize + 101, // 90: vtadmin.Schema.TableSize.by_shard:type_name -> vtadmin.Schema.TableSize.ByShardEntry + 99, // 91: vtadmin.Schema.TableSize.ByShardEntry.value:type_name -> vtadmin.Schema.ShardTableSize + 6, // 92: vtadmin.GetWorkflowsResponse.WorkflowsByClusterEntry.value:type_name -> vtadmin.ClusterWorkflows + 7, // 93: vtadmin.ReloadSchemasResponse.KeyspaceResult.keyspace:type_name -> vtadmin.Keyspace + 122, // 94: vtadmin.ReloadSchemasResponse.KeyspaceResult.events:type_name -> logutil.Event + 9, // 95: vtadmin.ReloadSchemasResponse.ShardResult.shard:type_name -> vtadmin.Shard + 122, // 96: vtadmin.ReloadSchemasResponse.ShardResult.events:type_name -> logutil.Event + 11, // 97: vtadmin.ReloadSchemasResponse.TabletResult.tablet:type_name -> vtadmin.Tablet + 16, // 98: vtadmin.VTAdmin.CreateKeyspace:input_type -> vtadmin.CreateKeyspaceRequest + 18, // 99: vtadmin.VTAdmin.CreateShard:input_type -> vtadmin.CreateShardRequest + 19, // 100: vtadmin.VTAdmin.DeleteKeyspace:input_type -> vtadmin.DeleteKeyspaceRequest + 20, // 101: vtadmin.VTAdmin.DeleteShards:input_type -> vtadmin.DeleteShardsRequest + 21, // 102: vtadmin.VTAdmin.DeleteTablet:input_type -> vtadmin.DeleteTabletRequest + 23, // 103: vtadmin.VTAdmin.EmergencyFailoverShard:input_type -> vtadmin.EmergencyFailoverShardRequest + 25, // 104: vtadmin.VTAdmin.FindSchema:input_type -> vtadmin.FindSchemaRequest + 26, // 105: vtadmin.VTAdmin.GetBackups:input_type -> vtadmin.GetBackupsRequest + 28, // 106: vtadmin.VTAdmin.GetCellInfos:input_type -> vtadmin.GetCellInfosRequest + 30, // 107: vtadmin.VTAdmin.GetCellsAliases:input_type -> vtadmin.GetCellsAliasesRequest + 32, // 108: vtadmin.VTAdmin.GetClusters:input_type -> vtadmin.GetClustersRequest + 34, // 109: vtadmin.VTAdmin.GetFullStatus:input_type -> vtadmin.GetFullStatusRequest + 35, // 110: vtadmin.VTAdmin.GetGates:input_type -> vtadmin.GetGatesRequest + 37, // 111: vtadmin.VTAdmin.GetKeyspace:input_type -> vtadmin.GetKeyspaceRequest + 38, // 112: vtadmin.VTAdmin.GetKeyspaces:input_type -> vtadmin.GetKeyspacesRequest + 40, // 113: vtadmin.VTAdmin.GetSchema:input_type -> vtadmin.GetSchemaRequest + 41, // 114: vtadmin.VTAdmin.GetSchemas:input_type -> vtadmin.GetSchemasRequest + 43, // 115: vtadmin.VTAdmin.GetShardReplicationPositions:input_type -> vtadmin.GetShardReplicationPositionsRequest + 45, // 116: vtadmin.VTAdmin.GetSrvVSchema:input_type -> vtadmin.GetSrvVSchemaRequest + 46, // 117: vtadmin.VTAdmin.GetSrvVSchemas:input_type -> vtadmin.GetSrvVSchemasRequest + 49, // 118: vtadmin.VTAdmin.GetTablet:input_type -> vtadmin.GetTabletRequest + 50, // 119: vtadmin.VTAdmin.GetTablets:input_type -> vtadmin.GetTabletsRequest + 52, // 120: vtadmin.VTAdmin.GetVSchema:input_type -> vtadmin.GetVSchemaRequest + 53, // 121: vtadmin.VTAdmin.GetVSchemas:input_type -> vtadmin.GetVSchemasRequest + 55, // 122: vtadmin.VTAdmin.GetVtctlds:input_type -> vtadmin.GetVtctldsRequest + 57, // 123: vtadmin.VTAdmin.GetWorkflow:input_type -> vtadmin.GetWorkflowRequest + 58, // 124: vtadmin.VTAdmin.GetWorkflows:input_type -> vtadmin.GetWorkflowsRequest + 60, // 125: vtadmin.VTAdmin.PingTablet:input_type -> vtadmin.PingTabletRequest + 62, // 126: vtadmin.VTAdmin.PlannedFailoverShard:input_type -> vtadmin.PlannedFailoverShardRequest + 64, // 127: vtadmin.VTAdmin.RebuildKeyspaceGraph:input_type -> vtadmin.RebuildKeyspaceGraphRequest + 66, // 128: vtadmin.VTAdmin.RefreshState:input_type -> vtadmin.RefreshStateRequest + 72, // 129: vtadmin.VTAdmin.RefreshTabletReplicationSource:input_type -> vtadmin.RefreshTabletReplicationSourceRequest + 68, // 130: vtadmin.VTAdmin.ReloadSchemas:input_type -> vtadmin.ReloadSchemasRequest + 70, // 131: vtadmin.VTAdmin.ReloadSchemaShard:input_type -> vtadmin.ReloadSchemaShardRequest + 74, // 132: vtadmin.VTAdmin.RemoveKeyspaceCell:input_type -> vtadmin.RemoveKeyspaceCellRequest + 76, // 133: vtadmin.VTAdmin.RunHealthCheck:input_type -> vtadmin.RunHealthCheckRequest + 78, // 134: vtadmin.VTAdmin.SetReadOnly:input_type -> vtadmin.SetReadOnlyRequest + 80, // 135: vtadmin.VTAdmin.SetReadWrite:input_type -> vtadmin.SetReadWriteRequest + 82, // 136: vtadmin.VTAdmin.StartReplication:input_type -> vtadmin.StartReplicationRequest + 84, // 137: vtadmin.VTAdmin.StopReplication:input_type -> vtadmin.StopReplicationRequest + 86, // 138: vtadmin.VTAdmin.TabletExternallyPromoted:input_type -> vtadmin.TabletExternallyPromotedRequest + 89, // 139: vtadmin.VTAdmin.Validate:input_type -> vtadmin.ValidateRequest + 90, // 140: vtadmin.VTAdmin.ValidateKeyspace:input_type -> vtadmin.ValidateKeyspaceRequest + 91, // 141: vtadmin.VTAdmin.ValidateSchemaKeyspace:input_type -> vtadmin.ValidateSchemaKeyspaceRequest + 92, // 142: vtadmin.VTAdmin.ValidateShard:input_type -> vtadmin.ValidateShardRequest + 93, // 143: vtadmin.VTAdmin.ValidateVersionKeyspace:input_type -> vtadmin.ValidateVersionKeyspaceRequest + 94, // 144: vtadmin.VTAdmin.VTExplain:input_type -> vtadmin.VTExplainRequest + 17, // 145: vtadmin.VTAdmin.CreateKeyspace:output_type -> vtadmin.CreateKeyspaceResponse + 126, // 146: vtadmin.VTAdmin.CreateShard:output_type -> vtctldata.CreateShardResponse + 127, // 147: vtadmin.VTAdmin.DeleteKeyspace:output_type -> vtctldata.DeleteKeyspaceResponse + 128, // 148: vtadmin.VTAdmin.DeleteShards:output_type -> vtctldata.DeleteShardsResponse + 22, // 149: vtadmin.VTAdmin.DeleteTablet:output_type -> vtadmin.DeleteTabletResponse + 24, // 150: vtadmin.VTAdmin.EmergencyFailoverShard:output_type -> vtadmin.EmergencyFailoverShardResponse + 8, // 151: vtadmin.VTAdmin.FindSchema:output_type -> vtadmin.Schema + 27, // 152: vtadmin.VTAdmin.GetBackups:output_type -> vtadmin.GetBackupsResponse + 29, // 153: vtadmin.VTAdmin.GetCellInfos:output_type -> vtadmin.GetCellInfosResponse + 31, // 154: vtadmin.VTAdmin.GetCellsAliases:output_type -> vtadmin.GetCellsAliasesResponse + 33, // 155: vtadmin.VTAdmin.GetClusters:output_type -> vtadmin.GetClustersResponse + 129, // 156: vtadmin.VTAdmin.GetFullStatus:output_type -> vtctldata.GetFullStatusResponse + 36, // 157: vtadmin.VTAdmin.GetGates:output_type -> vtadmin.GetGatesResponse + 7, // 158: vtadmin.VTAdmin.GetKeyspace:output_type -> vtadmin.Keyspace + 39, // 159: vtadmin.VTAdmin.GetKeyspaces:output_type -> vtadmin.GetKeyspacesResponse + 8, // 160: vtadmin.VTAdmin.GetSchema:output_type -> vtadmin.Schema + 42, // 161: vtadmin.VTAdmin.GetSchemas:output_type -> vtadmin.GetSchemasResponse + 44, // 162: vtadmin.VTAdmin.GetShardReplicationPositions:output_type -> vtadmin.GetShardReplicationPositionsResponse + 10, // 163: vtadmin.VTAdmin.GetSrvVSchema:output_type -> vtadmin.SrvVSchema + 47, // 164: vtadmin.VTAdmin.GetSrvVSchemas:output_type -> vtadmin.GetSrvVSchemasResponse + 11, // 165: vtadmin.VTAdmin.GetTablet:output_type -> vtadmin.Tablet + 51, // 166: vtadmin.VTAdmin.GetTablets:output_type -> vtadmin.GetTabletsResponse + 12, // 167: vtadmin.VTAdmin.GetVSchema:output_type -> vtadmin.VSchema + 54, // 168: vtadmin.VTAdmin.GetVSchemas:output_type -> vtadmin.GetVSchemasResponse + 56, // 169: vtadmin.VTAdmin.GetVtctlds:output_type -> vtadmin.GetVtctldsResponse + 15, // 170: vtadmin.VTAdmin.GetWorkflow:output_type -> vtadmin.Workflow + 59, // 171: vtadmin.VTAdmin.GetWorkflows:output_type -> vtadmin.GetWorkflowsResponse + 61, // 172: vtadmin.VTAdmin.PingTablet:output_type -> vtadmin.PingTabletResponse + 63, // 173: vtadmin.VTAdmin.PlannedFailoverShard:output_type -> vtadmin.PlannedFailoverShardResponse + 65, // 174: vtadmin.VTAdmin.RebuildKeyspaceGraph:output_type -> vtadmin.RebuildKeyspaceGraphResponse + 67, // 175: vtadmin.VTAdmin.RefreshState:output_type -> vtadmin.RefreshStateResponse + 73, // 176: vtadmin.VTAdmin.RefreshTabletReplicationSource:output_type -> vtadmin.RefreshTabletReplicationSourceResponse + 69, // 177: vtadmin.VTAdmin.ReloadSchemas:output_type -> vtadmin.ReloadSchemasResponse + 71, // 178: vtadmin.VTAdmin.ReloadSchemaShard:output_type -> vtadmin.ReloadSchemaShardResponse + 75, // 179: vtadmin.VTAdmin.RemoveKeyspaceCell:output_type -> vtadmin.RemoveKeyspaceCellResponse + 77, // 180: vtadmin.VTAdmin.RunHealthCheck:output_type -> vtadmin.RunHealthCheckResponse + 79, // 181: vtadmin.VTAdmin.SetReadOnly:output_type -> vtadmin.SetReadOnlyResponse + 81, // 182: vtadmin.VTAdmin.SetReadWrite:output_type -> vtadmin.SetReadWriteResponse + 83, // 183: vtadmin.VTAdmin.StartReplication:output_type -> vtadmin.StartReplicationResponse + 85, // 184: vtadmin.VTAdmin.StopReplication:output_type -> vtadmin.StopReplicationResponse + 87, // 185: vtadmin.VTAdmin.TabletExternallyPromoted:output_type -> vtadmin.TabletExternallyPromotedResponse + 130, // 186: vtadmin.VTAdmin.Validate:output_type -> vtctldata.ValidateResponse + 131, // 187: vtadmin.VTAdmin.ValidateKeyspace:output_type -> vtctldata.ValidateKeyspaceResponse + 132, // 188: vtadmin.VTAdmin.ValidateSchemaKeyspace:output_type -> vtctldata.ValidateSchemaKeyspaceResponse + 133, // 189: vtadmin.VTAdmin.ValidateShard:output_type -> vtctldata.ValidateShardResponse + 134, // 190: vtadmin.VTAdmin.ValidateVersionKeyspace:output_type -> vtctldata.ValidateVersionKeyspaceResponse + 95, // 191: vtadmin.VTAdmin.VTExplain:output_type -> vtadmin.VTExplainResponse + 145, // [145:192] is the sub-list for method output_type + 98, // [98:145] is the sub-list for method input_type + 98, // [98:98] is the sub-list for extension type_name + 98, // [98:98] is the sub-list for extension extendee + 0, // [0:98] is the sub-list for field type_name } func init() { file_vtadmin_proto_init() } @@ -7493,7 +7722,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGatesRequest); i { + switch v := v.(*GetFullStatusRequest); i { case 0: return &v.state case 1: @@ -7505,7 +7734,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGatesResponse); i { + switch v := v.(*GetGatesRequest); i { case 0: return &v.state case 1: @@ -7517,7 +7746,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyspaceRequest); i { + switch v := v.(*GetGatesResponse); i { case 0: return &v.state case 1: @@ -7529,7 +7758,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyspacesRequest); i { + switch v := v.(*GetKeyspaceRequest); i { case 0: return &v.state case 1: @@ -7541,7 +7770,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyspacesResponse); i { + switch v := v.(*GetKeyspacesRequest); i { case 0: return &v.state case 1: @@ -7553,7 +7782,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaRequest); i { + switch v := v.(*GetKeyspacesResponse); i { case 0: return &v.state case 1: @@ -7565,7 +7794,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemasRequest); i { + switch v := v.(*GetSchemaRequest); i { case 0: return &v.state case 1: @@ -7577,7 +7806,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemasResponse); i { + switch v := v.(*GetSchemasRequest); i { case 0: return &v.state case 1: @@ -7589,7 +7818,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardReplicationPositionsRequest); i { + switch v := v.(*GetSchemasResponse); i { case 0: return &v.state case 1: @@ -7601,7 +7830,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardReplicationPositionsResponse); i { + switch v := v.(*GetShardReplicationPositionsRequest); i { case 0: return &v.state case 1: @@ -7613,7 +7842,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSrvVSchemaRequest); i { + switch v := v.(*GetShardReplicationPositionsResponse); i { case 0: return &v.state case 1: @@ -7625,7 +7854,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSrvVSchemasRequest); i { + switch v := v.(*GetSrvVSchemaRequest); i { case 0: return &v.state case 1: @@ -7637,7 +7866,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSrvVSchemasResponse); i { + switch v := v.(*GetSrvVSchemasRequest); i { case 0: return &v.state case 1: @@ -7649,7 +7878,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaTableSizeOptions); i { + switch v := v.(*GetSrvVSchemasResponse); i { case 0: return &v.state case 1: @@ -7661,7 +7890,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTabletRequest); i { + switch v := v.(*GetSchemaTableSizeOptions); i { case 0: return &v.state case 1: @@ -7673,7 +7902,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTabletsRequest); i { + switch v := v.(*GetTabletRequest); i { case 0: return &v.state case 1: @@ -7685,7 +7914,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTabletsResponse); i { + switch v := v.(*GetTabletsRequest); i { case 0: return &v.state case 1: @@ -7697,7 +7926,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVSchemaRequest); i { + switch v := v.(*GetTabletsResponse); i { case 0: return &v.state case 1: @@ -7709,7 +7938,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVSchemasRequest); i { + switch v := v.(*GetVSchemaRequest); i { case 0: return &v.state case 1: @@ -7721,7 +7950,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVSchemasResponse); i { + switch v := v.(*GetVSchemasRequest); i { case 0: return &v.state case 1: @@ -7733,7 +7962,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVtctldsRequest); i { + switch v := v.(*GetVSchemasResponse); i { case 0: return &v.state case 1: @@ -7745,7 +7974,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVtctldsResponse); i { + switch v := v.(*GetVtctldsRequest); i { case 0: return &v.state case 1: @@ -7757,7 +7986,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowRequest); i { + switch v := v.(*GetVtctldsResponse); i { case 0: return &v.state case 1: @@ -7769,7 +7998,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowsRequest); i { + switch v := v.(*GetWorkflowRequest); i { case 0: return &v.state case 1: @@ -7781,7 +8010,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowsResponse); i { + switch v := v.(*GetWorkflowsRequest); i { case 0: return &v.state case 1: @@ -7793,7 +8022,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingTabletRequest); i { + switch v := v.(*GetWorkflowsResponse); i { case 0: return &v.state case 1: @@ -7805,7 +8034,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingTabletResponse); i { + switch v := v.(*PingTabletRequest); i { case 0: return &v.state case 1: @@ -7817,7 +8046,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlannedFailoverShardRequest); i { + switch v := v.(*PingTabletResponse); i { case 0: return &v.state case 1: @@ -7829,7 +8058,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlannedFailoverShardResponse); i { + switch v := v.(*PlannedFailoverShardRequest); i { case 0: return &v.state case 1: @@ -7841,7 +8070,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebuildKeyspaceGraphRequest); i { + switch v := v.(*PlannedFailoverShardResponse); i { case 0: return &v.state case 1: @@ -7853,7 +8082,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebuildKeyspaceGraphResponse); i { + switch v := v.(*RebuildKeyspaceGraphRequest); i { case 0: return &v.state case 1: @@ -7865,7 +8094,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshStateRequest); i { + switch v := v.(*RebuildKeyspaceGraphResponse); i { case 0: return &v.state case 1: @@ -7877,7 +8106,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshStateResponse); i { + switch v := v.(*RefreshStateRequest); i { case 0: return &v.state case 1: @@ -7889,7 +8118,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReloadSchemasRequest); i { + switch v := v.(*RefreshStateResponse); i { case 0: return &v.state case 1: @@ -7901,7 +8130,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReloadSchemasResponse); i { + switch v := v.(*ReloadSchemasRequest); i { case 0: return &v.state case 1: @@ -7913,7 +8142,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReloadSchemaShardRequest); i { + switch v := v.(*ReloadSchemasResponse); i { case 0: return &v.state case 1: @@ -7925,7 +8154,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReloadSchemaShardResponse); i { + switch v := v.(*ReloadSchemaShardRequest); i { case 0: return &v.state case 1: @@ -7937,7 +8166,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshTabletReplicationSourceRequest); i { + switch v := v.(*ReloadSchemaShardResponse); i { case 0: return &v.state case 1: @@ -7949,7 +8178,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshTabletReplicationSourceResponse); i { + switch v := v.(*RefreshTabletReplicationSourceRequest); i { case 0: return &v.state case 1: @@ -7961,7 +8190,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveKeyspaceCellRequest); i { + switch v := v.(*RefreshTabletReplicationSourceResponse); i { case 0: return &v.state case 1: @@ -7973,7 +8202,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveKeyspaceCellResponse); i { + switch v := v.(*RemoveKeyspaceCellRequest); i { case 0: return &v.state case 1: @@ -7985,7 +8214,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunHealthCheckRequest); i { + switch v := v.(*RemoveKeyspaceCellResponse); i { case 0: return &v.state case 1: @@ -7997,7 +8226,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunHealthCheckResponse); i { + switch v := v.(*RunHealthCheckRequest); i { case 0: return &v.state case 1: @@ -8009,7 +8238,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetReadOnlyRequest); i { + switch v := v.(*RunHealthCheckResponse); i { case 0: return &v.state case 1: @@ -8021,7 +8250,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetReadOnlyResponse); i { + switch v := v.(*SetReadOnlyRequest); i { case 0: return &v.state case 1: @@ -8033,7 +8262,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetReadWriteRequest); i { + switch v := v.(*SetReadOnlyResponse); i { case 0: return &v.state case 1: @@ -8045,7 +8274,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetReadWriteResponse); i { + switch v := v.(*SetReadWriteRequest); i { case 0: return &v.state case 1: @@ -8057,7 +8286,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartReplicationRequest); i { + switch v := v.(*SetReadWriteResponse); i { case 0: return &v.state case 1: @@ -8069,7 +8298,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartReplicationResponse); i { + switch v := v.(*StartReplicationRequest); i { case 0: return &v.state case 1: @@ -8081,7 +8310,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopReplicationRequest); i { + switch v := v.(*StartReplicationResponse); i { case 0: return &v.state case 1: @@ -8093,7 +8322,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopReplicationResponse); i { + switch v := v.(*StopReplicationRequest); i { case 0: return &v.state case 1: @@ -8105,7 +8334,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TabletExternallyPromotedRequest); i { + switch v := v.(*StopReplicationResponse); i { case 0: return &v.state case 1: @@ -8117,7 +8346,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TabletExternallyPromotedResponse); i { + switch v := v.(*TabletExternallyPromotedRequest); i { case 0: return &v.state case 1: @@ -8129,7 +8358,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TabletExternallyReparentedRequest); i { + switch v := v.(*TabletExternallyPromotedResponse); i { case 0: return &v.state case 1: @@ -8141,7 +8370,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateKeyspaceRequest); i { + switch v := v.(*TabletExternallyReparentedRequest); i { case 0: return &v.state case 1: @@ -8153,7 +8382,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateSchemaKeyspaceRequest); i { + switch v := v.(*ValidateRequest); i { case 0: return &v.state case 1: @@ -8165,7 +8394,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateVersionKeyspaceRequest); i { + switch v := v.(*ValidateKeyspaceRequest); i { case 0: return &v.state case 1: @@ -8177,7 +8406,7 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VTExplainRequest); i { + switch v := v.(*ValidateSchemaKeyspaceRequest); i { case 0: return &v.state case 1: @@ -8189,6 +8418,42 @@ func file_vtadmin_proto_init() { } } file_vtadmin_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateShardRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtadmin_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateVersionKeyspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtadmin_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VTExplainRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtadmin_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VTExplainResponse); i { case 0: return &v.state @@ -8200,7 +8465,7 @@ func file_vtadmin_proto_init() { return nil } } - file_vtadmin_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + file_vtadmin_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Schema_ShardTableSize); i { case 0: return &v.state @@ -8212,7 +8477,7 @@ func file_vtadmin_proto_init() { return nil } } - file_vtadmin_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + file_vtadmin_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Schema_TableSize); i { case 0: return &v.state @@ -8224,7 +8489,7 @@ func file_vtadmin_proto_init() { return nil } } - file_vtadmin_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + file_vtadmin_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReloadSchemasResponse_KeyspaceResult); i { case 0: return &v.state @@ -8236,7 +8501,7 @@ func file_vtadmin_proto_init() { return nil } } - file_vtadmin_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + file_vtadmin_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReloadSchemasResponse_ShardResult); i { case 0: return &v.state @@ -8248,7 +8513,7 @@ func file_vtadmin_proto_init() { return nil } } - file_vtadmin_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + file_vtadmin_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReloadSchemasResponse_TabletResult); i { case 0: return &v.state @@ -8267,7 +8532,7 @@ func file_vtadmin_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vtadmin_proto_rawDesc, NumEnums: 1, - NumMessages: 102, + NumMessages: 105, NumExtensions: 0, NumServices: 1, }, diff --git a/go/vt/proto/vtadmin/vtadmin_grpc.pb.go b/go/vt/proto/vtadmin/vtadmin_grpc.pb.go index 3dcdc93216b..cbb43920135 100644 --- a/go/vt/proto/vtadmin/vtadmin_grpc.pb.go +++ b/go/vt/proto/vtadmin/vtadmin_grpc.pb.go @@ -54,6 +54,8 @@ type VTAdminClient interface { GetCellsAliases(ctx context.Context, in *GetCellsAliasesRequest, opts ...grpc.CallOption) (*GetCellsAliasesResponse, error) // GetClusters returns all configured clusters. GetClusters(ctx context.Context, in *GetClustersRequest, opts ...grpc.CallOption) (*GetClustersResponse, error) + // GetFullStatus returns the full status of MySQL including the replication information, semi-sync information, GTID information among others + GetFullStatus(ctx context.Context, in *GetFullStatusRequest, opts ...grpc.CallOption) (*vtctldata.GetFullStatusResponse, error) // GetGates returns all gates across all the specified clusters. GetGates(ctx context.Context, in *GetGatesRequest, opts ...grpc.CallOption) (*GetGatesResponse, error) // GetKeyspace returns a keyspace by name in the specified cluster. @@ -138,6 +140,9 @@ type VTAdminClient interface { // * "orchestrator" here refers to external orchestrator, not the newer, // Vitess-aware orchestrator, VTOrc. TabletExternallyPromoted(ctx context.Context, in *TabletExternallyPromotedRequest, opts ...grpc.CallOption) (*TabletExternallyPromotedResponse, error) + // Validate validates all nodes in a cluster that are reachable from the global replication graph, + // as well as all tablets in discoverable cells, are consistent + Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*vtctldata.ValidateResponse, error) // ValidateKeyspace validates that all nodes reachable from the specified // keyspace are consistent. ValidateKeyspace(ctx context.Context, in *ValidateKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.ValidateKeyspaceResponse, error) @@ -145,6 +150,8 @@ type VTAdminClient interface { // for shard 0 matches the schema on all of the other tablets in the // keyspace. ValidateSchemaKeyspace(ctx context.Context, in *ValidateSchemaKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.ValidateSchemaKeyspaceResponse, error) + // ValidateShard validates that that all nodes reachable from the specified shard are consistent. + ValidateShard(ctx context.Context, in *ValidateShardRequest, opts ...grpc.CallOption) (*vtctldata.ValidateShardResponse, error) // ValidateVersionKeyspace validates that the version on the primary of // shard 0 matches all of the other tablets in the keyspace. ValidateVersionKeyspace(ctx context.Context, in *ValidateVersionKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.ValidateVersionKeyspaceResponse, error) @@ -260,6 +267,15 @@ func (c *vTAdminClient) GetClusters(ctx context.Context, in *GetClustersRequest, return out, nil } +func (c *vTAdminClient) GetFullStatus(ctx context.Context, in *GetFullStatusRequest, opts ...grpc.CallOption) (*vtctldata.GetFullStatusResponse, error) { + out := new(vtctldata.GetFullStatusResponse) + err := c.cc.Invoke(ctx, "/vtadmin.VTAdmin/GetFullStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *vTAdminClient) GetGates(ctx context.Context, in *GetGatesRequest, opts ...grpc.CallOption) (*GetGatesResponse, error) { out := new(GetGatesResponse) err := c.cc.Invoke(ctx, "/vtadmin.VTAdmin/GetGates", in, out, opts...) @@ -521,6 +537,15 @@ func (c *vTAdminClient) TabletExternallyPromoted(ctx context.Context, in *Tablet return out, nil } +func (c *vTAdminClient) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*vtctldata.ValidateResponse, error) { + out := new(vtctldata.ValidateResponse) + err := c.cc.Invoke(ctx, "/vtadmin.VTAdmin/Validate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *vTAdminClient) ValidateKeyspace(ctx context.Context, in *ValidateKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.ValidateKeyspaceResponse, error) { out := new(vtctldata.ValidateKeyspaceResponse) err := c.cc.Invoke(ctx, "/vtadmin.VTAdmin/ValidateKeyspace", in, out, opts...) @@ -539,6 +564,15 @@ func (c *vTAdminClient) ValidateSchemaKeyspace(ctx context.Context, in *Validate return out, nil } +func (c *vTAdminClient) ValidateShard(ctx context.Context, in *ValidateShardRequest, opts ...grpc.CallOption) (*vtctldata.ValidateShardResponse, error) { + out := new(vtctldata.ValidateShardResponse) + err := c.cc.Invoke(ctx, "/vtadmin.VTAdmin/ValidateShard", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *vTAdminClient) ValidateVersionKeyspace(ctx context.Context, in *ValidateVersionKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.ValidateVersionKeyspaceResponse, error) { out := new(vtctldata.ValidateVersionKeyspaceResponse) err := c.cc.Invoke(ctx, "/vtadmin.VTAdmin/ValidateVersionKeyspace", in, out, opts...) @@ -592,6 +626,8 @@ type VTAdminServer interface { GetCellsAliases(context.Context, *GetCellsAliasesRequest) (*GetCellsAliasesResponse, error) // GetClusters returns all configured clusters. GetClusters(context.Context, *GetClustersRequest) (*GetClustersResponse, error) + // GetFullStatus returns the full status of MySQL including the replication information, semi-sync information, GTID information among others + GetFullStatus(context.Context, *GetFullStatusRequest) (*vtctldata.GetFullStatusResponse, error) // GetGates returns all gates across all the specified clusters. GetGates(context.Context, *GetGatesRequest) (*GetGatesResponse, error) // GetKeyspace returns a keyspace by name in the specified cluster. @@ -676,6 +712,9 @@ type VTAdminServer interface { // * "orchestrator" here refers to external orchestrator, not the newer, // Vitess-aware orchestrator, VTOrc. TabletExternallyPromoted(context.Context, *TabletExternallyPromotedRequest) (*TabletExternallyPromotedResponse, error) + // Validate validates all nodes in a cluster that are reachable from the global replication graph, + // as well as all tablets in discoverable cells, are consistent + Validate(context.Context, *ValidateRequest) (*vtctldata.ValidateResponse, error) // ValidateKeyspace validates that all nodes reachable from the specified // keyspace are consistent. ValidateKeyspace(context.Context, *ValidateKeyspaceRequest) (*vtctldata.ValidateKeyspaceResponse, error) @@ -683,6 +722,8 @@ type VTAdminServer interface { // for shard 0 matches the schema on all of the other tablets in the // keyspace. ValidateSchemaKeyspace(context.Context, *ValidateSchemaKeyspaceRequest) (*vtctldata.ValidateSchemaKeyspaceResponse, error) + // ValidateShard validates that that all nodes reachable from the specified shard are consistent. + ValidateShard(context.Context, *ValidateShardRequest) (*vtctldata.ValidateShardResponse, error) // ValidateVersionKeyspace validates that the version on the primary of // shard 0 matches all of the other tablets in the keyspace. ValidateVersionKeyspace(context.Context, *ValidateVersionKeyspaceRequest) (*vtctldata.ValidateVersionKeyspaceResponse, error) @@ -729,6 +770,9 @@ func (UnimplementedVTAdminServer) GetCellsAliases(context.Context, *GetCellsAlia func (UnimplementedVTAdminServer) GetClusters(context.Context, *GetClustersRequest) (*GetClustersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetClusters not implemented") } +func (UnimplementedVTAdminServer) GetFullStatus(context.Context, *GetFullStatusRequest) (*vtctldata.GetFullStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFullStatus not implemented") +} func (UnimplementedVTAdminServer) GetGates(context.Context, *GetGatesRequest) (*GetGatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGates not implemented") } @@ -816,12 +860,18 @@ func (UnimplementedVTAdminServer) StopReplication(context.Context, *StopReplicat func (UnimplementedVTAdminServer) TabletExternallyPromoted(context.Context, *TabletExternallyPromotedRequest) (*TabletExternallyPromotedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TabletExternallyPromoted not implemented") } +func (UnimplementedVTAdminServer) Validate(context.Context, *ValidateRequest) (*vtctldata.ValidateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented") +} func (UnimplementedVTAdminServer) ValidateKeyspace(context.Context, *ValidateKeyspaceRequest) (*vtctldata.ValidateKeyspaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateKeyspace not implemented") } func (UnimplementedVTAdminServer) ValidateSchemaKeyspace(context.Context, *ValidateSchemaKeyspaceRequest) (*vtctldata.ValidateSchemaKeyspaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateSchemaKeyspace not implemented") } +func (UnimplementedVTAdminServer) ValidateShard(context.Context, *ValidateShardRequest) (*vtctldata.ValidateShardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateShard not implemented") +} func (UnimplementedVTAdminServer) ValidateVersionKeyspace(context.Context, *ValidateVersionKeyspaceRequest) (*vtctldata.ValidateVersionKeyspaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateVersionKeyspace not implemented") } @@ -1039,6 +1089,24 @@ func _VTAdmin_GetClusters_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _VTAdmin_GetFullStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFullStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VTAdminServer).GetFullStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtadmin.VTAdmin/GetFullStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VTAdminServer).GetFullStatus(ctx, req.(*GetFullStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _VTAdmin_GetGates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetGatesRequest) if err := dec(in); err != nil { @@ -1561,6 +1629,24 @@ func _VTAdmin_TabletExternallyPromoted_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _VTAdmin_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VTAdminServer).Validate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtadmin.VTAdmin/Validate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VTAdminServer).Validate(ctx, req.(*ValidateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _VTAdmin_ValidateKeyspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidateKeyspaceRequest) if err := dec(in); err != nil { @@ -1597,6 +1683,24 @@ func _VTAdmin_ValidateSchemaKeyspace_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _VTAdmin_ValidateShard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateShardRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VTAdminServer).ValidateShard(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtadmin.VTAdmin/ValidateShard", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VTAdminServer).ValidateShard(ctx, req.(*ValidateShardRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _VTAdmin_ValidateVersionKeyspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidateVersionKeyspaceRequest) if err := dec(in); err != nil { @@ -1684,6 +1788,10 @@ var VTAdmin_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetClusters", Handler: _VTAdmin_GetClusters_Handler, }, + { + MethodName: "GetFullStatus", + Handler: _VTAdmin_GetFullStatus_Handler, + }, { MethodName: "GetGates", Handler: _VTAdmin_GetGates_Handler, @@ -1800,6 +1908,10 @@ var VTAdmin_ServiceDesc = grpc.ServiceDesc{ MethodName: "TabletExternallyPromoted", Handler: _VTAdmin_TabletExternallyPromoted_Handler, }, + { + MethodName: "Validate", + Handler: _VTAdmin_Validate_Handler, + }, { MethodName: "ValidateKeyspace", Handler: _VTAdmin_ValidateKeyspace_Handler, @@ -1808,6 +1920,10 @@ var VTAdmin_ServiceDesc = grpc.ServiceDesc{ MethodName: "ValidateSchemaKeyspace", Handler: _VTAdmin_ValidateSchemaKeyspace_Handler, }, + { + MethodName: "ValidateShard", + Handler: _VTAdmin_ValidateShard_Handler, + }, { MethodName: "ValidateVersionKeyspace", Handler: _VTAdmin_ValidateVersionKeyspace_Handler, diff --git a/go/vt/proto/vtadmin/vtadmin_vtproto.pb.go b/go/vt/proto/vtadmin/vtadmin_vtproto.pb.go index e95dc2e6e11..21f15c73c83 100644 --- a/go/vt/proto/vtadmin/vtadmin_vtproto.pb.go +++ b/go/vt/proto/vtadmin/vtadmin_vtproto.pb.go @@ -2001,6 +2001,56 @@ func (m *GetClustersResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *GetFullStatusRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetFullStatusRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetFullStatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Alias != nil { + size, err := m.Alias.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.ClusterId) > 0 { + i -= len(m.ClusterId) + copy(dAtA[i:], m.ClusterId) + i = encodeVarint(dAtA, i, uint64(len(m.ClusterId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *GetGatesRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -5006,6 +5056,56 @@ func (m *TabletExternallyReparentedRequest) MarshalToSizedBufferVT(dAtA []byte) return len(dAtA) - i, nil } +func (m *ValidateRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ValidateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PingTablets { + i-- + if m.PingTablets { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.ClusterId) > 0 { + i -= len(m.ClusterId) + copy(dAtA[i:], m.ClusterId) + i = encodeVarint(dAtA, i, uint64(len(m.ClusterId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ValidateKeyspaceRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -5110,6 +5210,70 @@ func (m *ValidateSchemaKeyspaceRequest) MarshalToSizedBufferVT(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *ValidateShardRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateShardRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ValidateShardRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PingTablets { + i-- + if m.PingTablets { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Shard) > 0 { + i -= len(m.Shard) + copy(dAtA[i:], m.Shard) + i = encodeVarint(dAtA, i, uint64(len(m.Shard))) + i-- + dAtA[i] = 0x1a + } + if len(m.Keyspace) > 0 { + i -= len(m.Keyspace) + copy(dAtA[i:], m.Keyspace) + i = encodeVarint(dAtA, i, uint64(len(m.Keyspace))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClusterId) > 0 { + i -= len(m.ClusterId) + copy(dAtA[i:], m.ClusterId) + i = encodeVarint(dAtA, i, uint64(len(m.ClusterId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ValidateVersionKeyspaceRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -6093,6 +6257,26 @@ func (m *GetClustersResponse) SizeVT() (n int) { return n } +func (m *GetFullStatusRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClusterId) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Alias != nil { + l = m.Alias.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + func (m *GetGatesRequest) SizeVT() (n int) { if m == nil { return 0 @@ -7357,6 +7541,25 @@ func (m *TabletExternallyReparentedRequest) SizeVT() (n int) { return n } +func (m *ValidateRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClusterId) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.PingTablets { + n += 2 + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + func (m *ValidateKeyspaceRequest) SizeVT() (n int) { if m == nil { return 0 @@ -7400,6 +7603,33 @@ func (m *ValidateSchemaKeyspaceRequest) SizeVT() (n int) { return n } +func (m *ValidateShardRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClusterId) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Keyspace) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Shard) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.PingTablets { + n += 2 + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + func (m *ValidateVersionKeyspaceRequest) SizeVT() (n int) { if m == nil { return 0 @@ -12484,7 +12714,7 @@ func (m *GetClustersResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetGatesRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetFullStatusRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12507,15 +12737,15 @@ func (m *GetGatesRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetGatesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetFullStatusRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetGatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetFullStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12543,18 +12773,137 @@ func (m *GetGatesRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ClusterIds = append(m.ClusterIds, string(dAtA[iNdEx:postIndex])) + m.ClusterId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Alias == nil { + m.Alias = &topodata.TabletAlias{} + } + if err := m.Alias.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGatesRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGatesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterIds = append(m.ClusterIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) @@ -19438,6 +19787,109 @@ func (m *TabletExternallyReparentedRequest) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *ValidateRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PingTablets", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PingTablets = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ValidateKeyspaceRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -19688,6 +20140,173 @@ func (m *ValidateSchemaKeyspaceRequest) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *ValidateShardRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidateShardRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidateShardRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keyspace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shard", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Shard = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PingTablets", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PingTablets = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ValidateVersionKeyspaceRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/vt/schemamanager/tablet_executor.go b/go/vt/schemamanager/tablet_executor.go index 008e7acdd8a..59fb7255bfa 100644 --- a/go/vt/schemamanager/tablet_executor.go +++ b/go/vt/schemamanager/tablet_executor.go @@ -360,7 +360,7 @@ func (exec *TabletExecutor) Execute(ctx context.Context, sqls []string) *Execute } providedUUID := "" - rl := timer.NewRateLimiter(*topo.RemoteOperationTimeout / 4) + rl := timer.NewRateLimiter(topo.RemoteOperationTimeout / 4) defer rl.Stop() syncOperationExecuted := false diff --git a/go/vt/servenv/servenv.go b/go/vt/servenv/servenv.go index 61ac0a386c2..5c851b295ee 100644 --- a/go/vt/servenv/servenv.go +++ b/go/vt/servenv/servenv.go @@ -305,10 +305,7 @@ func getFlagHooksFor(cmd string) (hooks []func(fs *pflag.FlagSet)) { // ParseFlags initializes flags and handles the common case when no positional // arguments are expected. func ParseFlags(cmd string) { - fs := pflag.NewFlagSet(cmd, pflag.ExitOnError) - for _, hook := range getFlagHooksFor(cmd) { - hook(fs) - } + fs := GetFlagSetFor(cmd) _flag.Parse(fs) @@ -324,13 +321,21 @@ func ParseFlags(cmd string) { } } -// ParseFlagsWithArgs initializes flags and returns the positional arguments -func ParseFlagsWithArgs(cmd string) []string { +// GetFlagSetFor returns the flag set for a given command. +// This has to exported for the Vitess-operator to use +func GetFlagSetFor(cmd string) *pflag.FlagSet { fs := pflag.NewFlagSet(cmd, pflag.ExitOnError) for _, hook := range getFlagHooksFor(cmd) { hook(fs) } + return fs +} + +// ParseFlagsWithArgs initializes flags and returns the positional arguments +func ParseFlagsWithArgs(cmd string) []string { + fs := GetFlagSetFor(cmd) + _flag.Parse(fs) if version { @@ -385,3 +390,21 @@ func init() { // Flags in package logutil are installed for all binaries. OnParse(logutil.RegisterFlags) } + +func RegisterFlagsForTopoBinaries(registerFlags func(fs *pflag.FlagSet)) { + topoBinaries := []string{ + "vtbackup", + "vtcombo", + "vtctl", + "vtctld", + "vtgate", + "vtgr", + "vttablet", + "vttestserver", + "zk", + "vtorc", + } + for _, cmd := range topoBinaries { + OnParseFor(cmd, registerFlags) + } +} diff --git a/go/vt/sqlparser/ast_rewriting.go b/go/vt/sqlparser/ast_rewriting.go index 90bbd7ccc0c..5ecdea8896b 100644 --- a/go/vt/sqlparser/ast_rewriting.go +++ b/go/vt/sqlparser/ast_rewriting.go @@ -541,6 +541,14 @@ func (er *astRewriter) unnestSubQueries(cursor *Cursor, subquery *Subquery) { if !ok { return } + _, isColName := expr.Expr.(*ColName) + if isColName { + // If we find a single col-name in a `dual` subquery, we can be pretty sure the user is returning a column + // already projected. + // `select 1 as x, (select x)` + // is perfectly valid - any aliased columns to the left are available inside subquery scopes + return + } er.bindVars.NoteRewrite() // we need to make sure that the inner expression also gets rewritten, // so we fire off another rewriter traversal here diff --git a/go/vt/sqlparser/ast_rewriting_test.go b/go/vt/sqlparser/ast_rewriting_test.go index 957128e473c..95e84ae8c20 100644 --- a/go/vt/sqlparser/ast_rewriting_test.go +++ b/go/vt/sqlparser/ast_rewriting_test.go @@ -96,6 +96,10 @@ func TestRewrites(in *testing.T) { in: "select (select database() from dual) from dual", expected: "select :__vtdbname as `(select database() from dual)` from dual", db: true, + }, { + // don't unnest solo columns + in: "select 1 as foobar, (select foobar)", + expected: "select 1 as foobar, (select foobar from dual) from dual", }, { in: "select id from user where database()", expected: "select id from user where database()", diff --git a/go/vt/topo/cell_info.go b/go/vt/topo/cell_info.go index 9703232d095..468b15157c3 100644 --- a/go/vt/topo/cell_info.go +++ b/go/vt/topo/cell_info.go @@ -163,7 +163,7 @@ func (ts *Server) DeleteCellInfo(ctx context.Context, cell string, force bool) e // local-down-topo scenario would mean we never can delete it. // (see https://github.com/vitessio/vitess/issues/8220). var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(context.Background(), *RemoteOperationTimeout) + ctx, cancel = context.WithTimeout(context.Background(), RemoteOperationTimeout) defer cancel() default: // Context still has some time left, no need to make a new one. @@ -207,13 +207,13 @@ func (ts *Server) ExpandCells(ctx context.Context, cells string) ([]string, erro } expandCell := func(ctx context.Context, cell string) error { - shortCtx, cancel := context.WithTimeout(ctx, *RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, RemoteOperationTimeout) defer cancel() _, err := ts.GetCellInfo(shortCtx, cell, false /* strongRead */) if err != nil { // Not a valid cell name. Check whether it is an alias. - shortCtx, cancel := context.WithTimeout(ctx, *RemoteOperationTimeout) + shortCtx, cancel := context.WithTimeout(ctx, RemoteOperationTimeout) defer cancel() alias, err2 := ts.GetCellsAlias(shortCtx, cell, false /* strongRead */) diff --git a/go/vt/topo/consultopo/server.go b/go/vt/topo/consultopo/server.go index 80202c6cb26..3e9192b0e46 100644 --- a/go/vt/topo/consultopo/server.go +++ b/go/vt/topo/consultopo/server.go @@ -45,9 +45,7 @@ var ( ) func init() { - for _, cmd := range []string{"vtbackup", "vtcombo", "vtctl", "vtctld", "vtgate", "vtgr", "vttablet", "vttestserver", "zk"} { - servenv.OnParseFor(cmd, registerServerFlags) - } + servenv.RegisterFlagsForTopoBinaries(registerServerFlags) } func registerServerFlags(fs *pflag.FlagSet) { diff --git a/go/vt/topo/consultopo/watch.go b/go/vt/topo/consultopo/watch.go index d307e270dcd..8f3d4f6ad7c 100644 --- a/go/vt/topo/consultopo/watch.go +++ b/go/vt/topo/consultopo/watch.go @@ -33,9 +33,7 @@ var ( ) func init() { - for _, cmd := range []string{"vtbackup", "vtcombo", "vtctl", "vtctld", "vtgate", "vtgr", "vttablet", "vttestserver", "zk"} { - servenv.OnParseFor(cmd, registerWatchFlags) - } + servenv.RegisterFlagsForTopoBinaries(registerWatchFlags) } func registerWatchFlags(fs *pflag.FlagSet) { @@ -48,7 +46,7 @@ func (s *Server) Watch(ctx context.Context, filePath string) (*topo.WatchData, < nodePath := path.Join(s.root, filePath) options := &api.QueryOptions{} - initialCtx, initialCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + initialCtx, initialCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer initialCancel() pair, _, err := s.kv.Get(nodePath, options.WithContext(initialCtx)) diff --git a/go/vt/topo/etcd2topo/lock.go b/go/vt/topo/etcd2topo/lock.go index 752b82205d4..96b2fc0c66e 100644 --- a/go/vt/topo/etcd2topo/lock.go +++ b/go/vt/topo/etcd2topo/lock.go @@ -17,26 +17,36 @@ limitations under the License. package etcd2topo import ( - "flag" + "context" "fmt" "path" - "context" + "github.com/spf13/pflag" "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" - "vitess.io/vitess/go/vt/proto/vtrpc" - "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/topo" + "vitess.io/vitess/go/vt/vterrors" ) var ( - leaseTTL = flag.Int("topo_etcd_lease_ttl", 30, "Lease TTL for locks and leader election. The client will use KeepAlive to keep the lease going.") + leaseTTL = 30 ) +func init() { + for _, cmd := range topo.FlagBinaries { + servenv.OnParseFor(cmd, registerEtcd2TopoLockFlags) + } +} + +func registerEtcd2TopoLockFlags(fs *pflag.FlagSet) { + fs.IntVar(&leaseTTL, "topo_etcd_lease_ttl", leaseTTL, "Lease TTL for locks and leader election. The client will use KeepAlive to keep the lease going.") +} + // newUniqueEphemeralKV creates a new file in the provided directory. // It is linked to the Lease. // Errors returned are converted to topo errors. @@ -141,7 +151,7 @@ func (s *Server) lock(ctx context.Context, nodePath, contents string) (topo.Lock nodePath = path.Join(s.root, nodePath, locksPath) // Get a lease, set its KeepAlive. - lease, err := s.cli.Grant(ctx, int64(*leaseTTL)) + lease, err := s.cli.Grant(ctx, int64(leaseTTL)) if err != nil { return nil, convertError(err, nodePath) } diff --git a/go/vt/topo/etcd2topo/server.go b/go/vt/topo/etcd2topo/server.go index 3ca60f15e6e..95bebb1fecf 100644 --- a/go/vt/topo/etcd2topo/server.go +++ b/go/vt/topo/etcd2topo/server.go @@ -36,22 +36,23 @@ package etcd2topo import ( "crypto/tls" "crypto/x509" - "flag" "strings" "time" + "github.com/spf13/pflag" + "go.etcd.io/etcd/client/pkg/v3/tlsutil" "google.golang.org/grpc" - "go.etcd.io/etcd/client/pkg/v3/tlsutil" clientv3 "go.etcd.io/etcd/client/v3" + "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/topo" ) var ( - clientCertPath = flag.String("topo_etcd_tls_cert", "", "path to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS") - clientKeyPath = flag.String("topo_etcd_tls_key", "", "path to the client key to use to connect to the etcd topo server, enables TLS") - serverCaPath = flag.String("topo_etcd_tls_ca", "", "path to the ca to use to validate the server cert when connecting to the etcd topo server") + clientCertPath string + clientKeyPath string + serverCaPath string ) // Factory is the consul topo.Factory implementation. @@ -78,6 +79,19 @@ type Server struct { running chan struct{} } +func init() { + for _, cmd := range topo.FlagBinaries { + servenv.OnParseFor(cmd, registerEtcd2TopoFlags) + } + topo.RegisterFactory("etcd2", Factory{}) +} + +func registerEtcd2TopoFlags(fs *pflag.FlagSet) { + fs.StringVar(&clientCertPath, "topo_etcd_tls_cert", clientCertPath, "path to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS") + fs.StringVar(&clientKeyPath, "topo_etcd_tls_key", clientKeyPath, "path to the client key to use to connect to the etcd topo server, enables TLS") + fs.StringVar(&serverCaPath, "topo_etcd_tls_ca", serverCaPath, "path to the ca to use to validate the server cert when connecting to the etcd topo server") +} + // Close implements topo.Server.Close. // It will nil out the global and cells fields, so any attempt to // re-use this server will panic. @@ -153,9 +167,5 @@ func NewServerWithOpts(serverAddr, root, certPath, keyPath, caPath string) (*Ser func NewServer(serverAddr, root string) (*Server, error) { // TODO: Rename this to a name to signifies this function uses the process-wide TLS settings. - return NewServerWithOpts(serverAddr, root, *clientCertPath, *clientKeyPath, *serverCaPath) -} - -func init() { - topo.RegisterFactory("etcd2", Factory{}) + return NewServerWithOpts(serverAddr, root, clientCertPath, clientKeyPath, serverCaPath) } diff --git a/go/vt/topo/etcd2topo/server_test.go b/go/vt/topo/etcd2topo/server_test.go index 2ff475a6c52..327f504f79b 100644 --- a/go/vt/topo/etcd2topo/server_test.go +++ b/go/vt/topo/etcd2topo/server_test.go @@ -271,7 +271,7 @@ func testKeyspaceLock(t *testing.T, ts *topo.Server) { } // Long TTL, unlock before lease runs out. - *leaseTTL = 1000 + leaseTTL = 1000 lockDescriptor, err := conn.Lock(ctx, keyspacePath, "ttl") if err != nil { t.Fatalf("Lock failed: %v", err) @@ -281,7 +281,7 @@ func testKeyspaceLock(t *testing.T, ts *topo.Server) { } // Short TTL, make sure it doesn't expire. - *leaseTTL = 1 + leaseTTL = 1 lockDescriptor, err = conn.Lock(ctx, keyspacePath, "short ttl") if err != nil { t.Fatalf("Lock failed: %v", err) diff --git a/go/vt/topo/etcd2topo/watch.go b/go/vt/topo/etcd2topo/watch.go index ab52e5d49b4..cdc9be44b21 100644 --- a/go/vt/topo/etcd2topo/watch.go +++ b/go/vt/topo/etcd2topo/watch.go @@ -37,7 +37,7 @@ func (s *Server) Watch(ctx context.Context, filePath string) (*topo.WatchData, < nodePath := path.Join(s.root, filePath) // Get the initial version of the file - initialCtx, initialCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + initialCtx, initialCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer initialCancel() initial, err := s.cli.Get(initialCtx, nodePath) if err != nil { diff --git a/go/vt/topo/k8stopo/server.go b/go/vt/topo/k8stopo/server.go index 169b73b3e3a..b76410dd22c 100644 --- a/go/vt/topo/k8stopo/server.go +++ b/go/vt/topo/k8stopo/server.go @@ -28,12 +28,15 @@ We follow these conventions within this package: package k8stopo import ( - "flag" "fmt" "os" "path/filepath" "strings" + "vitess.io/vitess/go/vt/servenv" + + "github.com/spf13/pflag" + "k8s.io/apimachinery/pkg/fields" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" @@ -47,16 +50,22 @@ import ( vttyped "vitess.io/vitess/go/vt/topo/k8stopo/client/clientset/versioned/typed/topo/v1beta1" ) -var ( +var kubeconfigPath, configContext, configNamespace string + +func init() { + servenv.RegisterFlagsForTopoBinaries(registerK8STopoFlags) +} + +func registerK8STopoFlags(fs *pflag.FlagSet) { // kubeconfigPath is a string that gives the location of a valid kubeconfig file - kubeconfigPath = flag.String("topo_k8s_kubeconfig", "", "Path to a valid kubeconfig file. When running as a k8s pod inside the same cluster you wish to use as the topo, you may omit this and the below arguments, and Vitess is capable of auto-discovering the correct values. https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod") + fs.StringVar(&kubeconfigPath, "topo_k8s_kubeconfig", kubeconfigPath, "Path to a valid kubeconfig file. When running as a k8s pod inside the same cluster you wish to use as the topo, you may omit this and the below arguments, and Vitess is capable of auto-discovering the correct values. https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod") // configContext is a string that can be used to override the default context - configContext = flag.String("topo_k8s_context", "", "The kubeconfig context to use, overrides the 'current-context' from the config") + fs.StringVar(&configContext, "topo_k8s_context", configContext, "The kubeconfig context to use, overrides the 'current-context' from the config") // configNamespace is a string that can be used to override the default namespace for objects - configNamespace = flag.String("topo_k8s_namespace", "", "The kubernetes namespace to use for all objects. Default comes from the context or in-cluster config") -) + fs.StringVar(&configNamespace, "topo_k8s_namespace", configNamespace, "The kubernetes namespace to use for all objects. Default comes from the context or in-cluster config") +} // Factory is the Kubernetes topo.Factory implementation. type Factory struct{} @@ -152,7 +161,7 @@ func NewServer(_, root string) (*Server, error) { var err error namespace := "default" //nolint - if *kubeconfigPath == "" { + if kubeconfigPath == "" { log.Info("Creating new in-cluster Kubernetes config") config, err = rest.InClusterConfig() @@ -167,18 +176,18 @@ func NewServer(_, root string) (*Server, error) { } namespace = string(nsBytes) } else { - log.Info("Creating new Kubernetes config from kubeconfig", *kubeconfigPath) + log.Info("Creating new Kubernetes config from kubeconfig", kubeconfigPath) configOverrides := &clientcmd.ConfigOverrides{} // respect the context flag - if *configContext != "" { - configOverrides.CurrentContext = *configContext + if configContext != "" { + configOverrides.CurrentContext = configContext log.V(7).Info("Overriding Kubernetes config context with: ", configOverrides.CurrentContext) } configLoader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( - &clientcmd.ClientConfigLoadingRules{ExplicitPath: *kubeconfigPath}, + &clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfigPath}, configOverrides, ) @@ -195,8 +204,8 @@ func NewServer(_, root string) (*Server, error) { } // respect the namespace flag - if *configNamespace != "" { - namespace = *configNamespace + if configNamespace != "" { + namespace = configNamespace log.V(7).Info("Overriding Kubernetes config namespace with: ", namespace) } diff --git a/go/vt/topo/k8stopo/server_flaky_test.go b/go/vt/topo/k8stopo/server_flaky_test.go index 54e71da008f..f5107d44476 100644 --- a/go/vt/topo/k8stopo/server_flaky_test.go +++ b/go/vt/topo/k8stopo/server_flaky_test.go @@ -18,7 +18,6 @@ package k8stopo import ( "context" - "flag" "fmt" "os" "os/exec" @@ -114,7 +113,12 @@ func TestKubernetesTopo(t *testing.T) { } serverAddr := "default" - flag.Set("topo_k8s_kubeconfig", testConfigPath) + + oldKubeConfigPath := kubeconfigPath + kubeconfigPath = testConfigPath + defer func() { + kubeconfigPath = oldKubeConfigPath + }() // Run the test suite. testIndex := 0 diff --git a/go/vt/topo/k8stopo/watch.go b/go/vt/topo/k8stopo/watch.go index 2707e22ad27..4cf1c7bc2c3 100644 --- a/go/vt/topo/k8stopo/watch.go +++ b/go/vt/topo/k8stopo/watch.go @@ -34,7 +34,7 @@ func (s *Server) Watch(ctx context.Context, filePath string) (*topo.WatchData, < current := &topo.WatchData{} // get current - initialCtx, initialCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + initialCtx, initialCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer initialCancel() contents, ver, err := s.Get(initialCtx, filePath) diff --git a/go/vt/topo/locks.go b/go/vt/topo/locks.go index cda93c33192..5ee60c2ea2f 100644 --- a/go/vt/topo/locks.go +++ b/go/vt/topo/locks.go @@ -17,21 +17,21 @@ limitations under the License. package topo import ( + "context" "encoding/json" - "flag" "os" "os/user" "path" "sync" "time" - "context" - - "vitess.io/vitess/go/vt/proto/vtrpc" - "vitess.io/vitess/go/vt/vterrors" + "github.com/spf13/pflag" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/servenv" + "vitess.io/vitess/go/vt/vterrors" ) // This file contains utility methods and definitions to lock @@ -46,7 +46,7 @@ var ( // RemoteOperationTimeout is used for operations where we have to // call out to another process. // Used for RPC calls (including topo server calls) - RemoteOperationTimeout = flag.Duration("remote_operation_timeout", 30*time.Second, "time to wait for a remote operation") + RemoteOperationTimeout = 30 * time.Second ) // Lock describes a long-running lock on a keyspace or a shard. @@ -62,6 +62,16 @@ type Lock struct { Status string } +func init() { + for _, cmd := range FlagBinaries { + servenv.OnParseFor(cmd, registerTopoLockFlags) + } +} + +func registerTopoLockFlags(fs *pflag.FlagSet) { + fs.DurationVar(&RemoteOperationTimeout, "remote_operation_timeout", RemoteOperationTimeout, "time to wait for a remote operation") +} + // newLock creates a new Lock. func newLock(action string) *Lock { l := &Lock{ @@ -234,7 +244,7 @@ func CheckKeyspaceLockedAndRenew(ctx context.Context, keyspace string) error { func (l *Lock) lockKeyspace(ctx context.Context, ts *Server, keyspace string) (LockDescriptor, error) { log.Infof("Locking keyspace %v for action %v", keyspace, l.Action) - ctx, cancel := context.WithTimeout(ctx, *RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, RemoteOperationTimeout) defer cancel() span, ctx := trace.NewSpan(ctx, "TopoServer.LockKeyspaceForAction") @@ -375,7 +385,7 @@ func CheckShardLocked(ctx context.Context, keyspace, shard string) error { func (l *Lock) lockShard(ctx context.Context, ts *Server, keyspace, shard string) (LockDescriptor, error) { log.Infof("Locking shard %v/%v for action %v", keyspace, shard, l.Action) - ctx, cancel := context.WithTimeout(ctx, *RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, RemoteOperationTimeout) defer cancel() span, ctx := trace.NewSpan(ctx, "TopoServer.LockShardForAction") diff --git a/go/vt/topo/server.go b/go/vt/topo/server.go index 4d34a4ca337..9ca9b2d3322 100644 --- a/go/vt/topo/server.go +++ b/go/vt/topo/server.go @@ -44,15 +44,15 @@ package topo import ( "context" - "flag" "fmt" "sync" - "vitess.io/vitess/go/vt/proto/topodata" - - "vitess.io/vitess/go/vt/vterrors" + "github.com/spf13/pflag" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/proto/topodata" + "vitess.io/vitess/go/vt/servenv" + "vitess.io/vitess/go/vt/vterrors" ) const ( @@ -83,14 +83,12 @@ const ( // Path for all object types. const ( - CellsPath = "cells" - CellsAliasesPath = "cells_aliases" - KeyspacesPath = "keyspaces" - ShardsPath = "shards" - TabletsPath = "tablets" - MetadataPath = "metadata" - - ExternalClusterMySQL = "mysql" + CellsPath = "cells" + CellsAliasesPath = "cells_aliases" + KeyspacesPath = "keyspaces" + ShardsPath = "shards" + TabletsPath = "tablets" + MetadataPath = "metadata" ExternalClusterVitess = "vitess" ) @@ -158,15 +156,15 @@ type cellsToAliasesMap struct { var ( // topoImplementation is the flag for which implementation to use. - topoImplementation = flag.String("topo_implementation", "", "the topology implementation to use") + topoImplementation string // topoGlobalServerAddress is the address of the global topology // server. - topoGlobalServerAddress = flag.String("topo_global_server_address", "", "the address of the global topology server") + topoGlobalServerAddress string // topoGlobalRoot is the root path to use for the global topology // server. - topoGlobalRoot = flag.String("topo_global_root", "", "the path of the global topology data in the global topology server") + topoGlobalRoot string // factories has the factories for the Conn objects. factories = make(map[string]Factory) @@ -174,8 +172,23 @@ var ( cellsAliases = cellsToAliasesMap{ cellsToAliases: make(map[string]string), } + + FlagBinaries = []string{"vttablet", "vtctl", "vtctld", "vtcombo", "vtexplain", "vtgate", + "vtgr", "vtorc", "vtbackup"} ) +func init() { + for _, cmd := range FlagBinaries { + servenv.OnParseFor(cmd, registerTopoFlags) + } +} + +func registerTopoFlags(fs *pflag.FlagSet) { + fs.StringVar(&topoImplementation, "topo_implementation", topoImplementation, "the topology implementation to use") + fs.StringVar(&topoGlobalServerAddress, "topo_global_server_address", topoGlobalServerAddress, "the address of the global topology server") + fs.StringVar(&topoGlobalRoot, "topo_global_root", topoGlobalRoot, "the path of the global topology data in the global topology server") +} + // RegisterFactory registers a Factory for an implementation for a Server. // If an implementation with that name already exists, it log.Fatals out. // Call this in the 'init' function in your topology implementation module. @@ -227,15 +240,15 @@ func OpenServer(implementation, serverAddress, root string) (*Server, error) { // Open returns a Server using the command line parameter flags // for implementation, address and root. It log.Exits out if an error occurs. func Open() *Server { - if *topoGlobalServerAddress == "" && *topoImplementation != "k8s" { + if topoGlobalServerAddress == "" && topoImplementation != "k8s" { log.Exitf("topo_global_server_address must be configured") } - if *topoGlobalRoot == "" { + if topoGlobalRoot == "" { log.Exit("topo_global_root must be non-empty") } - ts, err := OpenServer(*topoImplementation, *topoGlobalServerAddress, *topoGlobalRoot) + ts, err := OpenServer(topoImplementation, topoGlobalServerAddress, topoGlobalRoot) if err != nil { - log.Exitf("Failed to open topo server (%v,%v,%v): %v", *topoImplementation, *topoGlobalServerAddress, *topoGlobalRoot, err) + log.Exitf("Failed to open topo server (%v,%v,%v): %v", topoImplementation, topoGlobalServerAddress, topoGlobalRoot, err) } return ts } diff --git a/go/vt/topo/stats_conn.go b/go/vt/topo/stats_conn.go index c1959bf5d3d..bed1c00cb46 100644 --- a/go/vt/topo/stats_conn.go +++ b/go/vt/topo/stats_conn.go @@ -178,15 +178,10 @@ func (st *StatsConn) WatchRecursive(ctx context.Context, path string) ([]*WatchD // NewLeaderParticipation is part of the Conn interface func (st *StatsConn) NewLeaderParticipation(name, id string) (LeaderParticipation, error) { startTime := time.Now() - // TODO(deepthi): delete after v13.0 - deprecatedKey := []string{"NewMasterParticipation", st.cell} - defer topoStatsConnTimings.Record(deprecatedKey, startTime) - statsKey := []string{"NewLeaderParticipation", st.cell} defer topoStatsConnTimings.Record(statsKey, startTime) res, err := st.conn.NewLeaderParticipation(name, id) if err != nil { - topoStatsConnErrors.Add(deprecatedKey, int64(1)) topoStatsConnErrors.Add(statsKey, int64(1)) return res, err } diff --git a/go/vt/topo/stats_conn_test.go b/go/vt/topo/stats_conn_test.go index 2b715d2fe55..50c9ab16e25 100644 --- a/go/vt/topo/stats_conn_test.go +++ b/go/vt/topo/stats_conn_test.go @@ -319,35 +319,19 @@ func TestStatsConnTopoNewLeaderParticipation(t *testing.T) { statsConn := NewStatsConn("global", conn) _, _ = statsConn.NewLeaderParticipation("", "") - // TODO(deepthi): delete "Master" stats after v13.0 - timingCounts := topoStatsConnTimings.Counts()["NewMasterParticipation.global"] - if got, want := timingCounts, int64(1); got != want { - t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) - } - timingCounts = topoStatsConnTimings.Counts()["NewLeaderParticipation.global"] + timingCounts := topoStatsConnTimings.Counts()["NewLeaderParticipation.global"] if got, want := timingCounts, int64(1); got != want { t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) } // error is zero before getting an error - errorCount := topoStatsConnErrors.Counts()["NewMasterParticipation.global"] - if got, want := errorCount, int64(0); got != want { - t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) - } - // error is zero before getting an error - errorCount = topoStatsConnErrors.Counts()["NewLeaderParticipation.global"] + errorCount := topoStatsConnErrors.Counts()["NewLeaderParticipation.global"] if got, want := errorCount, int64(0); got != want { t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) } _, _ = statsConn.NewLeaderParticipation("error", "") - // error stats gets emitted - errorCount = topoStatsConnErrors.Counts()["NewMasterParticipation.global"] - if got, want := errorCount, int64(1); got != want { - t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) - } - // error stats gets emitted errorCount = topoStatsConnErrors.Counts()["NewLeaderParticipation.global"] if got, want := errorCount, int64(1); got != want { diff --git a/go/vt/topo/zk2topo/watch.go b/go/vt/topo/zk2topo/watch.go index 06d466d8cef..92e72b1cdba 100644 --- a/go/vt/topo/zk2topo/watch.go +++ b/go/vt/topo/zk2topo/watch.go @@ -31,7 +31,7 @@ func (zs *Server) Watch(ctx context.Context, filePath string) (*topo.WatchData, zkPath := path.Join(zs.root, filePath) // Get the initial value, set the initial watch - initialCtx, initialCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + initialCtx, initialCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer initialCancel() data, stats, watch, err := zs.conn.GetW(initialCtx, zkPath) diff --git a/go/vt/topo/zk2topo/zk_conn.go b/go/vt/topo/zk2topo/zk_conn.go index 95e9d778b96..7c4ba066caf 100644 --- a/go/vt/topo/zk2topo/zk_conn.go +++ b/go/vt/topo/zk2topo/zk_conn.go @@ -17,9 +17,9 @@ limitations under the License. package zk2topo import ( + "context" "crypto/tls" "crypto/x509" - "flag" "fmt" "math/rand" "net" @@ -28,12 +28,12 @@ import ( "sync" "time" - "context" - + "github.com/spf13/pflag" "github.com/z-division/go-zookeeper/zk" "vitess.io/vitess/go/sync2" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/servenv" ) const ( @@ -51,16 +51,26 @@ const ( ) var ( - maxConcurrency = flag.Int("topo_zk_max_concurrency", 64, "maximum number of pending requests to send to a Zookeeper server.") + maxConcurrency = 64 + baseTimeout = 30 * time.Second - baseTimeout = flag.Duration("topo_zk_base_timeout", 30*time.Second, "zk base timeout (see zk.Connect)") - - certPath = flag.String("topo_zk_tls_cert", "", "the cert to use to connect to the zk topo server, requires topo_zk_tls_key, enables TLS") - keyPath = flag.String("topo_zk_tls_key", "", "the key to use to connect to the zk topo server, enables TLS") - caPath = flag.String("topo_zk_tls_ca", "", "the server ca to use to validate servers when connecting to the zk topo server") - authFile = flag.String("topo_zk_auth_file", "", "auth to use when connecting to the zk topo server, file contents should be :, e.g., digest:user:pass") + certPath, keyPath, caPath, authFile string ) +func init() { + servenv.RegisterFlagsForTopoBinaries(registerFlags) +} + +func registerFlags(fs *pflag.FlagSet) { + fs.IntVar(&maxConcurrency, "topo_zk_max_concurrency", maxConcurrency, "maximum number of pending requests to send to a Zookeeper server.") + fs.DurationVar(&baseTimeout, "topo_zk_base_timeout", baseTimeout, "zk base timeout (see zk.Connect)") + fs.StringVar(&certPath, "topo_zk_tls_cert", certPath, "the cert to use to connect to the zk topo server, requires topo_zk_tls_key, enables TLS") + fs.StringVar(&keyPath, "topo_zk_tls_key", keyPath, "the key to use to connect to the zk topo server, enables TLS") + fs.StringVar(&caPath, "topo_zk_tls_ca", caPath, "the server ca to use to validate servers when connecting to the zk topo server") + fs.StringVar(&authFile, "topo_zk_auth_file", authFile, "auth to use when connecting to the zk topo server, file contents should be :, e.g., digest:user:pass") + +} + // Time returns a time.Time from a ZK int64 milliseconds since Epoch time. func Time(i int64) time.Time { return time.Unix(i/1000, i%1000*1000000) @@ -97,7 +107,7 @@ type ZkConn struct { func Connect(addr string) *ZkConn { return &ZkConn{ addr: addr, - sem: sync2.NewSemaphore(*maxConcurrency, 0), + sem: sync2.NewSemaphore(maxConcurrency, 0), } } @@ -288,10 +298,10 @@ func (c *ZkConn) getConn(ctx context.Context) (*zk.Conn, error) { // maybeAddAuth calls AddAuth if the `-topo_zk_auth_file` flag was specified func (c *ZkConn) maybeAddAuth(ctx context.Context) { - if *authFile == "" { + if authFile == "" { return } - authInfoBytes, err := os.ReadFile(*authFile) + authInfoBytes, err := os.ReadFile(authFile) if err != nil { log.Errorf("failed to read topo_zk_auth_file: %v", err) return @@ -342,10 +352,10 @@ func (c *ZkConn) handleSessionEvents(conn *zk.Conn, session <-chan zk.Event) { func dialZk(ctx context.Context, addr string) (*zk.Conn, <-chan zk.Event, error) { servers := strings.Split(addr, ",") dialer := zk.WithDialer(net.DialTimeout) - ctx, cancel := context.WithTimeout(ctx, *baseTimeout) + ctx, cancel := context.WithTimeout(ctx, baseTimeout) defer cancel() // If TLS is enabled use a TLS enabled dialer option - if *certPath != "" && *keyPath != "" { + if certPath != "" && keyPath != "" { if strings.Contains(addr, ",") { log.Fatalf("This TLS zk code requires that the all the zk servers validate to a single server name.") } @@ -353,14 +363,14 @@ func dialZk(ctx context.Context, addr string) (*zk.Conn, <-chan zk.Event, error) serverName := strings.Split(addr, ":")[0] log.Infof("Using TLS ZK, connecting to %v server name %v", addr, serverName) - cert, err := tls.LoadX509KeyPair(*certPath, *keyPath) + cert, err := tls.LoadX509KeyPair(certPath, keyPath) if err != nil { - log.Fatalf("Unable to load cert %v and key %v, err %v", *certPath, *keyPath, err) + log.Fatalf("Unable to load cert %v and key %v, err %v", certPath, keyPath, err) } - clientCACert, err := os.ReadFile(*caPath) + clientCACert, err := os.ReadFile(caPath) if err != nil { - log.Fatalf("Unable to open ca cert %v, err %v", *caPath, err) + log.Fatalf("Unable to open ca cert %v, err %v", caPath, err) } clientCertPool := x509.NewCertPool() @@ -383,7 +393,7 @@ func dialZk(ctx context.Context, addr string) (*zk.Conn, <-chan zk.Event, error) hostProvider := zk.WithHostProvider(&zk.SimpleDNSHostProvider{}) // zk.Connect automatically shuffles the servers - zconn, session, err := zk.Connect(servers, *baseTimeout, dialer, hostProvider) + zconn, session, err := zk.Connect(servers, baseTimeout, dialer, hostProvider) if err != nil { return nil, nil, err } diff --git a/go/vt/vtadmin/api.go b/go/vt/vtadmin/api.go index 2ebe638a457..e0e27d9503c 100644 --- a/go/vt/vtadmin/api.go +++ b/go/vt/vtadmin/api.go @@ -341,6 +341,7 @@ func (api *API) Handler() http.Handler { router.HandleFunc("/cells", httpAPI.Adapt(vtadminhttp.GetCellInfos)).Name("API.GetCellInfos") router.HandleFunc("/cells_aliases", httpAPI.Adapt(vtadminhttp.GetCellsAliases)).Name("API.GetCellsAliases") router.HandleFunc("/clusters", httpAPI.Adapt(vtadminhttp.GetClusters)).Name("API.GetClusters") + router.HandleFunc("/cluster/{cluster_id}/validate", httpAPI.Adapt(vtadminhttp.Validate)).Name("API.Validate").Methods("PUT", "OPTIONS") router.HandleFunc("/gates", httpAPI.Adapt(vtadminhttp.GetGates)).Name("API.GetGates") router.HandleFunc("/keyspace/{cluster_id}", httpAPI.Adapt(vtadminhttp.CreateKeyspace)).Name("API.CreateKeyspace").Methods("POST") router.HandleFunc("/keyspace/{cluster_id}/{name}", httpAPI.Adapt(vtadminhttp.DeleteKeyspace)).Name("API.DeleteKeyspace").Methods("DELETE") @@ -358,6 +359,7 @@ func (api *API) Handler() http.Handler { router.HandleFunc("/shard/{cluster_id}/{keyspace}/{shard}/emergency_failover", httpAPI.Adapt(vtadminhttp.EmergencyFailoverShard)).Name("API.EmergencyFailoverShard").Methods("POST") router.HandleFunc("/shard/{cluster_id}/{keyspace}/{shard}/planned_failover", httpAPI.Adapt(vtadminhttp.PlannedFailoverShard)).Name("API.PlannedFailoverShard").Methods("POST") router.HandleFunc("/shard/{cluster_id}/{keyspace}/{shard}/reload_schema_shard", httpAPI.Adapt(vtadminhttp.ReloadSchemaShard)).Name("API.ReloadSchemaShard").Methods("PUT", "OPTIONS") + router.HandleFunc("/shard/{cluster_id}/{keyspace}/{shard}/validate", httpAPI.Adapt(vtadminhttp.ValidateShard)).Name("API.ValidateShard").Methods("PUT", "OPTIONS") router.HandleFunc("/shard_replication_positions", httpAPI.Adapt(vtadminhttp.GetShardReplicationPositions)).Name("API.GetShardReplicationPositions") router.HandleFunc("/shards/{cluster_id}", httpAPI.Adapt(vtadminhttp.CreateShard)).Name("API.CreateShard").Methods("POST") router.HandleFunc("/shards/{cluster_id}", httpAPI.Adapt(vtadminhttp.DeleteShards)).Name("API.DeleteShards").Methods("DELETE") @@ -366,6 +368,7 @@ func (api *API) Handler() http.Handler { router.HandleFunc("/tablets", httpAPI.Adapt(vtadminhttp.GetTablets)).Name("API.GetTablets") router.HandleFunc("/tablet/{tablet}", httpAPI.Adapt(vtadminhttp.GetTablet)).Name("API.GetTablet").Methods("GET") router.HandleFunc("/tablet/{tablet}", httpAPI.Adapt(vtadminhttp.DeleteTablet)).Name("API.DeleteTablet").Methods("DELETE", "OPTIONS") + router.HandleFunc("/tablet/{tablet}/full_status", httpAPI.Adapt(vtadminhttp.GetFullStatus)).Name("API.GetFullStatus").Methods("GET") router.HandleFunc("/tablet/{tablet}/healthcheck", httpAPI.Adapt(vtadminhttp.RunHealthCheck)).Name("API.RunHealthCheck") router.HandleFunc("/tablet/{tablet}/ping", httpAPI.Adapt(vtadminhttp.PingTablet)).Name("API.PingTablet") router.HandleFunc("/tablet/{tablet}/refresh", httpAPI.Adapt(vtadminhttp.RefreshState)).Name("API.RefreshState").Methods("PUT", "OPTIONS") @@ -771,6 +774,25 @@ func (api *API) GetClusters(ctx context.Context, req *vtadminpb.GetClustersReque }, nil } +// GetFullStatus is part of the vtadminpb.VTAdminServer interface. +func (api *API) GetFullStatus(ctx context.Context, req *vtadminpb.GetFullStatusRequest) (*vtctldatapb.GetFullStatusResponse, error) { + span, ctx := trace.NewSpan(ctx, "API.GetFullStatus") + defer span.Finish() + + c, err := api.getClusterForRequest(req.ClusterId) + if err != nil { + return nil, err + } + + if !api.authz.IsAuthorized(ctx, c.ID, rbac.TabletResource, rbac.GetAction) { + return nil, nil + } + + return c.Vtctld.GetFullStatus(ctx, &vtctldatapb.GetFullStatusRequest{ + TabletAlias: req.Alias, + }) +} + // GetGates is part of the vtadminpb.VTAdminServer interface. func (api *API) GetGates(ctx context.Context, req *vtadminpb.GetGatesRequest) (*vtadminpb.GetGatesResponse, error) { span, ctx := trace.NewSpan(ctx, "API.GetGates") @@ -1714,6 +1736,31 @@ func (api *API) TabletExternallyPromoted(ctx context.Context, req *vtadminpb.Tab return c.TabletExternallyPromoted(ctx, tablet) } +// Validate is part of the vtadminpb.VTAdminServer interface. +func (api *API) Validate(ctx context.Context, req *vtadminpb.ValidateRequest) (*vtctldatapb.ValidateResponse, error) { + span, ctx := trace.NewSpan(ctx, "API.Validate") + defer span.Finish() + + c, err := api.getClusterForRequest(req.ClusterId) + if err != nil { + return nil, err + } + + if !api.authz.IsAuthorized(ctx, c.ID, rbac.ClusterResource, rbac.PutAction) { + return nil, nil + } + + res, err := c.Vtctld.Validate(ctx, &vtctldatapb.ValidateRequest{ + PingTablets: req.PingTablets, + }) + + if err != nil { + return nil, err + } + + return res, nil +} + // ValidateKeyspace is part of the vtadminpb.VTAdminServer interface. func (api *API) ValidateKeyspace(ctx context.Context, req *vtadminpb.ValidateKeyspaceRequest) (*vtctldatapb.ValidateKeyspaceResponse, error) { span, ctx := trace.NewSpan(ctx, "API.ValidateKeyspace") @@ -1765,6 +1812,33 @@ func (api *API) ValidateSchemaKeyspace(ctx context.Context, req *vtadminpb.Valid return res, nil } +// ValidateShard is part of the vtadminpb.VTAdminServer interface. +func (api *API) ValidateShard(ctx context.Context, req *vtadminpb.ValidateShardRequest) (*vtctldatapb.ValidateShardResponse, error) { + span, ctx := trace.NewSpan(ctx, "API.ValidateShard") + defer span.Finish() + + c, err := api.getClusterForRequest(req.ClusterId) + if err != nil { + return nil, err + } + + if !api.authz.IsAuthorized(ctx, c.ID, rbac.ShardResource, rbac.PutAction) { + return nil, nil + } + + res, err := c.Vtctld.ValidateShard(ctx, &vtctldatapb.ValidateShardRequest{ + Keyspace: req.Keyspace, + Shard: req.Shard, + PingTablets: req.PingTablets, + }) + + if err != nil { + return nil, err + } + + return res, nil +} + // ValidateVersionKeyspace is part of the vtadminpb.VTAdminServer interface. func (api *API) ValidateVersionKeyspace(ctx context.Context, req *vtadminpb.ValidateVersionKeyspaceRequest) (*vtctldatapb.ValidateVersionKeyspaceResponse, error) { span, ctx := trace.NewSpan(ctx, "API.ValidateVersionKeyspace") diff --git a/go/vt/vtadmin/http/clusters.go b/go/vt/vtadmin/http/clusters.go index ff02719679a..653feba9d94 100644 --- a/go/vt/vtadmin/http/clusters.go +++ b/go/vt/vtadmin/http/clusters.go @@ -18,8 +18,12 @@ package http import ( "context" + "encoding/json" + + "github.com/gorilla/mux" vtadminpb "vitess.io/vitess/go/vt/proto/vtadmin" + "vitess.io/vitess/go/vt/vtadmin/errors" ) // GetClusters implements the http wrapper for /clusters @@ -27,3 +31,26 @@ func GetClusters(ctx context.Context, r Request, api *API) *JSONResponse { clusters, err := api.server.GetClusters(ctx, &vtadminpb.GetClustersRequest{}) return NewJSONResponse(clusters, err) } + +// Validate implements the http wrapper for /cluster/{cluster_id}/validate +func Validate(ctx context.Context, r Request, api *API) *JSONResponse { + vars := mux.Vars(r.Request) + decoder := json.NewDecoder(r.Body) + defer r.Body.Close() + + var result struct { + PingTablets bool `json:"pingTablets"` + } + + if err := decoder.Decode(&result); err != nil { + return NewJSONResponse(nil, &errors.BadRequest{ + Err: err, + }) + } + + resp, err := api.server.Validate(ctx, &vtadminpb.ValidateRequest{ + ClusterId: vars["cluster_id"], + PingTablets: result.PingTablets, + }) + return NewJSONResponse(resp, err) +} diff --git a/go/vt/vtadmin/http/shards.go b/go/vt/vtadmin/http/shards.go index b0555f70f13..ecc035be361 100644 --- a/go/vt/vtadmin/http/shards.go +++ b/go/vt/vtadmin/http/shards.go @@ -199,3 +199,35 @@ func ReloadSchemaShard(ctx context.Context, r Request, api *API) *JSONResponse { }) return NewJSONResponse(result, err) } + +// ValidateShard implements the http wrapper for +// PUT /shard/{cluster_id}/{keyspace}/{shard}/validate +// +// Query params: none +// +// Body params: +// - ping_tablets: bool +func ValidateShard(ctx context.Context, r Request, api *API) *JSONResponse { + decoder := json.NewDecoder(r.Body) + defer r.Body.Close() + + var params struct { + PingTablets bool `json:"ping_tablets"` + } + + if err := decoder.Decode(¶ms); err != nil { + return NewJSONResponse(nil, &errors.BadRequest{ + Err: err, + }) + } + + vars := r.Vars() + + result, err := api.server.ValidateShard(ctx, &vtadminpb.ValidateShardRequest{ + ClusterId: vars["cluster_id"], + Keyspace: vars["keyspace"], + Shard: vars["shard"], + PingTablets: params.PingTablets, + }) + return NewJSONResponse(result, err) +} diff --git a/go/vt/vtadmin/http/tablets.go b/go/vt/vtadmin/http/tablets.go index 322092d8b97..b812fd1aebb 100644 --- a/go/vt/vtadmin/http/tablets.go +++ b/go/vt/vtadmin/http/tablets.go @@ -22,6 +22,22 @@ import ( vtadminpb "vitess.io/vitess/go/vt/proto/vtadmin" ) +// GetFullStatus implements the http wrapper for /tablets/{tablet}/full_status +func GetFullStatus(ctx context.Context, r Request, api *API) *JSONResponse { + vars := r.Vars() + + alias, err := vars.GetTabletAlias("tablet") + if err != nil { + return NewJSONResponse(nil, err) + } + status, err := api.server.GetFullStatus(ctx, &vtadminpb.GetFullStatusRequest{ + ClusterId: r.URL.Query()["cluster"][0], + Alias: alias, + }) + + return NewJSONResponse(status, err) +} + // GetTablets implements the http wrapper for /tablets[?cluster=[&cluster=]]. func GetTablets(ctx context.Context, r Request, api *API) *JSONResponse { tablets, err := api.server.GetTablets(ctx, &vtadminpb.GetTabletsRequest{ diff --git a/go/vt/vtctl/backup.go b/go/vt/vtctl/backup.go index eb03a1c0397..7d73c352efc 100644 --- a/go/vt/vtctl/backup.go +++ b/go/vt/vtctl/backup.go @@ -18,10 +18,10 @@ package vtctl import ( "context" - "flag" "fmt" "time" + "github.com/spf13/pflag" "google.golang.org/grpc" "vitess.io/vitess/go/protoutil" @@ -70,7 +70,7 @@ func init() { }) } -func commandBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { concurrency := subFlags.Int("concurrency", 4, "Specifies the number of compression/checksum jobs to run simultaneously") allowPrimary := subFlags.Bool("allow_primary", false, "Allows backups to be taken on primary. Warning!! If you are using the builtin backup engine, this will shutdown your primary mysql for as long as it takes to create a backup.") @@ -108,7 +108,7 @@ func (b *backupEventStreamLogger) Send(resp *vtctldatapb.BackupResponse) error { return nil } -func commandBackupShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandBackupShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { concurrency := subFlags.Int("concurrency", 4, "Specifies the number of compression/checksum jobs to run simultaneously") allowPrimary := subFlags.Bool("allow_primary", false, "Whether to use primary tablet for backup. Warning!! If you are using the builtin backup engine, this will shutdown your primary mysql for as long as it takes to create a backup.") @@ -132,7 +132,7 @@ func commandBackupShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl }, &backupEventStreamLogger{logger: wr.Logger(), ctx: ctx}) } -func commandListBackups(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandListBackups(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -161,7 +161,7 @@ func commandListBackups(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return nil } -func commandRemoveBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRemoveBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -198,7 +198,7 @@ func (b *backupRestoreEventStreamLogger) Send(resp *vtctldatapb.RestoreFromBacku return nil } -func commandRestoreFromBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRestoreFromBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { backupTimestampStr := subFlags.String("backup_timestamp", "", "Use the backup taken at or before this timestamp rather than using the latest backup.") if err := subFlags.Parse(args); err != nil { return err diff --git a/go/vt/vtctl/cell_info.go b/go/vt/vtctl/cell_info.go index 0478af4e50b..cef29de6c82 100644 --- a/go/vt/vtctl/cell_info.go +++ b/go/vt/vtctl/cell_info.go @@ -18,10 +18,11 @@ package vtctl import ( "context" - "flag" "fmt" "strings" + "github.com/spf13/pflag" + "vitess.io/vitess/go/vt/wrangler" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -71,7 +72,7 @@ func init() { }) } -func commandAddCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandAddCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { serverAddress := subFlags.String("server_address", "", "The address the topology server is using for that cell.") root := subFlags.String("root", "", "The root path the topology server is using for that cell.") if err := subFlags.Parse(args); err != nil { @@ -92,7 +93,7 @@ func commandAddCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return err } -func commandUpdateCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandUpdateCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { serverAddress := subFlags.String("server_address", "", "The address the topology server is using for that cell.") root := subFlags.String("root", "", "The root path the topology server is using for that cell.") if err := subFlags.Parse(args); err != nil { @@ -113,7 +114,7 @@ func commandUpdateCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandDeleteCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDeleteCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { force := subFlags.Bool("force", false, "Proceeds even if the cell's topology server cannot be reached. The assumption is that you turned down the entire cell, and just need to update the global topo data.") if err := subFlags.Parse(args); err != nil { return err @@ -130,7 +131,7 @@ func commandDeleteCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandGetCellInfoNames(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetCellInfoNames(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -145,7 +146,7 @@ func commandGetCellInfoNames(ctx context.Context, wr *wrangler.Wrangler, subFlag return nil } -func commandGetCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } diff --git a/go/vt/vtctl/cells_aliases.go b/go/vt/vtctl/cells_aliases.go index eaf016e1b28..9fd7fea9aca 100644 --- a/go/vt/vtctl/cells_aliases.go +++ b/go/vt/vtctl/cells_aliases.go @@ -18,10 +18,11 @@ package vtctl import ( "context" - "flag" "fmt" "strings" + "github.com/spf13/pflag" + "vitess.io/vitess/go/vt/wrangler" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -64,8 +65,8 @@ func init() { }) } -func commandAddCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { - cellsString := subFlags.String("cells", "", "The list of cell names that are members of this alias.") +func commandAddCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { + cells := subFlags.StringSlice("cells", nil, "The list of cell names that are members of this alias.") if err := subFlags.Parse(args); err != nil { return err } @@ -73,21 +74,20 @@ func commandAddCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags * return fmt.Errorf("the argument is required for the AddCellsAlias command") } - cells := strings.Split(*cellsString, ",") - for i, cell := range cells { - cells[i] = strings.TrimSpace(cell) + for i, cell := range *cells { + (*cells)[i] = strings.TrimSpace(cell) } alias := subFlags.Arg(0) _, err := wr.VtctldServer().AddCellsAlias(ctx, &vtctldatapb.AddCellsAliasRequest{ Name: alias, - Cells: cells, + Cells: *cells, }) return err } -func commandUpdateCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { - cellsString := subFlags.String("cells", "", "The list of cell names that are members of this alias.") +func commandUpdateCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { + cells := subFlags.StringSlice("cells", nil, "The list of cell names that are members of this alias.") if err := subFlags.Parse(args); err != nil { return err } @@ -95,22 +95,21 @@ func commandUpdateCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlag return fmt.Errorf("the argument is required for the UpdateCellsAlias command") } - cells := strings.Split(*cellsString, ",") - for i, cell := range cells { - cells[i] = strings.TrimSpace(cell) + for i, cell := range *cells { + (*cells)[i] = strings.TrimSpace(cell) } alias := subFlags.Arg(0) _, err := wr.VtctldServer().UpdateCellsAlias(ctx, &vtctldatapb.UpdateCellsAliasRequest{ Name: alias, CellsAlias: &topodatapb.CellsAlias{ - Cells: cells, + Cells: *cells, }, }) return err } -func commandDeleteCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDeleteCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -125,7 +124,7 @@ func commandDeleteCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlag return err } -func commandGetCellsAliases(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetCellsAliases(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } diff --git a/go/vt/vtctl/endtoend/get_schema_test.go b/go/vt/vtctl/endtoend/get_schema_test.go index 5bed5cbdc24..fe25080c7ae 100644 --- a/go/vt/vtctl/endtoend/get_schema_test.go +++ b/go/vt/vtctl/endtoend/get_schema_test.go @@ -177,7 +177,7 @@ func TestGetSchema(t *testing.T) { utils.MustMatch(t, sd, actual) // reset for the next invocation, where we verify that passing - // -table_sizes_only does not include the create table statement or columns. + // --table_sizes_only does not include the create table statement or columns. logger.Events = nil sd = &tabletmanagerdatapb.SchemaDefinition{ TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ @@ -202,7 +202,7 @@ func TestGetSchema(t *testing.T) { err = vtctl.RunCommand(ctx, wrangler.New(logger, topo, &tmc), []string{ "GetSchema", - "-table_sizes_only", + "--table_sizes_only", topoproto.TabletAliasString(tablet.Alias), }) require.NoError(t, err) diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 788a065b8b1..7423efad50f 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -119,7 +119,7 @@ func (s *VtctldServer) AddCellInfo(ctx context.Context, req *vtctldatapb.AddCell span.Annotate("cell_root", req.CellInfo.Root) span.Annotate("cell_address", req.CellInfo.ServerAddress) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err = s.ts.CreateCellInfo(ctx, req.Name, req.CellInfo); err != nil { @@ -139,7 +139,7 @@ func (s *VtctldServer) AddCellsAlias(ctx context.Context, req *vtctldatapb.AddCe span.Annotate("cells_alias", req.Name) span.Annotate("cells", strings.Join(req.Cells, ",")) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err = s.ts.CreateCellsAlias(ctx, req.Name, &topodatapb.CellsAlias{Cells: req.Cells}); err != nil { @@ -509,7 +509,7 @@ func (s *VtctldServer) ChangeTabletType(ctx context.Context, req *vtctldatapb.Ch span.Annotate("dry_run", req.DryRun) span.Annotate("tablet_type", topoproto.TabletTypeLString(req.DbType)) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() tablet, err := s.ts.GetTablet(ctx, req.TabletAlias) @@ -772,7 +772,7 @@ func (s *VtctldServer) DeleteCellInfo(ctx context.Context, req *vtctldatapb.Dele span.Annotate("cell", req.Name) span.Annotate("force", req.Force) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err = s.ts.DeleteCellInfo(ctx, req.Name, req.Force); err != nil { @@ -791,7 +791,7 @@ func (s *VtctldServer) DeleteCellsAlias(ctx context.Context, req *vtctldatapb.De span.Annotate("cells_alias", req.Name) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err = s.ts.DeleteCellsAlias(ctx, req.Name); err != nil { @@ -924,7 +924,7 @@ func (s *VtctldServer) DeleteSrvVSchema(ctx context.Context, req *vtctldatapb.De span.Annotate("cell", req.Cell) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err = s.ts.DeleteSrvVSchema(ctx, req.Cell); err != nil { @@ -1479,7 +1479,7 @@ func (s *VtctldServer) GetSrvKeyspaceNames(ctx context.Context, req *vtctldatapb cells := req.Cells if len(cells) == 0 { - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() cells, err = s.ts.GetCellInfoNames(ctx) @@ -1493,7 +1493,7 @@ func (s *VtctldServer) GetSrvKeyspaceNames(ctx context.Context, req *vtctldatapb // Contact each cell sequentially, each cell is bounded by *topo.RemoteOperationTimeout. // Total runtime is O(len(cells) * topo.RemoteOperationTimeout). for _, cell := range cells { - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) names, err2 := s.ts.GetSrvKeyspaceNames(ctx, cell) if err2 != nil { cancel() @@ -1663,7 +1663,7 @@ func (s *VtctldServer) GetTablets(ctx context.Context, req *vtctldatapb.GetTable // // Per-cell goroutines may also cancel this context if they fail and the // request specified Strict=true to allow us to fail faster. - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() var tabletMap map[string]*topo.TabletInfo @@ -2281,7 +2281,7 @@ func (s *VtctldServer) RefreshState(ctx context.Context, req *vtctldatapb.Refres return nil, err } - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() tablet, err := s.ts.GetTablet(ctx, req.TabletAlias) @@ -2314,7 +2314,7 @@ func (s *VtctldServer) RefreshStateByShard(ctx context.Context, req *vtctldatapb return nil, err } - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() si, err := s.ts.GetShard(ctx, req.Keyspace, req.Shard) @@ -2986,7 +2986,7 @@ func (s *VtctldServer) ShardReplicationPositions(ctx context.Context, req *vtctl span.Annotate("tablet_alias", alias) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() var status *replicationdatapb.Status @@ -3028,7 +3028,7 @@ func (s *VtctldServer) ShardReplicationPositions(ctx context.Context, req *vtctl span.Annotate("tablet_alias", alias) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() status, err := s.tmc.ReplicationStatus(ctx, tablet) @@ -3101,7 +3101,7 @@ func (s *VtctldServer) SleepTablet(ctx context.Context, req *vtctldatapb.SleepTa if err != nil { return nil, err } else if !ok { - dur = *topo.RemoteOperationTimeout + dur = topo.RemoteOperationTimeout } span.Annotate("sleep_duration", dur.String()) @@ -3409,7 +3409,7 @@ func (s *VtctldServer) UpdateCellInfo(ctx context.Context, req *vtctldatapb.Upda span.Annotate("cell_server_address", req.CellInfo.ServerAddress) span.Annotate("cell_root", req.CellInfo.Root) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() var updatedCi *topodatapb.CellInfo @@ -3457,7 +3457,7 @@ func (s *VtctldServer) UpdateCellsAlias(ctx context.Context, req *vtctldatapb.Up span.Annotate("cells_alias", req.Name) span.Annotate("cells_alias_cells", strings.Join(req.CellsAlias.Cells, ",")) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() var updatedCa *topodatapb.CellsAlias @@ -3490,7 +3490,7 @@ func (s *VtctldServer) Validate(ctx context.Context, req *vtctldatapb.ValidateRe span.Annotate("ping_tablets", req.PingTablets) resp = &vtctldatapb.ValidateResponse{} - getKeyspacesCtx, getKeyspacesCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getKeyspacesCtx, getKeyspacesCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer getKeyspacesCancel() keyspaces, err := s.ts.GetKeyspaces(getKeyspacesCtx) @@ -3513,7 +3513,7 @@ func (s *VtctldServer) Validate(ctx context.Context, req *vtctldatapb.ValidateRe cellSet := sets.NewString() for _, keyspace := range keyspaces { - getShardNamesCtx, getShardNamesCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getShardNamesCtx, getShardNamesCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) shards, err := s.ts.GetShardNames(getShardNamesCtx, keyspace) getShardNamesCancel() // don't defer in a loop @@ -3525,7 +3525,7 @@ func (s *VtctldServer) Validate(ctx context.Context, req *vtctldatapb.ValidateRe } for _, shard := range shards { - findAllTabletAliasesCtx, findAllTabletAliasesCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + findAllTabletAliasesCtx, findAllTabletAliasesCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) aliases, err := s.ts.FindAllTabletAliasesInShard(findAllTabletAliasesCtx, keyspace, shard) findAllTabletAliasesCancel() // don't defer in a loop @@ -3543,7 +3543,7 @@ func (s *VtctldServer) Validate(ctx context.Context, req *vtctldatapb.ValidateRe } for _, cell := range cellSet.List() { - getTabletsByCellCtx, getTabletsByCellCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getTabletsByCellCtx, getTabletsByCellCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) aliases, err := s.ts.GetTabletAliasesByCell(getTabletsByCellCtx, cell) getTabletsByCellCancel() // don't defer in a loop @@ -3565,7 +3565,7 @@ func (s *VtctldServer) Validate(ctx context.Context, req *vtctldatapb.ValidateRe key := topoproto.TabletAliasString(alias) span.Annotate("tablet_alias", key) - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err := topo.Validate(ctx, s.ts, alias); err != nil { @@ -3625,7 +3625,7 @@ func (s *VtctldServer) ValidateKeyspace(ctx context.Context, req *vtctldatapb.Va span.Annotate("ping_tablets", req.PingTablets) resp = &vtctldatapb.ValidateKeyspaceResponse{} - getShardNamesCtx, getShardNamesCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getShardNamesCtx, getShardNamesCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer getShardNamesCancel() shards, err := s.ts.GetShardNames(getShardNamesCtx, req.Keyspace) @@ -3819,7 +3819,7 @@ func (s *VtctldServer) ValidateShard(ctx context.Context, req *vtctldatapb.Valid span.Annotate("ping_tablets", req.PingTablets) resp = &vtctldatapb.ValidateShardResponse{} - getShardCtx, getShardCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getShardCtx, getShardCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer getShardCancel() si, err := s.ts.GetShard(getShardCtx, req.Keyspace, req.Shard) @@ -3829,7 +3829,7 @@ func (s *VtctldServer) ValidateShard(ctx context.Context, req *vtctldatapb.Valid return resp, err } - findAllTabletAliasesCtx, findAllTabletAliasesCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + findAllTabletAliasesCtx, findAllTabletAliasesCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer findAllTabletAliasesCancel() aliases, err := s.ts.FindAllTabletAliasesInShard(findAllTabletAliasesCtx, req.Keyspace, req.Shard) @@ -3839,7 +3839,7 @@ func (s *VtctldServer) ValidateShard(ctx context.Context, req *vtctldatapb.Valid return resp, err } - getTabletMapCtx, getTabletMapCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getTabletMapCtx, getTabletMapCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer getTabletMapCancel() tabletMap, _ := s.ts.GetTabletMap(getTabletMapCtx, aliases) @@ -3878,7 +3878,7 @@ func (s *VtctldServer) ValidateShard(ctx context.Context, req *vtctldatapb.Valid go func(alias *topodatapb.TabletAlias) { defer wg.Done() - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err := topo.Validate(ctx, s.ts, alias); err != nil { @@ -3904,7 +3904,7 @@ func (s *VtctldServer) ValidateShard(ctx context.Context, req *vtctldatapb.Valid return } - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() replicaList, err := s.tmc.GetReplicas(ctx, primaryTabletInfo.Tablet) @@ -3962,7 +3962,7 @@ func (s *VtctldServer) ValidateShard(ctx context.Context, req *vtctldatapb.Valid go func(alias string, ti *topo.TabletInfo) { defer wg.Done() - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err := s.tmc.Ping(ctx, ti.Tablet); err != nil { diff --git a/go/vt/vtctl/grpcvtctldserver/server_slow_test.go b/go/vt/vtctl/grpcvtctldserver/server_slow_test.go index 91f9bbe6971..858ac271a70 100644 --- a/go/vt/vtctl/grpcvtctldserver/server_slow_test.go +++ b/go/vt/vtctl/grpcvtctldserver/server_slow_test.go @@ -723,7 +723,7 @@ func TestSleepTablet(t *testing.T) { require.NoError(t, err) assert.Equal(t, tt.expected, resp) - dur := expectedDur(t, tt.req.Duration, *topo.RemoteOperationTimeout) + dur := expectedDur(t, tt.req.Duration, topo.RemoteOperationTimeout) assert.LessOrEqual(t, dur, sleepDur, "sleep should have taken at least %v; took %v", dur, sleepDur) }) } diff --git a/go/vt/vtctl/reparent.go b/go/vt/vtctl/reparent.go index 46a2fdf528a..b2f030e0756 100644 --- a/go/vt/vtctl/reparent.go +++ b/go/vt/vtctl/reparent.go @@ -18,9 +18,10 @@ package vtctl import ( "context" - "flag" "fmt" + "github.com/spf13/pflag" + "vitess.io/vitess/go/vt/mysqlctl" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" @@ -63,7 +64,7 @@ func init() { }) } -func commandReparentTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandReparentTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if mysqlctl.DisableActiveReparents { return fmt.Errorf("active reparent commands disabled (unset the --disable_active_reparents flag to enable)") } @@ -81,13 +82,13 @@ func commandReparentTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags return wr.ReparentTablet(ctx, tabletAlias) } -func commandInitShardPrimary(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandInitShardPrimary(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if mysqlctl.DisableActiveReparents { return fmt.Errorf("active reparent commands disabled (unset the --disable_active_reparents flag to enable)") } force := subFlags.Bool("force", false, "will force the reparent even if the provided tablet is not writable or the shard primary") - waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", *topo.RemoteOperationTimeout, "time to wait for replicas to catch up in reparenting") + waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", topo.RemoteOperationTimeout, "time to wait for replicas to catch up in reparenting") if err := subFlags.Parse(args); err != nil { return err } @@ -105,12 +106,12 @@ func commandInitShardPrimary(ctx context.Context, wr *wrangler.Wrangler, subFlag return wr.InitShardPrimary(ctx, keyspace, shard, tabletAlias, *force, *waitReplicasTimeout) } -func commandPlannedReparentShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandPlannedReparentShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if mysqlctl.DisableActiveReparents { return fmt.Errorf("active reparent commands disabled (unset the --disable_active_reparents flag to enable)") } - waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", *topo.RemoteOperationTimeout, "time to wait for replicas to catch up on replication before and after reparenting") + waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", topo.RemoteOperationTimeout, "time to wait for replicas to catch up on replication before and after reparenting") keyspaceShard := subFlags.String("keyspace_shard", "", "keyspace/shard of the shard that needs to be reparented") newPrimary := subFlags.String("new_primary", "", "alias of a tablet that should be the new primary") avoidTablet := subFlags.String("avoid_tablet", "", "alias of a tablet that should not be the primary, i.e. reparent to any other tablet if this one is the primary") @@ -149,12 +150,12 @@ func commandPlannedReparentShard(ctx context.Context, wr *wrangler.Wrangler, sub return wr.PlannedReparentShard(ctx, keyspace, shard, newPrimaryAlias, avoidTabletAlias, *waitReplicasTimeout) } -func commandEmergencyReparentShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandEmergencyReparentShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if mysqlctl.DisableActiveReparents { return fmt.Errorf("active reparent commands disabled (unset the --disable_active_reparents flag to enable)") } - waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", *topo.RemoteOperationTimeout, "time to wait for replicas to catch up in reparenting") + waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", topo.RemoteOperationTimeout, "time to wait for replicas to catch up in reparenting") keyspaceShard := subFlags.String("keyspace_shard", "", "keyspace/shard of the shard that needs to be reparented") newPrimary := subFlags.String("new_primary", "", "optional alias of a tablet that should be the new primary. If not specified, Vitess will select the best candidate") preventCrossCellPromotion := subFlags.Bool("prevent_cross_cell_promotion", false, "only promotes a new primary from the same cell as the previous primary") @@ -189,7 +190,7 @@ func commandEmergencyReparentShard(ctx context.Context, wr *wrangler.Wrangler, s return wr.EmergencyReparentShard(ctx, keyspace, shard, tabletAlias, *waitReplicasTimeout, unreachableReplicas, *preventCrossCellPromotion) } -func commandTabletExternallyReparented(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandTabletExternallyReparented(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } diff --git a/go/vt/vtctl/reparentutil/planned_reparenter.go b/go/vt/vtctl/reparentutil/planned_reparenter.go index f95329aa25a..fc0e1c80a06 100644 --- a/go/vt/vtctl/reparentutil/planned_reparenter.go +++ b/go/vt/vtctl/reparentutil/planned_reparenter.go @@ -226,7 +226,7 @@ func (pr *PlannedReparenter) performGracefulPromotion( // First, we find the position of the current primary. Note that this is // just a snapshot of the position, since we let it keep accepting writes // until we're sure we want to proceed with the promotion. - snapshotCtx, snapshotCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + snapshotCtx, snapshotCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer snapshotCancel() snapshotPos, err := pr.tmc.PrimaryPosition(snapshotCtx, currentPrimary.Tablet) @@ -260,7 +260,7 @@ func (pr *PlannedReparenter) performGracefulPromotion( pr.logger.Infof("demoting current primary: %v", currentPrimary.AliasString()) event.DispatchUpdate(ev, "demoting old primary") - demoteCtx, demoteCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + demoteCtx, demoteCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer demoteCancel() primaryStatus, err := pr.tmc.DemotePrimary(demoteCtx, currentPrimary.Tablet) @@ -290,7 +290,7 @@ func (pr *PlannedReparenter) performGracefulPromotion( // that not enough time is left on the it to finish the rollback. // We create a new background context to avoid a partial rollback, which // could leave the cluster in a worse state than when we started. - undoCtx, undoCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + undoCtx, undoCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer undoCancel() if undoErr := pr.tmc.UndoDemotePrimary(undoCtx, currentPrimary.Tablet, SemiSyncAckers(opts.durability, currentPrimary.Tablet) > 0); undoErr != nil { @@ -355,7 +355,7 @@ func (pr *PlannedReparenter) performPartialPromotionRecovery(ctx context.Context // It's possible that a previous attempt to reparent failed to SetReadWrite, // so call it here to make sure the underlying MySQL is read-write on the // candidate primary. - setReadWriteCtx, setReadWriteCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + setReadWriteCtx, setReadWriteCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer setReadWriteCancel() if err := pr.tmc.SetReadWrite(setReadWriteCtx, primaryElect); err != nil { @@ -363,7 +363,7 @@ func (pr *PlannedReparenter) performPartialPromotionRecovery(ctx context.Context } // The primary is already the one we want according to its tablet record. - refreshCtx, refreshCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + refreshCtx, refreshCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer refreshCancel() // Get the replication position so we can try to fix the replicas (back in @@ -415,7 +415,7 @@ func (pr *PlannedReparenter) performPotentialPromotion( rec concurrency.AllErrorRecorder ) - stopAllCtx, stopAllCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + stopAllCtx, stopAllCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer stopAllCancel() for alias, tabletInfo := range tabletMap { @@ -501,7 +501,7 @@ func (pr *PlannedReparenter) performPotentialPromotion( } // Promote the candidate primary to type:PRIMARY. - promoteCtx, promoteCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + promoteCtx, promoteCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer promoteCancel() rp, err := pr.tmc.PromoteReplica(promoteCtx, primaryElect, SemiSyncAckers(opts.durability, primaryElect) > 0) diff --git a/go/vt/vtctl/topo.go b/go/vt/vtctl/topo.go index 465e731f8ab..308d1f305f9 100644 --- a/go/vt/vtctl/topo.go +++ b/go/vt/vtctl/topo.go @@ -19,11 +19,11 @@ package vtctl import ( "context" "encoding/json" - "flag" "fmt" "os" "path" + "github.com/spf13/pflag" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/proto" @@ -110,7 +110,7 @@ func DecodeContent(filename string, data []byte, json bool) (string, error) { return string(marshalled), err } -func commandTopoCat(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandTopoCat(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cell := subFlags.String("cell", topo.GlobalCell, "topology cell to cat the file from. Defaults to global cell.") long := subFlags.Bool("long", false, "long listing.") decodeProtoJSON := subFlags.Bool("decode_proto_json", false, "decode proto files and display them as json") @@ -146,7 +146,7 @@ func commandTopoCat(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.F return topologyDecoder.decode(ctx, resolved, conn, wr, *long) } -func commandTopoCp(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandTopoCp(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cell := subFlags.String("cell", topo.GlobalCell, "topology cell to use for the copy. Defaults to global cell.") toTopo := subFlags.Bool("to_topo", false, "copies from local server to topo instead (reverse direction).") subFlags.Parse(args) diff --git a/go/vt/vtctl/vdiff2.go b/go/vt/vtctl/vdiff2.go index 88065820c1b..e97b56edb68 100644 --- a/go/vt/vtctl/vdiff2.go +++ b/go/vt/vtctl/vdiff2.go @@ -21,7 +21,6 @@ package vtctl import ( "context" "encoding/json" - "flag" "fmt" "math" "reflect" @@ -33,17 +32,19 @@ import ( "github.com/bndr/gotabulate" "github.com/google/uuid" + "github.com/spf13/pflag" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/log" - tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" - vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tabletmanager/vdiff" "vitess.io/vitess/go/vt/wrangler" + + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" ) -func commandVDiff2(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandVDiff2(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Bool("v2", false, "Use VDiff2") timeout := subFlags.Duration("filtered_replication_wait_time", 30*time.Second, "Specifies the maximum time to wait, in seconds, for filtered replication to catch up on primary migrations. The migration will be cancelled on a timeout.") diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index baac1a8ca19..143740267a5 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -94,16 +94,16 @@ import ( "sync" "time" + "github.com/spf13/pflag" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/textutil" - "vitess.io/vitess/go/cmd/vtctldclient/cli" "vitess.io/vitess/go/flagutil" "vitess.io/vitess/go/json2" "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/textutil" hk "vitess.io/vitess/go/vt/hook" "vitess.io/vitess/go/vt/key" "vitess.io/vitess/go/vt/log" @@ -123,9 +123,6 @@ import ( vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/proto/vttime" - - // Include deprecation warnings for soon-to-be-unsupported flag invocations. - _flag "vitess.io/vitess/go/internal/flag" ) var ( @@ -142,13 +139,18 @@ var ( type command struct { name string - method func(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error + method func(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error params string help string // if help is empty, won't list the command // if set, PrintAllCommands will not show this command hidden bool + // (ajm188) - before we transition to cobra, we need to know whether to + // strip off a -- after the action (i.e. "command") name in RunCommand so + // that parsing continues to work. + disableFlagInterspersal bool + // deprecation support deprecated bool deprecatedBy string @@ -248,13 +250,6 @@ var commands = []commandGroup{ params: "", help: "Runs a health check on a remote tablet.", }, - { - name: "IgnoreHealthError", - method: commandIgnoreHealthError, - params: " ", - help: "Sets the regexp for health check errors to ignore on the specified tablet. The pattern has implicit ^$ anchors. Set to empty string or restart vttablet to stop ignoring anything.", - deprecated: true, - }, { name: "Sleep", method: commandSleep, @@ -267,6 +262,7 @@ var commands = []commandGroup{ params: " [ ...]", help: "Runs the specified hook on the given tablet. A hook is a script that resides in the $VTROOT/vthook directory. You can put any script into that directory and use this command to run that script.\n" + "For this command, the param=value arguments are parameters that the command passes to the specified hook.", + disableFlagInterspersal: true, }, { name: "ExecuteFetchAsApp", @@ -441,7 +437,7 @@ var commands = []commandGroup{ name: "Reshard", method: commandReshard, params: "[--source_shards=] [--target_shards=] [--cells=] [--tablet_types=] [--skip_schema_copy] 'action must be one of the following: Create, Complete, Cancel, SwitchTraffic, ReverseTrafffic, Show, or Progress' ", - help: "Start a Resharding process. Example: Reshard --cells='zone1,alias1' --tablet_types='PRIMARY,REPLICA,RDONLY' ks.workflow001 '0' '-80,80-'", + help: "Start a Resharding process. Example: Reshard --cells='zone1,alias1' --tablet_types='PRIMARY,REPLICA,RDONLY' ks.workflow001 -- '0' '-80,80-'", }, { name: "MoveTables", @@ -464,7 +460,7 @@ var commands = []commandGroup{ { name: "CreateLookupVindex", method: commandCreateLookupVindex, - params: "[--cell= DEPRECATED] [--cells=] [--tablet_types=] ", + params: "[--cells=] [--tablet_types=] ", help: `Create and backfill a lookup vindex. the json_spec must contain the vindex and colvindex specs for the new lookup.`, }, { @@ -488,7 +484,7 @@ var commands = []commandGroup{ { name: "SwitchReads", method: commandSwitchReads, - params: "[--cells=c1,c2,...] [--reverse] --tablet_type={replica|rdonly} [--dry_run] ", + params: "[--cells=c1,c2,...] [--reverse] [--tablet_types=REPLICA,RDONLY] [--dry_run] ", help: "Switch read traffic for the specified workflow.", }, { @@ -546,9 +542,9 @@ var commands = []commandGroup{ }, { name: "LegacyVtctlCommand", - method: func(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { + method: func(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { subFlags.Usage = func() { - fmt.Fprintln(subFlags.Output(), "Runs the vtctl request through the legacy vtctlclient program syntax (default).") + wr.Logger().Printf("Runs the vtctl request through the legacy vtctlclient program syntax (default).\n") } return subFlags.Parse(args) @@ -558,9 +554,9 @@ var commands = []commandGroup{ }, { name: "VtctldCommand", - method: func(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { + method: func(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { subFlags.Usage = func() { - fmt.Fprintln(subFlags.Output(), "Runs the vtctl request through the new vtctldclient program syntax. This will become the default in a future version of Vitess.") + wr.Logger().Printf("Runs the vtctl request through the new vtctldclient program syntax. This will become the default in a future version of Vitess.\n") } return subFlags.Parse(args) @@ -922,7 +918,7 @@ func parseTabletType(param string, types []topodatapb.TabletType) (topodatapb.Ta return tabletType, nil } -func commandInitTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandInitTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { dbNameOverride := subFlags.String("db_name_override", "", "Overrides the name of the database that the vttablet uses") allowUpdate := subFlags.Bool("allow_update", false, "Use this flag to force initialization if a tablet with the same name already exists. Use with caution.") allowPrimaryOverride := subFlags.Bool("allow_master_override", false, "Use this flag to force initialization if a tablet is created as primary, and a primary for the keyspace/shard already exists. Use with caution.") @@ -978,7 +974,7 @@ func commandInitTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *fla return wr.TopoServer().InitTablet(ctx, tablet, *allowPrimaryOverride, *createShardAndKeyspace, *allowUpdate) } -func commandGetTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -998,7 +994,7 @@ func commandGetTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag return printJSON(wr.Logger(), tabletInfo.Tablet) } -func commandUpdateTabletAddrs(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandUpdateTabletAddrs(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { hostname := subFlags.String("hostname", "", "The fully qualified host name of the server on which the tablet is running.") mysqlHost := subFlags.String("mysql_host", "", "The mysql host for the mysql server") mysqlPort := subFlags.Int("mysql-port", 0, "The mysql port for the mysql daemon") @@ -1043,7 +1039,7 @@ func commandUpdateTabletAddrs(ctx context.Context, wr *wrangler.Wrangler, subFla return err } -func commandDeleteTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDeleteTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { allowPrimary := subFlags.Bool("allow_primary", false, "Allows for the primary tablet of a shard to be deleted. Use with caution.") if err := subFlags.Parse(args); err != nil { @@ -1065,7 +1061,7 @@ func commandDeleteTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return nil } -func commandSetReadOnly(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSetReadOnly(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1084,7 +1080,7 @@ func commandSetReadOnly(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return err } -func commandSetReadWrite(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSetReadWrite(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1103,7 +1099,7 @@ func commandSetReadWrite(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return err } -func commandStartReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandStartReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1122,7 +1118,7 @@ func commandStartReplication(ctx context.Context, wr *wrangler.Wrangler, subFlag return err } -func commandStopReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandStopReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1141,7 +1137,7 @@ func commandStopReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandChangeTabletType(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandChangeTabletType(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { dryRun := subFlags.Bool("dry-run", false, "Lists the proposed change without actually executing it") if err := subFlags.Parse(args); err != nil { @@ -1160,7 +1156,7 @@ func commandChangeTabletType(ctx context.Context, wr *wrangler.Wrangler, subFlag return err } - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if *dryRun { @@ -1179,7 +1175,7 @@ func commandChangeTabletType(ctx context.Context, wr *wrangler.Wrangler, subFlag return wr.ChangeTabletType(ctx, tabletAlias, newType) } -func commandPing(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandPing(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1196,7 +1192,7 @@ func commandPing(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.Flag return err } -func commandRefreshState(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRefreshState(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1214,7 +1210,7 @@ func commandRefreshState(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return err } -func commandRefreshStateByShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRefreshStateByShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cellsStr := subFlags.String("cells", "", "Specifies a comma-separated list of cells whose tablets are included. If empty, all cells are considered.") if err := subFlags.Parse(args); err != nil { return err @@ -1241,7 +1237,7 @@ func commandRefreshStateByShard(ctx context.Context, wr *wrangler.Wrangler, subF return err } -func commandRunHealthCheck(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRunHealthCheck(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1259,11 +1255,7 @@ func commandRunHealthCheck(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandIgnoreHealthError(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { - return fmt.Errorf("this command is no longer relevant and has been deprecated") -} - -func commandSleep(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSleep(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1286,7 +1278,7 @@ func commandSleep(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.Fla return err } -func commandExecuteFetchAsApp(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandExecuteFetchAsApp(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { maxRows := subFlags.Int("max_rows", 10000, "Specifies the maximum number of rows to allow in fetch") usePool := subFlags.Bool("use_pool", false, "Use connection from pool") json := subFlags.Bool("json", false, "Output JSON instead of human-readable table") @@ -1315,7 +1307,7 @@ func commandExecuteFetchAsApp(ctx context.Context, wr *wrangler.Wrangler, subFla return nil } -func commandExecuteFetchAsDba(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandExecuteFetchAsDba(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { maxRows := subFlags.Int("max_rows", 10000, "Specifies the maximum number of rows to allow in fetch") disableBinlogs := subFlags.Bool("disable_binlogs", false, "Disables writing to binlogs during the query") reloadSchema := subFlags.Bool("reload_schema", false, "Indicates whether the tablet schema will be reloaded after executing the SQL command. The default value is false, which indicates that the tablet schema will not be reloaded.") @@ -1345,7 +1337,7 @@ func commandExecuteFetchAsDba(ctx context.Context, wr *wrangler.Wrangler, subFla return nil } -func commandVReplicationExec(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandVReplicationExec(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { json := subFlags.Bool("json", false, "Output JSON instead of human-readable table") if err := subFlags.Parse(args); err != nil { @@ -1372,7 +1364,9 @@ func commandVReplicationExec(ctx context.Context, wr *wrangler.Wrangler, subFlag return nil } -func commandExecuteHook(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandExecuteHook(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { + subFlags.SetInterspersed(false) // all flags should be treated as posargs to pass them to the actual hook + if err := subFlags.Parse(args); err != nil { return err } @@ -1404,7 +1398,7 @@ func commandExecuteHook(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return printJSON(wr.Logger(), hr) } -func commandCreateShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandCreateShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { force := subFlags.Bool("force", false, "Proceeds with the command even if the shard already exists") parent := subFlags.Bool("parent", false, "Creates the parent keyspace if it doesn't already exist") if err := subFlags.Parse(args); err != nil { @@ -1432,7 +1426,7 @@ func commandCreateShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return err } -func commandGetShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1452,7 +1446,7 @@ func commandGetShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag. return printJSON(wr.Logger(), shardInfo.Shard) } -func commandValidateShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidateShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { pingTablets := subFlags.Bool("ping-tablets", true, "Indicates whether all tablets should be pinged during the validation process") if err := subFlags.Parse(args); err != nil { return err @@ -1468,7 +1462,7 @@ func commandValidateShard(ctx context.Context, wr *wrangler.Wrangler, subFlags * return wr.ValidateShard(ctx, keyspace, shard, *pingTablets) } -func commandShardReplicationPositions(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandShardReplicationPositions(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1504,7 +1498,7 @@ func commandShardReplicationPositions(ctx context.Context, wr *wrangler.Wrangler return nil } -func commandListShardTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandListShardTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1532,7 +1526,7 @@ func commandListShardTablets(ctx context.Context, wr *wrangler.Wrangler, subFlag return nil } -func commandSetShardIsPrimaryServing(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSetShardIsPrimaryServing(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1557,7 +1551,7 @@ func commandSetShardIsPrimaryServing(ctx context.Context, wr *wrangler.Wrangler, return err } -func commandUpdateSrvKeyspacePartition(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandUpdateSrvKeyspacePartition(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cellsStr := subFlags.String("cells", "", "Specifies a comma-separated list of cells to update") remove := subFlags.Bool("remove", false, "Removes shard from serving keyspace partition") @@ -1588,7 +1582,7 @@ func commandUpdateSrvKeyspacePartition(ctx context.Context, wr *wrangler.Wrangle return nil } -func commandSetShardTabletControl(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSetShardTabletControl(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cellsStr := subFlags.String("cells", "", "Specifies a comma-separated list of cells to update") deniedTablesStr := subFlags.String("denied_tables", "", "Specifies a comma-separated list of tables to add to the denylist (used for VReplication). Each is either an exact match, or a regular expression of the form '/regexp/'.") @@ -1629,7 +1623,7 @@ func commandSetShardTabletControl(ctx context.Context, wr *wrangler.Wrangler, su return err } -func commandSourceShardDelete(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSourceShardDelete(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1648,7 +1642,7 @@ func commandSourceShardDelete(ctx context.Context, wr *wrangler.Wrangler, subFla return wr.SourceShardDelete(ctx, keyspace, shard, uint32(uid)) } -func commandSourceShardAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSourceShardAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { keyRange := subFlags.String("key_range", "", "Identifies the key range to use for the SourceShard") tablesStr := subFlags.String("tables", "", "Specifies a comma-separated list of tables to replicate. Each is either an exact match, or a regular expression of the form /regexp/") if err := subFlags.Parse(args); err != nil { @@ -1682,7 +1676,7 @@ func commandSourceShardAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags return wr.SourceShardAdd(ctx, keyspace, shard, uint32(uid), skeyspace, sshard, kr, tables) } -func commandShardReplicationAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandShardReplicationAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1707,7 +1701,7 @@ func commandShardReplicationAdd(ctx context.Context, wr *wrangler.Wrangler, subF return err } -func commandShardReplicationRemove(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandShardReplicationRemove(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1732,7 +1726,7 @@ func commandShardReplicationRemove(ctx context.Context, wr *wrangler.Wrangler, s return err } -func commandShardReplicationFix(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandShardReplicationFix(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1749,7 +1743,7 @@ func commandShardReplicationFix(ctx context.Context, wr *wrangler.Wrangler, subF return err } -func commandWaitForFilteredReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWaitForFilteredReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { maxDelay := subFlags.Duration("max_delay", wrangler.DefaultWaitForFilteredReplicationMaxDelay, "Specifies the maximum delay, in seconds, the filtered replication of the"+ " given destination shard should lag behind the source shard. When"+ @@ -1768,7 +1762,7 @@ func commandWaitForFilteredReplication(ctx context.Context, wr *wrangler.Wrangle return wr.WaitForFilteredReplication(ctx, keyspace, shard, *maxDelay) } -func commandRemoveShardCell(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRemoveShardCell(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { force := subFlags.Bool("force", false, "Proceeds even if the cell's topology server cannot be reached. The assumption is that you turned down the entire cell, and just need to update the global topo data.") recursive := subFlags.Bool("recursive", false, "Also delete all tablets in that cell belonging to the specified shard.") if err := subFlags.Parse(args); err != nil { @@ -1795,7 +1789,7 @@ func commandRemoveShardCell(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandDeleteShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDeleteShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { recursive := subFlags.Bool("recursive", false, "Also delete all tablets belonging to the shard.") evenIfServing := subFlags.Bool("even_if_serving", false, "Remove the shard even if it is serving. Use with caution.") if err := subFlags.Parse(args); err != nil { @@ -1823,7 +1817,7 @@ func commandDeleteShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return nil } -func commandCreateKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandCreateKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { force := subFlags.Bool("force", false, "Proceeds even if the keyspace already exists") allowEmptyVSchema := subFlags.Bool("allow_empty_vschema", false, "If set this will allow a new keyspace to have no vschema") @@ -1936,7 +1930,7 @@ func commandCreateKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags return wr.TopoServer().RebuildSrvVSchema(ctx, []string{} /* cells */) } -func commandDeleteKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDeleteKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { recursive := subFlags.Bool("recursive", false, "Also recursively delete all shards in the keyspace.") if err := subFlags.Parse(args); err != nil { return err @@ -1952,7 +1946,7 @@ func commandDeleteKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandRemoveKeyspaceCell(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRemoveKeyspaceCell(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { force := subFlags.Bool("force", false, "Proceeds even if the cell's topology server cannot be reached. The assumption is that you turned down the entire cell, and just need to update the global topo data.") recursive := subFlags.Bool("recursive", false, "Also delete all tablets in that cell belonging to the specified keyspace.") if err := subFlags.Parse(args); err != nil { @@ -1974,7 +1968,7 @@ func commandRemoveKeyspaceCell(ctx context.Context, wr *wrangler.Wrangler, subFl return err } -func commandGetKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -1994,7 +1988,7 @@ func commandGetKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return printJSON(wr.Logger(), keyspaceInfo.Keyspace.Keyspace) } -func commandGetKeyspaces(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetKeyspaces(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { resp, err := wr.VtctldServer().GetKeyspaces(ctx, &vtctldatapb.GetKeyspacesRequest{}) if err != nil { return err @@ -2009,7 +2003,7 @@ func commandGetKeyspaces(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return nil } -func commandRebuildKeyspaceGraph(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandRebuildKeyspaceGraph(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cells := subFlags.String("cells", "", "Specifies a comma-separated list of cells to update") allowPartial := subFlags.Bool("allow_partial", false, "Specifies whether a SNAPSHOT keyspace is allowed to serve with an incomplete set of shards. Ignored for all other types of keyspaces") if err := subFlags.Parse(args); err != nil { @@ -2041,7 +2035,7 @@ func commandRebuildKeyspaceGraph(ctx context.Context, wr *wrangler.Wrangler, sub return nil } -func commandValidateKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidateKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { pingTablets := subFlags.Bool("ping-tablets", false, "Specifies whether all tablets will be pinged during the validation process") if err := subFlags.Parse(args); err != nil { return err @@ -2063,7 +2057,7 @@ func useV1(args []string) bool { return false } -func commandReshard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandReshard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if !useV1(args) { log.Infof("*** Using Reshard v2 flow ***") return commandVRWorkflow(ctx, wr, subFlags, args, wrangler.ReshardWorkflow) @@ -2094,7 +2088,7 @@ func commandReshard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.F *tabletTypes, *autoStart, *stopAfterCopy) } -func commandMoveTables(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandMoveTables(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if !useV1(args) { log.Infof("*** Using MoveTables v2 flow ***") return commandVRWorkflow(ctx, wr, subFlags, args, wrangler.MoveTablesWorkflow) @@ -2152,7 +2146,7 @@ const ( vReplicationWorkflowActionGetState = "getstate" ) -func commandMigrate(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandMigrate(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { return commandVRWorkflow(ctx, wr, subFlags, args, wrangler.MigrateWorkflow) } @@ -2167,7 +2161,7 @@ func getSourceKeyspace(clusterKeyspace string) (clusterName string, sourceKeyspa // commandVRWorkflow is the common entry point for MoveTables/Reshard/Migrate workflows // FIXME: this function needs a refactor. Also validations for params should to be done per workflow type -func commandVRWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string, +func commandVRWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string, workflowType wrangler.VReplicationWorkflowType) error { const defaultWaitTime = time.Duration(30 * time.Second) @@ -2525,10 +2519,8 @@ func commandVRWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *fla return nil } -func commandCreateLookupVindex(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandCreateLookupVindex(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cells := subFlags.String("cells", "", "Source cells to replicate from.") - // TODO: keep --cell around for backward compatibility and remove it in a future version - cell := subFlags.String("cell", "", "Cell to replicate from.") tabletTypes := subFlags.String("tablet_types", "", "Source tablet types to replicate from.") continueAfterCopyWithOwner := subFlags.Bool("continue_after_copy_with_owner", false, "Vindex will continue materialization after copy when an owner is provided") if err := subFlags.Parse(args); err != nil { @@ -2537,9 +2529,6 @@ func commandCreateLookupVindex(ctx context.Context, wr *wrangler.Wrangler, subFl if subFlags.NArg() != 2 { return fmt.Errorf("two arguments are required: keyspace and json_spec") } - if *cells == "" && *cell != "" { - *cells = *cell - } keyspace := subFlags.Arg(0) specs := &vschemapb.Keyspace{} if err := json2.Unmarshal([]byte(subFlags.Arg(1)), specs); err != nil { @@ -2548,7 +2537,7 @@ func commandCreateLookupVindex(ctx context.Context, wr *wrangler.Wrangler, subFl return wr.CreateLookupVindex(ctx, keyspace, specs, *cells, *tabletTypes, *continueAfterCopyWithOwner) } -func commandExternalizeVindex(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandExternalizeVindex(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -2558,7 +2547,7 @@ func commandExternalizeVindex(ctx context.Context, wr *wrangler.Wrangler, subFla return wr.ExternalizeVindex(ctx, subFlags.Arg(0)) } -func commandMaterialize(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandMaterialize(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { cells := subFlags.String("cells", "", "Source cells to replicate from.") tabletTypes := subFlags.String("tablet_types", "", "Source tablet types to replicate from.") if err := subFlags.Parse(args); err != nil { @@ -2585,7 +2574,7 @@ func useVDiffV2(args []string) bool { return false } -func commandVDiff(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandVDiff(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if useVDiffV2(args) { log.Infof("*** Using (experimental) VDiff2 ***") return commandVDiff2(ctx, wr, subFlags, args) @@ -2643,7 +2632,7 @@ func splitKeyspaceWorkflow(in string) (keyspace, workflow string, err error) { return splits[0], splits[1], nil } -func commandDropSources(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDropSources(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { wr.Logger().Printf("*** DropSources is deprecated. Consider using v2 commands instead, see https://vitess.io/docs/reference/vreplication/v2/ ***\n") dryRun := subFlags.Bool("dry_run", false, "Does a dry run of commandDropSources and only reports the actions to be taken") renameTables := subFlags.Bool("rename_tables", false, "Rename tables instead of dropping them") @@ -2676,26 +2665,17 @@ func commandDropSources(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return nil } -func commandSwitchReads(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSwitchReads(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { wr.Logger().Printf("*** SwitchReads is deprecated. Consider using v2 commands instead, see https://vitess.io/docs/reference/vreplication/v2/ ***\n") reverse := subFlags.Bool("reverse", false, "Moves the served tablet type backward instead of forward.") cellsStr := subFlags.String("cells", "", "Specifies a comma-separated list of cells to update") - tabletTypes := subFlags.String("tablet_types", "rdonly,replica", "Tablet types to switch one or both or rdonly/replica") - deprecatedTabletType := subFlags.String("tablet_type", "", "(DEPRECATED) one of rdonly/replica") + tabletTypes := subFlags.String("tablet_types", "rdonly,replica", "Tablet types to switch one or both of rdonly/replica") dryRun := subFlags.Bool("dry_run", false, "Does a dry run of SwitchReads and only reports the actions to be taken") if err := subFlags.Parse(args); err != nil { return err } - if !(*deprecatedTabletType == "" || *deprecatedTabletType == "replica" || *deprecatedTabletType == "rdonly") { - return fmt.Errorf("invalid value specified for --tablet_type: %s", *deprecatedTabletType) - } - - if *deprecatedTabletType != "" { - *tabletTypes = *deprecatedTabletType - } - tabletTypesArr := strings.Split(*tabletTypes, ",") var servedTypes []topodatapb.TabletType for _, tabletType := range tabletTypesArr { @@ -2731,7 +2711,7 @@ func commandSwitchReads(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return nil } -func commandSwitchWrites(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandSwitchWrites(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { wr.Logger().Printf("*** SwitchWrites is deprecated. Consider using v2 commands instead, see https://vitess.io/docs/reference/vreplication/v2/ ***\n") timeout := subFlags.Duration("timeout", 30*time.Second, "Specifies the maximum time to wait, in seconds, for vreplication to catch up on primary migrations. The migration will be cancelled on a timeout.") @@ -2769,7 +2749,7 @@ func commandSwitchWrites(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return nil } -func commandFindAllShardsInKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandFindAllShardsInKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -2795,7 +2775,7 @@ func commandFindAllShardsInKeyspace(ctx context.Context, wr *wrangler.Wrangler, return printJSON(wr.Logger(), legacyShardMap) } -func commandValidate(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidate(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { pingTablets := subFlags.Bool("ping-tablets", false, "Indicates whether all tablets should be pinged during the validation process") if err := subFlags.Parse(args); err != nil { return err @@ -2807,7 +2787,7 @@ func commandValidate(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag. return wr.Validate(ctx, *pingTablets) } -func commandListAllTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandListAllTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { keyspaceFilter := subFlags.String("keyspace", "", "Keyspace to filter on") tabletTypeStr := subFlags.String("tablet_type", "", "Tablet type to filter on") var err error @@ -2844,7 +2824,7 @@ func commandListAllTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags return nil } -func commandListTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandListTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -2877,7 +2857,7 @@ func commandListTablets(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return nil } -func commandGetSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { tables := subFlags.String("tables", "", "Specifies a comma-separated list of tables for which we should gather information. Each is either an exact match, or a regular expression of the form /regexp/") excludeTables := subFlags.String("exclude_tables", "", "Specifies a comma-separated list of tables to exclude. Each is either an exact match, or a regular expression of the form /regexp/") includeViews := subFlags.Bool("include-views", false, "Includes views in the output") @@ -2928,7 +2908,7 @@ func commandGetSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag return printJSON(wr.Logger(), resp.Schema) } -func commandReloadSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandReloadSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -2945,7 +2925,7 @@ func commandReloadSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return err } -func commandReloadSchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandReloadSchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { concurrency := subFlags.Int("concurrency", 10, "How many tablets to reload in parallel") includePrimary := subFlags.Bool("include_primary", true, "Include the primary tablet") @@ -2974,7 +2954,7 @@ func commandReloadSchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFla return err } -func commandReloadSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandReloadSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { concurrency := subFlags.Int("concurrency", 10, "How many tablets to reload in parallel") includePrimary := subFlags.Bool("include_primary", true, "Include the primary tablet(s)") @@ -2998,7 +2978,7 @@ func commandReloadSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, sub return err } -func commandValidateSchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidateSchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { excludeTables := subFlags.String("exclude_tables", "", "Specifies a comma-separated list of tables to exclude. Each is either an exact match, or a regular expression of the form /regexp/") includeViews := subFlags.Bool("include-views", false, "Includes views in the validation") includeVSchema := subFlags.Bool("include-vschema", false, "Validate schemas against the vschema") @@ -3020,7 +3000,7 @@ func commandValidateSchemaShard(ctx context.Context, wr *wrangler.Wrangler, subF return wr.ValidateSchemaShard(ctx, keyspace, shard, excludeTableArray, *includeViews, *includeVSchema) } -func commandValidateSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidateSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { excludeTables := subFlags.String("exclude_tables", "", "Specifies a comma-separated list of tables to exclude. Each is either an exact match, or a regular expression of the form /regexp/") includeViews := subFlags.Bool("include-views", false, "Includes views in the validation") skipNoPrimary := subFlags.Bool("skip-no-primary", true, "Skip shards that don't have primary when performing validation") @@ -3062,7 +3042,7 @@ func commandValidateSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, s return nil } -func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { allowLongUnavailability := subFlags.Bool("allow_long_unavailability", false, "Allow large schema changes which incur a longer unavailability of the database.") sql := subFlags.String("sql", "", "A list of semicolon-delimited SQL commands") sqlFile := subFlags.String("sql-file", "", "Identifies the file that contains the SQL commands") @@ -3130,7 +3110,7 @@ func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl return nil } -func commandOnlineDDL(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandOnlineDDL(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { json := subFlags.Bool("json", false, "Output JSON instead of human-readable table") orderBy := subFlags.String("order", "ascending", "Sort the results by `id` property of the Schema migration (default is ascending. Allowed values are `ascending` or `descending`.") limit := subFlags.Int64("limit", 0, "Limit number of rows returned in output") @@ -3231,7 +3211,7 @@ func commandOnlineDDL(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag return nil } -func commandCopySchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandCopySchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { tables := subFlags.String("tables", "", "Specifies a comma-separated list of tables to copy. Each is either an exact match, or a regular expression of the form /regexp/") excludeTables := subFlags.String("exclude_tables", "", "Specifies a comma-separated list of tables to exclude. Each is either an exact match, or a regular expression of the form /regexp/") includeViews := subFlags.Bool("include-views", true, "Includes views in the output") @@ -3269,7 +3249,7 @@ func commandCopySchemaShard(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } -func commandValidateVersionShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidateVersionShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3284,7 +3264,7 @@ func commandValidateVersionShard(ctx context.Context, wr *wrangler.Wrangler, sub return wr.ValidateVersionShard(ctx, keyspace, shard) } -func commandValidateVersionKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidateVersionKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3310,7 +3290,7 @@ func commandValidateVersionKeyspace(ctx context.Context, wr *wrangler.Wrangler, return nil } -func commandGetPermissions(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetPermissions(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3335,7 +3315,7 @@ func commandGetPermissions(ctx context.Context, wr *wrangler.Wrangler, subFlags return nil } -func commandValidatePermissionsShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidatePermissionsShard(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3350,7 +3330,7 @@ func commandValidatePermissionsShard(ctx context.Context, wr *wrangler.Wrangler, return wr.ValidatePermissionsShard(ctx, keyspace, shard) } -func commandValidatePermissionsKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandValidatePermissionsKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3362,7 +3342,7 @@ func commandValidatePermissionsKeyspace(ctx context.Context, wr *wrangler.Wrangl return wr.ValidatePermissionsKeyspace(ctx, keyspace) } -func commandGetVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3383,7 +3363,7 @@ func commandGetVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *fla return nil } -func commandGetRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3402,9 +3382,9 @@ func commandGetRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFlags return nil } -func commandRebuildVSchemaGraph(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { - var cells flagutil.StringListValue - subFlags.Var(&cells, "cells", "Specifies a comma-separated list of cells to look for tablets") +func commandRebuildVSchemaGraph(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { + var cells []string + subFlags.StringSliceVar(&cells, "cells", cells, "Specifies a comma-separated list of cells to look for tablets") if err := subFlags.Parse(args); err != nil { return err @@ -3419,15 +3399,15 @@ func commandRebuildVSchemaGraph(ctx context.Context, wr *wrangler.Wrangler, subF return err } -func commandApplyVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandApplyVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { vschema := subFlags.String("vschema", "", "Identifies the VTGate routing schema") vschemaFile := subFlags.String("vschema_file", "", "Identifies the VTGate routing schema file") sql := subFlags.String("sql", "", "A vschema ddl SQL statement (e.g. `add vindex`, `alter table t add vindex hash(id)`, etc)") sqlFile := subFlags.String("sql_file", "", "A vschema ddl SQL statement (e.g. `add vindex`, `alter table t add vindex hash(id)`, etc)") dryRun := subFlags.Bool("dry-run", false, "If set, do not save the altered vschema, simply echo to console.") skipRebuild := subFlags.Bool("skip_rebuild", false, "If set, do not rebuild the SrvSchema objects.") - var cells flagutil.StringListValue - subFlags.Var(&cells, "cells", "If specified, limits the rebuild to the cells, after upload. Ignored if --skip_rebuild is set.") + var cells []string + subFlags.StringSliceVar(&cells, "cells", cells, "If specified, limits the rebuild to the cells, after upload. Ignored if --skip_rebuild is set.") if err := subFlags.Parse(args); err != nil { return err @@ -3533,13 +3513,13 @@ func commandApplyVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return wr.TopoServer().RebuildSrvVSchema(ctx, cells) } -func commandApplyRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandApplyRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { routingRules := subFlags.String("rules", "", "Specify rules as a string") routingRulesFile := subFlags.String("rules_file", "", "Specify rules in a file") skipRebuild := subFlags.Bool("skip_rebuild", false, "If set, do no rebuild the SrvSchema objects.") dryRun := subFlags.Bool("dry-run", false, "Do not upload the routing rules, but print what actions would be taken") - var cells flagutil.StringListValue - subFlags.Var(&cells, "cells", "If specified, limits the rebuild to the cells, after upload. Ignored if skipRebuild is set.") + var cells []string + subFlags.StringSliceVar(&cells, "cells", cells, "If specified, limits the rebuild to the cells, after upload. Ignored if skipRebuild is set.") if err := subFlags.Parse(args); err != nil { return err @@ -3609,7 +3589,7 @@ func commandApplyRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFla return nil } -func commandGetSrvKeyspaceNames(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetSrvKeyspaceNames(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3638,7 +3618,7 @@ func commandGetSrvKeyspaceNames(ctx context.Context, wr *wrangler.Wrangler, subF return nil } -func commandGetSrvKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetSrvKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3664,7 +3644,7 @@ func commandGetSrvKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags return printJSON(wr.Logger(), cellKs) } -func commandGetSrvVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetSrvVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3679,7 +3659,7 @@ func commandGetSrvVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags * return printJSON(wr.Logger(), srvVSchema) } -func commandDeleteSrvVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandDeleteSrvVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3693,7 +3673,7 @@ func commandDeleteSrvVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlag return err } -func commandGetShardReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGetShardReplication(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3713,7 +3693,7 @@ func commandGetShardReplication(ctx context.Context, wr *wrangler.Wrangler, subF return printJSON(wr.Logger(), shardReplication.ShardReplication) } -func commandHelp(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandHelp(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if err := subFlags.Parse(args); err != nil { return err } @@ -3730,7 +3710,7 @@ func commandHelp(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.Flag return nil } -func commandVExec(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandVExec(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { deprecationMessage := `VExec command will be deprecated in version v12. For Online DDL control, use "vtctl OnlineDDL" commands or SQL syntax` log.Warningf(deprecationMessage) @@ -3769,7 +3749,7 @@ func commandVExec(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.Fla return nil } -func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { dryRun := subFlags.Bool("dry_run", false, "Does a dry run of Workflow and only reports the final query and list of tablets on which the operation will be applied") if err := subFlags.Parse(args); err != nil { return err @@ -3832,7 +3812,7 @@ func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag. return nil } -func commandMount(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandMount(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { clusterType := subFlags.String("type", "vitess", "Specify cluster type: mysql or vitess, only vitess clustered right now") unmount := subFlags.Bool("unmount", false, "Unmount cluster") show := subFlags.Bool("show", false, "Display contents of cluster") @@ -3888,7 +3868,7 @@ func commandMount(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.Fla } } -func commandGenerateShardRanges(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandGenerateShardRanges(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { numShards := subFlags.Int("num_shards", 2, "Number of shards to generate shard ranges for.") if err := subFlags.Parse(args); err != nil { @@ -3903,7 +3883,7 @@ func commandGenerateShardRanges(ctx context.Context, wr *wrangler.Wrangler, subF return printJSON(wr.Logger(), shardRanges) } -func commandPanic(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandPanic(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { panic(fmt.Errorf("this command panics on purpose")) } @@ -3998,30 +3978,42 @@ func RunCommand(ctx context.Context, wr *wrangler.Wrangler, args []string) error for _, group := range commands { for _, cmd := range group.commands { if strings.ToLower(cmd.name) == actionLowerCase { - subFlags := flag.NewFlagSet(action, flag.ContinueOnError) + subFlags := pflag.NewFlagSet(action, pflag.ContinueOnError) subFlags.SetOutput(logutil.NewLoggerWriter(wr.Logger())) - _flag.SetUsage(subFlags, _flag.UsageOptions{ - Preface: func(w io.Writer) { - if cmd.deprecated { - msg := &strings.Builder{} - msg.WriteString("WARNING: ") - msg.WriteString(action) - msg.WriteString(" is deprecated and will be removed in a future release.") - if cmd.deprecatedBy != "" { - msg.WriteString(" Use ") - msg.WriteString(cmd.deprecatedBy) - msg.WriteString(" instead.") - } - - wr.Logger().Printf("%s\n", msg.String()) + subFlags.Usage = func() { + if cmd.deprecated { + msg := &strings.Builder{} + msg.WriteString("WARNING: ") + msg.WriteString(action) + msg.WriteString(" is deprecated and will be removed in a future release.") + if cmd.deprecatedBy != "" { + msg.WriteString(" Use ") + msg.WriteString(cmd.deprecatedBy) + msg.WriteString(" instead.") } - wr.Logger().Printf("Usage: %s %s\n\n", action, cmd.params) - wr.Logger().Printf("%s\n\n", cmd.help) - }, - }) + wr.Logger().Printf("%s\n", msg.String()) + } + + wr.Logger().Printf("Usage: %s %s\n\n", action, cmd.params) + wr.Logger().Printf("%s\n\n", cmd.help) + + wr.Logger().Printf("%s\n", subFlags.FlagUsages()) + } - return cmd.method(ctx, wr, subFlags, args[1:]) + if len(args) > 1 && args[1] == "--" && !cmd.disableFlagInterspersal { + PrintDoubleDashDeprecationNotice(wr) + args = args[1:] + } + + switch err := cmd.method(ctx, wr, subFlags, args[1:]); err { + case pflag.ErrHelp: + // Don't actually error if the user requested --help on a + // subcommand. + return nil + default: + return err + } } } } @@ -4030,6 +4022,17 @@ func RunCommand(ctx context.Context, wr *wrangler.Wrangler, args []string) error return ErrUnknownCommand } +func PrintDoubleDashDeprecationNotice(wr *wrangler.Wrangler) { + msg := (`DEPRECATION NOTICE: in v14, users needed to add a double-dash ("--") separator to split up top-level and sub-command arguments/flags. +Beginning in v16, this will no longer work properly. Please remove any double-dashes that preceed sub-command **flags** only. + +Note that this does not mean you do not need a separator to split up position arguments. +For example, to pass a flag to a hook via ExecuteHook, "vtctl ExecuteHook myhook.sh -- --hook-flag 5" is the correct formation. +For v1 Reshard commands, you will also need a separator if your shard names begin with a hyphen, i.e. "Reshard ks.workflow -- -80,80-" needs a double-dash, but "Reshard ks.workflow 40-80,80-c0" does not.`) + + wr.Logger().Warningf(msg) +} + // PrintAllCommands will print the list of commands to the logger func PrintAllCommands(logger logutil.Logger) { msg := &strings.Builder{} @@ -4060,9 +4063,9 @@ func PrintAllCommands(logger logutil.Logger) { // userPassedFlag returns true if the flag name given was provided // as a command-line argument by the user. -func userPassedFlag(flags *flag.FlagSet, name string) bool { +func userPassedFlag(flags *pflag.FlagSet, name string) bool { passed := false - flags.Visit(func(f *flag.Flag) { + flags.Visit(func(f *pflag.Flag) { if f.Name == name { passed = true } diff --git a/go/vt/vtctl/workflow.go b/go/vt/vtctl/workflow.go index 5fe7d444ece..88a4053f1c1 100644 --- a/go/vt/vtctl/workflow.go +++ b/go/vt/vtctl/workflow.go @@ -18,9 +18,10 @@ package vtctl import ( "context" - "flag" "fmt" + "github.com/spf13/pflag" + "vitess.io/vitess/go/vt/workflow" "vitess.io/vitess/go/vt/wrangler" ) @@ -83,7 +84,7 @@ func init() { }) } -func commandWorkflowCreate(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowCreate(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } @@ -109,7 +110,7 @@ func commandWorkflowCreate(ctx context.Context, wr *wrangler.Wrangler, subFlags return nil } -func commandWorkflowStart(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowStart(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } @@ -124,7 +125,7 @@ func commandWorkflowStart(ctx context.Context, wr *wrangler.Wrangler, subFlags * return WorkflowManager.Start(ctx, uuid) } -func commandWorkflowStop(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowStop(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } @@ -139,7 +140,7 @@ func commandWorkflowStop(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return WorkflowManager.Stop(ctx, uuid) } -func commandWorkflowDelete(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowDelete(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } @@ -154,7 +155,7 @@ func commandWorkflowDelete(ctx context.Context, wr *wrangler.Wrangler, subFlags return WorkflowManager.Delete(ctx, uuid) } -func commandWorkflowWait(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowWait(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } @@ -169,7 +170,7 @@ func commandWorkflowWait(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return WorkflowManager.Wait(ctx, uuid) } -func commandWorkflowTree(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowTree(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } @@ -189,7 +190,7 @@ func commandWorkflowTree(ctx context.Context, wr *wrangler.Wrangler, subFlags *f return nil } -func commandWorkflowAction(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { +func commandWorkflowAction(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { if WorkflowManager == nil { return fmt.Errorf("no workflow.Manager registered") } diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index aa40969a5d5..005c923ffe5 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -415,7 +415,7 @@ func (s *Server) GetWorkflows(ctx context.Context, req *vtctldatapb.GetWorkflows shardStreamKey := fmt.Sprintf("%s/%s", tablet.Shard, tablet.AliasString()) shardStream, ok := workflow.ShardStreams[shardStreamKey] if !ok { - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() si, err := s.ts.GetShard(ctx, req.Keyspace, tablet.Shard) diff --git a/go/vt/vtctl/workflow/vexec/vexec.go b/go/vt/vtctl/workflow/vexec/vexec.go index 3cd4d916d8e..77bb0b98d3f 100644 --- a/go/vt/vtctl/workflow/vexec/vexec.go +++ b/go/vt/vtctl/workflow/vexec/vexec.go @@ -153,7 +153,7 @@ func (vx *VExec) QueryContext(ctx context.Context, query string) (map[*topo.Tabl func (vx *VExec) initialize(ctx context.Context) error { vx.primaries = nil - getShardsCtx, getShardsCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + getShardsCtx, getShardsCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer getShardsCancel() shards, err := vx.ts.GetShardNames(getShardsCtx, vx.keyspace) @@ -168,7 +168,7 @@ func (vx *VExec) initialize(ctx context.Context) error { primaries := make([]*topo.TabletInfo, 0, len(shards)) for _, shard := range shards { - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() si, err := vx.ts.GetShard(ctx, vx.keyspace, shard) diff --git a/go/vt/vtgate/planbuilder/physical/filter.go b/go/vt/vtgate/planbuilder/physical/filter.go index 67cc84809ee..4647740faac 100644 --- a/go/vt/vtgate/planbuilder/physical/filter.go +++ b/go/vt/vtgate/planbuilder/physical/filter.go @@ -37,11 +37,6 @@ func (f *Filter) TableID() semantics.TableSet { return f.Source.TableID() } -// PushPredicate implements the PhysicalOperator interface -func (f *Filter) PushPredicate(expr sqlparser.Expr, semTable *semantics.SemTable) error { - panic("unimplemented") -} - // UnsolvedPredicates implements the PhysicalOperator interface func (f *Filter) UnsolvedPredicates(semTable *semantics.SemTable) []sqlparser.Expr { panic("implement me") diff --git a/go/vt/vtgate/planbuilder/testdata/select_cases.txt b/go/vt/vtgate/planbuilder/testdata/select_cases.txt index 9259e15688c..3072533565c 100644 --- a/go/vt/vtgate/planbuilder/testdata/select_cases.txt +++ b/go/vt/vtgate/planbuilder/testdata/select_cases.txt @@ -7694,3 +7694,39 @@ Gen4 error: unsupported: JOIN not supported between derived tables "user.music" ] } + +# Earlier columns are in scope in subqueries https://github.com/vitessio/vitess/issues/11246 +"SELECT 1 as x, (SELECT x)" +{ + "QueryType": "SELECT", + "Original": "SELECT 1 as x, (SELECT x)", + "Instructions": { + "OperatorType": "Route", + "Variant": "Reference", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select 1 as x, (select x from dual where 1 != 1) from dual where 1 != 1", + "Query": "select 1 as x, (select x from dual) from dual", + "Table": "dual" + } +} +{ + "QueryType": "SELECT", + "Original": "SELECT 1 as x, (SELECT x)", + "Instructions": { + "OperatorType": "Route", + "Variant": "Reference", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select 1 as x, (select x from dual where 1 != 1) from dual where 1 != 1", + "Query": "select 1 as x, (select x from dual) from dual", + "Table": "dual" + }, + "TablesUsed": [ + "main.dual" + ] +} diff --git a/go/vt/vtgr/vtgr.go b/go/vt/vtgr/vtgr.go index 947a5bde5c1..97ddabd44bc 100644 --- a/go/vt/vtgr/vtgr.go +++ b/go/vt/vtgr/vtgr.go @@ -104,7 +104,7 @@ func OpenTabletDiscoveryWithAcitve(ctx context.Context, cellsToWatch, clustersTo tmclient.NewTabletManagerClient(), ) var shards []*controller.GRShard - ctx, cancel := context.WithTimeout(vtgr.ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(vtgr.ctx, topo.RemoteOperationTimeout) defer cancel() for _, ks := range clustersToWatch { if strings.Contains(ks, "/") { diff --git a/go/vt/vtorc/attributes/attributes_dao.go b/go/vt/vtorc/attributes/attributes_dao.go index af138ff6bf1..503d4e4d22c 100644 --- a/go/vt/vtorc/attributes/attributes_dao.go +++ b/go/vt/vtorc/attributes/attributes_dao.go @@ -21,8 +21,9 @@ import ( "vitess.io/vitess/go/vt/log" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) // SetHostAttributes is used to set host attributes diff --git a/go/vt/vtorc/db/db.go b/go/vt/vtorc/db/db.go index fea872ec8dc..b71a80a1dc2 100644 --- a/go/vt/vtorc/db/db.go +++ b/go/vt/vtorc/db/db.go @@ -20,9 +20,10 @@ import ( "database/sql" "strings" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vtorc/config" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) var ( diff --git a/go/vt/vtorc/external/golib/README.md b/go/vt/vtorc/external/golib/README.md deleted file mode 100644 index ee0907e945e..00000000000 --- a/go/vt/vtorc/external/golib/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Common Go libraries - -To import & use: -``` -go get "github.com/openark/golib/math" -go get "github.com/openark/golib/sqlutils" -go get "github.com/openark/golib/tests" -... -``` diff --git a/go/vt/vtorc/external/golib/sqlutils/dialect.go b/go/vt/vtorc/external/golib/sqlutils/dialect.go deleted file mode 100644 index 19cb55d258c..00000000000 --- a/go/vt/vtorc/external/golib/sqlutils/dialect.go +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2017 GitHub Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package sqlutils - -import ( - "regexp" - "strings" -) - -type regexpMap struct { - r *regexp.Regexp - replacement string -} - -func (this *regexpMap) process(text string) (result string) { - return this.r.ReplaceAllString(text, this.replacement) -} - -func rmap(regexpExpression string, replacement string) regexpMap { - return regexpMap{ - r: regexp.MustCompile(regexpSpaces(regexpExpression)), - replacement: replacement, - } -} - -func regexpSpaces(statement string) string { - return strings.Replace(statement, " ", `[\s]+`, -1) -} - -func applyConversions(statement string, conversions []regexpMap) string { - for _, rmap := range conversions { - statement = rmap.process(statement) - } - return statement -} diff --git a/go/vt/vtorc/external/golib/sqlutils/sqlite_dialect.go b/go/vt/vtorc/external/golib/sqlutils/sqlite_dialect.go deleted file mode 100644 index c733d946360..00000000000 --- a/go/vt/vtorc/external/golib/sqlutils/sqlite_dialect.go +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright 2017 GitHub Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -// What's this about? -// This is a brute-force regular-expression based conversion from MySQL syntax to sqlite3 syntax. -// It is NOT meant to be a general purpose solution and is only expected & confirmed to run on -// queries issued by vtorc. There are known limitations to this design. -// It's not even pretty. -// In fact... -// Well, it gets the job done at this time. Call it debt. - -package sqlutils - -import ( - "regexp" -) - -var sqlite3CreateTableConversions = []regexpMap{ - rmap(`(?i) (character set|charset) [\S]+`, ``), - rmap(`(?i)int unsigned`, `int`), - rmap(`(?i)int[\s]*[(][\s]*([0-9]+)[\s]*[)] unsigned`, `int`), - rmap(`(?i)engine[\s]*=[\s]*(innodb|myisam|ndb|memory|tokudb)`, ``), - rmap(`(?i)DEFAULT CHARSET[\s]*=[\s]*[\S]+`, ``), - rmap(`(?i)[\S]*int( not null|) auto_increment`, `integer`), - rmap(`(?i)comment '[^']*'`, ``), - rmap(`(?i)after [\S]+`, ``), - rmap(`(?i)alter table ([\S]+) add (index|key) ([\S]+) (.+)`, `create index ${3}_${1} on $1 $4`), - rmap(`(?i)alter table ([\S]+) add unique (index|key) ([\S]+) (.+)`, `create unique index ${3}_${1} on $1 $4`), - rmap(`(?i)([\S]+) enum[\s]*([(].*?[)])`, `$1 text check($1 in $2)`), - rmap(`(?i)([\s\S]+[/][*] sqlite3-skip [*][/][\s\S]+)`, ``), - rmap(`(?i)timestamp default current_timestamp`, `timestamp default ('')`), - rmap(`(?i)timestamp not null default current_timestamp`, `timestamp not null default ('')`), - - rmap(`(?i)add column (.*int) not null[\s]*$`, `add column $1 not null default 0`), - rmap(`(?i)add column (.* text) not null[\s]*$`, `add column $1 not null default ''`), - rmap(`(?i)add column (.* varchar.*) not null[\s]*$`, `add column $1 not null default ''`), -} - -var sqlite3InsertConversions = []regexpMap{ - rmap(`(?i)insert ignore ([\s\S]+) on duplicate key update [\s\S]+`, `insert or ignore $1`), - rmap(`(?i)insert ignore`, `insert or ignore`), - rmap(`(?i)now[(][)]`, `datetime('now')`), - rmap(`(?i)insert into ([\s\S]+) on duplicate key update [\s\S]+`, `replace into $1`), -} - -var sqlite3GeneralConversions = []regexpMap{ - rmap(`(?i)now[(][)][\s]*[-][\s]*interval [?] ([\w]+)`, `datetime('now', printf('-%d $1', ?))`), - rmap(`(?i)now[(][)][\s]*[+][\s]*interval [?] ([\w]+)`, `datetime('now', printf('+%d $1', ?))`), - rmap(`(?i)now[(][)][\s]*[-][\s]*interval ([0-9.]+) ([\w]+)`, `datetime('now', '-${1} $2')`), - rmap(`(?i)now[(][)][\s]*[+][\s]*interval ([0-9.]+) ([\w]+)`, `datetime('now', '+${1} $2')`), - - rmap(`(?i)[=<>\s]([\S]+[.][\S]+)[\s]*[-][\s]*interval [?] ([\w]+)`, ` datetime($1, printf('-%d $2', ?))`), - rmap(`(?i)[=<>\s]([\S]+[.][\S]+)[\s]*[+][\s]*interval [?] ([\w]+)`, ` datetime($1, printf('+%d $2', ?))`), - - rmap(`(?i)unix_timestamp[(][)]`, `strftime('%s', 'now')`), - rmap(`(?i)unix_timestamp[(]([^)]+)[)]`, `strftime('%s', $1)`), - rmap(`(?i)now[(][)]`, `datetime('now')`), - rmap(`(?i)cast[(][\s]*([\S]+) as signed[\s]*[)]`, `cast($1 as integer)`), - - rmap(`(?i)\bconcat[(][\s]*([^,)]+)[\s]*,[\s]*([^,)]+)[\s]*[)]`, `($1 || $2)`), - rmap(`(?i)\bconcat[(][\s]*([^,)]+)[\s]*,[\s]*([^,)]+)[\s]*,[\s]*([^,)]+)[\s]*[)]`, `($1 || $2 || $3)`), - - rmap(`(?i) rlike `, ` like `), - - rmap(`(?i)create index([\s\S]+)[(][\s]*[0-9]+[\s]*[)]([\s\S]+)`, `create index ${1}${2}`), - rmap(`(?i)drop index ([\S]+) on ([\S]+)`, `drop index if exists $1`), -} - -var ( - sqlite3IdentifyCreateTableStatement = regexp.MustCompile(regexpSpaces(`(?i)^[\s]*create table`)) - sqlite3IdentifyCreateIndexStatement = regexp.MustCompile(regexpSpaces(`(?i)^[\s]*create( unique|) index`)) - sqlite3IdentifyDropIndexStatement = regexp.MustCompile(regexpSpaces(`(?i)^[\s]*drop index`)) - sqlite3IdentifyAlterTableStatement = regexp.MustCompile(regexpSpaces(`(?i)^[\s]*alter table`)) - sqlite3IdentifyInsertStatement = regexp.MustCompile(regexpSpaces(`(?i)^[\s]*(insert|replace)`)) -) - -func IsInsert(statement string) bool { - return sqlite3IdentifyInsertStatement.MatchString(statement) -} - -func IsCreateTable(statement string) bool { - return sqlite3IdentifyCreateTableStatement.MatchString(statement) -} - -func IsCreateIndex(statement string) bool { - return sqlite3IdentifyCreateIndexStatement.MatchString(statement) -} - -func IsDropIndex(statement string) bool { - return sqlite3IdentifyDropIndexStatement.MatchString(statement) -} - -func IsAlterTable(statement string) bool { - return sqlite3IdentifyAlterTableStatement.MatchString(statement) -} - -func ToSqlite3CreateTable(statement string) string { - return applyConversions(statement, sqlite3CreateTableConversions) -} - -func ToSqlite3Insert(statement string) string { - return applyConversions(statement, sqlite3InsertConversions) -} - -func ToSqlite3Dialect(statement string) (translated string) { - if IsCreateTable(statement) { - return ToSqlite3CreateTable(statement) - } - if IsAlterTable(statement) { - return ToSqlite3CreateTable(statement) - } - statement = applyConversions(statement, sqlite3GeneralConversions) - if IsInsert(statement) { - return ToSqlite3Insert(statement) - } - return statement -} diff --git a/go/vt/vtorc/external/golib/sqlutils/sqlite_dialect_test.go b/go/vt/vtorc/external/golib/sqlutils/sqlite_dialect_test.go deleted file mode 100644 index 85cd773d58d..00000000000 --- a/go/vt/vtorc/external/golib/sqlutils/sqlite_dialect_test.go +++ /dev/null @@ -1,242 +0,0 @@ -/* - Copyright 2017 GitHub Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package sqlutils - -import ( - "regexp" - "strings" - "testing" - - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" -) - -var spacesRegexp = regexp.MustCompile(`[\s]+`) - -func init() { -} - -func stripSpaces(statement string) string { - statement = strings.TrimSpace(statement) - statement = spacesRegexp.ReplaceAllString(statement, " ") - return statement -} - -func TestIsCreateTable(t *testing.T) { - test.S(t).ExpectTrue(IsCreateTable("create table t(id int)")) - test.S(t).ExpectTrue(IsCreateTable(" create table t(id int)")) - test.S(t).ExpectTrue(IsCreateTable("CREATE TABLE t(id int)")) - test.S(t).ExpectTrue(IsCreateTable(` - create table t(id int) - `)) - test.S(t).ExpectFalse(IsCreateTable("where create table t(id int)")) - test.S(t).ExpectFalse(IsCreateTable("insert")) -} - -func TestToSqlite3CreateTable(t *testing.T) { - { - statement := "create table t(id int)" - result := ToSqlite3CreateTable(statement) - test.S(t).ExpectEquals(result, statement) - } - { - statement := "create table t(id int, v varchar(123) CHARACTER SET ascii NOT NULL default '')" - result := ToSqlite3CreateTable(statement) - test.S(t).ExpectEquals(result, "create table t(id int, v varchar(123) NOT NULL default '')") - } - { - statement := "create table t(id int, v varchar ( 123 ) CHARACTER SET ascii NOT NULL default '')" - result := ToSqlite3CreateTable(statement) - test.S(t).ExpectEquals(result, "create table t(id int, v varchar ( 123 ) NOT NULL default '')") - } - { - statement := "create table t(i smallint unsigned)" - result := ToSqlite3CreateTable(statement) - test.S(t).ExpectEquals(result, "create table t(i smallint)") - } - { - statement := "create table t(i smallint(5) unsigned)" - result := ToSqlite3CreateTable(statement) - test.S(t).ExpectEquals(result, "create table t(i smallint)") - } - { - statement := "create table t(i smallint ( 5 ) unsigned)" - result := ToSqlite3CreateTable(statement) - test.S(t).ExpectEquals(result, "create table t(i smallint)") - } -} - -func TestToSqlite3AlterTable(t *testing.T) { - { - statement := ` - ALTER TABLE - database_instance - ADD COLUMN sql_delay INT UNSIGNED NOT NULL AFTER replica_lag_seconds - ` - result := stripSpaces(ToSqlite3Dialect(statement)) - test.S(t).ExpectEquals(result, stripSpaces(` - ALTER TABLE - database_instance - add column sql_delay int not null default 0 - `)) - } - { - statement := ` - ALTER TABLE - database_instance - ADD INDEX source_host_port_idx (source_host, source_port) - ` - result := stripSpaces(ToSqlite3Dialect(statement)) - test.S(t).ExpectEquals(result, stripSpaces(` - create index - source_host_port_idx_database_instance - on database_instance (source_host, source_port) - `)) - } - { - statement := ` - ALTER TABLE - topology_recovery - ADD KEY last_detection_idx (last_detection_id) - ` - result := stripSpaces(ToSqlite3Dialect(statement)) - test.S(t).ExpectEquals(result, stripSpaces(` - create index - last_detection_idx_topology_recovery - on topology_recovery (last_detection_id) - `)) - } - -} - -func TestCreateIndex(t *testing.T) { - { - statement := ` - create index - source_host_port_idx_database_instance - on database_instance (source_host(128), source_port) - ` - result := stripSpaces(ToSqlite3Dialect(statement)) - test.S(t).ExpectEquals(result, stripSpaces(` - create index - source_host_port_idx_database_instance - on database_instance (source_host, source_port) - `)) - } -} - -func TestIsInsert(t *testing.T) { - test.S(t).ExpectTrue(IsInsert("insert into t")) - test.S(t).ExpectTrue(IsInsert("insert ignore into t")) - test.S(t).ExpectTrue(IsInsert(` - insert ignore into t - `)) - test.S(t).ExpectFalse(IsInsert("where create table t(id int)")) - test.S(t).ExpectFalse(IsInsert("create table t(id int)")) - test.S(t).ExpectTrue(IsInsert(` - insert into - cluster_domain_name (cluster_name, domain_name, last_registered) - values - (?, ?, datetime('now')) - on duplicate key update - domain_name=values(domain_name), - last_registered=values(last_registered) - `)) -} - -func TestToSqlite3Insert(t *testing.T) { - { - statement := ` - insert into - cluster_domain_name (cluster_name, domain_name, last_registered) - values - (?, ?, datetime('now')) - on duplicate key update - domain_name=values(domain_name), - last_registered=values(last_registered) - ` - result := stripSpaces(ToSqlite3Dialect(statement)) - test.S(t).ExpectEquals(result, stripSpaces(` - replace into - cluster_domain_name (cluster_name, domain_name, last_registered) - values - (?, ?, datetime('now')) - `)) - } -} - -func TestToSqlite3GeneralConversions(t *testing.T) { - { - statement := "select now()" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select datetime('now')") - } - { - statement := "select now() - interval ? second" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select datetime('now', printf('-%d second', ?))") - } - { - statement := "select now() + interval ? minute" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select datetime('now', printf('+%d minute', ?))") - } - { - statement := "select now() + interval 5 minute" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select datetime('now', '+5 minute')") - } - { - statement := "select some_table.some_column + interval ? minute" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select datetime(some_table.some_column, printf('+%d minute', ?))") - } - { - statement := "AND primary_instance.last_attempted_check <= primary_instance.last_seen + interval ? minute" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "AND primary_instance.last_attempted_check <= datetime(primary_instance.last_seen, printf('+%d minute', ?))") - } - { - statement := "select concat(primary_instance.port, '') as port" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select (primary_instance.port || '') as port") - } - { - statement := "select concat( 'abc' , 'def') as s" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select ('abc' || 'def') as s") - } - { - statement := "select concat( 'abc' , 'def', last.col) as s" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select ('abc' || 'def' || last.col) as s") - } - { - statement := "select concat(myself.only) as s" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select concat(myself.only) as s") - } - { - statement := "select concat(1, '2', 3, '4') as s" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select concat(1, '2', 3, '4') as s") - } - { - statement := "select group_concat( 'abc' , 'def') as s" - result := ToSqlite3Dialect(statement) - test.S(t).ExpectEquals(result, "select group_concat( 'abc' , 'def') as s") - } -} diff --git a/go/vt/vtorc/external/golib/sqlutils/sqlutils.go b/go/vt/vtorc/external/golib/sqlutils/sqlutils.go deleted file mode 100644 index a96179a3eb8..00000000000 --- a/go/vt/vtorc/external/golib/sqlutils/sqlutils.go +++ /dev/null @@ -1,429 +0,0 @@ -/* - Copyright 2014 Outbrain Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package sqlutils - -import ( - "database/sql" - "encoding/json" - "fmt" - "strconv" - "strings" - "sync" - "time" - - "vitess.io/vitess/go/vt/log" -) - -const DateTimeFormat = "2006-01-02 15:04:05.999999" - -// RowMap represents one row in a result set. Its objective is to allow -// for easy, typed getters by column name. -type RowMap map[string]CellData - -// Cell data is the result of a single (atomic) column in a single row -type CellData sql.NullString - -func (this *CellData) MarshalJSON() ([]byte, error) { - if this.Valid { - return json.Marshal(this.String) - } else { - return json.Marshal(nil) - } -} - -// UnmarshalJSON reds this object from JSON -func (this *CellData) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - (*this).String = s - (*this).Valid = true - - return nil -} - -func (this *CellData) NullString() *sql.NullString { - return (*sql.NullString)(this) -} - -// RowData is the result of a single row, in positioned array format -type RowData []CellData - -// MarshalJSON will marshal this map as JSON -func (this *RowData) MarshalJSON() ([]byte, error) { - cells := make([](*CellData), len(*this)) - for i, val := range *this { - d := CellData(val) - cells[i] = &d - } - return json.Marshal(cells) -} - -func (this *RowData) Args() []any { - result := make([]any, len(*this)) - for i := range *this { - result[i] = (*(*this)[i].NullString()) - } - return result -} - -// ResultData is an ordered row set of RowData -type ResultData []RowData -type NamedResultData struct { - Columns []string - Data ResultData -} - -var EmptyResultData = ResultData{} - -func (this *RowMap) GetString(key string) string { - return (*this)[key].String -} - -// GetStringD returns a string from the map, or a default value if the key does not exist -func (this *RowMap) GetStringD(key string, def string) string { - if cell, ok := (*this)[key]; ok { - return cell.String - } - return def -} - -func (this *RowMap) GetInt64(key string) int64 { - res, _ := strconv.ParseInt(this.GetString(key), 10, 0) - return res -} - -func (this *RowMap) GetNullInt64(key string) sql.NullInt64 { - i, err := strconv.ParseInt(this.GetString(key), 10, 0) - if err == nil { - return sql.NullInt64{Int64: i, Valid: true} - } else { - return sql.NullInt64{Valid: false} - } -} - -func (this *RowMap) GetInt(key string) int { - res, _ := strconv.Atoi(this.GetString(key)) - return res -} - -func (this *RowMap) GetIntD(key string, def int) int { - res, err := strconv.Atoi(this.GetString(key)) - if err != nil { - return def - } - return res -} - -func (this *RowMap) GetUint(key string) uint { - res, _ := strconv.ParseUint(this.GetString(key), 10, 0) - return uint(res) -} - -func (this *RowMap) GetUintD(key string, def uint) uint { - res, err := strconv.Atoi(this.GetString(key)) - if err != nil { - return def - } - return uint(res) -} - -func (this *RowMap) GetUint64(key string) uint64 { - res, _ := strconv.ParseUint(this.GetString(key), 10, 0) - return res -} - -func (this *RowMap) GetUint64D(key string, def uint64) uint64 { - res, err := strconv.ParseUint(this.GetString(key), 10, 0) - if err != nil { - return def - } - return uint64(res) -} - -func (this *RowMap) GetBool(key string) bool { - return this.GetInt(key) != 0 -} - -func (this *RowMap) GetTime(key string) time.Time { - if t, err := time.Parse(DateTimeFormat, this.GetString(key)); err == nil { - return t - } - return time.Time{} -} - -// knownDBs is a DB cache by uri -var knownDBs map[string]*sql.DB = make(map[string]*sql.DB) -var knownDBsMutex = &sync.Mutex{} - -// GetDB returns a DB instance based on uri. -// bool result indicates whether the DB was returned from cache; err -func GetGenericDB(driverName, dataSourceName string) (*sql.DB, bool, error) { - knownDBsMutex.Lock() - defer func() { - knownDBsMutex.Unlock() - }() - - var exists bool - if _, exists = knownDBs[dataSourceName]; !exists { - if db, err := sql.Open(driverName, dataSourceName); err == nil { - knownDBs[dataSourceName] = db - } else { - return db, exists, err - } - } - return knownDBs[dataSourceName], exists, nil -} - -// GetDB returns a MySQL DB instance based on uri. -// bool result indicates whether the DB was returned from cache; err -func GetDB(mysql_uri string) (*sql.DB, bool, error) { - return GetGenericDB("mysql", mysql_uri) -} - -// GetDB returns a SQLite DB instance based on DB file name. -// bool result indicates whether the DB was returned from cache; err -func GetSQLiteDB(dbFile string) (*sql.DB, bool, error) { - return GetGenericDB("sqlite3", dbFile) -} - -// RowToArray is a convenience function, typically not called directly, which maps a -// single read database row into a NullString -func RowToArray(rows *sql.Rows, columns []string) []CellData { - buff := make([]any, len(columns)) - data := make([]CellData, len(columns)) - for i := range buff { - buff[i] = data[i].NullString() - } - _ = rows.Scan(buff...) - return data -} - -// ScanRowsToArrays is a convenience function, typically not called directly, which maps rows -// already read from the databse into arrays of NullString -func ScanRowsToArrays(rows *sql.Rows, on_row func([]CellData) error) error { - columns, _ := rows.Columns() - for rows.Next() { - arr := RowToArray(rows, columns) - err := on_row(arr) - if err != nil { - return err - } - } - return nil -} - -func rowToMap(row []CellData, columns []string) map[string]CellData { - m := make(map[string]CellData) - for k, data_col := range row { - m[columns[k]] = data_col - } - return m -} - -// ScanRowsToMaps is a convenience function, typically not called directly, which maps rows -// already read from the databse into RowMap entries. -func ScanRowsToMaps(rows *sql.Rows, on_row func(RowMap) error) error { - columns, _ := rows.Columns() - err := ScanRowsToArrays(rows, func(arr []CellData) error { - m := rowToMap(arr, columns) - err := on_row(m) - if err != nil { - return err - } - return nil - }) - return err -} - -// QueryRowsMap is a convenience function allowing querying a result set while poviding a callback -// function activated per read row. -func QueryRowsMap(db *sql.DB, query string, on_row func(RowMap) error, args ...any) (err error) { - defer func() { - if derr := recover(); derr != nil { - err = fmt.Errorf("QueryRowsMap unexpected error: %+v", derr) - } - }() - - var rows *sql.Rows - rows, err = db.Query(query, args...) - if rows != nil { - defer rows.Close() - } - if err != nil && err != sql.ErrNoRows { - log.Error(err) - return err - } - err = ScanRowsToMaps(rows, on_row) - return -} - -// queryResultData returns a raw array of rows for a given query, optionally reading and returning column names -func queryResultData(db *sql.DB, query string, retrieveColumns bool, args ...any) (resultData ResultData, columns []string, err error) { - defer func() { - if derr := recover(); derr != nil { - err = fmt.Errorf("QueryRowsMap unexpected error: %+v", derr) - } - }() - - var rows *sql.Rows - rows, err = db.Query(query, args...) - if err != nil && err != sql.ErrNoRows { - log.Error(err) - return EmptyResultData, columns, err - } - defer rows.Close() - - if retrieveColumns { - // Don't pay if you don't want to - columns, _ = rows.Columns() - } - resultData = ResultData{} - err = ScanRowsToArrays(rows, func(rowData []CellData) error { - resultData = append(resultData, rowData) - return nil - }) - return resultData, columns, err -} - -// QueryResultData returns a raw array of rows -func QueryResultData(db *sql.DB, query string, args ...any) (ResultData, error) { - resultData, _, err := queryResultData(db, query, false, args...) - return resultData, err -} - -// QueryResultDataNamed returns a raw array of rows, with column names -func QueryNamedResultData(db *sql.DB, query string, args ...any) (NamedResultData, error) { - resultData, columns, err := queryResultData(db, query, true, args...) - return NamedResultData{Columns: columns, Data: resultData}, err -} - -// QueryRowsMapBuffered reads data from the database into a buffer, and only then applies the given function per row. -// This allows the application to take its time with processing the data, albeit consuming as much memory as required by -// the result set. -func QueryRowsMapBuffered(db *sql.DB, query string, on_row func(RowMap) error, args ...any) error { - resultData, columns, err := queryResultData(db, query, true, args...) - if err != nil { - // Already logged - return err - } - for _, row := range resultData { - err = on_row(rowToMap(row, columns)) - if err != nil { - return err - } - } - return nil -} - -// ExecNoPrepare executes given query using given args on given DB, without using prepared statements. -func ExecNoPrepare(db *sql.DB, query string, args ...any) (res sql.Result, err error) { - defer func() { - if derr := recover(); derr != nil { - err = fmt.Errorf("ExecNoPrepare unexpected error: %+v", derr) - } - }() - - res, err = db.Exec(query, args...) - if err != nil { - log.Error(err) - } - return res, err -} - -// ExecQuery executes given query using given args on given DB. It will safele prepare, execute and close -// the statement. -func execInternal(silent bool, db *sql.DB, query string, args ...any) (res sql.Result, err error) { - defer func() { - if derr := recover(); derr != nil { - err = fmt.Errorf("execInternal unexpected error: %+v", derr) - } - }() - var stmt *sql.Stmt - stmt, err = db.Prepare(query) - if err != nil { - return nil, err - } - defer stmt.Close() - res, err = stmt.Exec(args...) - if err != nil && !silent { - log.Error(err) - } - return res, err -} - -// Exec executes given query using given args on given DB. It will safele prepare, execute and close -// the statement. -func Exec(db *sql.DB, query string, args ...any) (sql.Result, error) { - return execInternal(false, db, query, args...) -} - -// ExecSilently acts like Exec but does not report any error -func ExecSilently(db *sql.DB, query string, args ...any) (sql.Result, error) { - return execInternal(true, db, query, args...) -} - -func InClauseStringValues(terms []string) string { - quoted := []string{} - for _, s := range terms { - quoted = append(quoted, fmt.Sprintf("'%s'", strings.Replace(s, ",", "''", -1))) - } - return strings.Join(quoted, ", ") -} - -// Convert variable length arguments into arguments array -func Args(args ...any) []any { - return args -} - -func NilIfZero(i int64) any { - if i == 0 { - return nil - } - return i -} - -func ScanTable(db *sql.DB, tableName string) (NamedResultData, error) { - query := fmt.Sprintf("select * from %s", tableName) - return QueryNamedResultData(db, query) -} - -func WriteTable(db *sql.DB, tableName string, data NamedResultData) (err error) { - if len(data.Data) == 0 { - return nil - } - if len(data.Columns) == 0 { - return nil - } - placeholders := make([]string, len(data.Columns)) - for i := range placeholders { - placeholders[i] = "?" - } - query := fmt.Sprintf( - `replace into %s (%s) values (%s)`, - tableName, - strings.Join(data.Columns, ","), - strings.Join(placeholders, ","), - ) - for _, rowData := range data.Data { - if _, execErr := db.Exec(query, rowData.Args()...); execErr != nil { - err = execErr - } - } - return err -} diff --git a/go/vt/vtorc/external/golib/tests/spec.go b/go/vt/vtorc/external/golib/tests/spec.go deleted file mode 100644 index 0da408b846f..00000000000 --- a/go/vt/vtorc/external/golib/tests/spec.go +++ /dev/null @@ -1,76 +0,0 @@ -package tests - -import ( - "testing" -) - -// Spec is an access point to test Expections -type Spec struct { - t *testing.T -} - -// S generates a spec. You will want to use it once in a test file, once in a test or once per each check -func S(t *testing.T) *Spec { - return &Spec{t: t} -} - -// ExpectNil expects given value to be nil, or errors -func (spec *Spec) ExpectNil(actual any) { - if actual == nil { - return - } - spec.t.Errorf("Expected %+v to be nil", actual) -} - -// ExpectNotNil expects given value to be not nil, or errors -func (spec *Spec) ExpectNotNil(actual any) { - if actual != nil { - return - } - spec.t.Errorf("Expected %+v to be not nil", actual) -} - -// ExpectEquals expects given values to be equal (comparison via `==`), or errors -func (spec *Spec) ExpectEquals(actual, value any) { - if actual == value { - return - } - spec.t.Errorf("Expected:\n[[[%+v]]]\n- got:\n[[[%+v]]]", value, actual) -} - -// ExpectNotEquals expects given values to be nonequal (comparison via `==`), or errors -func (spec *Spec) ExpectNotEquals(actual, value any) { - if !(actual == value) { - return - } - spec.t.Errorf("Expected not %+v", value) -} - -// ExpectEqualsAny expects given actual to equal (comparison via `==`) at least one of given values, or errors -func (spec *Spec) ExpectEqualsAny(actual any, values ...any) { - for _, value := range values { - if actual == value { - return - } - } - spec.t.Errorf("Expected %+v to equal any of given values", actual) -} - -// ExpectNotEqualsAny expects given actual to be nonequal (comparison via `==`)tp any of given values, or errors -func (spec *Spec) ExpectNotEqualsAny(actual any, values ...any) { - for _, value := range values { - if actual == value { - spec.t.Errorf("Expected not %+v", value) - } - } -} - -// ExpectFalse expects given values to be false, or errors -func (spec *Spec) ExpectFalse(actual any) { - spec.ExpectEquals(actual, false) -} - -// ExpectTrue expects given values to be true, or errors -func (spec *Spec) ExpectTrue(actual any) { - spec.ExpectEquals(actual, true) -} diff --git a/go/vt/vtorc/external/golib/util/text.go b/go/vt/vtorc/external/golib/util/text.go deleted file mode 100644 index 419a5a5ef3a..00000000000 --- a/go/vt/vtorc/external/golib/util/text.go +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright 2015 Shlomi Noach. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package util - -import ( - "fmt" - "regexp" - "strconv" - "strings" -) - -const ( - TabulateLeft = 0 - TabulateRight = 1 -) - -// ParseSimpleTime parses input in the format 7s, 55m, 3h, 31d, 4w (second, minute, hour, day, week) -// The time.ParseDuration() function should have done this, but it does not support "d" and "w" extensions. -func SimpleTimeToSeconds(simpleTime string) (int, error) { - if matched, _ := regexp.MatchString("^[0-9]+s$", simpleTime); matched { - i, _ := strconv.Atoi(simpleTime[0 : len(simpleTime)-1]) - return i, nil - } - if matched, _ := regexp.MatchString("^[0-9]+m$", simpleTime); matched { - i, _ := strconv.Atoi(simpleTime[0 : len(simpleTime)-1]) - return i * 60, nil - } - if matched, _ := regexp.MatchString("^[0-9]+h$", simpleTime); matched { - i, _ := strconv.Atoi(simpleTime[0 : len(simpleTime)-1]) - return i * 60 * 60, nil - } - if matched, _ := regexp.MatchString("^[0-9]+d$", simpleTime); matched { - i, _ := strconv.Atoi(simpleTime[0 : len(simpleTime)-1]) - return i * 60 * 60 * 24, nil - } - if matched, _ := regexp.MatchString("^[0-9]+w$", simpleTime); matched { - i, _ := strconv.Atoi(simpleTime[0 : len(simpleTime)-1]) - return i * 60 * 60 * 24 * 7, nil - } - return 0, fmt.Errorf("Cannot parse simple time: %s", simpleTime) -} - -func Tabulate(lines []string, separator string, outputSeparator string, directionFlags ...int) (result []string) { - tokens := make([][]string, 0) - countColumns := 0 - for _, line := range lines { - lineTokens := strings.Split(line, separator) - tokens = append(tokens, lineTokens) - if len(lineTokens) > countColumns { - countColumns = len(lineTokens) - } - } - columnWidths := make([]int, countColumns) - for _, lineTokens := range tokens { - for col, token := range lineTokens { - if len(token) > columnWidths[col] { - columnWidths[col] = len(token) - } - } - } - for _, lineTokens := range tokens { - resultRow := "" - for col := 0; col < countColumns; col++ { - token := "" - if col < len(lineTokens) { - token = lineTokens[col] - } - format := fmt.Sprintf("%%-%ds", columnWidths[col]) // format left - if col < len(directionFlags) && directionFlags[col] == TabulateRight { - format = fmt.Sprintf("%%%ds", columnWidths[col]) - } - formattedToken := fmt.Sprintf(format, token) - if col == 0 { - resultRow = formattedToken - } else { - resultRow = fmt.Sprintf("%s%s%s", resultRow, outputSeparator, formattedToken) - } - } - result = append(result, resultRow) - } - return result -} diff --git a/go/vt/vtorc/external/golib/util/text_test.go b/go/vt/vtorc/external/golib/util/text_test.go deleted file mode 100644 index 4c0591a9a29..00000000000 --- a/go/vt/vtorc/external/golib/util/text_test.go +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright 2014 Outbrain Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package util - -import ( - "reflect" - "strings" - "testing" - - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" -) - -func init() { -} - -func TestTabulate(t *testing.T) { - { - text := strings.TrimSpace(` -a,b,c -d,e,f -g,h,i - `) - - tabulated := Tabulate(strings.Split(text, "\n"), ",", ",") - expected := strings.Split(text, "\n") - test.S(t).ExpectTrue(reflect.DeepEqual(tabulated, expected)) - } - { - text := strings.TrimSpace(` -a,b,c -d,e,f -g,h,i - `) - - tabulated := Tabulate(strings.Split(text, "\n"), ",", "|") - expected := []string{ - "a|b|c", - "d|e|f", - "g|h|i", - } - test.S(t).ExpectTrue(reflect.DeepEqual(tabulated, expected)) - } - { - text := strings.TrimSpace(` -a,20,c -d,e,100 -0000,h,i - `) - - tabulated := Tabulate(strings.Split(text, "\n"), ",", "|") - expected := []string{ - "a |20|c ", - "d |e |100", - "0000|h |i ", - } - test.S(t).ExpectTrue(reflect.DeepEqual(tabulated, expected)) - } - { - text := strings.TrimSpace(` -a,20,c -d,1,100 -0000,3,i - `) - - tabulated := Tabulate(strings.Split(text, "\n"), ",", "|", TabulateLeft, TabulateRight, TabulateRight) - expected := []string{ - "a |20| c", - "d | 1|100", - "0000| 3| i", - } - - test.S(t).ExpectTrue(reflect.DeepEqual(tabulated, expected)) - } -} diff --git a/go/vt/vtorc/external/zk/zk.go b/go/vt/vtorc/external/zk/zk.go deleted file mode 100644 index 4f83464206c..00000000000 --- a/go/vt/vtorc/external/zk/zk.go +++ /dev/null @@ -1,398 +0,0 @@ -/* - Copyright 2014 Outbrain Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -// zk provides with higher level commands over the lower level zookeeper connector -package zk - -import ( - "bytes" - "errors" - "fmt" - "math" - gopath "path" - "sort" - "strconv" - "strings" - "time" - - "vitess.io/vitess/go/vt/log" - - "github.com/samuel/go-zookeeper/zk" -) - -type ZooKeeper struct { - servers []string - authScheme string - authExpression []byte - - // We assume complete access to all - flags int32 - acl []zk.ACL -} - -func NewZooKeeper() *ZooKeeper { - return &ZooKeeper{ - flags: int32(0), - acl: zk.WorldACL(zk.PermAll), - } -} - -// SetServers sets the list of servers for the zookeeper client to connect to. -// Each element in the array should be in either of following forms: -// - "servername" -// - "servername:port" -func (zook *ZooKeeper) SetServers(serversArray []string) { - zook.servers = serversArray -} - -func (zook *ZooKeeper) SetAuth(scheme string, auth []byte) { - log.Info("Setting Auth ") - zook.authScheme = scheme - zook.authExpression = auth -} - -// BuildACL returns Acls -func (zook *ZooKeeper) BuildACL(authScheme string, user string, pwd string, acls string) (perms []zk.ACL, err error) { - aclsList := strings.Split(acls, ",") - for _, elem := range aclsList { - acl, err := strconv.ParseInt(elem, 10, 32) - if err != nil { - break - } - perm := zk.DigestACL(int32(acl), user, pwd) - perms = append(perms, perm[0]) - } - return perms, err -} - -type infoLogger struct{} - -func (infoLogger) Printf(format string, a ...any) { - log.Infof(format, a...) -} - -// connect -func (zook *ZooKeeper) connect() (*zk.Conn, error) { - zk.DefaultLogger = &infoLogger{} - conn, _, err := zk.Connect(zook.servers, time.Second) - if err == nil && zook.authScheme != "" { - log.Infof("Add Auth %s %s", zook.authScheme, zook.authExpression) - err = conn.AddAuth(zook.authScheme, zook.authExpression) - } - - return conn, err -} - -// Exists returns true when the given path exists -func (zook *ZooKeeper) Exists(path string) (bool, error) { - connection, err := zook.connect() - if err != nil { - return false, err - } - defer connection.Close() - - exists, _, err := connection.Exists(path) - return exists, err -} - -// Get returns value associated with given path, or error if path does not exist -func (zook *ZooKeeper) Get(path string) ([]byte, error) { - connection, err := zook.connect() - if err != nil { - return []byte{}, err - } - defer connection.Close() - - data, _, err := connection.Get(path) - return data, err -} - -func (zook *ZooKeeper) GetACL(path string) (data []string, err error) { - connection, err := zook.connect() - if err != nil { - return nil, err - } - defer connection.Close() - - perms, _, err := connection.GetACL(path) - return zook.aclsToString(perms), err -} - -func (zook *ZooKeeper) aclsToString(acls []zk.ACL) (result []string) { - for _, acl := range acls { - var buffer bytes.Buffer - - buffer.WriteString(fmt.Sprintf("%v:%v:", acl.Scheme, acl.ID)) - - if acl.Perms&zk.PermCreate != 0 { - buffer.WriteString("c") - } - if acl.Perms&zk.PermDelete != 0 { - buffer.WriteString("d") - } - if acl.Perms&zk.PermRead != 0 { - buffer.WriteString("r") - } - if acl.Perms&zk.PermWrite != 0 { - buffer.WriteString("w") - } - if acl.Perms&zk.PermAdmin != 0 { - buffer.WriteString("a") - } - result = append(result, buffer.String()) - } - return result -} - -// Children returns sub-paths of given path, optionally empty array, or error if path does not exist -func (zook *ZooKeeper) Children(path string) ([]string, error) { - connection, err := zook.connect() - if err != nil { - return []string{}, err - } - defer connection.Close() - - children, _, err := connection.Children(path) - return children, err -} - -// childrenRecursiveInternal: internal implementation of recursive-children query. -func (zook *ZooKeeper) childrenRecursiveInternal(connection *zk.Conn, path string, incrementalPath string) ([]string, error) { - children, _, err := connection.Children(path) - if err != nil { - return children, err - } - sort.Strings(children) - recursiveChildren := []string{} - for _, child := range children { - incrementalChild := gopath.Join(incrementalPath, child) - recursiveChildren = append(recursiveChildren, incrementalChild) - log.Infof("incremental child: %+v", incrementalChild) - incrementalChildren, err := zook.childrenRecursiveInternal(connection, gopath.Join(path, child), incrementalChild) - if err != nil { - return children, err - } - recursiveChildren = append(recursiveChildren, incrementalChildren...) - } - return recursiveChildren, err -} - -// ChildrenRecursive returns list of all descendants of given path (optionally empty), or error if the path -// does not exist. -// Every element in result list is a relative subpath for the given path. -func (zook *ZooKeeper) ChildrenRecursive(path string) ([]string, error) { - connection, err := zook.connect() - if err != nil { - return []string{}, err - } - defer connection.Close() - - result, err := zook.childrenRecursiveInternal(connection, path, "") - return result, err -} - -// createInternal: create a new path -func (zook *ZooKeeper) createInternal(connection *zk.Conn, path string, data []byte, acl []zk.ACL, force bool) (string, error) { - if path == "/" { - return "/", nil - } - - log.Infof("creating: %s", path) - attempts := 0 - for { - attempts++ - returnValue, err := connection.Create(path, data, zook.flags, zook.acl) - log.Infof("create status for %s: %s, %+v", path, returnValue, err) - - if err != nil && force && attempts < 2 { - parentPath := gopath.Dir(path) - if parentPath == path { - return returnValue, err - } - _, _ = zook.createInternal(connection, parentPath, []byte("zookeepercli auto-generated"), acl, force) - } else { - return returnValue, err - } - } -} - -// createInternalWithACL: create a new path with acl -func (zook *ZooKeeper) createInternalWithACL(connection *zk.Conn, path string, data []byte, force bool, perms []zk.ACL) (string, error) { - if path == "/" { - return "/", nil - } - log.Infof("creating: %s with acl ", path) - attempts := 0 - for { - attempts++ - returnValue, err := connection.Create(path, data, zook.flags, perms) - log.Infof("create status for %s: %s, %+v", path, returnValue, err) - if err != nil && force && attempts < 2 { - _, _ = zook.createInternalWithACL(connection, gopath.Dir(path), []byte("zookeepercli auto-generated"), force, perms) - } else { - return returnValue, err - } - } -} - -// Create will create a new path, or exit with error should the path exist. -// The "force" param controls the behavior when path's parent directory does not exist. -// When "force" is false, the function returns with error/ When "force" is true, it recursively -// attempts to create required parent directories. -func (zook *ZooKeeper) Create(path string, data []byte, aclstr string, force bool) (string, error) { - connection, err := zook.connect() - if err != nil { - return "", err - } - defer connection.Close() - - if len(aclstr) > 0 { - zook.acl, err = zook.parseACLString(aclstr) - if err != nil { - return "", err - } - } - - return zook.createInternal(connection, path, data, zook.acl, force) -} - -func (zook *ZooKeeper) CreateWithACL(path string, data []byte, force bool, perms []zk.ACL) (string, error) { - connection, err := zook.connect() - if err != nil { - return "", err - } - defer connection.Close() - - return zook.createInternalWithACL(connection, path, data, force, perms) -} - -// Set updates a value for a given path, or returns with error if the path does not exist -func (zook *ZooKeeper) Set(path string, data []byte) (*zk.Stat, error) { - connection, err := zook.connect() - if err != nil { - return nil, err - } - defer connection.Close() - - return connection.Set(path, data, -1) -} - -// updates the ACL on a given path -func (zook *ZooKeeper) SetACL(path string, aclstr string, force bool) (string, error) { - connection, err := zook.connect() - if err != nil { - return "", err - } - defer connection.Close() - - acl, err := zook.parseACLString(aclstr) - if err != nil { - return "", err - } - - if force { - exists, _, err := connection.Exists(path) - if err != nil { - return "", err - } - - if !exists { - return zook.createInternal(connection, path, []byte(""), acl, force) - } - } - - _, err = connection.SetACL(path, acl, -1) - return path, err -} - -func (zook *ZooKeeper) parseACLString(aclstr string) (acl []zk.ACL, err error) { - aclsList := strings.Split(aclstr, ",") - for _, entry := range aclsList { - parts := strings.Split(entry, ":") - var scheme, id string - var perms int32 - if len(parts) > 3 && parts[0] == "digest" { - scheme = parts[0] - id = fmt.Sprintf("%s:%s", parts[1], parts[2]) - perms, err = zook.parsePermsString(parts[3]) - } else { - scheme, id = parts[0], parts[1] - perms, err = zook.parsePermsString(parts[2]) - } - - if err == nil { - perm := zk.ACL{Scheme: scheme, ID: id, Perms: perms} - acl = append(acl, perm) - } - } - return acl, err -} - -func (zook *ZooKeeper) parsePermsString(permstr string) (perms int32, err error) { - if x, e := strconv.ParseFloat(permstr, 64); e == nil { - perms = int32(math.Min(x, 31)) - } else { - for _, rune := range strings.Split(permstr, "") { - switch rune { - case "r": - perms |= zk.PermRead - case "w": - perms |= zk.PermWrite - case "c": - perms |= zk.PermCreate - case "d": - perms |= zk.PermDelete - case "a": - perms |= zk.PermAdmin - default: - err = errors.New("invalid ACL string specified") - } - - if err != nil { - break - } - } - } - return perms, err -} - -// Delete removes a path entry. It exits with error if the path does not exist, or has subdirectories. -func (zook *ZooKeeper) Delete(path string) error { - connection, err := zook.connect() - if err != nil { - return err - } - defer connection.Close() - - return connection.Delete(path, -1) -} - -// Delete recursive if has subdirectories. -func (zook *ZooKeeper) DeleteRecursive(path string) error { - result, err := zook.ChildrenRecursive(path) - if err != nil { - log.Fatal(err) - } - - for i := len(result) - 1; i >= 0; i-- { - znode := path + "/" + result[i] - if err = zook.Delete(znode); err != nil { - log.Fatal(err) - } - } - - return zook.Delete(path) -} diff --git a/go/vt/vtorc/external/zk/zk_test.go b/go/vt/vtorc/external/zk/zk_test.go deleted file mode 100644 index 1be602ca031..00000000000 --- a/go/vt/vtorc/external/zk/zk_test.go +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright 2014 Outbrain Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -// zk provides with higher level commands over the lower level zookeeper connector -package zk - -import ( - "testing" - - "github.com/samuel/go-zookeeper/zk" -) - -func TestParseACLString(t *testing.T) { - cases := []struct { - aclstr string - want []zk.ACL - }{ - {"world:anyone:cdrwa", []zk.ACL{{Scheme: "world", ID: "anyone", Perms: 31}}}, - {"world:anyone:rw", []zk.ACL{{Scheme: "world", ID: "anyone", Perms: 3}}}, - {"world:anyone:3", []zk.ACL{{Scheme: "world", ID: "anyone", Perms: 3}}}, - {"host:example.com:cdrw", []zk.ACL{{Scheme: "host", ID: "example.com", Perms: 15}}}, - {"ip:10.2.1.15/32:cdrwa", []zk.ACL{{Scheme: "ip", ID: "10.2.1.15/32", Perms: 31}}}, - {"digest:username:pwhash:cd", []zk.ACL{{Scheme: "digest", ID: "username:pwhash", Perms: 12}}}, - {"auth::cdrwa", []zk.ACL{{Scheme: "auth", ID: "", Perms: 31}}}, - } - - for _, c := range cases { - zook := NewZooKeeper() - got, _ := zook.parseACLString(c.aclstr) - if !aclsEqual(got, c.want) { - t.Errorf("parseACLString(%q) == %q, want %q", c.aclstr, got, c.want) - } - } -} - -func TestParseInvalidACLString(t *testing.T) { - aclstr := "world:anyone:rwb" - want := "invalid ACL string specified" - - zook := NewZooKeeper() - _, err := zook.parseACLString(aclstr) - - if err == nil { - t.Error("No error returned") - } else { - if err.Error() != want { - t.Errorf("parseACLString(%q) error %q, want %q", aclstr, err.Error(), want) - } - } -} - -func aclsEqual(a, b []zk.ACL) bool { - if len(a) != len(b) { - return false - } - - for i := range a { - if a[i] != b[i] { - return false - } - } - return true -} diff --git a/go/vt/vtorc/inst/analysis_dao.go b/go/vt/vtorc/inst/analysis_dao.go index 5681a82337a..657bb6ddea3 100644 --- a/go/vt/vtorc/inst/analysis_dao.go +++ b/go/vt/vtorc/inst/analysis_dao.go @@ -35,7 +35,7 @@ import ( "github.com/patrickmn/go-cache" "github.com/rcrowley/go-metrics" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" + "github.com/openark/golib/sqlutils" ) var analysisChangeWriteAttemptCounter = metrics.NewCounter() diff --git a/go/vt/vtorc/inst/analysis_dao_test.go b/go/vt/vtorc/inst/analysis_dao_test.go index fa35ab7a0fc..a705530a585 100644 --- a/go/vt/vtorc/inst/analysis_dao_test.go +++ b/go/vt/vtorc/inst/analysis_dao_test.go @@ -21,9 +21,10 @@ import ( "github.com/stretchr/testify/require" + "github.com/openark/golib/sqlutils" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vtorc/test" ) diff --git a/go/vt/vtorc/inst/analysis_test.go b/go/vt/vtorc/inst/analysis_test.go index c2a59d13dcf..70849379a5e 100644 --- a/go/vt/vtorc/inst/analysis_test.go +++ b/go/vt/vtorc/inst/analysis_test.go @@ -20,7 +20,8 @@ import ( "testing" "vitess.io/vitess/go/vt/vtorc/config" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" + + "github.com/stretchr/testify/require" ) func init() { @@ -30,18 +31,18 @@ func init() { func TestGetAnalysisInstanceType(t *testing.T) { { analysis := &ReplicationAnalysis{} - test.S(t).ExpectEquals(string(analysis.GetAnalysisInstanceType()), "intermediate-primary") + require.Equal(t, string(analysis.GetAnalysisInstanceType()), "intermediate-primary") } { analysis := &ReplicationAnalysis{IsPrimary: true} - test.S(t).ExpectEquals(string(analysis.GetAnalysisInstanceType()), "primary") + require.Equal(t, string(analysis.GetAnalysisInstanceType()), "primary") } { analysis := &ReplicationAnalysis{IsCoPrimary: true} - test.S(t).ExpectEquals(string(analysis.GetAnalysisInstanceType()), "co-primary") + require.Equal(t, string(analysis.GetAnalysisInstanceType()), "co-primary") } { analysis := &ReplicationAnalysis{IsPrimary: true, IsCoPrimary: true} - test.S(t).ExpectEquals(string(analysis.GetAnalysisInstanceType()), "co-primary") + require.Equal(t, string(analysis.GetAnalysisInstanceType()), "co-primary") } } diff --git a/go/vt/vtorc/inst/audit_dao.go b/go/vt/vtorc/inst/audit_dao.go index a0c6eaeb0d4..36c690d2513 100644 --- a/go/vt/vtorc/inst/audit_dao.go +++ b/go/vt/vtorc/inst/audit_dao.go @@ -26,9 +26,10 @@ import ( "github.com/rcrowley/go-metrics" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) // syslogWriter is optional, and defaults to nil (disabled) diff --git a/go/vt/vtorc/inst/binlog_test.go b/go/vt/vtorc/inst/binlog_test.go index 6585c7bd120..e650fd81fca 100644 --- a/go/vt/vtorc/inst/binlog_test.go +++ b/go/vt/vtorc/inst/binlog_test.go @@ -3,8 +3,9 @@ package inst import ( "testing" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/vt/vtorc/config" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" ) var testCoordinates = BinlogCoordinates{LogFile: "mysql-bin.000010", LogPos: 108} @@ -15,40 +16,40 @@ func init() { func TestDetach(t *testing.T) { detachedCoordinates := testCoordinates.Detach() - test.S(t).ExpectEquals(detachedCoordinates.LogFile, "//mysql-bin.000010:108") - test.S(t).ExpectEquals(detachedCoordinates.LogPos, testCoordinates.LogPos) + require.Equal(t, detachedCoordinates.LogFile, "//mysql-bin.000010:108") + require.Equal(t, detachedCoordinates.LogPos, testCoordinates.LogPos) } func TestDetachedCoordinates(t *testing.T) { isDetached, detachedCoordinates := testCoordinates.ExtractDetachedCoordinates() - test.S(t).ExpectFalse(isDetached) - test.S(t).ExpectEquals(detachedCoordinates.LogFile, testCoordinates.LogFile) - test.S(t).ExpectEquals(detachedCoordinates.LogPos, testCoordinates.LogPos) + require.False(t, isDetached) + require.Equal(t, detachedCoordinates.LogFile, testCoordinates.LogFile) + require.Equal(t, detachedCoordinates.LogPos, testCoordinates.LogPos) } func TestDetachedCoordinates2(t *testing.T) { detached := testCoordinates.Detach() isDetached, coordinates := detached.ExtractDetachedCoordinates() - test.S(t).ExpectTrue(isDetached) - test.S(t).ExpectEquals(coordinates.LogFile, testCoordinates.LogFile) - test.S(t).ExpectEquals(coordinates.LogPos, testCoordinates.LogPos) + require.True(t, isDetached) + require.Equal(t, coordinates.LogFile, testCoordinates.LogFile) + require.Equal(t, coordinates.LogPos, testCoordinates.LogPos) } func TestPreviousFileCoordinates(t *testing.T) { previous, err := testCoordinates.PreviousFileCoordinates() - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(previous.LogFile, "mysql-bin.000009") - test.S(t).ExpectEquals(previous.LogPos, int64(0)) + require.NoError(t, err) + require.Equal(t, previous.LogFile, "mysql-bin.000009") + require.Equal(t, previous.LogPos, int64(0)) } func TestNextFileCoordinates(t *testing.T) { next, err := testCoordinates.NextFileCoordinates() - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(next.LogFile, "mysql-bin.000011") - test.S(t).ExpectEquals(next.LogPos, int64(0)) + require.NoError(t, err) + require.Equal(t, next.LogFile, "mysql-bin.000011") + require.Equal(t, next.LogPos, int64(0)) } func TestBinlogCoordinates(t *testing.T) { @@ -57,47 +58,47 @@ func TestBinlogCoordinates(t *testing.T) { c3 := BinlogCoordinates{LogFile: "mysql-bin.00017", LogPos: 5000} c4 := BinlogCoordinates{LogFile: "mysql-bin.00112", LogPos: 104} - test.S(t).ExpectTrue(c1.Equals(&c2)) - test.S(t).ExpectFalse(c1.Equals(&c3)) - test.S(t).ExpectFalse(c1.Equals(&c4)) - test.S(t).ExpectFalse(c1.SmallerThan(&c2)) - test.S(t).ExpectTrue(c1.SmallerThan(&c3)) - test.S(t).ExpectTrue(c1.SmallerThan(&c4)) - test.S(t).ExpectTrue(c3.SmallerThan(&c4)) - test.S(t).ExpectFalse(c3.SmallerThan(&c2)) - test.S(t).ExpectFalse(c4.SmallerThan(&c2)) - test.S(t).ExpectFalse(c4.SmallerThan(&c3)) - - test.S(t).ExpectTrue(c1.SmallerThanOrEquals(&c2)) - test.S(t).ExpectTrue(c1.SmallerThanOrEquals(&c3)) + require.True(t, c1.Equals(&c2)) + require.False(t, c1.Equals(&c3)) + require.False(t, c1.Equals(&c4)) + require.False(t, c1.SmallerThan(&c2)) + require.True(t, c1.SmallerThan(&c3)) + require.True(t, c1.SmallerThan(&c4)) + require.True(t, c3.SmallerThan(&c4)) + require.False(t, c3.SmallerThan(&c2)) + require.False(t, c4.SmallerThan(&c2)) + require.False(t, c4.SmallerThan(&c3)) + + require.True(t, c1.SmallerThanOrEquals(&c2)) + require.True(t, c1.SmallerThanOrEquals(&c3)) } func TestBinlogPrevious(t *testing.T) { c1 := BinlogCoordinates{LogFile: "mysql-bin.00017", LogPos: 104} cres, err := c1.PreviousFileCoordinates() - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(c1.Type, cres.Type) - test.S(t).ExpectEquals(cres.LogFile, "mysql-bin.00016") + require.NoError(t, err) + require.Equal(t, c1.Type, cres.Type) + require.Equal(t, cres.LogFile, "mysql-bin.00016") c2 := BinlogCoordinates{LogFile: "mysql-bin.00100", LogPos: 104} cres, err = c2.PreviousFileCoordinates() - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(c1.Type, cres.Type) - test.S(t).ExpectEquals(cres.LogFile, "mysql-bin.00099") + require.NoError(t, err) + require.Equal(t, c1.Type, cres.Type) + require.Equal(t, cres.LogFile, "mysql-bin.00099") c3 := BinlogCoordinates{LogFile: "mysql.00.prod.com.00100", LogPos: 104} cres, err = c3.PreviousFileCoordinates() - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(c1.Type, cres.Type) - test.S(t).ExpectEquals(cres.LogFile, "mysql.00.prod.com.00099") + require.NoError(t, err) + require.Equal(t, c1.Type, cres.Type) + require.Equal(t, cres.LogFile, "mysql.00.prod.com.00099") c4 := BinlogCoordinates{LogFile: "mysql.00.prod.com.00000", LogPos: 104} _, err = c4.PreviousFileCoordinates() - test.S(t).ExpectNotNil(err) + require.Error(t, err) } func TestBinlogCoordinatesAsKey(t *testing.T) { @@ -113,22 +114,22 @@ func TestBinlogCoordinatesAsKey(t *testing.T) { m[c3] = true m[c4] = true - test.S(t).ExpectEquals(len(m), 3) + require.Equal(t, len(m), 3) } func TestFileNumberDistance(t *testing.T) { c1 := BinlogCoordinates{LogFile: "mysql-bin.00017", LogPos: 104} c2 := BinlogCoordinates{LogFile: "mysql-bin.00022", LogPos: 104} - test.S(t).ExpectEquals(c1.FileNumberDistance(&c1), 0) - test.S(t).ExpectEquals(c1.FileNumberDistance(&c2), 5) - test.S(t).ExpectEquals(c2.FileNumberDistance(&c1), -5) + require.Equal(t, c1.FileNumberDistance(&c1), 0) + require.Equal(t, c1.FileNumberDistance(&c2), 5) + require.Equal(t, c2.FileNumberDistance(&c1), -5) } func TestFileNumber(t *testing.T) { c1 := BinlogCoordinates{LogFile: "mysql-bin.00017", LogPos: 104} fileNum, numLen := c1.FileNumber() - test.S(t).ExpectEquals(fileNum, 17) - test.S(t).ExpectEquals(numLen, 5) + require.Equal(t, fileNum, 17) + require.Equal(t, numLen, 5) } diff --git a/go/vt/vtorc/inst/candidate_database_instance_dao.go b/go/vt/vtorc/inst/candidate_database_instance_dao.go index 529d3dd2ceb..b9883626eca 100644 --- a/go/vt/vtorc/inst/candidate_database_instance_dao.go +++ b/go/vt/vtorc/inst/candidate_database_instance_dao.go @@ -17,8 +17,9 @@ package inst import ( + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/log" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" diff --git a/go/vt/vtorc/inst/instance_dao.go b/go/vt/vtorc/inst/instance_dao.go index bc40e293566..455319781b4 100644 --- a/go/vt/vtorc/inst/instance_dao.go +++ b/go/vt/vtorc/inst/instance_dao.go @@ -31,6 +31,8 @@ import ( "github.com/rcrowley/go-metrics" "github.com/sjmudd/stopwatch" + "github.com/openark/golib/sqlutils" + vitessmysql "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/tb" "vitess.io/vitess/go/vt/log" @@ -42,7 +44,6 @@ import ( "vitess.io/vitess/go/vt/vtorc/collection" "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vtorc/metrics/query" "vitess.io/vitess/go/vt/vtorc/util" math "vitess.io/vitess/go/vt/vtorc/util" diff --git a/go/vt/vtorc/inst/instance_dao_test.go b/go/vt/vtorc/inst/instance_dao_test.go index 83686c7a312..5d2ba5a73ce 100644 --- a/go/vt/vtorc/inst/instance_dao_test.go +++ b/go/vt/vtorc/inst/instance_dao_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" + "github.com/stretchr/testify/require" ) var ( @@ -50,9 +50,9 @@ func TestMkInsertOdkuSingle(t *testing.T) { instances := mkTestInstances() sql, args, err := mkInsertOdkuForInstances(nil, true, true) - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(sql, "") - test.S(t).ExpectEquals(len(args), 0) + require.NoError(t, err) + require.Equal(t, sql, "") + require.Equal(t, len(args), 0) // one instance s1 := `INSERT ignore INTO database_instance @@ -73,9 +73,9 @@ func TestMkInsertOdkuSingle(t *testing.T) { false, false, 0, 0, false, false, false, , , , , , , false, false, , 0, mysql.000007, 10, , 0, , , {0 false}, {0 false}, 0, , , , , 0, false, false, false, false, false, 0, 0, false, false, 0, false, , 0, , false, , , [], , 0, ` sql1, args1, err := mkInsertOdkuForInstances(instances[:1], false, true) - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(normalizeQuery(sql1), normalizeQuery(s1)) - test.S(t).ExpectEquals(stripSpaces(fmtArgs(args1)), stripSpaces(a1)) + require.NoError(t, err) + require.Equal(t, normalizeQuery(sql1), normalizeQuery(s1)) + require.Equal(t, stripSpaces(fmtArgs(args1)), stripSpaces(a1)) } func TestMkInsertOdkuThree(t *testing.T) { @@ -102,9 +102,9 @@ func TestMkInsertOdkuThree(t *testing.T) { ` sql3, args3, err := mkInsertOdkuForInstances(instances[:3], true, true) - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(normalizeQuery(sql3), normalizeQuery(s3)) - test.S(t).ExpectEquals(stripSpaces(fmtArgs(args3)), stripSpaces(a3)) + require.NoError(t, err) + require.Equal(t, normalizeQuery(sql3), normalizeQuery(s3)) + require.Equal(t, stripSpaces(fmtArgs(args3)), stripSpaces(a3)) } func fmtArgs(args []any) string { diff --git a/go/vt/vtorc/inst/instance_key_map_test.go b/go/vt/vtorc/inst/instance_key_map_test.go index 2015d0e5fee..a390ef99532 100644 --- a/go/vt/vtorc/inst/instance_key_map_test.go +++ b/go/vt/vtorc/inst/instance_key_map_test.go @@ -20,8 +20,9 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/vt/vtorc/config" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" ) func init() { @@ -34,16 +35,16 @@ func TestGetInstanceKeys(t *testing.T) { m.AddKey(key1) m.AddKey(key2) keys := m.GetInstanceKeys() - test.S(t).ExpectEquals(keys[0], key1) - test.S(t).ExpectEquals(keys[1], key2) + require.Equal(t, keys[0], key1) + require.Equal(t, keys[1], key2) } for range rand.Perm(10) { // Just running many iterations to cover multiple possible map iteration ordering. Perm() is just used as an array generator here. m := *NewInstanceKeyMap() m.AddKey(key2) m.AddKey(key1) keys := m.GetInstanceKeys() - test.S(t).ExpectEquals(keys[0], key1) - test.S(t).ExpectEquals(keys[1], key2) + require.Equal(t, keys[0], key1) + require.Equal(t, keys[1], key2) } } @@ -52,25 +53,25 @@ func TestInstanceKeyMapToJSON(t *testing.T) { m.AddKey(key1) m.AddKey(key2) json, err := m.ToJSON() - test.S(t).ExpectNil(err) + require.NoError(t, err) ok := (json == `[{"Hostname":"host1","Port":3306},{"Hostname":"host2","Port":3306}]`) || (json == `[{"Hostname":"host2","Port":3306},{"Hostname":"host1","Port":3306}]`) - test.S(t).ExpectTrue(ok) + require.True(t, ok) } func TestInstanceKeyMapReadJSON(t *testing.T) { json := `[{"Hostname":"host1","Port":3306},{"Hostname":"host2","Port":3306}]` m := *NewInstanceKeyMap() _ = m.ReadJSON(json) - test.S(t).ExpectEquals(len(m), 2) - test.S(t).ExpectTrue(m[key1]) - test.S(t).ExpectTrue(m[key2]) + require.Equal(t, len(m), 2) + require.True(t, m[key1]) + require.True(t, m[key2]) } func TestEmptyInstanceKeyMapToCommaDelimitedList(t *testing.T) { m := *NewInstanceKeyMap() res := m.ToCommaDelimitedList() - test.S(t).ExpectEquals(res, "") + require.Equal(t, res, "") } func TestInstanceKeyMapToCommaDelimitedList(t *testing.T) { @@ -80,7 +81,7 @@ func TestInstanceKeyMapToCommaDelimitedList(t *testing.T) { res := m.ToCommaDelimitedList() ok := (res == `host1:3306,host2:3306`) || (res == `host2:3306,host1:3306`) - test.S(t).ExpectTrue(ok) + require.True(t, ok) } func TestIntersect(t *testing.T) { @@ -94,7 +95,7 @@ func TestIntersect(t *testing.T) { other.AddKey(key2) intersected := m.Intersect(other) - test.S(t).ExpectEquals(len(*intersected), 1) + require.Equal(t, len(*intersected), 1) } { m := NewInstanceKeyMap() @@ -105,7 +106,7 @@ func TestIntersect(t *testing.T) { other.AddKey(key2) intersected := m.Intersect(other) - test.S(t).ExpectEquals(len(*intersected), 0) + require.Equal(t, len(*intersected), 0) } { m := NewInstanceKeyMap() @@ -118,7 +119,7 @@ func TestIntersect(t *testing.T) { other.AddKey(key2) intersected := m.Intersect(other) - test.S(t).ExpectEquals(len(*intersected), 2) + require.Equal(t, len(*intersected), 2) } } diff --git a/go/vt/vtorc/inst/instance_key_test.go b/go/vt/vtorc/inst/instance_key_test.go index 4bf53e18e9c..1374aad570e 100644 --- a/go/vt/vtorc/inst/instance_key_test.go +++ b/go/vt/vtorc/inst/instance_key_test.go @@ -19,8 +19,9 @@ package inst import ( "testing" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/vt/vtorc/config" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" ) func init() { @@ -47,162 +48,162 @@ func TestInstanceKeyEquals(t *testing.T) { Version: "5.5", } - test.S(t).ExpectEquals(i1.Key, i2.Key) + require.Equal(t, i1.Key, i2.Key) i2.Key.Port = 3307 - test.S(t).ExpectNotEquals(i1.Key, i2.Key) + require.NotEqual(t, i1.Key, i2.Key) } func TestNewResolveInstanceKey(t *testing.T) { { i, err := NewResolveInstanceKey("127.0.0.1", 3308) - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(i.Hostname, "127.0.0.1") - test.S(t).ExpectEquals(i.Port, 3308) + require.NoError(t, err) + require.Equal(t, i.Hostname, "127.0.0.1") + require.Equal(t, i.Port, 3308) } { _, err := NewResolveInstanceKey("", 3309) - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { i, err := NewResolveInstanceKey("127.0.0.1", 0) - test.S(t).ExpectNil(err) - test.S(t).ExpectFalse(i.IsValid()) + require.NoError(t, err) + require.False(t, i.IsValid()) } } func TestParseResolveInstanceKey(t *testing.T) { { key, err := ParseResolveInstanceKey("myhost:1234") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "myhost") - test.S(t).ExpectEquals(key.Port, 1234) + require.NoError(t, err) + require.Equal(t, key.Hostname, "myhost") + require.Equal(t, key.Port, 1234) } { key, err := ParseResolveInstanceKey("myhost") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "myhost") - test.S(t).ExpectEquals(key.Port, 3306) + require.NoError(t, err) + require.Equal(t, key.Hostname, "myhost") + require.Equal(t, key.Port, 3306) } { key, err := ParseResolveInstanceKey("10.0.0.3:3307") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "10.0.0.3") - test.S(t).ExpectEquals(key.Port, 3307) + require.NoError(t, err) + require.Equal(t, key.Hostname, "10.0.0.3") + require.Equal(t, key.Port, 3307) } { key, err := ParseResolveInstanceKey("10.0.0.3") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "10.0.0.3") - test.S(t).ExpectEquals(key.Port, 3306) + require.NoError(t, err) + require.Equal(t, key.Hostname, "10.0.0.3") + require.Equal(t, key.Port, 3306) } { key, err := ParseResolveInstanceKey("[2001:db8:1f70::999:de8:7648:6e8]:3308") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "2001:db8:1f70::999:de8:7648:6e8") - test.S(t).ExpectEquals(key.Port, 3308) + require.NoError(t, err) + require.Equal(t, key.Hostname, "2001:db8:1f70::999:de8:7648:6e8") + require.Equal(t, key.Port, 3308) } { key, err := ParseResolveInstanceKey("::1") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "::1") - test.S(t).ExpectEquals(key.Port, 3306) + require.NoError(t, err) + require.Equal(t, key.Hostname, "::1") + require.Equal(t, key.Port, 3306) } { key, err := ParseResolveInstanceKey("0:0:0:0:0:0:0:0") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(key.Hostname, "0:0:0:0:0:0:0:0") - test.S(t).ExpectEquals(key.Port, 3306) + require.NoError(t, err) + require.Equal(t, key.Hostname, "0:0:0:0:0:0:0:0") + require.Equal(t, key.Port, 3306) } { _, err := ParseResolveInstanceKey("[2001:xxxx:1f70::999:de8:7648:6e8]:3308") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { _, err := ParseResolveInstanceKey("10.0.0.4:") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { _, err := ParseResolveInstanceKey("10.0.0.4:5.6.7") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } } func TestNewResolveInstanceKeyStrings(t *testing.T) { { i, err := NewResolveInstanceKeyStrings("127.0.0.1", "3306") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(i.Hostname, "127.0.0.1") - test.S(t).ExpectEquals(i.Port, 3306) + require.NoError(t, err) + require.Equal(t, i.Hostname, "127.0.0.1") + require.Equal(t, i.Port, 3306) } { _, err := NewResolveInstanceKeyStrings("127.0.0.1", "") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { _, err := NewResolveInstanceKeyStrings("127.0.0.1", "3306x") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } } func TestInstanceKeyValid(t *testing.T) { - test.S(t).ExpectTrue(key1.IsValid()) + require.True(t, key1.IsValid()) i, err := ParseResolveInstanceKey("_:3306") - test.S(t).ExpectNil(err) - test.S(t).ExpectFalse(i.IsValid()) + require.NoError(t, err) + require.False(t, i.IsValid()) i, err = ParseResolveInstanceKey("//myhost:3306") - test.S(t).ExpectNil(err) - test.S(t).ExpectFalse(i.IsValid()) + require.NoError(t, err) + require.False(t, i.IsValid()) } func TestInstanceKeyDetach(t *testing.T) { - test.S(t).ExpectFalse(key1.IsDetached()) + require.False(t, key1.IsDetached()) detached1 := key1.DetachedKey() - test.S(t).ExpectTrue(detached1.IsDetached()) + require.True(t, detached1.IsDetached()) detached2 := key1.DetachedKey() - test.S(t).ExpectTrue(detached2.IsDetached()) - test.S(t).ExpectTrue(detached1.Equals(detached2)) + require.True(t, detached2.IsDetached()) + require.True(t, detached1.Equals(detached2)) reattached1 := detached1.ReattachedKey() - test.S(t).ExpectFalse(reattached1.IsDetached()) - test.S(t).ExpectTrue(reattached1.Equals(&key1)) + require.False(t, reattached1.IsDetached()) + require.True(t, reattached1.Equals(&key1)) reattached2 := reattached1.ReattachedKey() - test.S(t).ExpectFalse(reattached2.IsDetached()) - test.S(t).ExpectTrue(reattached1.Equals(reattached2)) + require.False(t, reattached2.IsDetached()) + require.True(t, reattached1.Equals(reattached2)) } func TestIsIPv4(t *testing.T) { - test.S(t).ExpectFalse(key1.IsIPv4()) + require.False(t, key1.IsIPv4()) { k, _ := ParseRawInstanceKey("mysql-server-1:3306") - test.S(t).ExpectFalse(k.IsIPv4()) + require.False(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("mysql-server-1") - test.S(t).ExpectFalse(k.IsIPv4()) + require.False(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("my.sql.server.1") - test.S(t).ExpectFalse(k.IsIPv4()) + require.False(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("mysql-server-1:3306") - test.S(t).ExpectFalse(k.IsIPv4()) + require.False(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("127.0.0:3306") - test.S(t).ExpectFalse(k.IsIPv4()) + require.False(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("127::0::0::1:3306") - test.S(t).ExpectFalse(k.IsIPv4()) + require.False(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("127.0.0.1:3306") - test.S(t).ExpectTrue(k.IsIPv4()) + require.True(t, k.IsIPv4()) } { k, _ := ParseRawInstanceKey("127.0.0.1") - test.S(t).ExpectTrue(k.IsIPv4()) + require.True(t, k.IsIPv4()) } } diff --git a/go/vt/vtorc/inst/instance_test.go b/go/vt/vtorc/inst/instance_test.go index b5dbf4327ad..ebc2d9d0c89 100644 --- a/go/vt/vtorc/inst/instance_test.go +++ b/go/vt/vtorc/inst/instance_test.go @@ -19,8 +19,9 @@ package inst import ( "testing" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/vt/vtorc/config" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" ) func init() { @@ -34,9 +35,9 @@ func TestIsSmallerMajorVersion(t *testing.T) { i5517 := Instance{Version: "5.5.17"} i56 := Instance{Version: "5.6"} - test.S(t).ExpectFalse(i55.IsSmallerMajorVersion(&i5517)) - test.S(t).ExpectFalse(i56.IsSmallerMajorVersion(&i5517)) - test.S(t).ExpectTrue(i55.IsSmallerMajorVersion(&i56)) + require.False(t, i55.IsSmallerMajorVersion(&i5517)) + require.False(t, i56.IsSmallerMajorVersion(&i5517)) + require.True(t, i55.IsSmallerMajorVersion(&i56)) } func TestIsVersion(t *testing.T) { @@ -45,40 +46,40 @@ func TestIsVersion(t *testing.T) { i56 := Instance{Version: "5.6.20"} i57 := Instance{Version: "5.7.8-log"} - test.S(t).ExpectTrue(i51.IsMySQL51()) - test.S(t).ExpectTrue(i55.IsMySQL55()) - test.S(t).ExpectTrue(i56.IsMySQL56()) - test.S(t).ExpectFalse(i55.IsMySQL56()) - test.S(t).ExpectTrue(i57.IsMySQL57()) - test.S(t).ExpectFalse(i56.IsMySQL57()) + require.True(t, i51.IsMySQL51()) + require.True(t, i55.IsMySQL55()) + require.True(t, i56.IsMySQL56()) + require.False(t, i55.IsMySQL56()) + require.True(t, i57.IsMySQL57()) + require.False(t, i56.IsMySQL57()) } func TestIsSmallerBinlogFormat(t *testing.T) { iStatement := &Instance{Key: key1, BinlogFormat: "STATEMENT"} iRow := &Instance{Key: key2, BinlogFormat: "ROW"} iMixed := &Instance{Key: key3, BinlogFormat: "MIXED"} - test.S(t).ExpectTrue(iStatement.IsSmallerBinlogFormat(iRow)) - test.S(t).ExpectFalse(iStatement.IsSmallerBinlogFormat(iStatement)) - test.S(t).ExpectFalse(iRow.IsSmallerBinlogFormat(iStatement)) - - test.S(t).ExpectTrue(iStatement.IsSmallerBinlogFormat(iMixed)) - test.S(t).ExpectTrue(iMixed.IsSmallerBinlogFormat(iRow)) - test.S(t).ExpectFalse(iMixed.IsSmallerBinlogFormat(iStatement)) - test.S(t).ExpectFalse(iRow.IsSmallerBinlogFormat(iMixed)) + require.True(t, iStatement.IsSmallerBinlogFormat(iRow)) + require.False(t, iStatement.IsSmallerBinlogFormat(iStatement)) + require.False(t, iRow.IsSmallerBinlogFormat(iStatement)) + + require.True(t, iStatement.IsSmallerBinlogFormat(iMixed)) + require.True(t, iMixed.IsSmallerBinlogFormat(iRow)) + require.False(t, iMixed.IsSmallerBinlogFormat(iStatement)) + require.False(t, iRow.IsSmallerBinlogFormat(iMixed)) } func TestReplicationThreads(t *testing.T) { { - test.S(t).ExpectFalse(instance1.ReplicaRunning()) + require.False(t, instance1.ReplicaRunning()) } { - test.S(t).ExpectTrue(instance1.ReplicationThreadsExist()) + require.True(t, instance1.ReplicationThreadsExist()) } { - test.S(t).ExpectTrue(instance1.ReplicationThreadsStopped()) + require.True(t, instance1.ReplicationThreadsStopped()) } { i := Instance{Key: key1, ReplicationIOThreadState: ReplicationThreadStateNoThread, ReplicationSQLThreadState: ReplicationThreadStateNoThread} - test.S(t).ExpectFalse(i.ReplicationThreadsExist()) + require.False(t, i.ReplicationThreadsExist()) } } diff --git a/go/vt/vtorc/inst/keyspace_dao.go b/go/vt/vtorc/inst/keyspace_dao.go index 3eef9bf8740..e02d13fc448 100644 --- a/go/vt/vtorc/inst/keyspace_dao.go +++ b/go/vt/vtorc/inst/keyspace_dao.go @@ -19,10 +19,11 @@ package inst import ( "errors" + "github.com/openark/golib/sqlutils" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) // ErrKeyspaceNotFound is a fixed error message used when a keyspace is not found in the database. diff --git a/go/vt/vtorc/inst/oracle_gtid_set_test.go b/go/vt/vtorc/inst/oracle_gtid_set_test.go index 9715c404e91..b62f9475696 100644 --- a/go/vt/vtorc/inst/oracle_gtid_set_test.go +++ b/go/vt/vtorc/inst/oracle_gtid_set_test.go @@ -3,28 +3,28 @@ package inst import ( "testing" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" + "github.com/stretchr/testify/require" ) func TestNewOracleGtidSetEntry(t *testing.T) { { uuidSet := "00020194-3333-3333-3333-333333333333:1-7" entry, err := NewOracleGtidSetEntry(uuidSet) - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(entry.UUID, "00020194-3333-3333-3333-333333333333") - test.S(t).ExpectEquals(entry.Ranges, "1-7") + require.NoError(t, err) + require.Equal(t, entry.UUID, "00020194-3333-3333-3333-333333333333") + require.Equal(t, entry.Ranges, "1-7") } { uuidSet := "00020194-3333-3333-3333-333333333333:1-7:10-20" entry, err := NewOracleGtidSetEntry(uuidSet) - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(entry.UUID, "00020194-3333-3333-3333-333333333333") - test.S(t).ExpectEquals(entry.Ranges, "1-7:10-20") + require.NoError(t, err) + require.Equal(t, entry.UUID, "00020194-3333-3333-3333-333333333333") + require.Equal(t, entry.Ranges, "1-7:10-20") } { uuidSet := "00020194-3333-3333-3333-333333333333" _, err := NewOracleGtidSetEntry(uuidSet) - test.S(t).ExpectNotNil(err) + require.Error(t, err) } } @@ -32,47 +32,47 @@ func TestExplode(t *testing.T) { { uuidSet := "00020194-3333-3333-3333-333333333333:7" entry, err := NewOracleGtidSetEntry(uuidSet) - test.S(t).ExpectNil(err) + require.NoError(t, err) exploded := entry.Explode() - test.S(t).ExpectEquals(len(exploded), 1) - test.S(t).ExpectEquals(exploded[0].String(), "00020194-3333-3333-3333-333333333333:7") + require.Equal(t, len(exploded), 1) + require.Equal(t, exploded[0].String(), "00020194-3333-3333-3333-333333333333:7") } { uuidSet := "00020194-3333-3333-3333-333333333333:1-3" entry, err := NewOracleGtidSetEntry(uuidSet) - test.S(t).ExpectNil(err) + require.NoError(t, err) exploded := entry.Explode() - test.S(t).ExpectEquals(len(exploded), 3) - test.S(t).ExpectEquals(exploded[0].String(), "00020194-3333-3333-3333-333333333333:1") - test.S(t).ExpectEquals(exploded[1].String(), "00020194-3333-3333-3333-333333333333:2") - test.S(t).ExpectEquals(exploded[2].String(), "00020194-3333-3333-3333-333333333333:3") + require.Equal(t, len(exploded), 3) + require.Equal(t, exploded[0].String(), "00020194-3333-3333-3333-333333333333:1") + require.Equal(t, exploded[1].String(), "00020194-3333-3333-3333-333333333333:2") + require.Equal(t, exploded[2].String(), "00020194-3333-3333-3333-333333333333:3") } { uuidSet := "00020194-3333-3333-3333-333333333333:1-3:6-7" entry, err := NewOracleGtidSetEntry(uuidSet) - test.S(t).ExpectNil(err) + require.NoError(t, err) exploded := entry.Explode() - test.S(t).ExpectEquals(len(exploded), 5) - test.S(t).ExpectEquals(exploded[0].String(), "00020194-3333-3333-3333-333333333333:1") - test.S(t).ExpectEquals(exploded[1].String(), "00020194-3333-3333-3333-333333333333:2") - test.S(t).ExpectEquals(exploded[2].String(), "00020194-3333-3333-3333-333333333333:3") - test.S(t).ExpectEquals(exploded[3].String(), "00020194-3333-3333-3333-333333333333:6") - test.S(t).ExpectEquals(exploded[4].String(), "00020194-3333-3333-3333-333333333333:7") + require.Equal(t, len(exploded), 5) + require.Equal(t, exploded[0].String(), "00020194-3333-3333-3333-333333333333:1") + require.Equal(t, exploded[1].String(), "00020194-3333-3333-3333-333333333333:2") + require.Equal(t, exploded[2].String(), "00020194-3333-3333-3333-333333333333:3") + require.Equal(t, exploded[3].String(), "00020194-3333-3333-3333-333333333333:6") + require.Equal(t, exploded[4].String(), "00020194-3333-3333-3333-333333333333:7") } { gtidSetVal := "00020192-1111-1111-1111-111111111111:29-30, 00020194-3333-3333-3333-333333333333:7-8" gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) exploded := gtidSet.Explode() - test.S(t).ExpectEquals(len(exploded), 4) - test.S(t).ExpectEquals(exploded[0].String(), "00020192-1111-1111-1111-111111111111:29") - test.S(t).ExpectEquals(exploded[1].String(), "00020192-1111-1111-1111-111111111111:30") - test.S(t).ExpectEquals(exploded[2].String(), "00020194-3333-3333-3333-333333333333:7") - test.S(t).ExpectEquals(exploded[3].String(), "00020194-3333-3333-3333-333333333333:8") + require.Equal(t, len(exploded), 4) + require.Equal(t, exploded[0].String(), "00020192-1111-1111-1111-111111111111:29") + require.Equal(t, exploded[1].String(), "00020192-1111-1111-1111-111111111111:30") + require.Equal(t, exploded[2].String(), "00020194-3333-3333-3333-333333333333:7") + require.Equal(t, exploded[3].String(), "00020194-3333-3333-3333-333333333333:8") } } @@ -80,28 +80,28 @@ func TestNewOracleGtidSet(t *testing.T) { { gtidSetVal := "00020192-1111-1111-1111-111111111111:20-30, 00020194-3333-3333-3333-333333333333:7-8" gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 2) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") - test.S(t).ExpectEquals(gtidSet.GtidEntries[1].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.Equal(t, len(gtidSet.GtidEntries), 2) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") + require.Equal(t, gtidSet.GtidEntries[1].String(), "00020194-3333-3333-3333-333333333333:7-8") } { gtidSetVal := " ,,, , , 00020192-1111-1111-1111-111111111111:20-30,,,, 00020194-3333-3333-3333-333333333333:7-8,, ,," gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 2) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") - test.S(t).ExpectEquals(gtidSet.GtidEntries[1].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.Equal(t, len(gtidSet.GtidEntries), 2) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") + require.Equal(t, gtidSet.GtidEntries[1].String(), "00020194-3333-3333-3333-333333333333:7-8") } { gtidSetVal := " ,,, , ,, ,," gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 0) - test.S(t).ExpectTrue(gtidSet.IsEmpty()) + require.Equal(t, len(gtidSet.GtidEntries), 0) + require.True(t, gtidSet.IsEmpty()) } } @@ -109,30 +109,30 @@ func TestRemoveUUID(t *testing.T) { gtidSetVal := "00020192-1111-1111-1111-111111111111:20-30, 00020194-3333-3333-3333-333333333333:7-8" { gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 2) + require.Equal(t, len(gtidSet.GtidEntries), 2) gtidSet.RemoveUUID("00020194-3333-3333-3333-333333333333") - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") removed := gtidSet.RemoveUUID(`230ea8ea-81e3-11e4-972a-e25ec4bd140a`) - test.S(t).ExpectFalse(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") + require.False(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020192-1111-1111-1111-111111111111:20-30") } { gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 2) + require.Equal(t, len(gtidSet.GtidEntries), 2) gtidSet.RemoveUUID("00020192-1111-1111-1111-111111111111") - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") gtidSet.RemoveUUID("00020194-3333-3333-3333-333333333333") - test.S(t).ExpectTrue(gtidSet.IsEmpty()) + require.True(t, gtidSet.IsEmpty()) } } @@ -140,22 +140,22 @@ func TestRetainUUID(t *testing.T) { gtidSetVal := "00020192-1111-1111-1111-111111111111:20-30, 00020194-3333-3333-3333-333333333333:7-8" { gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 2) + require.Equal(t, len(gtidSet.GtidEntries), 2) removed := gtidSet.RetainUUID("00020194-3333-3333-3333-333333333333") - test.S(t).ExpectTrue(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.True(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") removed = gtidSet.RetainUUID("00020194-3333-3333-3333-333333333333") - test.S(t).ExpectFalse(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.False(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") removed = gtidSet.RetainUUID("230ea8ea-81e3-11e4-972a-e25ec4bd140a") - test.S(t).ExpectTrue(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 0) + require.True(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 0) } } @@ -163,65 +163,65 @@ func TestRetainUUIDs(t *testing.T) { gtidSetVal := "00020192-1111-1111-1111-111111111111:20-30, 00020194-3333-3333-3333-333333333333:7-8" { gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 2) + require.Equal(t, len(gtidSet.GtidEntries), 2) removed := gtidSet.RetainUUIDs([]string{"00020194-3333-3333-3333-333333333333", "00020194-5555-5555-5555-333333333333"}) - test.S(t).ExpectTrue(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.True(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") removed = gtidSet.RetainUUIDs([]string{"00020194-3333-3333-3333-333333333333", "00020194-5555-5555-5555-333333333333"}) - test.S(t).ExpectFalse(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 1) - test.S(t).ExpectEquals(gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") + require.False(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 1) + require.Equal(t, gtidSet.GtidEntries[0].String(), "00020194-3333-3333-3333-333333333333:7-8") removed = gtidSet.RetainUUIDs([]string{"230ea8ea-81e3-11e4-972a-e25ec4bd140a"}) - test.S(t).ExpectTrue(removed) - test.S(t).ExpectEquals(len(gtidSet.GtidEntries), 0) + require.True(t, removed) + require.Equal(t, len(gtidSet.GtidEntries), 0) } } func TestSharedUUIDs(t *testing.T) { gtidSetVal := "00020192-1111-1111-1111-111111111111:20-30, 00020194-3333-3333-3333-333333333333:7-8" gtidSet, err := NewOracleGtidSet(gtidSetVal) - test.S(t).ExpectNil(err) + require.NoError(t, err) { otherSet, err := NewOracleGtidSet("00020194-3333-3333-3333-333333333333:7-8,230ea8ea-81e3-11e4-972a-e25ec4bd140a:1-2") - test.S(t).ExpectNil(err) + require.NoError(t, err) { shared := gtidSet.SharedUUIDs(otherSet) - test.S(t).ExpectEquals(len(shared), 1) - test.S(t).ExpectEquals(shared[0], "00020194-3333-3333-3333-333333333333") + require.Equal(t, len(shared), 1) + require.Equal(t, shared[0], "00020194-3333-3333-3333-333333333333") } { shared := otherSet.SharedUUIDs(gtidSet) - test.S(t).ExpectEquals(len(shared), 1) - test.S(t).ExpectEquals(shared[0], "00020194-3333-3333-3333-333333333333") + require.Equal(t, len(shared), 1) + require.Equal(t, shared[0], "00020194-3333-3333-3333-333333333333") } } { otherSet, err := NewOracleGtidSet("00020194-4444-4444-4444-333333333333:7-8,230ea8ea-81e3-11e4-972a-e25ec4bd140a:1-2") - test.S(t).ExpectNil(err) + require.NoError(t, err) { shared := gtidSet.SharedUUIDs(otherSet) - test.S(t).ExpectEquals(len(shared), 0) + require.Equal(t, len(shared), 0) } { shared := otherSet.SharedUUIDs(gtidSet) - test.S(t).ExpectEquals(len(shared), 0) + require.Equal(t, len(shared), 0) } } { otherSet, err := NewOracleGtidSet("00020194-3333-3333-3333-333333333333:7-8,00020192-1111-1111-1111-111111111111:1-2") - test.S(t).ExpectNil(err) + require.NoError(t, err) { shared := gtidSet.SharedUUIDs(otherSet) - test.S(t).ExpectEquals(len(shared), 2) + require.Equal(t, len(shared), 2) } { shared := otherSet.SharedUUIDs(gtidSet) - test.S(t).ExpectEquals(len(shared), 2) + require.Equal(t, len(shared), 2) } } } diff --git a/go/vt/vtorc/inst/resolve_dao.go b/go/vt/vtorc/inst/resolve_dao.go index 0ba8aea8060..2af0bf6d32d 100644 --- a/go/vt/vtorc/inst/resolve_dao.go +++ b/go/vt/vtorc/inst/resolve_dao.go @@ -21,9 +21,10 @@ import ( "vitess.io/vitess/go/vt/log" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) var writeResolvedHostnameCounter = metrics.NewCounter() diff --git a/go/vt/vtorc/inst/tablet_dao.go b/go/vt/vtorc/inst/tablet_dao.go index dc19638e978..f9d00ca8ea3 100644 --- a/go/vt/vtorc/inst/tablet_dao.go +++ b/go/vt/vtorc/inst/tablet_dao.go @@ -26,13 +26,14 @@ import ( "google.golang.org/protobuf/proto" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/logutil" replicationdatapb "vitess.io/vitess/go/vt/proto/replicationdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vttablet/tmclient" ) @@ -61,7 +62,7 @@ func SwitchPrimary(newPrimaryKey, oldPrimaryKey InstanceKey) error { log.Errorf("Unexpected: tablet type did not change to primary: %v", newPrimaryTablet.Type) return nil } - ctx, cancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer cancel() _, err = TopoServ.UpdateShardFields(ctx, newPrimaryTablet.Keyspace, newPrimaryTablet.Shard, func(si *topo.ShardInfo) error { if proto.Equal(si.PrimaryAlias, newPrimaryTablet.Alias) && proto.Equal(si.PrimaryTermStartTime, newPrimaryTablet.PrimaryTermStartTime) { @@ -103,12 +104,12 @@ func ChangeTabletType(instanceKey InstanceKey, tabletType topodatapb.TabletType, return nil, err } tmc := tmclient.NewTabletManagerClient() - tmcCtx, tmcCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + tmcCtx, tmcCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer tmcCancel() if err := tmc.ChangeType(tmcCtx, tablet, tabletType, semiSync); err != nil { return nil, err } - tsCtx, tsCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + tsCtx, tsCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer tsCancel() ti, err := TopoServ.GetTablet(tsCtx, tablet.Alias) if err != nil { @@ -128,7 +129,7 @@ func ResetReplicationParameters(instanceKey InstanceKey) error { return err } tmc := tmclient.NewTabletManagerClient() - tmcCtx, tmcCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + tmcCtx, tmcCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer tmcCancel() if err := tmc.ResetReplicationParameters(tmcCtx, tablet); err != nil { return err @@ -143,7 +144,7 @@ func FullStatus(instanceKey InstanceKey) (*replicationdatapb.FullStatus, error) return nil, err } tmc := tmclient.NewTabletManagerClient() - tmcCtx, tmcCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + tmcCtx, tmcCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer tmcCancel() return tmc.FullStatus(tmcCtx, tablet) } diff --git a/go/vt/vtorc/inst/tag_dao.go b/go/vt/vtorc/inst/tag_dao.go index 7037a6b78db..b49601198be 100644 --- a/go/vt/vtorc/inst/tag_dao.go +++ b/go/vt/vtorc/inst/tag_dao.go @@ -21,8 +21,9 @@ import ( "vitess.io/vitess/go/vt/log" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) func PutInstanceTag(instanceKey *InstanceKey, tag *Tag) (err error) { diff --git a/go/vt/vtorc/inst/tag_test.go b/go/vt/vtorc/inst/tag_test.go index 2e4b6138ad2..0ce182b7fb2 100644 --- a/go/vt/vtorc/inst/tag_test.go +++ b/go/vt/vtorc/inst/tag_test.go @@ -3,139 +3,139 @@ package inst import ( "testing" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" + "github.com/stretchr/testify/require" ) //nolint:staticcheck func TestParseTag(t *testing.T) { { tag, err := ParseTag("") - test.S(t).ExpectTrue(tag == nil) - test.S(t).ExpectNotNil(err) + require.True(t, tag == nil) + require.Error(t, err) } { tag, err := ParseTag("=") - test.S(t).ExpectTrue(tag == nil) - test.S(t).ExpectNotNil(err) + require.True(t, tag == nil) + require.Error(t, err) } { tag, err := ParseTag("=backup") - test.S(t).ExpectTrue(tag == nil) - test.S(t).ExpectNotNil(err) + require.True(t, tag == nil) + require.Error(t, err) } { tag, err := ParseTag(" =backup") - test.S(t).ExpectTrue(tag == nil) - test.S(t).ExpectNotNil(err) + require.True(t, tag == nil) + require.Error(t, err) } { tag, err := ParseTag("role") - test.S(t).ExpectNil(err) - test.S(t).ExpectTrue(tag != nil) - test.S(t).ExpectEquals(tag.TagName, "role") - test.S(t).ExpectEquals(tag.TagValue, "") - test.S(t).ExpectFalse(tag.Negate) - test.S(t).ExpectFalse(tag.HasValue) + require.NoError(t, err) + require.True(t, tag != nil) + require.Equal(t, tag.TagName, "role") + require.Equal(t, tag.TagValue, "") + require.False(t, tag.Negate) + require.False(t, tag.HasValue) - test.S(t).ExpectEquals(tag.String(), "role=") + require.Equal(t, tag.String(), "role=") } { tag, err := ParseTag("role=") - test.S(t).ExpectNil(err) - test.S(t).ExpectTrue(tag != nil) - test.S(t).ExpectEquals(tag.TagName, "role") - test.S(t).ExpectEquals(tag.TagValue, "") - test.S(t).ExpectFalse(tag.Negate) - test.S(t).ExpectTrue(tag.HasValue) + require.NoError(t, err) + require.True(t, tag != nil) + require.Equal(t, tag.TagName, "role") + require.Equal(t, tag.TagValue, "") + require.False(t, tag.Negate) + require.True(t, tag.HasValue) - test.S(t).ExpectEquals(tag.String(), "role=") + require.Equal(t, tag.String(), "role=") } { tag, err := ParseTag("role=backup") - test.S(t).ExpectNil(err) - test.S(t).ExpectTrue(tag != nil) - test.S(t).ExpectEquals(tag.TagName, "role") - test.S(t).ExpectEquals(tag.TagValue, "backup") - test.S(t).ExpectFalse(tag.Negate) - test.S(t).ExpectTrue(tag.HasValue) + require.NoError(t, err) + require.True(t, tag != nil) + require.Equal(t, tag.TagName, "role") + require.Equal(t, tag.TagValue, "backup") + require.False(t, tag.Negate) + require.True(t, tag.HasValue) - test.S(t).ExpectEquals(tag.String(), "role=backup") + require.Equal(t, tag.String(), "role=backup") } { tag, err := ParseTag("!role") - test.S(t).ExpectNil(err) - test.S(t).ExpectTrue(tag != nil) - test.S(t).ExpectEquals(tag.TagName, "role") - test.S(t).ExpectTrue(tag.Negate) - test.S(t).ExpectFalse(tag.HasValue) + require.NoError(t, err) + require.True(t, tag != nil) + require.Equal(t, tag.TagName, "role") + require.True(t, tag.Negate) + require.False(t, tag.HasValue) } { tag, err := ParseTag("~role=backup") - test.S(t).ExpectNil(err) - test.S(t).ExpectTrue(tag != nil) - test.S(t).ExpectEquals(tag.TagName, "role") - test.S(t).ExpectEquals(tag.TagValue, "backup") - test.S(t).ExpectTrue(tag.Negate) - test.S(t).ExpectTrue(tag.HasValue) + require.NoError(t, err) + require.True(t, tag != nil) + require.Equal(t, tag.TagName, "role") + require.Equal(t, tag.TagValue, "backup") + require.True(t, tag.Negate) + require.True(t, tag.HasValue) } } func TestParseIntersectTags(t *testing.T) { { _, err := ParseIntersectTags("") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { _, err := ParseIntersectTags(",") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { _, err := ParseIntersectTags(",,,") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { _, err := ParseIntersectTags("role,") - test.S(t).ExpectNotNil(err) + require.Error(t, err) } { tags, err := ParseIntersectTags("role") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(len(tags), 1) + require.NoError(t, err) + require.Equal(t, len(tags), 1) - test.S(t).ExpectEquals(tags[0].TagName, "role") - test.S(t).ExpectEquals(tags[0].TagValue, "") - test.S(t).ExpectFalse(tags[0].Negate) - test.S(t).ExpectFalse(tags[0].HasValue) + require.Equal(t, tags[0].TagName, "role") + require.Equal(t, tags[0].TagValue, "") + require.False(t, tags[0].Negate) + require.False(t, tags[0].HasValue) } { tags, err := ParseIntersectTags("role,dc") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(len(tags), 2) + require.NoError(t, err) + require.Equal(t, len(tags), 2) - test.S(t).ExpectEquals(tags[0].TagName, "role") - test.S(t).ExpectEquals(tags[0].TagValue, "") - test.S(t).ExpectFalse(tags[0].Negate) - test.S(t).ExpectFalse(tags[0].HasValue) + require.Equal(t, tags[0].TagName, "role") + require.Equal(t, tags[0].TagValue, "") + require.False(t, tags[0].Negate) + require.False(t, tags[0].HasValue) - test.S(t).ExpectEquals(tags[1].TagName, "dc") - test.S(t).ExpectEquals(tags[1].TagValue, "") - test.S(t).ExpectFalse(tags[1].Negate) - test.S(t).ExpectFalse(tags[1].HasValue) + require.Equal(t, tags[1].TagName, "dc") + require.Equal(t, tags[1].TagValue, "") + require.False(t, tags[1].Negate) + require.False(t, tags[1].HasValue) } { tags, err := ParseIntersectTags("role=backup, !dc=ny") - test.S(t).ExpectNil(err) - test.S(t).ExpectEquals(len(tags), 2) + require.NoError(t, err) + require.Equal(t, len(tags), 2) - test.S(t).ExpectEquals(tags[0].TagName, "role") - test.S(t).ExpectEquals(tags[0].TagValue, "backup") - test.S(t).ExpectFalse(tags[0].Negate) - test.S(t).ExpectTrue(tags[0].HasValue) + require.Equal(t, tags[0].TagName, "role") + require.Equal(t, tags[0].TagValue, "backup") + require.False(t, tags[0].Negate) + require.True(t, tags[0].HasValue) - test.S(t).ExpectEquals(tags[1].TagName, "dc") - test.S(t).ExpectEquals(tags[1].TagValue, "ny") - test.S(t).ExpectTrue(tags[1].Negate) - test.S(t).ExpectTrue(tags[1].HasValue) + require.Equal(t, tags[1].TagName, "dc") + require.Equal(t, tags[1].TagValue, "ny") + require.True(t, tags[1].Negate) + require.True(t, tags[1].HasValue) } } diff --git a/go/vt/vtorc/logic/disable_recovery.go b/go/vt/vtorc/logic/disable_recovery.go index 19ff65e46df..f5d18381452 100644 --- a/go/vt/vtorc/logic/disable_recovery.go +++ b/go/vt/vtorc/logic/disable_recovery.go @@ -32,9 +32,10 @@ package logic import ( "fmt" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) // IsRecoveryDisabled returns true if Recoveries are disabled globally diff --git a/go/vt/vtorc/logic/keyspace_discovery.go b/go/vt/vtorc/logic/keyspace_discovery.go index 0fa8c5bba4a..4065c3c0857 100644 --- a/go/vt/vtorc/logic/keyspace_discovery.go +++ b/go/vt/vtorc/logic/keyspace_discovery.go @@ -32,7 +32,7 @@ import ( func RefreshAllKeyspaces() { var keyspaces []string if len(clustersToWatch) == 0 { // all known keyspaces - ctx, cancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer cancel() var err error // Get all the keyspaces @@ -62,7 +62,7 @@ func RefreshAllKeyspaces() { // Sort the list of keyspaces. // The list can have duplicates because the input to clusters to watch may have multiple shards of the same keyspace sort.Strings(keyspaces) - refreshCtx, refreshCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + refreshCtx, refreshCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer refreshCancel() var wg sync.WaitGroup for idx, keyspace := range keyspaces { @@ -83,7 +83,7 @@ func RefreshAllKeyspaces() { // RefreshKeyspace refreshes the keyspace's information for the given keyspace from the topo func RefreshKeyspace(keyspaceName string) error { - refreshCtx, refreshCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + refreshCtx, refreshCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer refreshCancel() return refreshKeyspace(refreshCtx, keyspaceName) } diff --git a/go/vt/vtorc/logic/tablet_discovery.go b/go/vt/vtorc/logic/tablet_discovery.go index b10f131459f..85ccddc2210 100644 --- a/go/vt/vtorc/logic/tablet_discovery.go +++ b/go/vt/vtorc/logic/tablet_discovery.go @@ -25,6 +25,7 @@ import ( "time" "github.com/spf13/pflag" + "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/proto" @@ -33,11 +34,12 @@ import ( "vitess.io/vitess/go/vt/vtorc/config" + "github.com/openark/golib/sqlutils" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topotools" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vtorc/inst" "vitess.io/vitess/go/vt/vttablet/tmclient" ) @@ -88,7 +90,7 @@ func refreshTabletsUsing(loader func(instanceKey *inst.InstanceKey), forceRefres return } if len(clustersToWatch) == 0 { // all known clusters - ctx, cancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer cancel() cells, err := ts.GetKnownCells(ctx) if err != nil { @@ -96,7 +98,7 @@ func refreshTabletsUsing(loader func(instanceKey *inst.InstanceKey), forceRefres return } - refreshCtx, refreshCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + refreshCtx, refreshCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer refreshCancel() var wg sync.WaitGroup for _, cell := range cells { @@ -117,7 +119,7 @@ func refreshTabletsUsing(loader func(instanceKey *inst.InstanceKey), forceRefres keyspaceShards = append(keyspaceShards, &topo.KeyspaceShard{Keyspace: input[0], Shard: input[1]}) } else { // Assume this is a keyspace and find all shards in keyspace - ctx, cancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer cancel() shards, err := ts.GetShardNames(ctx, ks) if err != nil { @@ -138,7 +140,7 @@ func refreshTabletsUsing(loader func(instanceKey *inst.InstanceKey), forceRefres log.Errorf("Found no keyspaceShards for input: %+v", clustersToWatch) return } - refreshCtx, refreshCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + refreshCtx, refreshCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer refreshCancel() var wg sync.WaitGroup for _, ks := range keyspaceShards { @@ -168,7 +170,7 @@ func refreshTabletsInCell(ctx context.Context, cell string, loader func(instance // change the replication information for the entire cluster drastically enough to warrant a full forceful refresh func forceRefreshAllTabletsInShard(ctx context.Context, keyspace, shard string) { log.Infof("force refresh of all tablets in shard - %v/%v", keyspace, shard) - refreshCtx, refreshCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + refreshCtx, refreshCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer refreshCancel() refreshTabletsInKeyspaceShard(refreshCtx, keyspace, shard, func(instanceKey *inst.InstanceKey) { DiscoverInstance(*instanceKey, true) diff --git a/go/vt/vtorc/logic/topology_recovery_dao.go b/go/vt/vtorc/logic/topology_recovery_dao.go index d647d7e0b2c..f1cfa284de8 100644 --- a/go/vt/vtorc/logic/topology_recovery_dao.go +++ b/go/vt/vtorc/logic/topology_recovery_dao.go @@ -22,9 +22,10 @@ import ( "vitess.io/vitess/go/vt/log" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vtorc/inst" "vitess.io/vitess/go/vt/vtorc/process" "vitess.io/vitess/go/vt/vtorc/util" diff --git a/go/vt/vtorc/process/election_dao.go b/go/vt/vtorc/process/election_dao.go index 3c45e5bdf70..f4737217d6f 100644 --- a/go/vt/vtorc/process/election_dao.go +++ b/go/vt/vtorc/process/election_dao.go @@ -17,10 +17,11 @@ package process import ( + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" "vitess.io/vitess/go/vt/vtorc/util" ) diff --git a/go/vt/vtorc/process/health_dao.go b/go/vt/vtorc/process/health_dao.go index e7442c6b314..ed2b90fcf5c 100644 --- a/go/vt/vtorc/process/health_dao.go +++ b/go/vt/vtorc/process/health_dao.go @@ -21,9 +21,10 @@ import ( "vitess.io/vitess/go/vt/log" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) // WriteRegisterNode writes down this node in the node_health table diff --git a/go/vt/vtorc/test/db.go b/go/vt/vtorc/test/db.go index 804bcc9a6de..199dc924619 100644 --- a/go/vt/vtorc/test/db.go +++ b/go/vt/vtorc/test/db.go @@ -21,8 +21,9 @@ import ( "vitess.io/vitess/go/vt/log" + "github.com/openark/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/db" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" ) var _ db.DB = (*DB)(nil) diff --git a/go/vt/vtorc/test/recovery_analysis.go b/go/vt/vtorc/test/recovery_analysis.go index 80d34018f94..4fa748f91cf 100644 --- a/go/vt/vtorc/test/recovery_analysis.go +++ b/go/vt/vtorc/test/recovery_analysis.go @@ -22,7 +22,7 @@ import ( "google.golang.org/protobuf/encoding/prototext" - "vitess.io/vitess/go/vt/vtorc/external/golib/sqlutils" + "github.com/openark/golib/sqlutils" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) diff --git a/go/vt/vtorc/util/token_test.go b/go/vt/vtorc/util/token_test.go index f949d109727..5e634c05f31 100644 --- a/go/vt/vtorc/util/token_test.go +++ b/go/vt/vtorc/util/token_test.go @@ -3,9 +3,9 @@ package util import ( "testing" - "vitess.io/vitess/go/vt/log" + "github.com/stretchr/testify/require" - test "vitess.io/vitess/go/vt/vtorc/external/golib/tests" + "vitess.io/vitess/go/vt/log" ) func init() { @@ -14,8 +14,8 @@ func init() { func TestNewToken(t *testing.T) { token1 := NewToken() - test.S(t).ExpectNotEquals(token1.Hash, "") - test.S(t).ExpectEquals(len(token1.Hash), 64) + require.NotEqual(t, token1.Hash, "") + require.Equal(t, len(token1.Hash), 64) } func TestNewTokenRandom(t *testing.T) { @@ -24,5 +24,5 @@ func TestNewTokenRandom(t *testing.T) { token2 := NewToken() // The following test can fail once in a quadrazillion eons - test.S(t).ExpectNotEquals(token1.Hash, token2.Hash) + require.NotEqual(t, token1.Hash, token2.Hash) } diff --git a/go/vt/vttablet/tabletmanager/restore.go b/go/vt/vttablet/tabletmanager/restore.go index 0b741bf6e79..dbcc158097f 100644 --- a/go/vt/vttablet/tabletmanager/restore.go +++ b/go/vt/vttablet/tabletmanager/restore.go @@ -550,7 +550,7 @@ func (tm *TabletManager) startReplication(ctx context.Context, pos mysql.Positio // the initial pos before proceeding tmc := tmclient.NewTabletManagerClient() defer tmc.Close() - remoteCtx, remoteCancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + remoteCtx, remoteCancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer remoteCancel() posStr, err := tmc.PrimaryPosition(remoteCtx, primary.Tablet) if err != nil { diff --git a/go/vt/vttablet/tabletmanager/shard_sync.go b/go/vt/vttablet/tabletmanager/shard_sync.go index 578062abc43..7dc8710758e 100644 --- a/go/vt/vttablet/tabletmanager/shard_sync.go +++ b/go/vt/vttablet/tabletmanager/shard_sync.go @@ -166,7 +166,7 @@ func (tm *TabletManager) shardSyncLoop(ctx context.Context, notifyChan <-chan st // success (we successfully synchronized), but the returned primaryAlias will be // different from the input tablet.Alias. func syncShardPrimary(ctx context.Context, ts *topo.Server, tablet *topodatapb.Tablet, PrimaryTermStartTime time.Time) (primaryAlias *topodatapb.TabletAlias, shouldDemote bool, err error) { - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() var shardInfo *topo.ShardInfo @@ -220,7 +220,7 @@ func (tm *TabletManager) endPrimaryTerm(ctx context.Context, primaryAlias *topod if mysqlctl.DisableActiveReparents { // Don't touch anything at the MySQL level. Just update tablet state. log.Infof("Active reparents are disabled; updating tablet state only.") - changeTypeCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + changeTypeCtx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() if err := tm.tmState.ChangeTabletType(changeTypeCtx, tm.baseTabletType, DBActionNone); err != nil { return vterrors.Wrapf(err, "failed to change type to %v", tm.baseTabletType) @@ -234,12 +234,12 @@ func (tm *TabletManager) endPrimaryTerm(ctx context.Context, primaryAlias *topod // no return. Instead, we should leave partial results and retry the rest // later. log.Infof("Active reparents are enabled; converting MySQL to replica.") - demotePrimaryCtx, cancelDemotePrimary := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + demotePrimaryCtx, cancelDemotePrimary := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancelDemotePrimary() if _, err := tm.demotePrimary(demotePrimaryCtx, false /* revertPartialFailure */); err != nil { return vterrors.Wrap(err, "failed to demote primary") } - setPrimaryCtx, cancelSetPrimary := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + setPrimaryCtx, cancelSetPrimary := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancelSetPrimary() log.Infof("Attempting to reparent self to new primary %v.", primaryAliasStr) if primaryAlias == nil { diff --git a/go/vt/vttablet/tabletmanager/tm_init.go b/go/vt/vttablet/tabletmanager/tm_init.go index d312310c60e..f3a3d12a1d2 100644 --- a/go/vt/vttablet/tabletmanager/tm_init.go +++ b/go/vt/vttablet/tabletmanager/tm_init.go @@ -452,7 +452,7 @@ func (tm *TabletManager) Close() { return nil } - updateCtx, updateCancel := context.WithTimeout(context.Background(), *topo.RemoteOperationTimeout) + updateCtx, updateCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer updateCancel() if _, err := tm.TopoServer.UpdateTabletFields(updateCtx, tm.tabletAlias, f); err != nil { diff --git a/go/vt/vttablet/tabletmanager/tm_state.go b/go/vt/vttablet/tabletmanager/tm_state.go index ee41e931314..da43cbf9a25 100644 --- a/go/vt/vttablet/tabletmanager/tm_state.go +++ b/go/vt/vttablet/tabletmanager/tm_state.go @@ -411,7 +411,7 @@ func (ts *tmState) publishStateLocked(ctx context.Context) { return } // Fast path: publish immediately. - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() _, err := ts.tm.TopoServer.UpdateTabletFields(ctx, ts.tm.tabletAlias, func(tablet *topodatapb.Tablet) error { if err := topotools.CheckOwnership(tablet, ts.tablet); err != nil { @@ -444,7 +444,7 @@ func (ts *tmState) retryPublish() { for { // Retry immediately the first time because the previous failure might have been // due to an expired context. - ctx, cancel := context.WithTimeout(ts.ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ts.ctx, topo.RemoteOperationTimeout) _, err := ts.tm.TopoServer.UpdateTabletFields(ctx, ts.tm.tabletAlias, func(tablet *topodatapb.Tablet) error { if err := topotools.CheckOwnership(tablet, ts.tablet); err != nil { log.Error(err) diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go index 18a4a37a4c1..2617eb83831 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go @@ -48,6 +48,9 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletconn" ) +// how long to wait for background operations to complete +var BackgroundOperationTimeout = topo.RemoteOperationTimeout * 4 + // compareColInfo contains the metadata for a column of the table being diffed type compareColInfo struct { colIndex int // index of the column in the filter's select @@ -107,7 +110,13 @@ func (td *tableDiffer) initialize(ctx context.Context) error { return err } defer func() { - if err := td.restartTargetVReplicationStreams(ctx); err != nil { + // We use a new context as we want to reset the state even + // when the parent context has timed out or been canceled. + log.Infof("Restarting the %q VReplication workflow on target tablets in keyspace %q", + td.wd.ct.workflow, targetKeyspace) + restartCtx, restartCancel := context.WithTimeout(context.Background(), BackgroundOperationTimeout) + defer restartCancel() + if err := td.restartTargetVReplicationStreams(restartCtx); err != nil { log.Errorf("error restarting target streams: %v", err) } }() @@ -321,9 +330,19 @@ func (td *tableDiffer) startSourceDataStreams(ctx context.Context) error { func (td *tableDiffer) restartTargetVReplicationStreams(ctx context.Context) error { ct := td.wd.ct - query := fmt.Sprintf("update _vt.vreplication set state='Running', message='', stop_pos='' where db_name=%s and workflow=%s", encodeString(ct.vde.dbName), encodeString(ct.workflow)) - log.Infof("restarting target replication with %s", query) - _, err := ct.tmc.VReplicationExec(ctx, ct.vde.thisTablet, query) + query := fmt.Sprintf("update _vt.vreplication set state='Running', message='', stop_pos='' where db_name=%s and workflow=%s", + encodeString(ct.vde.dbName), encodeString(ct.workflow)) + log.Infof("Restarting the %q VReplication workflow using %q", ct.workflow, query) + var err error + // Let's retry a few times if we get a retryable error. + for i := 1; i <= 3; i++ { + _, err := ct.tmc.VReplicationExec(ctx, ct.vde.thisTablet, query) + if err == nil || !mysql.IsEphemeralError(err) { + break + } + log.Warningf("Encountered the following error while restarting the %q VReplication workflow, will retry (attempt #%d): %v", + ct.workflow, i, err) + } return err } diff --git a/go/vt/vttls/vttls.go b/go/vt/vttls/vttls.go index 40a1ca72028..098ed67eec4 100644 --- a/go/vt/vttls/vttls.go +++ b/go/vt/vttls/vttls.go @@ -61,6 +61,12 @@ func (mode *SslMode) String() string { return string(*mode) } +// Type returns the value type, part of the pflag Value interface +// for allowing this to be used as a generic flag. +func (mode *SslMode) Type() string { + return "SslMode" +} + // Set updates the value of the SslMode pointer, part of the Value interface // for allowing to update a flag. func (mode *SslMode) Set(value string) error { diff --git a/go/vt/wrangler/testlib/apply_schema_flaky_test.go b/go/vt/wrangler/testlib/apply_schema_flaky_test.go index 9a39d373d5e..de72983aa3b 100644 --- a/go/vt/wrangler/testlib/apply_schema_flaky_test.go +++ b/go/vt/wrangler/testlib/apply_schema_flaky_test.go @@ -38,7 +38,7 @@ import ( ) // TestApplySchema_AllowLongUnavailability is an integration test for the -// -allow_long_unavailability flag of vtctl ApplySchema. +// --allow_long_unavailability flag of vtctl ApplySchema. // Only if the flag is specified, potentially long running schema changes are // allowed. func TestApplySchema_AllowLongUnavailability(t *testing.T) { @@ -107,7 +107,7 @@ func TestApplySchema_AllowLongUnavailability(t *testing.T) { db.AddQuery(addColumn, &sqltypes.Result{}) // First ApplySchema fails because the table is very big and -allow_long_unavailability is missing. - if err := vp.Run([]string{"ApplySchema", "-sql", addColumn, "ks"}); err == nil { + if err := vp.Run([]string{"ApplySchema", "--sql", addColumn, "ks"}); err == nil { t.Fatal("ApplySchema should have failed but did not.") } else if !strings.Contains(err.Error(), "big schema change detected") || !strings.Contains(strings.ToLower(err.Error()), "alter table table1") { @@ -115,7 +115,7 @@ func TestApplySchema_AllowLongUnavailability(t *testing.T) { } // Second ApplySchema succeeds because -allow_long_unavailability is set. - if err := vp.Run([]string{"ApplySchema", "-allow_long_unavailability", "-sql", addColumn, "ks"}); err != nil { + if err := vp.Run([]string{"ApplySchema", "--allow_long_unavailability", "--sql", addColumn, "ks"}); err != nil { t.Fatalf("ApplySchema failed: %v", err) } if count := db.GetQueryCalledNum(changeToDb); count != 2 { diff --git a/go/vt/wrangler/testlib/backup_test.go b/go/vt/wrangler/testlib/backup_test.go index 9088d104a98..7cdb7172e19 100644 --- a/go/vt/wrangler/testlib/backup_test.go +++ b/go/vt/wrangler/testlib/backup_test.go @@ -718,7 +718,7 @@ func TestRestoreUnreachablePrimary(t *testing.T) { primary.StopActionLoop(t) // set a short timeout so that we don't have to wait 30 seconds - *topo.RemoteOperationTimeout = 2 * time.Second + topo.RemoteOperationTimeout = 2 * time.Second // Restore should still succeed require.NoError(t, destTablet.TM.RestoreData(ctx, logutil.NewConsoleLogger(), 0 /* waitForBackupInterval */, false /* deleteBeforeRestore */, time.Time{} /* restoreFromBackupTs */)) // verify the full status diff --git a/go/vt/wrangler/testlib/copy_schema_shard_test.go b/go/vt/wrangler/testlib/copy_schema_shard_test.go index e23e687e272..8620d7e7565 100644 --- a/go/vt/wrangler/testlib/copy_schema_shard_test.go +++ b/go/vt/wrangler/testlib/copy_schema_shard_test.go @@ -172,7 +172,7 @@ func copySchema(t *testing.T, useShardAsSource bool) { if useShardAsSource { source = "ks/-80" } - if err := vp.Run([]string{"CopySchemaShard", "-include-views", source, "ks/-40"}); err != nil { + if err := vp.Run([]string{"CopySchemaShard", "--include-views", source, "ks/-40"}); err != nil { t.Fatalf("CopySchemaShard failed: %v", err) } diff --git a/go/vt/wrangler/testlib/emergency_reparent_shard_test.go b/go/vt/wrangler/testlib/emergency_reparent_shard_test.go index a8066ea4fb0..014029504a9 100644 --- a/go/vt/wrangler/testlib/emergency_reparent_shard_test.go +++ b/go/vt/wrangler/testlib/emergency_reparent_shard_test.go @@ -181,7 +181,7 @@ func TestEmergencyReparentShard(t *testing.T) { // run EmergencyReparentShard waitReplicaTimeout := time.Second * 2 - err := vp.Run([]string{"EmergencyReparentShard", "-wait_replicas_timeout", waitReplicaTimeout.String(), newPrimary.Tablet.Keyspace + "/" + newPrimary.Tablet.Shard, + err := vp.Run([]string{"EmergencyReparentShard", "--wait_replicas_timeout", waitReplicaTimeout.String(), newPrimary.Tablet.Keyspace + "/" + newPrimary.Tablet.Shard, topoproto.TabletAliasString(newPrimary.Tablet.Alias)}) require.NoError(t, err) // check what was run diff --git a/go/vt/wrangler/testlib/shard_test.go b/go/vt/wrangler/testlib/shard_test.go index 9fd4a3000e7..1b00ad82769 100644 --- a/go/vt/wrangler/testlib/shard_test.go +++ b/go/vt/wrangler/testlib/shard_test.go @@ -68,7 +68,7 @@ func TestDeleteShardCleanup(t *testing.T) { // without recursive flag, should fail on existing tablets. if err := vp.Run([]string{ "DeleteShard", - "-even_if_serving", + "--even_if_serving", primary.Tablet.Keyspace + "/" + primary.Tablet.Shard, }); err == nil || !strings.Contains(err.Error(), "use -recursive or remove them manually") { t.Fatalf("DeleteShard(evenIfServing=true) returned wrong error: %v", err) @@ -78,8 +78,8 @@ func TestDeleteShardCleanup(t *testing.T) { // it should just work. if err := vp.Run([]string{ "DeleteShard", - "-recursive", - "-even_if_serving", + "--recursive", + "--even_if_serving", primary.Tablet.Keyspace + "/" + primary.Tablet.Shard, }); err != nil { t.Fatalf("DeleteShard(recursive=true, evenIfServing=true) should have worked but returned: %v", err) diff --git a/go/vt/wrangler/testlib/vtctl_topo_test.go b/go/vt/wrangler/testlib/vtctl_topo_test.go index 932132a38f7..d3dd5d8cb21 100644 --- a/go/vt/wrangler/testlib/vtctl_topo_test.go +++ b/go/vt/wrangler/testlib/vtctl_topo_test.go @@ -65,7 +65,7 @@ func TestVtctlTopoCommands(t *testing.T) { tmp := t.TempDir() // Test TopoCat. - testVtctlTopoCommand(t, vp, []string{"TopoCat", "-long", "-decode_proto", "/keyspaces/*/Keyspace"}, `path=/keyspaces/ks1/Keyspace version=V + testVtctlTopoCommand(t, vp, []string{"TopoCat", "--long", "--decode_proto", "/keyspaces/*/Keyspace"}, `path=/keyspaces/ks1/Keyspace version=V path=/keyspaces/ks2/Keyspace version=V keyspace_type:SNAPSHOT `) @@ -90,7 +90,7 @@ keyspace_type:SNAPSHOT } // Test TopoCp from disk to topo. - _, err = vp.RunAndOutput([]string{"TopoCp", "-to_topo", ksFile, "/keyspaces/ks3/Keyspace"}) + _, err = vp.RunAndOutput([]string{"TopoCp", "--to_topo", ksFile, "/keyspaces/ks3/Keyspace"}) if err != nil { t.Fatalf("TopoCp(/keyspaces/ks3/Keyspace) failed: %v", err) } diff --git a/go/vt/wrangler/vdiff.go b/go/vt/wrangler/vdiff.go index 2edd061bff4..cfecefaeabd 100644 --- a/go/vt/wrangler/vdiff.go +++ b/go/vt/wrangler/vdiff.go @@ -242,11 +242,17 @@ func (wr *Wrangler) VDiff(ctx context.Context, targetKeyspace, workflowName, sou if err := df.selectTablets(ctx, ts); err != nil { return nil, vterrors.Wrap(err, "selectTablets") } - defer func(ctx context.Context) { - if err := df.restartTargets(ctx); err != nil { - wr.Logger().Errorf("Could not restart workflow %s: %v, please restart it manually", workflowName, err) + defer func() { + // We use a new context as we want to reset the state even + // when the parent context has timed out or been canceled. + log.Infof("Restarting the %q VReplication workflow on target tablets in keyspace %q", df.workflow, df.targetKeyspace) + restartCtx, restartCancel := context.WithTimeout(context.Background(), DefaultActionTimeout) + defer restartCancel() + if err := df.restartTargets(restartCtx); err != nil { + wr.Logger().Errorf("Could not restart workflow %q on target tablets in keyspace %q: %v, please restart it manually", + df.workflow, df.targetKeyspace, err) } - }(ctx) + }() // Perform the diffs. // We need a cancelable context to abort all running streams @@ -360,12 +366,6 @@ func (df *vdiff) diffTable(ctx context.Context, wr *Wrangler, table string, td * } }() - defer func() { - log.Errorf("restarting targets for workflow %s in keyspace %s", df.workflow, df.targetKeyspace) - if err := df.restartTargets(ctx); err != nil { - log.Errorf("Error restarting targets for workflow %s in keyspace %s", df.workflow, df.targetKeyspace) - } - }() // Stop the targets and record their source positions. if err := df.stopTargets(ctx); err != nil { return vterrors.Wrap(err, "stopTargets") @@ -906,9 +906,19 @@ func (df *vdiff) syncTargets(ctx context.Context, filteredReplicationWaitTime ti // restartTargets restarts the stopped target vreplication streams. func (df *vdiff) restartTargets(ctx context.Context) error { return df.forAll(df.targets, func(shard string, target *shardStreamer) error { - query := fmt.Sprintf("update _vt.vreplication set state='Running', message='', stop_pos='' where db_name=%s and workflow=%s", encodeString(target.primary.DbName()), encodeString(df.ts.WorkflowName())) - log.Infof("restarting target replication with %s", query) - _, err := df.ts.TabletManagerClient().VReplicationExec(ctx, target.primary.Tablet, query) + query := fmt.Sprintf("update _vt.vreplication set state='Running', message='', stop_pos='' where db_name=%s and workflow=%s", + encodeString(target.primary.DbName()), encodeString(df.ts.WorkflowName())) + log.Infof("Restarting the %q VReplication workflow on %q using %q", df.ts.WorkflowName(), target.primary.Alias, query) + var err error + // Let's retry a few times if we get a retryable error. + for i := 1; i <= 3; i++ { + _, err = df.ts.TabletManagerClient().VReplicationExec(ctx, target.primary.Tablet, query) + if err == nil || !mysql.IsEphemeralError(err) { + break + } + log.Warningf("Encountered the following error while restarting the %q VReplication workflow on %q, will retry (attempt #%d): %v", + df.ts.WorkflowName(), target.primary.Alias, i, err) + } return err }) } diff --git a/go/vt/wrangler/vexec.go b/go/vt/wrangler/vexec.go index af39e491064..d29a438b8fe 100644 --- a/go/vt/wrangler/vexec.go +++ b/go/vt/wrangler/vexec.go @@ -570,7 +570,7 @@ func (wr *Wrangler) getStreams(ctx context.Context, workflow, keyspace string) ( } // We set a topo timeout since we contact topo for the shard record. - ctx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout) + ctx, cancel := context.WithTimeout(ctx, topo.RemoteOperationTimeout) defer cancel() var sourceKeyspace string sourceShards := sets.NewString() diff --git a/go/vt/wrangler/wrangler.go b/go/vt/wrangler/wrangler.go index 4b6b394be84..ea04baf6569 100644 --- a/go/vt/wrangler/wrangler.go +++ b/go/vt/wrangler/wrangler.go @@ -36,7 +36,7 @@ var ( // lock actions use RemoteOperationTimeout, // so basing this to be greater than RemoteOperationTimeout is good. // Use this as the default value for Context that need a deadline. - DefaultActionTimeout = *topo.RemoteOperationTimeout * 4 + DefaultActionTimeout = topo.RemoteOperationTimeout * 4 ) // Wrangler manages complex actions on the topology, like reparents, diff --git a/proto/vtadmin.proto b/proto/vtadmin.proto index 66d1a9d27be..d4aca099581 100644 --- a/proto/vtadmin.proto +++ b/proto/vtadmin.proto @@ -64,6 +64,8 @@ service VTAdmin { rpc GetCellsAliases(GetCellsAliasesRequest) returns (GetCellsAliasesResponse) {}; // GetClusters returns all configured clusters. rpc GetClusters(GetClustersRequest) returns (GetClustersResponse) {}; + // GetFullStatus returns the full status of MySQL including the replication information, semi-sync information, GTID information among others + rpc GetFullStatus(GetFullStatusRequest) returns (vtctldata.GetFullStatusResponse) {}; // GetGates returns all gates across all the specified clusters. rpc GetGates(GetGatesRequest) returns (GetGatesResponse) {}; // GetKeyspace returns a keyspace by name in the specified cluster. @@ -148,6 +150,9 @@ service VTAdmin { // * "orchestrator" here refers to external orchestrator, not the newer, // Vitess-aware orchestrator, VTOrc. rpc TabletExternallyPromoted(TabletExternallyPromotedRequest) returns (TabletExternallyPromotedResponse) {}; + // Validate validates all nodes in a cluster that are reachable from the global replication graph, + // as well as all tablets in discoverable cells, are consistent + rpc Validate(ValidateRequest) returns (vtctldata.ValidateResponse) {}; // ValidateKeyspace validates that all nodes reachable from the specified // keyspace are consistent. rpc ValidateKeyspace(ValidateKeyspaceRequest) returns (vtctldata.ValidateKeyspaceResponse) {}; @@ -155,7 +160,9 @@ service VTAdmin { // for shard 0 matches the schema on all of the other tablets in the // keyspace. rpc ValidateSchemaKeyspace(ValidateSchemaKeyspaceRequest) returns (vtctldata.ValidateSchemaKeyspaceResponse) {}; - // ValidateVersionKeyspace validates that the version on the primary of + // ValidateShard validates that that all nodes reachable from the specified shard are consistent. + rpc ValidateShard(ValidateShardRequest) returns (vtctldata.ValidateShardResponse) {}; + // ValidateVersionKeyspace validates that the version on the primary of // shard 0 matches all of the other tablets in the keyspace. rpc ValidateVersionKeyspace(ValidateVersionKeyspaceRequest) returns (vtctldata.ValidateVersionKeyspaceResponse) {}; // VTExplain provides information on how Vitess plans to execute a @@ -415,6 +422,11 @@ message GetClustersResponse { repeated Cluster clusters = 1; } +message GetFullStatusRequest { + string cluster_id = 1; + topodata.TabletAlias alias = 2; +} + message GetGatesRequest { repeated string cluster_ids = 1; } @@ -808,6 +820,11 @@ message TabletExternallyReparentedRequest { repeated string cluster_ids = 2; } +message ValidateRequest { + string cluster_id = 1; + bool ping_tablets = 2; +} + message ValidateKeyspaceRequest { string cluster_id = 1; string keyspace = 2; @@ -819,6 +836,13 @@ message ValidateSchemaKeyspaceRequest { string keyspace = 2; } +message ValidateShardRequest { + string cluster_id = 1; + string keyspace = 2; + string shard = 3; + bool ping_tablets = 4; +} + message ValidateVersionKeyspaceRequest { string cluster_id = 1; string keyspace = 2; diff --git a/test/ci_workflow_gen.go b/test/ci_workflow_gen.go index 4c8869b72e9..c39752d93fc 100644 --- a/test/ci_workflow_gen.go +++ b/test/ci_workflow_gen.go @@ -33,14 +33,13 @@ const ( mysql80 mysqlVersion = "mysql80" mariadb103 mysqlVersion = "mariadb103" - defaultMySQLVersion mysqlVersion = mysql57 + defaultMySQLVersion = mysql80 ) type mysqlVersions []mysqlVersion var ( defaultMySQLVersions = []mysqlVersion{defaultMySQLVersion} - mysql80OnlyVersions = []mysqlVersion{mysql80} allMySQLVersions = []mysqlVersion{mysql57, mysql80} ) @@ -130,7 +129,6 @@ var ( clusterSelfHostedList = []string{ "vtorc", - "vtorc_8.0", } clusterDockerList = []string{} clustersRequiringXtraBackup = []string{ @@ -153,7 +151,7 @@ type clusterTest struct { Name, Shard, Platform string FileName string MakeTools, InstallXtraBackup bool - Ubuntu20, Docker bool + Docker bool LimitResourceUsage bool PartialKeyspace bool } @@ -164,10 +162,6 @@ type selfHostedTest struct { MakeTools, InstallXtraBackup, Docker bool } -func needsUbuntu20(clusterName string, mysqlVersion mysqlVersion) bool { - return mysqlVersion == mysql80 || strings.HasPrefix(clusterName, "vtgate") || strings.HasPrefix(clusterName, "tabletmanager") -} - // clusterMySQLVersions return list of mysql versions (one or more) that this cluster needs to test against func clusterMySQLVersions(clusterName string) mysqlVersions { switch { @@ -177,20 +171,12 @@ func clusterMySQLVersions(clusterName string) mysqlVersions { return allMySQLVersions case clusterName == "tabletmanager_tablegc": return allMySQLVersions - case clusterName == "mysql80": - return mysql80OnlyVersions - case clusterName == "vtorc_8.0": - return mysql80OnlyVersions - case clusterName == "vreplication_across_db_versions": - return []mysqlVersion{mysql80} + case clusterName == "vtorc": + return allMySQLVersions case clusterName == "xb_backup": return allMySQLVersions - case clusterName == "vtctlbackup_sharded_clustertest_heavy": - return []mysqlVersion{mysql80} - case clusterName == "vtbackup_transform": - return []mysqlVersion{mysql80} - case clusterName == "vtgate_partial_keyspace": - return []mysqlVersion{mysql80} + case clusterName == "xb_recovery": + return allMySQLVersions default: return defaultMySQLVersions } @@ -282,11 +268,17 @@ func generateSelfHostedClusterWorkflows() error { clusters := canonnizeList(clusterSelfHostedList) for _, cluster := range clusters { for _, mysqlVersion := range clusterMySQLVersions(cluster) { - directoryName := fmt.Sprintf("cluster_test_%s", cluster) + // check mysqlversion + mysqlVersionIndicator := "" + if mysqlVersion != defaultMySQLVersion && len(clusterMySQLVersions(cluster)) > 1 { + mysqlVersionIndicator = "_" + string(mysqlVersion) + } + + directoryName := fmt.Sprintf("cluster_test_%s%s", cluster, mysqlVersionIndicator) test := &selfHostedTest{ - Name: fmt.Sprintf("Cluster (%s)", cluster), - ImageName: fmt.Sprintf("cluster_test_%s", cluster), - Platform: "mysql57", + Name: fmt.Sprintf("Cluster (%s)(%s)", cluster, mysqlVersion), + ImageName: fmt.Sprintf("cluster_test_%s%s", cluster, mysqlVersionIndicator), + Platform: "mysql80", directoryName: directoryName, Dockerfile: fmt.Sprintf("./.github/docker/%s/Dockerfile", directoryName), Shard: cluster, @@ -307,12 +299,8 @@ func generateSelfHostedClusterWorkflows() error { break } } - if mysqlVersion == mysql80 { - test.Platform = string(mysql80) - } - mysqlVersionIndicator := "" - if mysqlVersion != defaultMySQLVersion && len(clusterMySQLVersions(cluster)) > 1 { - mysqlVersionIndicator = "_" + string(mysqlVersion) + if mysqlVersion == mysql57 { + test.Platform = string(mysql57) } err := setupTestDockerFile(test) @@ -353,11 +341,8 @@ func generateClusterWorkflows(list []string, tpl string) { break } } - if needsUbuntu20(cluster, mysqlVersion) { - test.Ubuntu20 = true - } - if mysqlVersion == mysql80 { - test.Platform = string(mysql80) + if mysqlVersion == mysql57 { + test.Platform = string(mysql57) } if strings.HasPrefix(cluster, "vreplication") || strings.HasSuffix(cluster, "heavy") { test.LimitResourceUsage = true diff --git a/test/config.json b/test/config.json index feca79dc511..da32b876ded 100644 --- a/test/config.json +++ b/test/config.json @@ -1125,33 +1125,6 @@ "RetryMax": 3, "Tags": [] }, - "vtorc_primary_failure_8.0": { - "File": "unused.go", - "Args": ["vitess.io/vitess/go/test/endtoend/vtorc/primaryfailure"], - "Command": [], - "Manual": false, - "Shard": "vtorc_8.0", - "RetryMax": 3, - "Tags": [] - }, - "vtorc_api_8.0": { - "File": "unused.go", - "Args": ["vitess.io/vitess/go/test/endtoend/vtorc/api"], - "Command": [], - "Manual": false, - "Shard": "vtorc_8.0", - "RetryMax": 3, - "Tags": [] - }, - "vtorc_general_8.0": { - "File": "unused.go", - "Args": ["vitess.io/vitess/go/test/endtoend/vtorc/general"], - "Command": [], - "Manual": false, - "Shard": "vtorc_8.0", - "RetryMax": 3, - "Tags": [] - }, "vault": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/vault"], diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 1a6218cb59a..1284931c53b 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -8,16 +8,11 @@ env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{`{{ github.event.pull_request.head.sha }}`}}" -{{if .InstallXtraBackup}} - # This is used if we need to pin the xtrabackup version used in tests. - # If this is NOT set then the latest version available will be used. - #XTRABACKUP_VERSION: "2.4.24-1" -{{end}} jobs: build: name: Run endtoend tests on {{.Name}} - {{if .Ubuntu20}}runs-on: ubuntu-20.04{{else}}runs-on: ubuntu-18.04{{end}} + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -74,8 +69,16 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | + # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo apt-get install -y lsb-release gnupg2 curl + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo percona-release setup ps80 + sudo apt-get update + + # Install everything else we need, and configure + sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils sudo service mysql stop sudo service etcd stop sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ @@ -87,17 +90,7 @@ jobs: {{if .InstallXtraBackup}} - wget "https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb" - sudo apt-get install -y gnupg2 - sudo dpkg -i "percona-release_latest.$(lsb_release -sc)_all.deb" - sudo apt-get update - if [[ -n $XTRABACKUP_VERSION ]]; then - debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" - wget "https://repo.percona.com/pxb-24/apt/pool/main/p/percona-xtrabackup-24/$debfile" - sudo apt install -y "./$debfile" - else - sudo apt-get install -y percona-xtrabackup-24 - fi + sudo apt-get install percona-xtrabackup-80 lz4 {{end}} @@ -124,7 +117,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -138,8 +131,9 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql57.cnf + cat <<-EOF>>./config/mycnf/mysql80.cnf innodb_buffer_pool_dump_at_shutdown=OFF + innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF @@ -155,7 +149,7 @@ jobs: {{end}} # run the tests however you normally do, then produce a JUnit XML file - eatmydata -- go run test.go -docker=false -follow -shard {{.Shard}}{{if .PartialKeyspace}} -partial-keyspace=true {{end}} | tee -a output.txt | go-junit-report -set-exit-code > report.xml + eatmydata -- go run test.go -docker={{if .Docker}}true -flavor={{.Platform}}{{else}}false{{end}} -follow -shard {{.Shard}}{{if .PartialKeyspace}} -partial-keyspace=true {{end}} | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Print test output and Record test result in launchable if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() diff --git a/test/templates/cluster_endtoend_test_mysql80.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl similarity index 72% rename from test/templates/cluster_endtoend_test_mysql80.tpl rename to test/templates/cluster_endtoend_test_mysql57.tpl index 85963ac7432..815d5aa47d8 100644 --- a/test/templates/cluster_endtoend_test_mysql80.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -8,12 +8,16 @@ env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{`{{ github.event.pull_request.head.sha }}`}}" +{{if .InstallXtraBackup}} + # This is used if we need to pin the xtrabackup version used in tests. + # If this is NOT set then the latest version available will be used. + #XTRABACKUP_VERSION: "2.4.24-1" +{{end}} jobs: build: name: Run endtoend tests on {{.Name}} - {{if .Ubuntu20}}runs-on: ubuntu-20.04{{else}}runs-on: ubuntu-18.04{{end}} - timeout-minutes: 45 + runs-on: ubuntu-20.04 steps: - name: Check if workflow needs to be skipped @@ -70,28 +74,52 @@ jobs: - name: Get dependencies if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | - # Setup Percona Server for MySQL 8.0 sudo apt-get update - sudo apt-get install -y lsb-release gnupg2 curl - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb - sudo percona-release setup ps80 + + # Uninstall any previously installed MySQL first + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 + + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb + # Bionic packages are still compatible for Focal since there's no MySQL 5.7 + # packages for Focal. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* - # Install everything else we need, and configure - sudo apt-get install -y percona-server-server percona-server-client make unzip g++ etcd git wget eatmydata xz-utils + sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata sudo service mysql stop sudo service etcd stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - go mod download # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD {{if .InstallXtraBackup}} - sudo apt-get install percona-xtrabackup-80 lz4 + wget "https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb" + sudo apt-get install -y gnupg2 + sudo dpkg -i "percona-release_latest.$(lsb_release -sc)_all.deb" + sudo apt-get update + if [[ -n $XTRABACKUP_VERSION ]]; then + debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" + wget "https://repo.percona.com/pxb-24/apt/pool/main/p/percona-xtrabackup-24/$debfile" + sudo apt install -y "./$debfile" + else + sudo apt-get install -y percona-xtrabackup-24 + fi {{end}} @@ -118,7 +146,7 @@ jobs: - name: Run cluster endtoend test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' - timeout-minutes: 30 + timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file # which musn't be more than 107 characters long. @@ -132,9 +160,8 @@ jobs: sudo sysctl -w net.ipv4.ip_local_port_range="22768 61999" # Increase our open file descriptor limit as we could hit this ulimit -n 65536 - cat <<-EOF>>./config/mycnf/mysql80.cnf + cat <<-EOF>>./config/mycnf/mysql57.cnf innodb_buffer_pool_dump_at_shutdown=OFF - innodb_buffer_pool_in_core_file=OFF innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_size=64M innodb_doublewrite=OFF diff --git a/tools/rowlog/rowlog.go b/tools/rowlog/rowlog.go index 0ef3ce25620..9593e88d652 100644 --- a/tools/rowlog/rowlog.go +++ b/tools/rowlog/rowlog.go @@ -13,26 +13,28 @@ import ( "sync" "time" - "vitess.io/vitess/go/vt/binlog/binlogplayer" - vtgatepb "vitess.io/vitess/go/vt/proto/vtgate" + "github.com/spf13/pflag" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/binlog/binlogplayer" "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" - binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" - logutilpb "vitess.io/vitess/go/vt/proto/logutil" - "vitess.io/vitess/go/vt/proto/query" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" - _ "vitess.io/vitess/go/vt/topo/etcd2topo" + "vitess.io/vitess/go/vt/vtctl/vtctlclient" + "vitess.io/vitess/go/vt/vtgate/vtgateconn" + + _ "vitess.io/vitess/go/vt/topo/etcd2topo" // TODO: after #11394, add rowlog to this https://github.com/vitessio/vitess/pull/11394/files#diff-ee3c1b94c587244ea0645a8ee10187e1112167725f752d58cf17bab6e6d1047cR85 + _ "vitess.io/vitess/go/vt/vtctl/grpcvtctlclient" _ "vitess.io/vitess/go/vt/vtgate/grpcvtgateconn" _ "vitess.io/vitess/go/vt/vttablet/grpctabletconn" - _ "vitess.io/vitess/go/vt/vtctl/grpcvtctlclient" - "vitess.io/vitess/go/vt/vtctl/vtctlclient" - "vitess.io/vitess/go/vt/vtgate/vtgateconn" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + logutilpb "vitess.io/vitess/go/vt/proto/logutil" + querypb "vitess.io/vitess/go/vt/proto/query" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vtgatepb "vitess.io/vitess/go/vt/proto/vtgate" ) type RowLogConfig struct { @@ -57,12 +59,12 @@ func (rlc *RowLogConfig) Validate() bool { func usage() { logger := logutil.NewConsoleLogger() - flag.CommandLine.SetOutput(logutil.NewLoggerWriter(logger)) - flag.Usage = func() { + pflag.CommandLine.SetOutput(logutil.NewLoggerWriter(logger)) + pflag.Usage = func() { logger.Printf("Rowlog Usage:\n") - s := "rowlog -ids -table -pk -source -target " - s += "-vtctld -vtgate -cells -topo_implementation " - s += "-topo_global_server_address -topo_global_root \n" + s := "rowlog --ids --table --pk --source --target " + s += "--vtctld --vtgate --cells --topo_implementation " + s += "--topo_global_server_address --topo_global_root \n" logger.Printf(s) } } @@ -73,7 +75,7 @@ func main() { ctx := context.Background() config := parseCommandLine() if !config.Validate() { - flag.Usage() + pflag.Usage() return } log.Infof("Starting rowlogger with config: %s", config) @@ -159,14 +161,13 @@ func startStreaming(ctx context.Context, vtgate, vtctld, keyspace, tablet, table } defer conn.Close() reader, _ := conn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, &vtgatepb.VStreamFlags{}) - var fields []*query.Field + var fields []*querypb.Field var gtid string var plan *TablePlan var lastLoggedAt int64 var totalRowsForTable, filteredRows int for { evs, err := reader.Recv() - // fmt.Printf("events received: %d\n",len(evs)) switch err { case nil: for _, ev := range evs { @@ -180,10 +181,8 @@ func startStreaming(ctx context.Context, vtgate, vtctld, keyspace, tablet, table switch ev.Type { case binlogdatapb.VEventType_VGTID: gtid = ev.Vgtid.ShardGtids[0].Gtid - // fmt.Printf("gtid %s\n", gtid) case binlogdatapb.VEventType_FIELD: fields = ev.FieldEvent.Fields - // fmt.Printf("field %s\n", fields) plan = getTablePlan(keyspace, fields, ev.FieldEvent.TableName, pk, ids) if !fieldsPrinted { outputHeader(plan) @@ -193,30 +192,30 @@ func startStreaming(ctx context.Context, vtgate, vtctld, keyspace, tablet, table totalRowsForTable += len(ev.RowEvent.RowChanges) rows := processRowEvent(plan, gtid, ev) if len(rows) > 0 { - // fmt.Printf("#rows %d\n", len(rows)) filteredRows += len(rows) outputRows(plan, rows) } default: - // fmt.Printf("event type %v\n",ev.Type) } } - // fmt.Printf("stopPos %s\n", stopPos) var err error var currentPosition, stopPosition mysql.Position currentPosition, err = binlogplayer.DecodePosition(gtid) if err != nil { - fmt.Errorf("Error decoding position for %s:%vs\n", gtid, err.Error()) + fmt.Printf("Error decoding position for %s:%vs\n", gtid, err.Error()) } stopPosition, err = binlogplayer.DecodePosition(stopPos) if err != nil { - fmt.Errorf("Error decoding position for %s:%vs\n", stopPos, err.Error()) + fmt.Printf("Error decoding position for %s:%vs\n", stopPos, err.Error()) } if currentPosition.AtLeast(stopPosition) { log.Infof("Finished streaming keyspace %s from %s upto %s, total rows seen %d", keyspace, startPos, stopPos, totalRowsForTable) return "", "", true, true, nil } - // return gtid, stopPos, false, fieldsPrinted, nil //uncomment for testing resumability + + if testResumability { + return gtid, stopPos, false, fieldsPrinted, nil + } case io.EOF: log.Infof("stream ended before reaching stop pos") fmt.Printf("stream ended before reaching stop pos\n") @@ -336,7 +335,7 @@ func processRowEvent(plan *TablePlan, gtid string, ev *binlogdatapb.VEvent) []*R return rowLogs } -func getTablePlan(keyspace string, fields []*query.Field, table, pk string, ids []string) *TablePlan { +func getTablePlan(keyspace string, fields []*querypb.Field, table, pk string, ids []string) *TablePlan { allowedIds := make(map[string]bool) for _, id := range ids { allowedIds[id] = true @@ -362,13 +361,12 @@ type TablePlan struct { table, pk string allowedIds map[string]bool pkIndex int64 - fields []*query.Field + fields []*querypb.Field keyspace string } func getFlavor(ctx context.Context, server, keyspace string) string { curPos, err := getPosition(ctx, server, keyspace, "0") - // fmt.Printf("curpos is %s\n", curPos) if err != nil { return "" } @@ -392,27 +390,39 @@ func getTablet(ctx context.Context, ts *topo.Server, cells []string, keyspace st return tabletId } +func trickGlog() { + var args []string + os.Args, args = os.Args[:1], os.Args[1:] + defer func() { os.Args = append(os.Args, args...) }() + flag.Parse() +} + +var testResumability bool + func parseCommandLine() *RowLogConfig { - sourceKeyspace := flag.String("source", "", "") - targetKeyspace := flag.String("target", "", "") - ids := flag.String("ids", "", "") - pk := flag.String("pk", "", "") - table := flag.String("table", "", "") - vtgate := flag.String("vtgate", "", "") - vtctld := flag.String("vtctld", "", "") - cells := flag.String("cells", "", "") + trickGlog() + sourceKeyspace := pflag.StringP("source", "s", "", "") + targetKeyspace := pflag.StringP("target", "t", "", "") + ids := pflag.StringSlice("ids", nil, "") + pk := pflag.String("pk", "", "") + table := pflag.String("table", "", "") + vtgate := pflag.String("vtgate", "", "") + vtctld := pflag.String("vtctld", "", "") + cells := pflag.StringSlice("cells", nil, "") - flag.Parse() + pflag.BoolVar(&testResumability, "test_resumability", testResumability, "set to test stream resumability") + + pflag.Parse() return &RowLogConfig{ sourceKeyspace: *sourceKeyspace, targetKeyspace: *targetKeyspace, table: *table, pk: *pk, - ids: strings.Split(*ids, ","), + ids: *ids, vtctld: *vtctld, vtgate: *vtgate, - cells: strings.Split(*cells, ","), + cells: *cells, } } @@ -422,7 +432,7 @@ func processPositionResult(gtidset string) (string, string) { subs := strings.Split(arr[1], "-") id, err := strconv.Atoi(subs[0]) if err != nil { - fmt.Errorf(err.Error()) + fmt.Printf(err.Error()) return "", "" } firstPos := arr[0] + ":" + strconv.Itoa(id) // subs[0] @@ -435,37 +445,33 @@ func parseExecOutput(result string) string { resultMap := make(map[string]any) err := json.Unmarshal([]byte(result), &resultMap) if err != nil { - fmt.Errorf("error parsing result json %s", result) + fmt.Printf("error parsing result json %s", result) return "" } rows := reflect.ValueOf(resultMap["rows"]) s := fmt.Sprintf("%v", rows) s = strings.Trim(s, "[]") - // fmt.Printf("gtidset %s", s) return s } func getPositions(ctx context.Context, server, tablet string) (string, string, error) { query := "select GTID_SUBTRACT(@@GLOBAL.gtid_executed, GTID_SUBTRACT(@@GLOBAL.gtid_executed, @@GLOBAL.gtid_purged));" - results, err := execVtctl(ctx, server, []string{"ExecuteFetchAsDba", "-json", tablet, query}) + results, err := execVtctl(ctx, server, []string{"ExecuteFetchAsDba", "--json", tablet, query}) if err != nil { fmt.Println(err) log.Errorf(err.Error()) return "", "", err } - // fmt.Printf("results are %v\n", results) firstPos := parseExecOutput(strings.Join(results, "")) query = "select @@GLOBAL.gtid_executed;" - results, err = execVtctl(ctx, server, []string{"ExecuteFetchAsDba", "-json", tablet, query}) + results, err = execVtctl(ctx, server, []string{"ExecuteFetchAsDba", "--json", tablet, query}) if err != nil { fmt.Println(err) log.Errorf(err.Error()) return "", "", err } - // fmt.Printf("results are %v\n", results) lastPos := parseExecOutput(strings.Join(results, "")) - // fmt.Printf("firstPos %s, lastPos %s\n", firstPos, lastPos) return firstPos, lastPos, nil } diff --git a/vitess-mixin/.env b/vitess-mixin/.env index 2b09d5f2b53..2dd23ee5572 100644 --- a/vitess-mixin/.env +++ b/vitess-mixin/.env @@ -1,4 +1,4 @@ -TOPOLOGY_FLAGS=-topo_implementation consul -topo_global_server_address consul1:8500 -topo_global_root vitess/global +TOPOLOGY_FLAGS=--topo_implementation consul --topo_global_server_address consul1:8500 --topo_global_root vitess/global GRPC_PORT=15999 WEB_PORT=8080 MYSQL_PORT=15306 diff --git a/web/vtadmin/src/api/http.ts b/web/vtadmin/src/api/http.ts index 4b5e0209a1f..5376083ab50 100644 --- a/web/vtadmin/src/api/http.ts +++ b/web/vtadmin/src/api/http.ts @@ -754,3 +754,52 @@ export const createShard = async (params: CreateShardParams) => { return vtctldata.CreateShardResponse.create(result); }; + +export interface ValidateParams { + clusterID: string; + pingTablets: boolean; +} + +export const validate = async (params: ValidateParams) => { + const { result } = await vtfetch(`/api/cluster/${params.clusterID}/validate`, { + method: 'put', + body: JSON.stringify({ ping_tablets: params.pingTablets }), + }); + const err = pb.ValidateRequest.verify(result); + if (err) throw Error(err); + + return vtctldata.ValidateResponse.create(result); +}; + +export interface ValidateShardParams { + clusterID: string; + keyspace: string; + shard: string; + pingTablets: boolean; +} + +export const validateShard = async (params: ValidateShardParams) => { + const { result } = await vtfetch(`/api/shard/${params.clusterID}/${params.keyspace}/${params.shard}/validate`, { + method: 'put', + body: JSON.stringify({ ping_tablets: params.pingTablets }), + }); + + const err = vtctldata.ValidateShardResponse.verify(result); + if (err) throw Error(err); + + return vtctldata.ValidateShardResponse.create(result); +}; + +export interface GetFullStatusParams { + clusterID: string; + alias: string; +} + +export const getFullStatus = async (params: GetFullStatusParams) => { + const { result } = await vtfetch(`/api/tablet/${params.alias}/full_status?cluster=${params.clusterID}`); + + const err = vtctldata.GetFullStatusResponse.verify(result); + if (err) throw Error(err); + + return vtctldata.GetFullStatusResponse.create(result); +}; diff --git a/web/vtadmin/src/components/ActionPanel.tsx b/web/vtadmin/src/components/ActionPanel.tsx index 3e6fa62113b..45c68491ffc 100644 --- a/web/vtadmin/src/components/ActionPanel.tsx +++ b/web/vtadmin/src/components/ActionPanel.tsx @@ -93,16 +93,6 @@ const ActionPanel: React.FC = ({ ) )} - {warnings.map( - (warning, i) => - warning && ( -
- - {warning} -
- ) - )} - {/* Don't render the confirmation input if "disabled" prop is set */} {requiresConfirmation && !disabled && ( <> diff --git a/web/vtadmin/src/components/ValidationResults.tsx b/web/vtadmin/src/components/ValidationResults.tsx new file mode 100644 index 00000000000..3209ba773f9 --- /dev/null +++ b/web/vtadmin/src/components/ValidationResults.tsx @@ -0,0 +1,60 @@ +import React from 'react'; +import { vtctldata } from '../proto/vtadmin'; + +interface Props { + resultsByKeyspace?: { + [k: string]: vtctldata.IValidateKeyspaceResponse; + }; + resultsByShard?: vtctldata.ValidateShardResponse; + shard?: string; +} + +const ValidationResults: React.FC = ({ resultsByKeyspace, resultsByShard, shard }) => { + const hasShardResults = resultsByShard && resultsByShard.results.length > 0; + return ( +
+ + + + {resultsByKeyspace && } + {resultsByKeyspace && } + + + + + {resultsByKeyspace && + Object.entries(resultsByKeyspace).map(([keyspace, results]) => { + return ( + results.results_by_shard && + Object.entries(results.results_by_shard).map(([shard, results]) => ( + + + + + + )) + ); + })} + {hasShardResults && ( + <> + {resultsByShard.results.map((r) => ( + + + + ))} + + )} + {!hasShardResults && ( + <> + + + + + )} + +
KeyspaceShardResult
{keyspace}{shard}{results.results}
{r}
No results
+
+ ); +}; + +export default ValidationResults; diff --git a/web/vtadmin/src/components/dialog/Dialog.tsx b/web/vtadmin/src/components/dialog/Dialog.tsx index 9740f7a7a1d..2948e8ddf6d 100644 --- a/web/vtadmin/src/components/dialog/Dialog.tsx +++ b/web/vtadmin/src/components/dialog/Dialog.tsx @@ -121,7 +121,6 @@ const Dialog: React.FC = ({ className="btn" onClick={() => { onConfirm && onConfirm(); - onClose && onClose(); }} > {loading ? loadingText : confirmText || 'Confirm'} diff --git a/web/vtadmin/src/components/inputs/Select.tsx b/web/vtadmin/src/components/inputs/Select.tsx index 6200d113fbf..c9292b56d76 100644 --- a/web/vtadmin/src/components/inputs/Select.tsx +++ b/web/vtadmin/src/components/inputs/Select.tsx @@ -35,6 +35,7 @@ interface Props { selectedItem: T | null; size?: 'large'; description?: string; + required?: boolean; } /** @@ -56,6 +57,7 @@ export const Select = ({ selectedItem, size, description, + required, }: Props) => { const _itemToString = React.useCallback( (item: T | null): string => { @@ -136,7 +138,7 @@ export const Select = ({ return (
-
@@ -353,6 +430,7 @@ const Advanced: React.FC = () => {
setEmergencyReparentTablet(t as vtadmin.Tablet)} label="Tablet" items={tabletsInCluster} diff --git a/web/vtadmin/src/components/routes/tablet/FullStatus.tsx b/web/vtadmin/src/components/routes/tablet/FullStatus.tsx new file mode 100644 index 00000000000..a9f5a21344c --- /dev/null +++ b/web/vtadmin/src/components/routes/tablet/FullStatus.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { useGetFullStatus } from '../../../hooks/api'; +import { vtadmin } from '../../../proto/vtadmin'; +import { formatAlias } from '../../../util/tablets'; +import { Code } from '../../Code'; +import style from './Tablet.module.scss'; + +interface Props { + tablet: vtadmin.Tablet; +} + +const FullStatus: React.FC = ({ tablet }) => { + const { data, error } = useGetFullStatus({ + clusterID: tablet.cluster?.id as string, + alias: formatAlias(tablet.tablet?.alias) as string, + }); + + if (error) { + return ( +
+ 😰 +

An error occurred

+ {error.message} +

+ ← All tablets +

+
+ ); + } + + return ; +}; + +export default FullStatus; diff --git a/web/vtadmin/src/components/routes/tablet/Tablet.tsx b/web/vtadmin/src/components/routes/tablet/Tablet.tsx index 6e8695cc649..8924244be04 100644 --- a/web/vtadmin/src/components/routes/tablet/Tablet.tsx +++ b/web/vtadmin/src/components/routes/tablet/Tablet.tsx @@ -32,8 +32,8 @@ import { TabContainer } from '../../tabs/TabContainer'; import Advanced from './Advanced'; import style from './Tablet.module.scss'; import { TabletCharts } from './TabletCharts'; -import { TabletReplication } from './TabletReplication'; import { env } from '../../../util/env'; +import FullStatus from './FullStatus'; interface RouteParams { alias: string; @@ -48,6 +48,7 @@ export const Tablet = () => { const { data: tablet, ...tq } = useTablet({ alias, clusterID }); const { data: debugVars } = useExperimentalTabletDebugVars({ alias, clusterID }); + if (tq.error) { return (
@@ -105,9 +106,8 @@ export const Tablet = () => { - + - @@ -118,10 +118,6 @@ export const Tablet = () => { - - - -
@@ -132,6 +128,8 @@ export const Tablet = () => {
+ {tablet && } + {!isReadOnlyMode() && ( diff --git a/web/vtadmin/src/components/routes/tablet/TabletReplication.tsx b/web/vtadmin/src/components/routes/tablet/TabletReplication.tsx deleted file mode 100644 index 9519f3cc2a0..00000000000 --- a/web/vtadmin/src/components/routes/tablet/TabletReplication.tsx +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright 2022 The Vitess Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { isEmpty } from 'lodash-es'; -import { useShardReplicationPositions } from '../../../hooks/api'; -import { vtadmin as pb } from '../../../proto/vtadmin'; -import { formatAlias, formatPaddedAlias } from '../../../util/tablets'; -import { Code } from '../../Code'; -import { QueryErrorPlaceholder } from '../../placeholders/QueryErrorPlaceholder'; -import { QueryLoadingPlaceholder } from '../../placeholders/QueryLoadingPlaceholder'; - -interface Props { - tablet?: pb.Tablet; -} - -export const TabletReplication: React.FC = ({ tablet }) => { - const clusterID = tablet?.cluster?.id; - const keyspace = tablet?.tablet?.keyspace; - const shard = tablet?.tablet?.shard; - const keyspaceShard = keyspace && shard ? `${keyspace}/${shard}` : null; - const alias = formatAlias(tablet?.tablet?.alias); - const paddedAlias = tablet ? formatPaddedAlias(tablet.tablet?.alias) : null; - - const q = useShardReplicationPositions({ - clusterIDs: [clusterID], - keyspaces: [keyspace], - keyspaceShards: [keyspaceShard], - }); - - // Loading of the tablet itself is (for now) handled by the parent component, - // so allow it to handle the loading display, too. - if (!tablet) { - return null; - } - - const positionsForShard = q.data?.replication_positions.find( - (p) => p.cluster?.id === clusterID && p.keyspace === keyspace && p.shard === shard - ); - - const replicationStatuses = positionsForShard?.position_info?.replication_statuses; - const replicationStatus = replicationStatuses && paddedAlias ? replicationStatuses[paddedAlias] : null; - - let content = null; - if (q.isSuccess) { - content = isEmpty(replicationStatus) ? ( -
No replication status for {alias}
- ) : ( - - ); - } - - return ( -
- - - {content} -
- ); -}; diff --git a/web/vtadmin/src/hooks/api.ts b/web/vtadmin/src/hooks/api.ts index 5a593faec73..3a515eb0174 100644 --- a/web/vtadmin/src/hooks/api.ts +++ b/web/vtadmin/src/hooks/api.ts @@ -68,8 +68,14 @@ import { rebuildKeyspaceGraph, removeKeyspaceCell, createShard, + validate, + ValidateParams, + validateShard, + ValidateShardParams, + getFullStatus, + GetFullStatusParams, } from '../api/http'; -import { vtadmin as pb } from '../proto/vtadmin'; +import { vtadmin as pb, vtctldata } from '../proto/vtadmin'; import { formatAlias } from '../util/tablets'; /** @@ -554,3 +560,37 @@ export const useCreateShard = ( return createShard(params); }, options); }; + +/** + * useValidate is a mutate hook that validates that all nodes reachable from the global replication graph, + * as well as all tablets in discoverable cells, are consistent. + */ +export const useValidate = ( + params: Parameters[0], + options?: UseMutationOptions>, Error, ValidateParams> +) => { + return useMutation>, Error, ValidateParams>(() => { + return validate(params); + }, options); +}; + +/** + * useValidate is a mutate hook that validates that all nodes reachable from the global replication graph, + * as well as all tablets in discoverable cells, are consistent. + */ +export const useValidateShard = ( + params: Parameters[0], + options?: UseMutationOptions>, Error, ValidateShardParams> +) => { + return useMutation>, Error, ValidateShardParams>(() => { + return validateShard(params); + }, options); +}; + +/** + * useGetFullStatus is a query hook that fetches the full status of a tablet + */ +export const useGetFullStatus = ( + params: GetFullStatusParams, + options?: UseQueryOptions | undefined +) => useQuery(['full-status', params], () => getFullStatus(params), options); diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index ef5ad5b468b..be6bf814a66 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -176,6 +176,20 @@ export namespace vtadmin { */ public getClusters(request: vtadmin.IGetClustersRequest): Promise; + /** + * Calls GetFullStatus. + * @param request GetFullStatusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetFullStatusResponse + */ + public getFullStatus(request: vtadmin.IGetFullStatusRequest, callback: vtadmin.VTAdmin.GetFullStatusCallback): void; + + /** + * Calls GetFullStatus. + * @param request GetFullStatusRequest message or plain object + * @returns Promise + */ + public getFullStatus(request: vtadmin.IGetFullStatusRequest): Promise; + /** * Calls GetGates. * @param request GetGatesRequest message or plain object @@ -582,6 +596,20 @@ export namespace vtadmin { */ public tabletExternallyPromoted(request: vtadmin.ITabletExternallyPromotedRequest): Promise; + /** + * Calls Validate. + * @param request ValidateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ValidateResponse + */ + public validate(request: vtadmin.IValidateRequest, callback: vtadmin.VTAdmin.ValidateCallback): void; + + /** + * Calls Validate. + * @param request ValidateRequest message or plain object + * @returns Promise + */ + public validate(request: vtadmin.IValidateRequest): Promise; + /** * Calls ValidateKeyspace. * @param request ValidateKeyspaceRequest message or plain object @@ -610,6 +638,20 @@ export namespace vtadmin { */ public validateSchemaKeyspace(request: vtadmin.IValidateSchemaKeyspaceRequest): Promise; + /** + * Calls ValidateShard. + * @param request ValidateShardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ValidateShardResponse + */ + public validateShard(request: vtadmin.IValidateShardRequest, callback: vtadmin.VTAdmin.ValidateShardCallback): void; + + /** + * Calls ValidateShard. + * @param request ValidateShardRequest message or plain object + * @returns Promise + */ + public validateShard(request: vtadmin.IValidateShardRequest): Promise; + /** * Calls ValidateVersionKeyspace. * @param request ValidateVersionKeyspaceRequest message or plain object @@ -718,6 +760,13 @@ export namespace vtadmin { */ type GetClustersCallback = (error: (Error|null), response?: vtadmin.GetClustersResponse) => void; + /** + * Callback as used by {@link vtadmin.VTAdmin#getFullStatus}. + * @param error Error, if any + * @param [response] GetFullStatusResponse + */ + type GetFullStatusCallback = (error: (Error|null), response?: vtctldata.GetFullStatusResponse) => void; + /** * Callback as used by {@link vtadmin.VTAdmin#getGates}. * @param error Error, if any @@ -921,6 +970,13 @@ export namespace vtadmin { */ type TabletExternallyPromotedCallback = (error: (Error|null), response?: vtadmin.TabletExternallyPromotedResponse) => void; + /** + * Callback as used by {@link vtadmin.VTAdmin#validate}. + * @param error Error, if any + * @param [response] ValidateResponse + */ + type ValidateCallback = (error: (Error|null), response?: vtctldata.ValidateResponse) => void; + /** * Callback as used by {@link vtadmin.VTAdmin#validateKeyspace}. * @param error Error, if any @@ -935,6 +991,13 @@ export namespace vtadmin { */ type ValidateSchemaKeyspaceCallback = (error: (Error|null), response?: vtctldata.ValidateSchemaKeyspaceResponse) => void; + /** + * Callback as used by {@link vtadmin.VTAdmin#validateShard}. + * @param error Error, if any + * @param [response] ValidateShardResponse + */ + type ValidateShardCallback = (error: (Error|null), response?: vtctldata.ValidateShardResponse) => void; + /** * Callback as used by {@link vtadmin.VTAdmin#validateVersionKeyspace}. * @param error Error, if any @@ -4425,6 +4488,102 @@ export namespace vtadmin { public toJSON(): { [k: string]: any }; } + /** Properties of a GetFullStatusRequest. */ + interface IGetFullStatusRequest { + + /** GetFullStatusRequest cluster_id */ + cluster_id?: (string|null); + + /** GetFullStatusRequest alias */ + alias?: (topodata.ITabletAlias|null); + } + + /** Represents a GetFullStatusRequest. */ + class GetFullStatusRequest implements IGetFullStatusRequest { + + /** + * Constructs a new GetFullStatusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IGetFullStatusRequest); + + /** GetFullStatusRequest cluster_id. */ + public cluster_id: string; + + /** GetFullStatusRequest alias. */ + public alias?: (topodata.ITabletAlias|null); + + /** + * Creates a new GetFullStatusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFullStatusRequest instance + */ + public static create(properties?: vtadmin.IGetFullStatusRequest): vtadmin.GetFullStatusRequest; + + /** + * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtadmin.GetFullStatusRequest.verify|verify} messages. + * @param message GetFullStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.IGetFullStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtadmin.GetFullStatusRequest.verify|verify} messages. + * @param message GetFullStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.IGetFullStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFullStatusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFullStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetFullStatusRequest; + + /** + * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFullStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetFullStatusRequest; + + /** + * Verifies a GetFullStatusRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFullStatusRequest + */ + public static fromObject(object: { [k: string]: any }): vtadmin.GetFullStatusRequest; + + /** + * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. + * @param message GetFullStatusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.GetFullStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFullStatusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a GetGatesRequest. */ interface IGetGatesRequest { @@ -9954,6 +10113,102 @@ export namespace vtadmin { public toJSON(): { [k: string]: any }; } + /** Properties of a ValidateRequest. */ + interface IValidateRequest { + + /** ValidateRequest cluster_id */ + cluster_id?: (string|null); + + /** ValidateRequest ping_tablets */ + ping_tablets?: (boolean|null); + } + + /** Represents a ValidateRequest. */ + class ValidateRequest implements IValidateRequest { + + /** + * Constructs a new ValidateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IValidateRequest); + + /** ValidateRequest cluster_id. */ + public cluster_id: string; + + /** ValidateRequest ping_tablets. */ + public ping_tablets: boolean; + + /** + * Creates a new ValidateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateRequest instance + */ + public static create(properties?: vtadmin.IValidateRequest): vtadmin.ValidateRequest; + + /** + * Encodes the specified ValidateRequest message. Does not implicitly {@link vtadmin.ValidateRequest.verify|verify} messages. + * @param message ValidateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.IValidateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidateRequest message, length delimited. Does not implicitly {@link vtadmin.ValidateRequest.verify|verify} messages. + * @param message ValidateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.IValidateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.ValidateRequest; + + /** + * Decodes a ValidateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.ValidateRequest; + + /** + * Verifies a ValidateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateRequest + */ + public static fromObject(object: { [k: string]: any }): vtadmin.ValidateRequest; + + /** + * Creates a plain object from a ValidateRequest message. Also converts values to other types if specified. + * @param message ValidateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.ValidateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ValidateKeyspaceRequest. */ interface IValidateKeyspaceRequest { @@ -10152,6 +10407,114 @@ export namespace vtadmin { public toJSON(): { [k: string]: any }; } + /** Properties of a ValidateShardRequest. */ + interface IValidateShardRequest { + + /** ValidateShardRequest cluster_id */ + cluster_id?: (string|null); + + /** ValidateShardRequest keyspace */ + keyspace?: (string|null); + + /** ValidateShardRequest shard */ + shard?: (string|null); + + /** ValidateShardRequest ping_tablets */ + ping_tablets?: (boolean|null); + } + + /** Represents a ValidateShardRequest. */ + class ValidateShardRequest implements IValidateShardRequest { + + /** + * Constructs a new ValidateShardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IValidateShardRequest); + + /** ValidateShardRequest cluster_id. */ + public cluster_id: string; + + /** ValidateShardRequest keyspace. */ + public keyspace: string; + + /** ValidateShardRequest shard. */ + public shard: string; + + /** ValidateShardRequest ping_tablets. */ + public ping_tablets: boolean; + + /** + * Creates a new ValidateShardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateShardRequest instance + */ + public static create(properties?: vtadmin.IValidateShardRequest): vtadmin.ValidateShardRequest; + + /** + * Encodes the specified ValidateShardRequest message. Does not implicitly {@link vtadmin.ValidateShardRequest.verify|verify} messages. + * @param message ValidateShardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.IValidateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidateShardRequest message, length delimited. Does not implicitly {@link vtadmin.ValidateShardRequest.verify|verify} messages. + * @param message ValidateShardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.IValidateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidateShardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateShardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.ValidateShardRequest; + + /** + * Decodes a ValidateShardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateShardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.ValidateShardRequest; + + /** + * Verifies a ValidateShardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidateShardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateShardRequest + */ + public static fromObject(object: { [k: string]: any }): vtadmin.ValidateShardRequest; + + /** + * Creates a plain object from a ValidateShardRequest message. Also converts values to other types if specified. + * @param message ValidateShardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.ValidateShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidateShardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ValidateVersionKeyspaceRequest. */ interface IValidateVersionKeyspaceRequest { diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 4cd1ae36506..202c58a8611 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -413,6 +413,39 @@ $root.vtadmin = (function() { * @variation 2 */ + /** + * Callback as used by {@link vtadmin.VTAdmin#getFullStatus}. + * @memberof vtadmin.VTAdmin + * @typedef GetFullStatusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {vtctldata.GetFullStatusResponse} [response] GetFullStatusResponse + */ + + /** + * Calls GetFullStatus. + * @function getFullStatus + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetFullStatusRequest} request GetFullStatusRequest message or plain object + * @param {vtadmin.VTAdmin.GetFullStatusCallback} callback Node-style callback called with the error, if any, and GetFullStatusResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VTAdmin.prototype.getFullStatus = function getFullStatus(request, callback) { + return this.rpcCall(getFullStatus, $root.vtadmin.GetFullStatusRequest, $root.vtctldata.GetFullStatusResponse, request, callback); + }, "name", { value: "GetFullStatus" }); + + /** + * Calls GetFullStatus. + * @function getFullStatus + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetFullStatusRequest} request GetFullStatusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link vtadmin.VTAdmin#getGates}. * @memberof vtadmin.VTAdmin @@ -1370,6 +1403,39 @@ $root.vtadmin = (function() { * @variation 2 */ + /** + * Callback as used by {@link vtadmin.VTAdmin#validate}. + * @memberof vtadmin.VTAdmin + * @typedef ValidateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {vtctldata.ValidateResponse} [response] ValidateResponse + */ + + /** + * Calls Validate. + * @function validate + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IValidateRequest} request ValidateRequest message or plain object + * @param {vtadmin.VTAdmin.ValidateCallback} callback Node-style callback called with the error, if any, and ValidateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VTAdmin.prototype.validate = function validate(request, callback) { + return this.rpcCall(validate, $root.vtadmin.ValidateRequest, $root.vtctldata.ValidateResponse, request, callback); + }, "name", { value: "Validate" }); + + /** + * Calls Validate. + * @function validate + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IValidateRequest} request ValidateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link vtadmin.VTAdmin#validateKeyspace}. * @memberof vtadmin.VTAdmin @@ -1436,6 +1502,39 @@ $root.vtadmin = (function() { * @variation 2 */ + /** + * Callback as used by {@link vtadmin.VTAdmin#validateShard}. + * @memberof vtadmin.VTAdmin + * @typedef ValidateShardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {vtctldata.ValidateShardResponse} [response] ValidateShardResponse + */ + + /** + * Calls ValidateShard. + * @function validateShard + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IValidateShardRequest} request ValidateShardRequest message or plain object + * @param {vtadmin.VTAdmin.ValidateShardCallback} callback Node-style callback called with the error, if any, and ValidateShardResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VTAdmin.prototype.validateShard = function validateShard(request, callback) { + return this.rpcCall(validateShard, $root.vtadmin.ValidateShardRequest, $root.vtctldata.ValidateShardResponse, request, callback); + }, "name", { value: "ValidateShard" }); + + /** + * Calls ValidateShard. + * @function validateShard + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IValidateShardRequest} request ValidateShardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link vtadmin.VTAdmin#validateVersionKeyspace}. * @memberof vtadmin.VTAdmin @@ -9962,6 +10061,221 @@ $root.vtadmin = (function() { return GetClustersResponse; })(); + vtadmin.GetFullStatusRequest = (function() { + + /** + * Properties of a GetFullStatusRequest. + * @memberof vtadmin + * @interface IGetFullStatusRequest + * @property {string|null} [cluster_id] GetFullStatusRequest cluster_id + * @property {topodata.ITabletAlias|null} [alias] GetFullStatusRequest alias + */ + + /** + * Constructs a new GetFullStatusRequest. + * @memberof vtadmin + * @classdesc Represents a GetFullStatusRequest. + * @implements IGetFullStatusRequest + * @constructor + * @param {vtadmin.IGetFullStatusRequest=} [properties] Properties to set + */ + function GetFullStatusRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFullStatusRequest cluster_id. + * @member {string} cluster_id + * @memberof vtadmin.GetFullStatusRequest + * @instance + */ + GetFullStatusRequest.prototype.cluster_id = ""; + + /** + * GetFullStatusRequest alias. + * @member {topodata.ITabletAlias|null|undefined} alias + * @memberof vtadmin.GetFullStatusRequest + * @instance + */ + GetFullStatusRequest.prototype.alias = null; + + /** + * Creates a new GetFullStatusRequest instance using the specified properties. + * @function create + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {vtadmin.IGetFullStatusRequest=} [properties] Properties to set + * @returns {vtadmin.GetFullStatusRequest} GetFullStatusRequest instance + */ + GetFullStatusRequest.create = function create(properties) { + return new GetFullStatusRequest(properties); + }; + + /** + * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtadmin.GetFullStatusRequest.verify|verify} messages. + * @function encode + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {vtadmin.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFullStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cluster_id != null && Object.hasOwnProperty.call(message, "cluster_id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_id); + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) + $root.topodata.TabletAlias.encode(message.alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtadmin.GetFullStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {vtadmin.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFullStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFullStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtadmin.GetFullStatusRequest} GetFullStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFullStatusRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetFullStatusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cluster_id = reader.string(); + break; + case 2: + message.alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtadmin.GetFullStatusRequest} GetFullStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFullStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFullStatusRequest message. + * @function verify + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFullStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) + if (!$util.isString(message.cluster_id)) + return "cluster_id: string expected"; + if (message.alias != null && message.hasOwnProperty("alias")) { + var error = $root.topodata.TabletAlias.verify(message.alias); + if (error) + return "alias." + error; + } + return null; + }; + + /** + * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {vtadmin.GetFullStatusRequest} GetFullStatusRequest + */ + GetFullStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.GetFullStatusRequest) + return object; + var message = new $root.vtadmin.GetFullStatusRequest(); + if (object.cluster_id != null) + message.cluster_id = String(object.cluster_id); + if (object.alias != null) { + if (typeof object.alias !== "object") + throw TypeError(".vtadmin.GetFullStatusRequest.alias: object expected"); + message.alias = $root.topodata.TabletAlias.fromObject(object.alias); + } + return message; + }; + + /** + * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtadmin.GetFullStatusRequest + * @static + * @param {vtadmin.GetFullStatusRequest} message GetFullStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFullStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cluster_id = ""; + object.alias = null; + } + if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) + object.cluster_id = message.cluster_id; + if (message.alias != null && message.hasOwnProperty("alias")) + object.alias = $root.topodata.TabletAlias.toObject(message.alias, options); + return object; + }; + + /** + * Converts this GetFullStatusRequest to JSON. + * @function toJSON + * @memberof vtadmin.GetFullStatusRequest + * @instance + * @returns {Object.} JSON object + */ + GetFullStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetFullStatusRequest; + })(); + vtadmin.GetGatesRequest = (function() { /** @@ -23093,26 +23407,236 @@ $root.vtadmin = (function() { return TabletExternallyReparentedRequest; })(); - vtadmin.ValidateKeyspaceRequest = (function() { + vtadmin.ValidateRequest = (function() { /** - * Properties of a ValidateKeyspaceRequest. + * Properties of a ValidateRequest. * @memberof vtadmin - * @interface IValidateKeyspaceRequest - * @property {string|null} [cluster_id] ValidateKeyspaceRequest cluster_id - * @property {string|null} [keyspace] ValidateKeyspaceRequest keyspace - * @property {boolean|null} [ping_tablets] ValidateKeyspaceRequest ping_tablets + * @interface IValidateRequest + * @property {string|null} [cluster_id] ValidateRequest cluster_id + * @property {boolean|null} [ping_tablets] ValidateRequest ping_tablets */ /** - * Constructs a new ValidateKeyspaceRequest. + * Constructs a new ValidateRequest. * @memberof vtadmin - * @classdesc Represents a ValidateKeyspaceRequest. - * @implements IValidateKeyspaceRequest + * @classdesc Represents a ValidateRequest. + * @implements IValidateRequest * @constructor - * @param {vtadmin.IValidateKeyspaceRequest=} [properties] Properties to set + * @param {vtadmin.IValidateRequest=} [properties] Properties to set */ - function ValidateKeyspaceRequest(properties) { + function ValidateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidateRequest cluster_id. + * @member {string} cluster_id + * @memberof vtadmin.ValidateRequest + * @instance + */ + ValidateRequest.prototype.cluster_id = ""; + + /** + * ValidateRequest ping_tablets. + * @member {boolean} ping_tablets + * @memberof vtadmin.ValidateRequest + * @instance + */ + ValidateRequest.prototype.ping_tablets = false; + + /** + * Creates a new ValidateRequest instance using the specified properties. + * @function create + * @memberof vtadmin.ValidateRequest + * @static + * @param {vtadmin.IValidateRequest=} [properties] Properties to set + * @returns {vtadmin.ValidateRequest} ValidateRequest instance + */ + ValidateRequest.create = function create(properties) { + return new ValidateRequest(properties); + }; + + /** + * Encodes the specified ValidateRequest message. Does not implicitly {@link vtadmin.ValidateRequest.verify|verify} messages. + * @function encode + * @memberof vtadmin.ValidateRequest + * @static + * @param {vtadmin.IValidateRequest} message ValidateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cluster_id != null && Object.hasOwnProperty.call(message, "cluster_id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_id); + if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ping_tablets); + return writer; + }; + + /** + * Encodes the specified ValidateRequest message, length delimited. Does not implicitly {@link vtadmin.ValidateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtadmin.ValidateRequest + * @static + * @param {vtadmin.IValidateRequest} message ValidateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidateRequest message from the specified reader or buffer. + * @function decode + * @memberof vtadmin.ValidateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtadmin.ValidateRequest} ValidateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.ValidateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cluster_id = reader.string(); + break; + case 2: + message.ping_tablets = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtadmin.ValidateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtadmin.ValidateRequest} ValidateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateRequest message. + * @function verify + * @memberof vtadmin.ValidateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) + if (!$util.isString(message.cluster_id)) + return "cluster_id: string expected"; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + if (typeof message.ping_tablets !== "boolean") + return "ping_tablets: boolean expected"; + return null; + }; + + /** + * Creates a ValidateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtadmin.ValidateRequest + * @static + * @param {Object.} object Plain object + * @returns {vtadmin.ValidateRequest} ValidateRequest + */ + ValidateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.ValidateRequest) + return object; + var message = new $root.vtadmin.ValidateRequest(); + if (object.cluster_id != null) + message.cluster_id = String(object.cluster_id); + if (object.ping_tablets != null) + message.ping_tablets = Boolean(object.ping_tablets); + return message; + }; + + /** + * Creates a plain object from a ValidateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtadmin.ValidateRequest + * @static + * @param {vtadmin.ValidateRequest} message ValidateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cluster_id = ""; + object.ping_tablets = false; + } + if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) + object.cluster_id = message.cluster_id; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + object.ping_tablets = message.ping_tablets; + return object; + }; + + /** + * Converts this ValidateRequest to JSON. + * @function toJSON + * @memberof vtadmin.ValidateRequest + * @instance + * @returns {Object.} JSON object + */ + ValidateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidateRequest; + })(); + + vtadmin.ValidateKeyspaceRequest = (function() { + + /** + * Properties of a ValidateKeyspaceRequest. + * @memberof vtadmin + * @interface IValidateKeyspaceRequest + * @property {string|null} [cluster_id] ValidateKeyspaceRequest cluster_id + * @property {string|null} [keyspace] ValidateKeyspaceRequest keyspace + * @property {boolean|null} [ping_tablets] ValidateKeyspaceRequest ping_tablets + */ + + /** + * Constructs a new ValidateKeyspaceRequest. + * @memberof vtadmin + * @classdesc Represents a ValidateKeyspaceRequest. + * @implements IValidateKeyspaceRequest + * @constructor + * @param {vtadmin.IValidateKeyspaceRequest=} [properties] Properties to set + */ + function ValidateKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23535,6 +24059,260 @@ $root.vtadmin = (function() { return ValidateSchemaKeyspaceRequest; })(); + vtadmin.ValidateShardRequest = (function() { + + /** + * Properties of a ValidateShardRequest. + * @memberof vtadmin + * @interface IValidateShardRequest + * @property {string|null} [cluster_id] ValidateShardRequest cluster_id + * @property {string|null} [keyspace] ValidateShardRequest keyspace + * @property {string|null} [shard] ValidateShardRequest shard + * @property {boolean|null} [ping_tablets] ValidateShardRequest ping_tablets + */ + + /** + * Constructs a new ValidateShardRequest. + * @memberof vtadmin + * @classdesc Represents a ValidateShardRequest. + * @implements IValidateShardRequest + * @constructor + * @param {vtadmin.IValidateShardRequest=} [properties] Properties to set + */ + function ValidateShardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidateShardRequest cluster_id. + * @member {string} cluster_id + * @memberof vtadmin.ValidateShardRequest + * @instance + */ + ValidateShardRequest.prototype.cluster_id = ""; + + /** + * ValidateShardRequest keyspace. + * @member {string} keyspace + * @memberof vtadmin.ValidateShardRequest + * @instance + */ + ValidateShardRequest.prototype.keyspace = ""; + + /** + * ValidateShardRequest shard. + * @member {string} shard + * @memberof vtadmin.ValidateShardRequest + * @instance + */ + ValidateShardRequest.prototype.shard = ""; + + /** + * ValidateShardRequest ping_tablets. + * @member {boolean} ping_tablets + * @memberof vtadmin.ValidateShardRequest + * @instance + */ + ValidateShardRequest.prototype.ping_tablets = false; + + /** + * Creates a new ValidateShardRequest instance using the specified properties. + * @function create + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {vtadmin.IValidateShardRequest=} [properties] Properties to set + * @returns {vtadmin.ValidateShardRequest} ValidateShardRequest instance + */ + ValidateShardRequest.create = function create(properties) { + return new ValidateShardRequest(properties); + }; + + /** + * Encodes the specified ValidateShardRequest message. Does not implicitly {@link vtadmin.ValidateShardRequest.verify|verify} messages. + * @function encode + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {vtadmin.IValidateShardRequest} message ValidateShardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateShardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cluster_id != null && Object.hasOwnProperty.call(message, "cluster_id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_id); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); + if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ping_tablets); + return writer; + }; + + /** + * Encodes the specified ValidateShardRequest message, length delimited. Does not implicitly {@link vtadmin.ValidateShardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {vtadmin.IValidateShardRequest} message ValidateShardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidateShardRequest message from the specified reader or buffer. + * @function decode + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtadmin.ValidateShardRequest} ValidateShardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateShardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.ValidateShardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cluster_id = reader.string(); + break; + case 2: + message.keyspace = reader.string(); + break; + case 3: + message.shard = reader.string(); + break; + case 4: + message.ping_tablets = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidateShardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtadmin.ValidateShardRequest} ValidateShardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateShardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateShardRequest message. + * @function verify + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateShardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) + if (!$util.isString(message.cluster_id)) + return "cluster_id: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + if (typeof message.ping_tablets !== "boolean") + return "ping_tablets: boolean expected"; + return null; + }; + + /** + * Creates a ValidateShardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {Object.} object Plain object + * @returns {vtadmin.ValidateShardRequest} ValidateShardRequest + */ + ValidateShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.ValidateShardRequest) + return object; + var message = new $root.vtadmin.ValidateShardRequest(); + if (object.cluster_id != null) + message.cluster_id = String(object.cluster_id); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.ping_tablets != null) + message.ping_tablets = Boolean(object.ping_tablets); + return message; + }; + + /** + * Creates a plain object from a ValidateShardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtadmin.ValidateShardRequest + * @static + * @param {vtadmin.ValidateShardRequest} message ValidateShardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidateShardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cluster_id = ""; + object.keyspace = ""; + object.shard = ""; + object.ping_tablets = false; + } + if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) + object.cluster_id = message.cluster_id; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + object.ping_tablets = message.ping_tablets; + return object; + }; + + /** + * Converts this ValidateShardRequest to JSON. + * @function toJSON + * @memberof vtadmin.ValidateShardRequest + * @instance + * @returns {Object.} JSON object + */ + ValidateShardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidateShardRequest; + })(); + vtadmin.ValidateVersionKeyspaceRequest = (function() { /** diff --git a/web/vtctld2/app/index.html b/web/vtctld2/app/index.html index 7b89e825df0..08884ffd6be 100644 --- a/web/vtctld2/app/index.html +++ b/web/vtctld2/app/index.html @@ -27,5 +27,5 @@ Loading... - + diff --git a/web/vtctld2/app/inline.js b/web/vtctld2/app/inline.js index 76ae7eb4efa..6893c536150 100644 --- a/web/vtctld2/app/inline.js +++ b/web/vtctld2/app/inline.js @@ -1 +1 @@ -!function(e){function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,o,c){for(var _,a,i,u=0,p=[];u=this.length?i.$EOF:o.StringWrapper.charCodeAt(this.input,this.index)},_Scanner.prototype.scanToken=function(){for(var e=this.input,t=this.length,n=this.peek,r=this.index;n<=i.$SPACE;){if(++r>=t){n=i.$EOF;break}n=o.StringWrapper.charCodeAt(e,r)}if(this.peek=n,this.index=r,r>=t)return null;if(isIdentifierStart(n))return this.scanIdentifier();if(i.isDigit(n))return this.scanNumber(r);var s=r;switch(n){case i.$PERIOD:return this.advance(),i.isDigit(this.peek)?this.scanNumber(s):newCharacterToken(s,i.$PERIOD);case i.$LPAREN:case i.$RPAREN:case i.$LBRACE:case i.$RBRACE:case i.$LBRACKET:case i.$RBRACKET:case i.$COMMA:case i.$COLON:case i.$SEMICOLON:return this.scanCharacter(s,n);case i.$SQ:case i.$DQ:return this.scanString();case i.$HASH:case i.$PLUS:case i.$MINUS:case i.$STAR:case i.$SLASH:case i.$PERCENT:case i.$CARET:return this.scanOperator(s,o.StringWrapper.fromCharCode(n));case i.$QUESTION:return this.scanComplexOperator(s,"?",i.$PERIOD,".");case i.$LT:case i.$GT:return this.scanComplexOperator(s,o.StringWrapper.fromCharCode(n),i.$EQ,"=");case i.$BANG:case i.$EQ:return this.scanComplexOperator(s,o.StringWrapper.fromCharCode(n),i.$EQ,"=",i.$EQ,"=");case i.$AMPERSAND:return this.scanComplexOperator(s,"&",i.$AMPERSAND,"&");case i.$BAR:return this.scanComplexOperator(s,"|",i.$BAR,"|");case i.$NBSP:for(;i.isWhitespace(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+o.StringWrapper.fromCharCode(n)+"]",0)},_Scanner.prototype.scanCharacter=function(e,t){return this.advance(),newCharacterToken(e,t)},_Scanner.prototype.scanOperator=function(e,t){return this.advance(),newOperatorToken(e,t)},_Scanner.prototype.scanComplexOperator=function(e,t,n,r,i,s){this.advance();var a=t;return this.peek==n&&(this.advance(),a+=r),o.isPresent(i)&&this.peek==i&&(this.advance(),a+=s),newOperatorToken(e,a)},_Scanner.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();isIdentifierPart(this.peek);)this.advance();var t=this.input.substring(e,this.index);return a.indexOf(t)>-1?newKeywordToken(e,t):newIdentifierToken(e,t)},_Scanner.prototype.scanNumber=function(e){var t=this.index===e;for(this.advance();;){if(i.isDigit(this.peek));else if(this.peek==i.$PERIOD)t=!1;else{if(!isExponentStart(this.peek))break;if(this.advance(),isExponentSign(this.peek)&&this.advance(),!i.isDigit(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n=this.input.substring(e,this.index),r=t?o.NumberWrapper.parseIntAutoRadix(n):o.NumberWrapper.parseFloat(n);return newNumberToken(e,r)},_Scanner.prototype.scanString=function(){var e=this.index,t=this.peek;this.advance();for(var n,r=this.index,s=this.input;this.peek!=t;)if(this.peek==i.$BACKSLASH){null==n&&(n=new o.StringJoiner),n.add(s.substring(r,this.index)),this.advance();var a;if(this.peek==i.$u){var l=s.substring(this.index+1,this.index+5);try{a=o.NumberWrapper.parseInt(l,16)}catch(c){return this.error("Invalid unicode escape [\\u"+l+"]",0)}for(var u=0;u<5;u++)this.advance()}else a=unescape(this.peek),this.advance();n.add(o.StringWrapper.fromCharCode(a)),r=this.index}else{if(this.peek==i.$EOF)return this.error("Unterminated quote",0);this.advance()}var p=s.substring(r,this.index);this.advance();var d=p;return null!=n&&(n.add(p),d=n.toString()),newStringToken(e,d)},_Scanner.prototype.error=function(e,t){var n=this.index+t;return newErrorToken(n,"Lexer Error: "+e+" at column "+n+" in expression ["+this.input+"]")},_Scanner}();t.isIdentifier=isIdentifier,t.isQuote=isQuote},function(e,t,n){"use strict";function _createInterpolateRegExp(e){var t=o.escapeRegExp(e.start)+"([\\s\\S]*?)"+o.escapeRegExp(e.end);return new RegExp(t,"g")}var r=n(0),i=n(233),o=n(5),s=n(68),a=n(236),l=n(151),c=function(){function SplitInterpolation(e,t){this.strings=e,this.expressions=t}return SplitInterpolation}();t.SplitInterpolation=c;var u=function(){function TemplateBindingParseResult(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}return TemplateBindingParseResult}();t.TemplateBindingParseResult=u;var p=function(){function Parser(e){this._lexer=e,this.errors=[]}return Parser.prototype.parseAction=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG),this._checkNoInterpolation(e,t,n);var r=this._lexer.tokenize(this._stripComments(e)),i=new d(e,t,r,(!0),this.errors).parseChain();return new a.ASTWithSource(i,e,t,this.errors)},Parser.prototype.parseBinding=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG);var r=this._parseBindingAst(e,t,n);return new a.ASTWithSource(r,e,t,this.errors)},Parser.prototype.parseSimpleBinding=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG);var r=this._parseBindingAst(e,t,n);return h.check(r)||this._reportError("Host binding expression can only contain field access and constants",e,t),new a.ASTWithSource(r,e,t,this.errors)},Parser.prototype._reportError=function(e,t,n,r){this.errors.push(new a.ParserError(e,t,n,r))},Parser.prototype._parseBindingAst=function(e,t,n){var r=this._parseQuote(e,t);if(o.isPresent(r))return r;this._checkNoInterpolation(e,t,n);var i=this._lexer.tokenize(this._stripComments(e));return new d(e,t,i,(!1),this.errors).parseChain()},Parser.prototype._parseQuote=function(e,t){if(o.isBlank(e))return null;var n=e.indexOf(":");if(n==-1)return null;var r=e.substring(0,n).trim();if(!l.isIdentifier(r))return null;var i=e.substring(n+1);return new a.Quote(new a.ParseSpan(0,e.length),r,i,t)},Parser.prototype.parseTemplateBindings=function(e,t){var n=this._lexer.tokenize(e);return new d(e,t,n,(!1),this.errors).parseTemplateBindings()},Parser.prototype.parseInterpolation=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG);var r=this.splitInterpolation(e,t,n);if(null==r)return null;for(var i=[],l=0;l0?l.push(p):this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(i,u,n)+" in",t)}return new c(a,l)},Parser.prototype.wrapLiteralPrimitive=function(e,t){return new a.ASTWithSource(new a.LiteralPrimitive(new a.ParseSpan(0,o.isBlank(e)?0:e.length),e),e,t,this.errors)},Parser.prototype._stripComments=function(e){var t=this._commentStart(e);return o.isPresent(t)?e.substring(0,t).trim():e},Parser.prototype._commentStart=function(e){for(var t=null,n=0;n1&&this._reportError("Got interpolation ("+n.start+n.end+") where expression was expected",e,"at column "+this._findInterpolationErrorColumn(i,1,n)+" in",t)},Parser.prototype._findInterpolationErrorColumn=function(e,t,n){for(var r="",i=0;i":case"<=":case">=":this.advance();var n=this.parseAdditive();e=new a.Binary(this.span(e.span.start),t,e,n);continue}break}return e},_ParseAST.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==l.TokenType.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var n=this.parseMultiplicative();e=new a.Binary(this.span(e.span.start),t,e,n);continue}break}return e},_ParseAST.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==l.TokenType.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();e=new a.Binary(this.span(e.span.start),t,e,n);continue}break}return e},_ParseAST.prototype.parsePrefix=function(){if(this.next.type==l.TokenType.Operator){var e=this.inputIndex,t=this.next.strValue,n=void 0;switch(t){case"+":return this.advance(),this.parsePrefix();case"-":return this.advance(),n=this.parsePrefix(),new a.Binary(this.span(e),t,new a.LiteralPrimitive(new a.ParseSpan(e,e),0),n);case"!":return this.advance(),n=this.parsePrefix(),new a.PrefixNot(this.span(e),n)}}return this.parseCallChain()},_ParseAST.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(i.$PERIOD))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(i.$LBRACKET)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(i.$RBRACKET),this.optionalOperator("=")){var n=this.parseConditional();e=new a.KeyedWrite(this.span(e.span.start),e,t,n)}else e=new a.KeyedRead(this.span(e.span.start),e,t)}else{if(!this.optionalCharacter(i.$LPAREN))return e;this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(i.$RPAREN),e=new a.FunctionCall(this.span(e.span.start),e,r)}},_ParseAST.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(i.$LPAREN)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(i.$RPAREN),t}if(this.next.isKeywordNull())return this.advance(),new a.LiteralPrimitive(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new a.LiteralPrimitive(this.span(e),(void 0));if(this.next.isKeywordTrue())return this.advance(),new a.LiteralPrimitive(this.span(e),(!0));if(this.next.isKeywordFalse())return this.advance(),new a.LiteralPrimitive(this.span(e),(!1));if(this.next.isKeywordThis())return this.advance(),new a.ImplicitReceiver(this.span(e));if(this.optionalCharacter(i.$LBRACKET)){this.rbracketsExpected++;var n=this.parseExpressionList(i.$RBRACKET);return this.rbracketsExpected--,this.expectCharacter(i.$RBRACKET),new a.LiteralArray(this.span(e),n)}if(this.next.isCharacter(i.$LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new a.ImplicitReceiver(this.span(e)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new a.LiteralPrimitive(this.span(e),r)}if(this.next.isString()){var o=this.next.toString();return this.advance(),new a.LiteralPrimitive(this.span(e),o)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new a.EmptyExpr(this.span(e))):(this.error("Unexpected token "+this.next),new a.EmptyExpr(this.span(e)))},_ParseAST.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(i.$COMMA));return t},_ParseAST.prototype.parseLiteralMap=function(){var e=[],t=[],n=this.inputIndex;if(this.expectCharacter(i.$LBRACE),!this.optionalCharacter(i.$RBRACE)){this.rbracesExpected++;do{var r=this.expectIdentifierOrKeywordOrString();e.push(r),this.expectCharacter(i.$COLON),t.push(this.parsePipe())}while(this.optionalCharacter(i.$COMMA));this.rbracesExpected--,this.expectCharacter(i.$RBRACE)}return new a.LiteralMap(this.span(n),e,t)},_ParseAST.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var n=e.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(i.$LPAREN)){this.rparensExpected++;var o=this.parseCallArguments();this.expectCharacter(i.$RPAREN),this.rparensExpected--;var s=this.span(n);return t?new a.SafeMethodCall(s,e,r,o):new a.MethodCall(s,e,r,o)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new a.EmptyExpr(this.span(n))):new a.SafePropertyRead(this.span(n),e,r);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new a.EmptyExpr(this.span(n));var l=this.parseConditional();return new a.PropertyWrite(this.span(n),e,r,l)}return new a.PropertyRead(this.span(n),e,r)},_ParseAST.prototype.parseCallArguments=function(){if(this.next.isCharacter(i.$RPAREN))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(i.$COMMA));return e},_ParseAST.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator("-"),t&&(e+="-");while(t);return e.toString()},_ParseAST.prototype.parseTemplateBindings=function(){for(var e=[],t=null,n=[];this.index0&&e[e.length-1]===t}var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(10),o=n(5),s=n(60),a=n(85),l=n(68),c=n(546),u=n(102),p=function(e){function TreeError(t,n,r){e.call(this,n,r),this.elementName=t}return r(TreeError,e),TreeError.create=function(e,t,n){return new TreeError(e,t,n)},TreeError}(s.ParseError);t.TreeError=p;var d=function(){function ParseTreeResult(e,t){this.rootNodes=e,this.errors=t}return ParseTreeResult}();t.ParseTreeResult=d;var h=function(){function Parser(e){this._getTagDefinition=e}return Parser.prototype.parse=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=l.DEFAULT_INTERPOLATION_CONFIG);var i=c.tokenize(e,t,this._getTagDefinition,n,r),o=new f(i.tokens,this._getTagDefinition).build();return new d(o.rootNodes,i.errors.concat(o.errors))},Parser}();t.Parser=h;var f=function(){function _TreeBuilder(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return _TreeBuilder.prototype.build=function(){for(;this._peek.type!==c.TokenType.EOF;)this._peek.type===c.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===c.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===c.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===c.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===c.TokenType.TEXT||this._peek.type===c.TokenType.RAW_TEXT||this._peek.type===c.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===c.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new d(this._rootNodes,this._errors)},_TreeBuilder.prototype._advance=function(){var e=this._peek;return this._index0)return this._errors=this._errors.concat(i.errors),null;var l=new s.ParseSourceSpan(e.sourceSpan.start,r.sourceSpan.end),u=new s.ParseSourceSpan(t.sourceSpan.start,r.sourceSpan.end);return new a.ExpansionCase(e.parts[0],i.rootNodes,l,e.sourceSpan,u)},_TreeBuilder.prototype._collectExpansionExpTokens=function(e){for(var t=[],n=[c.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==c.TokenType.EXPANSION_FORM_START&&this._peek.type!==c.TokenType.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===c.TokenType.EXPANSION_CASE_EXP_END){if(!lastOnStack(n,c.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(p.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===c.TokenType.EXPANSION_FORM_END){if(!lastOnStack(n,c.TokenType.EXPANSION_FORM_START))return this._errors.push(p.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===c.TokenType.EOF)return this._errors.push(p.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},_TreeBuilder.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();o.isPresent(n)&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new a.Text(t,e.sourceSpan))},_TreeBuilder.prototype._closeVoidElement=function(){if(this._elementStack.length>0){var e=i.ListWrapper.last(this._elementStack);this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},_TreeBuilder.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this._peek.type===c.TokenType.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,n,this._getParentElement()),o=!1;if(this._peek.type===c.TokenType.TAG_OPEN_END_VOID){this._advance(),o=!0;var l=this.getTagDefinition(i);l.canSelfClose||null!==u.getNsPrefix(i)||l.isVoid||this._errors.push(p.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===c.TokenType.TAG_OPEN_END&&(this._advance(),o=!1);var d=this._peek.sourceSpan.start,h=new s.ParseSourceSpan(e.sourceSpan.start,d),f=new a.Element(i,r,[],h,h,null);this._pushElement(f),o&&(this._popElement(i),f.endSourceSpan=h)},_TreeBuilder.prototype._pushElement=function(e){if(this._elementStack.length>0){var t=i.ListWrapper.last(this._elementStack);this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop()}var n=this.getTagDefinition(e.name),r=this._getParentElementSkippingContainers(),s=r.parent,l=r.container;if(o.isPresent(s)&&n.requireExtraParent(s.name)){var c=new a.Element(n.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(s,l,c)}this._addToParent(e),this._elementStack.push(e)},_TreeBuilder.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(p.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(p.create(t,e.sourceSpan,'Unexpected closing tag "'+e.parts[1]+'"'))},_TreeBuilder.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(n.name==e)return i.ListWrapper.splice(this._elementStack,t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},_TreeBuilder.prototype._consumeAttr=function(e){var t=u.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="";if(this._peek.type===c.TokenType.ATTR_VALUE){var i=this._advance();r=i.parts[0],n=i.sourceSpan.end}return new a.Attribute(t,r,new s.ParseSourceSpan(e.sourceSpan.start,n))},_TreeBuilder.prototype._getParentElement=function(){return this._elementStack.length>0?i.ListWrapper.last(this._elementStack):null},_TreeBuilder.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if("ng-container"!==this._elementStack[t].name)return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:i.ListWrapper.last(this._elementStack),container:e}},_TreeBuilder.prototype._addToParent=function(e){var t=this._getParentElement();o.isPresent(t)?t.children.push(e):this._rootNodes.push(e)},_TreeBuilder.prototype._insertBeforeContainer=function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)},_TreeBuilder.prototype._getElementFullName=function(e,t,n){return o.isBlank(e)&&(e=this.getTagDefinition(t).implicitNamespacePrefix,o.isBlank(e)&&o.isPresent(n)&&(e=u.getNsPrefix(n.name))),u.mergeNsAndName(e,t)},_TreeBuilder}()},function(e,t,n){"use strict";function splitClasses(e){return e.trim().split(/\s+/g)}function createElementCssSelector(e,t){var n=new w.CssSelector,r=y.splitNsName(e)[1];n.setElement(r);for(var i=0;i0&&this._console.warn("Template parse warnings:\n"+a.join("\n")),l.length>0){var c=l.join("\n");throw new u.BaseException("Template parse errors:\n"+c)}return s.templateAst},TemplateParser.prototype.tryParse=function(e,t,n,r,i,o){var a;e.template&&(a=g.InterpolationConfig.fromArray(e.template.interpolation));var l,c=this._htmlParser.parse(t,o,!0,a),u=c.errors;if(0==u.length){var d=m.expandNodes(c.rootNodes);u.push.apply(u,d.errors),c=new f.ParseTreeResult(d.nodes,u)}if(c.rootNodes.length>0){var y=s.removeIdentifierDuplicates(n),v=s.removeIdentifierDuplicates(r),_=new b.ProviderViewContext(e,c.rootNodes[0].sourceSpan),w=new j(_,y,v,i,this._exprParser,this._schemaRegistry);l=h.visitAll(w,c.rootNodes,z),u.push.apply(u,w.errors.concat(_.errors))}else l=[];return this._assertNoReferenceDuplicationOnTemplate(l,u),u.length>0?new L(l,u):(p.isPresent(this.transforms)&&this.transforms.forEach(function(e){l=E.templateVisitAll(e,l)}),new L(l,u))},TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var n=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var r=e.name;if(n.indexOf(r)<0)n.push(r);else{var i=new V('Reference "#'+r+'" is defined several times',e.sourceSpan,v.ParseErrorLevel.FATAL);t.push(i)}})})},TemplateParser.decorators=[{type:i.Injectable}],TemplateParser.ctorParameters=[{type:l.Parser},{type:_.ElementSchemaRegistry},{type:f.HtmlParser},{type:o.Console},{type:Array,decorators:[{type:i.Optional},{type:i.Inject,args:[t.TEMPLATE_TRANSFORMS]}]}],TemplateParser}();t.TemplateParser=F;var j=function(){function TemplateParseVisitor(e,t,n,r,i,o){var s=this;this.providerViewContext=e,this._schemas=r,this._exprParser=i,this._schemaRegistry=o,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new w.SelectorMatcher;var a=e.component.template;p.isPresent(a)&&p.isPresent(a.interpolation)&&(this._interpolationConfig={start:a.interpolation[0],end:a.interpolation[1]}),c.ListWrapper.forEachWithIndex(t,function(e,t){var n=w.CssSelector.parse(e.selector);s.selectorMatcher.addSelectables(n,e),s.directivesIndex.set(e,t)}),this.pipesByName=new Map,n.forEach(function(e){return s.pipesByName.set(e.name,e)})}return TemplateParseVisitor.prototype._reportError=function(e,t,n){void 0===n&&(n=v.ParseErrorLevel.FATAL),this.errors.push(new V(e,t,n))},TemplateParseVisitor.prototype._reportParserErors=function(e,t){for(var n=0,r=e;no.MAX_INTERPOLATION_VALUES)throw new u.BaseException("Only support at most "+o.MAX_INTERPOLATION_VALUES+" interpolation values!");return r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},TemplateParseVisitor.prototype._parseAction=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseAction(e,n,this._interpolationConfig);return r&&this._reportParserErors(r.errors,t),!r||r.ast instanceof a.EmptyExpr?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n)):(this._checkPipes(r,t),r)}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},TemplateParseVisitor.prototype._parseBinding=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseBinding(e,n,this._interpolationConfig);return r&&this._reportParserErors(r.errors,t),this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},TemplateParseVisitor.prototype._parseTemplateBindings=function(e,t){var n=this,r=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,r);return this._reportParserErors(i.errors,t),i.templateBindings.forEach(function(e){p.isPresent(e.expression)&&n._checkPipes(e.expression,t)}),i.warnings.forEach(function(e){n._reportError(e,t,v.ParseErrorLevel.WARNING)}),i.templateBindings}catch(o){return this._reportError(""+o,t),[]}},TemplateParseVisitor.prototype._checkPipes=function(e,t){var n=this;if(p.isPresent(e)){var r=new q;e.visit(r),r.pipes.forEach(function(e){n.pipesByName.has(e)||n._reportError("The pipe '"+e+"' could not be found",t)})}},TemplateParseVisitor.prototype.visitExpansion=function(e,t){return null},TemplateParseVisitor.prototype.visitExpansionCase=function(e,t){return null},TemplateParseVisitor.prototype.visitText=function(e,t){var n=t.findNgContentIndex(N),r=this._parseInterpolation(e.value,e.sourceSpan);return p.isPresent(r)?new E.BoundTextAst(r,n,e.sourceSpan):new E.TextAst(e.value,n,e.sourceSpan)},TemplateParseVisitor.prototype.visitAttribute=function(e,t){return new E.AttrAst(e.name,e.value,e.sourceSpan)},TemplateParseVisitor.prototype.visitComment=function(e,t){return null},TemplateParseVisitor.prototype.visitElement=function(e,t){var n=this,r=e.name,i=R.preparseElement(e);if(i.type===R.PreparsedElementType.SCRIPT||i.type===R.PreparsedElementType.STYLE)return null;if(i.type===R.PreparsedElementType.STYLESHEET&&S.isStyleUrlResolvable(i.hrefAttr))return null;var o=[],s=[],a=[],l=[],c=[],u=[],d=[],f=[],m=[],g=!1,v=[],_=y.splitNsName(r.toLowerCase())[1],C=_==T;e.attrs.forEach(function(e){var t=n._parseAttr(C,e,o,s,c,u,a,l),r=n._parseInlineTemplateBinding(e,f,d,m);r&&g&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute named 'template' or prefixed with *",e.sourceSpan),t||r||(v.push(n.visitAttribute(e,null)),o.push([e.name,e.value])),r&&(g=!0)});var P=createElementCssSelector(r,o),x=this._parseDirectives(this.selectorMatcher,P),M=[],k=this._createDirectiveAsts(C,e.name,x,s,a,e.sourceSpan,M),I=this._createElementPropertyAsts(e.name,s,k).concat(c),A=t.isTemplateElement||g,O=new b.ProviderElementContext(this.providerViewContext,t.providerContext,A,k,v,M,e.sourceSpan),D=h.visitAll(i.nonBindable?G:this,e.children,U.create(C,k,C?t.providerContext:O));O.afterElement();var N,V=p.isPresent(i.projectAs)?w.CssSelector.parse(i.projectAs)[0]:P,L=t.findNgContentIndex(V);if(i.type===R.PreparsedElementType.NG_CONTENT)p.isPresent(e.children)&&e.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",e.sourceSpan),N=new E.NgContentAst((this.ngContentCount++),g?null:L,e.sourceSpan);else if(C)this._assertAllEventsPublishedByDirectives(k,u),this._assertNoComponentsNorElementBindingsOnTemplate(k,I,e.sourceSpan),N=new E.EmbeddedTemplateAst(v,u,M,l,O.transformedDirectiveAsts,O.transformProviders,O.transformedHasViewContainer,D,g?null:L,e.sourceSpan);else{this._assertOnlyOneComponent(k,e.sourceSpan);var F=g?null:t.findNgContentIndex(V);N=new E.ElementAst(r,v,I,u,M,O.transformedDirectiveAsts,O.transformProviders,O.transformedHasViewContainer,D,g?null:F,e.sourceSpan)}if(g){var j=createElementCssSelector(T,f),B=this._parseDirectives(this.selectorMatcher,j),W=this._createDirectiveAsts(!0,e.name,B,d,[],e.sourceSpan,[]),H=this._createElementPropertyAsts(e.name,d,W);this._assertNoComponentsNorElementBindingsOnTemplate(W,H,e.sourceSpan);var z=new b.ProviderElementContext(this.providerViewContext,t.providerContext,t.isTemplateElement,W,[],[],e.sourceSpan);z.afterElement(),N=new E.EmbeddedTemplateAst([],[],[],m,z.transformedDirectiveAsts,z.transformProviders,z.transformedHasViewContainer,[N],L,e.sourceSpan)}return N},TemplateParseVisitor.prototype._parseInlineTemplateBinding=function(e,t,n,r){var i=null;if(this._normalizeAttributeName(e.name)==x)i=e.value;else if(e.name.startsWith(M)){var o=e.name.substring(M.length);i=0==e.value.length?o:o+" "+e.value}if(p.isPresent(i)){for(var s=this._parseTemplateBindings(i,e.sourceSpan),a=0;a elements is deprecated. Use "let-" instead!',t.sourceSpan,v.ParseErrorLevel.WARNING),this._parseVariable(h,c,t.sourceSpan,a)):(this._reportError('"var-" on non