From 0f4b544c45cda2b9c60952ce022774b67a89387e Mon Sep 17 00:00:00 2001 From: vitess-bot <139342327+vitess-bot@users.noreply.github.com> Date: Mon, 1 Jul 2024 06:30:48 -0600 Subject: [PATCH 01/55] Upgrade the Golang Dependencies (#16302) Signed-off-by: GitHub Co-authored-by: frouioui --- go.mod | 25 +++++++++++++------------ go.sum | 58 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/go.mod b/go.mod index a7516c65ee0..f888a9a53d8 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/HdrHistogram/hdrhistogram-go v0.9.0 // indirect github.com/aquarapid/vaultlib v0.5.1 github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.54.2 + github.com/aws/aws-sdk-go v1.54.11 github.com/buger/jsonparser v1.1.1 github.com/cespare/xxhash/v2 v2.3.0 github.com/corpix/uarand v0.1.1 // indirect @@ -50,7 +50,7 @@ require ( github.com/planetscale/pargzip v0.0.0-20201116224723-90c7fc03ea8a github.com/planetscale/vtprotobuf v0.5.0 github.com/prometheus/client_golang v1.19.1 - github.com/prometheus/common v0.54.0 + github.com/prometheus/common v0.55.0 github.com/sjmudd/stopwatch v0.1.1 github.com/soheilhy/cmux v0.1.5 github.com/spf13/cobra v1.8.1 @@ -77,13 +77,13 @@ require ( golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 golang.org/x/tools v0.22.0 - google.golang.org/api v0.184.0 - google.golang.org/genproto v0.0.0-20240610135401-a8a62080eff3 // indirect + google.golang.org/api v0.186.0 + google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b google.golang.org/protobuf v1.34.2 - gopkg.in/DataDog/dd-trace-go.v1 v1.65.0 + gopkg.in/DataDog/dd-trace-go.v1 v1.65.1 gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/ldap.v2 v2.5.1 sigs.k8s.io/yaml v1.4.0 @@ -112,17 +112,17 @@ require ( require ( cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.5.1 // indirect + cloud.google.com/go/auth v0.6.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/iam v1.1.8 // indirect + cloud.google.com/go/iam v1.1.9 // indirect github.com/DataDog/appsec-internal-go v1.6.0 // indirect github.com/DataDog/datadog-agent/pkg/obfuscate v0.54.0 // indirect github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0 // indirect github.com/DataDog/go-libddwaf/v3 v3.2.1 // indirect github.com/DataDog/go-sqllexer v0.0.12 // indirect github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect - github.com/DataDog/sketches-go v1.4.5 // indirect + github.com/DataDog/sketches-go v1.4.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/coreos/go-semver v0.3.1 // indirect @@ -139,7 +139,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.4 // indirect + github.com/googleapis/gax-go/v2 v2.12.5 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect @@ -154,6 +154,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/gomega v1.23.0 // indirect @@ -184,13 +185,13 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect - modernc.org/libc v1.53.3 // indirect + modernc.org/libc v1.54.0 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.8.0 // indirect modernc.org/strutil v1.2.0 // indirect diff --git a/go.sum b/go.sum index eae93980f46..40ffbbd0854 100644 --- a/go.sum +++ b/go.sum @@ -2,14 +2,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/auth v0.5.1 h1:0QNO7VThG54LUzKiQxv8C6x1YX7lUrzlAa1nVLF8CIw= -cloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s= +cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= +cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/iam v1.1.8 h1:r7umDwhj+BQyz0ScZMp4QrGXjSTI3ZINnpgU2nlB/K0= -cloud.google.com/go/iam v1.1.8/go.mod h1:GvE6lyMmfxXauzNq8NbgJbeVQNspG+tcdL/W8QO1+zE= +cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= +cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= cloud.google.com/go/longrunning v0.5.7 h1:WLbHekDbjK1fVFD3ibpFFVoyizlLRl73I7YKuAKilhU= cloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng= cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= @@ -49,8 +49,8 @@ github.com/DataDog/go-tuf v1.1.0-0.5.2 h1:4CagiIekonLSfL8GMHRHcHudo1fQnxELS9g4ti github.com/DataDog/go-tuf v1.1.0-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gostackparse v0.7.0 h1:i7dLkXHvYzHV308hnkvVGDL3BR4FWl7IsXNPz/IGQh4= github.com/DataDog/gostackparse v0.7.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZMfWR0aitKFMM= -github.com/DataDog/sketches-go v1.4.5 h1:ki7VfeNz7IcNafq7yI/j5U/YCkO3LJiMDtXz9OMQbyE= -github.com/DataDog/sketches-go v1.4.5/go.mod h1:7Y8GN8Jf66DLyDhc94zuWA3uHEt/7ttt8jHOBWWrSOg= +github.com/DataDog/sketches-go v1.4.6 h1:acd5fb+QdUzGrosfNLwrIhqyrbMORpvBy7mE+vHlT3I= +github.com/DataDog/sketches-go v1.4.6/go.mod h1:7Y8GN8Jf66DLyDhc94zuWA3uHEt/7ttt8jHOBWWrSOg= github.com/HdrHistogram/hdrhistogram-go v0.9.0 h1:dpujRju0R4M/QZzcnR1LH1qm+TVG3UzkWdp5tH1WMcg= github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic= @@ -73,8 +73,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.54.2 h1:Wo6AVWcleNHrYa48YzfYz60hzxGRqsJrK5s/qePe+3I= -github.com/aws/aws-sdk-go v1.54.2/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.54.11 h1:Zxuv/R+IVS0B66yz4uezhxH9FN9/G2nbxejYqAMFjxk= +github.com/aws/aws-sdk-go v1.54.11/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -218,8 +218,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= -github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= +github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= +github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -357,6 +357,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= @@ -423,8 +425,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -690,8 +692,8 @@ golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSm golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -google.golang.org/api v0.184.0 h1:dmEdk6ZkJNXy1JcDhn/ou0ZUq7n9zropG2/tR4z+RDg= -google.golang.org/api v0.184.0/go.mod h1:CeDTtUEiYENAf8PPG5VZW2yNp2VM3VWbCeTioAZBTBA= +google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= +google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -699,12 +701,12 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20240610135401-a8a62080eff3 h1:8RTI1cmuvdY9J7q/jpJWEj5UfgWjhV5MCoXaYmwLBYQ= -google.golang.org/genproto v0.0.0-20240610135401-a8a62080eff3/go.mod h1:qb66gsewNb7Ghv1enkhJiRfYGWUklv3n6G8UvprOhzA= -google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 h1:QW9+G6Fir4VcRXVH8x3LilNAb6cxBGLa6+GM4hRwexE= -google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3/go.mod h1:kdrSS/OiLkPrNUpzD4aHgCq2rVuC/YRxok32HXZ4vRE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 h1:9Xyg6I9IWQZhRVfCWjKK+l6kI0jHcPesVlMnT//aHNo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d h1:PksQg4dV6Sem3/HkBX+Ltq8T0ke0PKIRBNBatoDTVls= +google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:s7iA721uChleev562UJO2OYB0PPT9CMFjV+Ce7VJH5M= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -733,8 +735,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/DataDog/dd-trace-go.v1 v1.65.0 h1:mMix4feEsbn2/wONR8e68JLob2QSdpiAMINhpG/8s7k= -gopkg.in/DataDog/dd-trace-go.v1 v1.65.0/go.mod h1:beNFIWd/H04d0k96cfltgiDH2+t0T5sDbyYLF3VTXqk= +gopkg.in/DataDog/dd-trace-go.v1 v1.65.1 h1:Ne7kzWr/br/jwhUJR7CnqPl/mUpNxa6LfgZs0S4htZM= +gopkg.in/DataDog/dd-trace-go.v1 v1.65.1/go.mod h1:beNFIWd/H04d0k96cfltgiDH2+t0T5sDbyYLF3VTXqk= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= @@ -767,18 +769,18 @@ honnef.co/go/gotraceui v0.2.0 h1:dmNsfQ9Vl3GwbiVD7Z8d/osC6WtGGrasyrC2suc4ZIQ= honnef.co/go/gotraceui v0.2.0/go.mod h1:qHo4/W75cA3bX0QQoSvDjbJa4R8mAyyFjbWAj63XElc= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -modernc.org/cc/v4 v4.21.3 h1:2mhBdWKtivdFlLR1ecKXTljPG1mfvbByX7QKztAIJl8= -modernc.org/cc/v4 v4.21.3/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= -modernc.org/ccgo/v4 v4.18.1 h1:1zF5kPBFq/ZVTulBOKgQPQITdOzzyBUfC51gVYP62E4= -modernc.org/ccgo/v4 v4.18.1/go.mod h1:ao1fAxf9a2KEOL15WY8+yP3wnpaOpP/QuyFOZ9HJolM= +modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ= +modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= +modernc.org/ccgo/v4 v4.19.0 h1:f9K5VdC0nVhHKTFMvhjtZ8TbRgFQbASvE5yO1zs8eC0= +modernc.org/ccgo/v4 v4.19.0/go.mod h1:CfpAl+673iXNwMG/aqcQn+vDcu4Es/YLya7+9RHjTa4= modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b h1:BnN1t+pb1cy61zbvSUV7SeI0PwosMhlAEi/vBY4qxp8= modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= -modernc.org/libc v1.53.3 h1:9O0aSLZuHPgp49we24NoFFteRgXNLGBAQ3TODrW3XLg= -modernc.org/libc v1.53.3/go.mod h1:kb+Erju4FfHNE59xd2fNpv5CBeAeej6fHbx8p8xaiyI= +modernc.org/libc v1.54.0 h1:lVBLfdyE5lDuDkxLbR/4JDvonpV6NZ60Vbgls5N5vGc= +modernc.org/libc v1.54.0/go.mod h1:B0D6klDmSmnq26T1iocn9kzyX6NtbzjuI3+oX/xfvng= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= From 2c468b29a256935de11149ad476c412267c05eb8 Mon Sep 17 00:00:00 2001 From: Max Englander Date: Mon, 1 Jul 2024 13:27:09 -0400 Subject: [PATCH 02/55] add support for vtgate traffic mirroring (#15945) Signed-off-by: Max Englander Signed-off-by: Max Englander Co-authored-by: Deepthi Sigireddi --- changelog/21.0/21.0.0/summary.md | 12 + go/cmd/vtcombo/cli/main.go | 5 + go/cmd/vtctldclient/command/mirror_rules.go | 58 + .../vreplication/common/mirrortraffic.go | 89 + .../command/vreplication/common/utils.go | 6 + .../vreplication/movetables/movetables.go | 6 + go/flags/endtoend/vtctldclient.txt | 1 + .../movetables_mirrortraffic_test.go | 114 ++ .../resharding_workflows_v2_test.go | 4 + .../vreplication/vreplication_test_env.go | 2 + .../vreplication_vtctldclient_cli_test.go | 43 + .../endtoend/vreplication/wrappers_test.go | 23 + go/vt/proto/vschema/vschema.pb.go | 274 ++- go/vt/proto/vschema/vschema_vtproto.pb.go | 442 +++++ go/vt/proto/vtctldata/vtctldata.pb.go | 1049 +++++++----- go/vt/proto/vtctldata/vtctldata_vtproto.pb.go | 837 +++++++++ go/vt/proto/vtctlservice/vtctlservice.pb.go | 498 +++--- .../vtctlservice/vtctlservice_grpc.pb.go | 74 + go/vt/proto/vttest/vttest.pb.go | 34 +- go/vt/proto/vttest/vttest_vtproto.pb.go | 51 + go/vt/topo/server.go | 1 + go/vt/topo/srv_vschema.go | 6 + go/vt/topo/topotests/srv_vschema_test.go | 5 + go/vt/topo/vschema.go | 36 + go/vt/topotools/mirror_rules.go | 72 + go/vt/topotools/mirror_rules_test.go | 79 + go/vt/vtcombo/tablet_map.go | 17 + go/vt/vtctl/grpcvtctldclient/client_gen.go | 18 + go/vt/vtctl/grpcvtctldserver/server.go | 48 +- go/vt/vtctl/grpcvtctldserver/server_test.go | 3 + go/vt/vtctl/localvtctldclient/client_gen.go | 10 + go/vt/vtctl/workflow/materializer_env_test.go | 177 +- go/vt/vtctl/workflow/server.go | 113 +- go/vt/vtctl/workflow/server_test.go | 422 +++++ go/vt/vtctl/workflow/state.go | 1 + go/vt/vtctl/workflow/switcher.go | 4 + go/vt/vtctl/workflow/switcher_dry_run.go | 11 + go/vt/vtctl/workflow/switcher_interface.go | 1 + go/vt/vtctl/workflow/traffic_switcher.go | 49 +- proto/vschema.proto | 15 + proto/vtctldata.proto | 20 + proto/vtctlservice.proto | 3 + proto/vttest.proto | 3 + web/vtadmin/src/proto/vtadmin.d.ts | 624 +++++++ web/vtadmin/src/proto/vtadmin.js | 1497 +++++++++++++++++ 45 files changed, 6106 insertions(+), 751 deletions(-) create mode 100644 go/cmd/vtctldclient/command/mirror_rules.go create mode 100644 go/cmd/vtctldclient/command/vreplication/common/mirrortraffic.go create mode 100644 go/test/endtoend/vreplication/movetables_mirrortraffic_test.go create mode 100644 go/vt/topotools/mirror_rules.go create mode 100644 go/vt/topotools/mirror_rules_test.go diff --git a/changelog/21.0/21.0.0/summary.md b/changelog/21.0/21.0.0/summary.md index 7946293f506..49c8b41d45f 100644 --- a/changelog/21.0/21.0.0/summary.md +++ b/changelog/21.0/21.0.0/summary.md @@ -8,6 +8,7 @@ - [Deletion of deprecated metrics](#metric-deletion) - [VTTablet Flags](#vttablet-flags) - **[Breaking changes](#breaking-changes)** + - **[Traffic Mirroring](#traffic-mirroring)** ## Major Changes @@ -38,3 +39,14 @@ The following metrics that were deprecated in the previous release, have now bee - `queryserver-enable-settings-pool` flag, added in v15, has been on by default since v17. It is now deprecated and will be removed in a future release. +### Traffic Mirroring + +Traffic mirroring is intended to help reduce some of the uncertainty inherent to `MoveTables SwitchTraffic`. When traffic mirroring is enabled, VTGate will mirror a percentage of traffic from one keyspace to another. + +Mirror rules may be enabled through `vtctldclient` with `MoveTables MirrorTraffic`. For example: + +```bash +$ vtctldclient --server :15999 MoveTables --target-keyspace customer --workflow commerce2customer MirrorTraffic --percent 5.0 +``` + +Mirror rules can be inspected with `GetMirrorRules`. diff --git a/go/cmd/vtcombo/cli/main.go b/go/cmd/vtcombo/cli/main.go index 189441594bb..5f27e581a24 100644 --- a/go/cmd/vtcombo/cli/main.go +++ b/go/cmd/vtcombo/cli/main.go @@ -206,6 +206,11 @@ func run(cmd *cobra.Command, args []string) (err error) { return fmt.Errorf("Failed to load routing rules: %w", err) } + // attempt to load any mirror rules specified by tpb + if err := vtcombo.InitMirrorRules(context.Background(), ts, tpb.GetMirrorRules()); err != nil { + return fmt.Errorf("Failed to load mirror rules: %w", err) + } + servenv.Init() tabletenv.Init() diff --git a/go/cmd/vtctldclient/command/mirror_rules.go b/go/cmd/vtctldclient/command/mirror_rules.go new file mode 100644 index 00000000000..d143546b1a8 --- /dev/null +++ b/go/cmd/vtctldclient/command/mirror_rules.go @@ -0,0 +1,58 @@ +/* +Copyright 2024 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 command + +import ( + "fmt" + + "github.com/spf13/cobra" + + "vitess.io/vitess/go/cmd/vtctldclient/cli" + + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" +) + +// GetMirrorRules makes a GetMirrorRules gRPC call to a vtctld. +var GetMirrorRules = &cobra.Command{ + Use: "GetMirrorRules", + Short: "Displays the VSchema mirror rules.", + DisableFlagsInUseLine: true, + Args: cobra.NoArgs, + RunE: commandGetMirrorRules, +} + +func commandGetMirrorRules(cmd *cobra.Command, args []string) error { + cli.FinishedParsing(cmd) + + resp, err := client.GetMirrorRules(commandCtx, &vtctldatapb.GetMirrorRulesRequest{}) + if err != nil { + return err + } + + data, err := cli.MarshalJSON(resp.MirrorRules) + if err != nil { + return err + } + + fmt.Printf("%s\n", data) + + return nil +} + +func init() { + Root.AddCommand(GetMirrorRules) +} diff --git a/go/cmd/vtctldclient/command/vreplication/common/mirrortraffic.go b/go/cmd/vtctldclient/command/vreplication/common/mirrortraffic.go new file mode 100644 index 00000000000..68f0cfbc68c --- /dev/null +++ b/go/cmd/vtctldclient/command/vreplication/common/mirrortraffic.go @@ -0,0 +1,89 @@ +/* +Copyright 2024 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 common + +import ( + "bytes" + "fmt" + + "github.com/spf13/cobra" + + "vitess.io/vitess/go/cmd/vtctldclient/cli" + + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" +) + +func GetMirrorTrafficCommand(opts *SubCommandsOpts) *cobra.Command { + cmd := &cobra.Command{ + Use: "mirrortraffic", + Short: fmt.Sprintf("Mirror traffic for a %s MoveTables workflow.", opts.SubCommand), + Example: fmt.Sprintf(`vtctldclient --server localhost:15999 %s --workflow %s --target-keyspace customer mirrortraffic --percent 5.0`, opts.SubCommand, opts.Workflow), + DisableFlagsInUseLine: true, + Aliases: []string{"MirrorTraffic"}, + Args: cobra.NoArgs, + PreRun: func(cmd *cobra.Command, args []string) { + if !cmd.Flags().Lookup("tablet-types").Changed { + // We mirror traffic for all tablet types if none are provided. + MirrorTrafficOptions.TabletTypes = []topodatapb.TabletType{ + topodatapb.TabletType_PRIMARY, + topodatapb.TabletType_REPLICA, + topodatapb.TabletType_RDONLY, + } + } + }, + RunE: commandMirrorTraffic, + } + return cmd +} + +func commandMirrorTraffic(cmd *cobra.Command, args []string) error { + format, err := GetOutputFormat(cmd) + if err != nil { + return err + } + + cli.FinishedParsing(cmd) + + req := &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: BaseOptions.TargetKeyspace, + Workflow: BaseOptions.Workflow, + TabletTypes: MirrorTrafficOptions.TabletTypes, + Percent: MirrorTrafficOptions.Percent, + } + resp, err := GetClient().WorkflowMirrorTraffic(GetCommandCtx(), req) + if err != nil { + return err + } + + var output []byte + if format == "json" { + output, err = cli.MarshalJSONPretty(resp) + if err != nil { + return err + } + } else { + tout := bytes.Buffer{} + tout.WriteString(resp.Summary + "\n\n") + tout.WriteString(fmt.Sprintf("Start State: %s\n", resp.StartState)) + tout.WriteString(fmt.Sprintf("Current State: %s\n", resp.CurrentState)) + output = tout.Bytes() + } + fmt.Printf("%s\n", output) + + return nil +} diff --git a/go/cmd/vtctldclient/command/vreplication/common/utils.go b/go/cmd/vtctldclient/command/vreplication/common/utils.go index a742f31a9ff..cb408add490 100644 --- a/go/cmd/vtctldclient/command/vreplication/common/utils.go +++ b/go/cmd/vtctldclient/command/vreplication/common/utils.go @@ -224,6 +224,12 @@ func AddCommonCreateFlags(cmd *cobra.Command) { cmd.Flags().BoolVar(&CreateOptions.StopAfterCopy, "stop-after-copy", false, "Stop the workflow after it's finished copying the existing rows and before it starts replicating changes.") } +var MirrorTrafficOptions = struct { + DryRun bool + Percent float32 + TabletTypes []topodatapb.TabletType +}{} + var SwitchTrafficOptions = struct { Cells []string TabletTypes []topodatapb.TabletType diff --git a/go/cmd/vtctldclient/command/vreplication/movetables/movetables.go b/go/cmd/vtctldclient/command/vreplication/movetables/movetables.go index d729230e7a7..4d8f9eaf3f0 100644 --- a/go/cmd/vtctldclient/command/vreplication/movetables/movetables.go +++ b/go/cmd/vtctldclient/command/vreplication/movetables/movetables.go @@ -20,6 +20,7 @@ import ( "github.com/spf13/cobra" "vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common" + "vitess.io/vitess/go/vt/topo/topoproto" ) var ( @@ -67,6 +68,11 @@ func registerCommands(root *cobra.Command) { base.AddCommand(common.GetStartCommand(opts)) base.AddCommand(common.GetStopCommand(opts)) + mirrorTrafficCommand := common.GetMirrorTrafficCommand(opts) + mirrorTrafficCommand.Flags().Var((*topoproto.TabletTypeListFlag)(&common.MirrorTrafficOptions.TabletTypes), "tablet-types", "Tablet types to mirror traffic for.") + mirrorTrafficCommand.Flags().Float32Var(&common.MirrorTrafficOptions.Percent, "percent", 1.0, "Percentage of traffic to mirror.") + base.AddCommand(mirrorTrafficCommand) + switchTrafficCommand := common.GetSwitchTrafficCommand(opts) common.AddCommonSwitchTrafficFlags(switchTrafficCommand, true) common.AddShardSubsetFlag(switchTrafficCommand, &common.SwitchTrafficOptions.Shards) diff --git a/go/flags/endtoend/vtctldclient.txt b/go/flags/endtoend/vtctldclient.txt index 393b9ada10d..45dcae2704a 100644 --- a/go/flags/endtoend/vtctldclient.txt +++ b/go/flags/endtoend/vtctldclient.txt @@ -42,6 +42,7 @@ Available Commands: GetKeyspace Returns information about the given keyspace from the topology. GetKeyspaceRoutingRules Displays the currently active keyspace routing rules. GetKeyspaces Returns information about every keyspace in the topology. + GetMirrorRules Displays the VSchema mirror rules. GetPermissions Displays the permissions for a tablet. GetRoutingRules Displays the VSchema routing rules. GetSchema Displays the full schema for a tablet, optionally restricted to the specified tables/views. diff --git a/go/test/endtoend/vreplication/movetables_mirrortraffic_test.go b/go/test/endtoend/vreplication/movetables_mirrortraffic_test.go new file mode 100644 index 00000000000..54e648de6b4 --- /dev/null +++ b/go/test/endtoend/vreplication/movetables_mirrortraffic_test.go @@ -0,0 +1,114 @@ +/* +Copyright 2024 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 vreplication + +import ( + "testing" + + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" +) + +func testMoveTablesMirrorTraffic(t *testing.T, flavor workflowFlavor) { + setSidecarDBName("_vt") + vc = setupMinimalCluster(t) + defer vc.TearDown() + + sourceKeyspace := "product" + targetKeyspace := "customer" + workflowName := "wf1" + tables := []string{"customer", "loadtest", "customer2"} + + _ = setupMinimalCustomerKeyspace(t) + + mtwf := &moveTablesWorkflow{ + workflowInfo: &workflowInfo{ + vc: vc, + workflowName: workflowName, + targetKeyspace: targetKeyspace, + }, + sourceKeyspace: sourceKeyspace, + tables: "customer,loadtest,customer2", + mirrorFlags: []string{"--percent", "25"}, + } + mt := newMoveTables(vc, mtwf, flavor) + + // Mirror rules do not exist by default. + mt.Create() + confirmNoMirrorRules(t) + + waitForWorkflowState(t, vc, ksWorkflow, binlogdatapb.VReplicationWorkflowState_Running.String()) + + // Mirror rules can be created after a MoveTables workflow is created. + mt.MirrorTraffic() + confirmMirrorRulesExist(t) + expectMirrorRules(t, sourceKeyspace, targetKeyspace, tables, []topodatapb.TabletType{ + topodatapb.TabletType_PRIMARY, + topodatapb.TabletType_REPLICA, + topodatapb.TabletType_RDONLY, + }, 25) + + // Mirror rules can be adjusted after mirror rules are in place. + mtwf.mirrorFlags[1] = "50" + mt.MirrorTraffic() + confirmMirrorRulesExist(t) + expectMirrorRules(t, sourceKeyspace, targetKeyspace, tables, []topodatapb.TabletType{ + topodatapb.TabletType_PRIMARY, + topodatapb.TabletType_REPLICA, + topodatapb.TabletType_RDONLY, + }, 50) + + // Mirror rules can be adjusted multiple times after mirror rules are in + // place. + mtwf.mirrorFlags[1] = "75" + mt.MirrorTraffic() + confirmMirrorRulesExist(t) + expectMirrorRules(t, sourceKeyspace, targetKeyspace, tables, []topodatapb.TabletType{ + topodatapb.TabletType_PRIMARY, + topodatapb.TabletType_REPLICA, + topodatapb.TabletType_RDONLY, + }, 75) + + lg := newLoadGenerator(t, vc) + go func() { + lg.start() + }() + lg.waitForCount(1000) + + mt.SwitchReads() + confirmMirrorRulesExist(t) + + // Mirror rules can be adjusted for writes after reads have been switched. + mtwf.mirrorFlags[1] = "100" + mtwf.mirrorFlags = append(mtwf.mirrorFlags, "--tablet-types", "primary") + mt.MirrorTraffic() + confirmMirrorRulesExist(t) + expectMirrorRules(t, sourceKeyspace, targetKeyspace, tables, []topodatapb.TabletType{ + topodatapb.TabletType_PRIMARY, + }, 100) + + // Mirror rules are removed after writes are switched. + mt.SwitchWrites() + confirmNoMirrorRules(t) +} + +func TestMoveTablesMirrorTraffic(t *testing.T) { + currentWorkflowType = binlogdatapb.VReplicationWorkflowType_MoveTables + t.Run(workflowFlavorNames[workflowFlavorVtctld], func(t *testing.T) { + testMoveTablesMirrorTraffic(t, workflowFlavorVtctld) + }) +} diff --git a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go index 82c859acb40..78ad843ca1d 100644 --- a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go +++ b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go @@ -52,6 +52,7 @@ const ( const ( workflowActionCreate = "Create" + workflowActionMirrorTraffic = "Mirror" workflowActionSwitchTraffic = "SwitchTraffic" workflowActionReverseTraffic = "ReverseTraffic" workflowActionComplete = "Complete" @@ -70,6 +71,7 @@ type workflowExecOptions struct { deferSecondaryKeys bool atomicCopy bool shardSubset string + percent float32 } var defaultWorkflowExecOptions = &workflowExecOptions{ @@ -222,6 +224,8 @@ func tstWorkflowExecVtctl(t *testing.T, cells, workflow, sourceKs, targetKs, tab } args = append(args, "--initialize-target-sequences") // Only used for MoveTables } + case workflowActionMirrorTraffic: + args = append(args, "--percent", strconv.FormatFloat(float64(options.percent), byte('f'), -1, 32)) default: if options.shardSubset != "" { args = append(args, "--shards", options.shardSubset) diff --git a/go/test/endtoend/vreplication/vreplication_test_env.go b/go/test/endtoend/vreplication/vreplication_test_env.go index 6073cfac6ab..238242f0e65 100644 --- a/go/test/endtoend/vreplication/vreplication_test_env.go +++ b/go/test/endtoend/vreplication/vreplication_test_env.go @@ -17,6 +17,7 @@ limitations under the License. package vreplication var dryRunResultsSwitchWritesCustomerShard = []string{ + "Mirroring 0.00 percent of traffic from keyspace product to keyspace customer for tablet types [PRIMARY]", "Lock keyspace product", "Lock keyspace customer", "/Stop writes on keyspace product for tables [Lead,Lead-1,blüb_tbl,customer,db_order_test,geom_tbl,json_tbl,loadtest,reftable,vdiff_order]: [keyspace:product;shard:0;position:", @@ -35,6 +36,7 @@ var dryRunResultsSwitchWritesCustomerShard = []string{ } var dryRunResultsReadCustomerShard = []string{ + "Mirroring 0.00 percent of traffic from keyspace product to keyspace customer for tablet types [RDONLY,REPLICA]", "Lock keyspace product", "Switch reads for tables [Lead,Lead-1,blüb_tbl,customer,db_order_test,geom_tbl,json_tbl,loadtest,reftable,vdiff_order] to keyspace customer for tablet types [RDONLY,REPLICA]", "Routing rules for tables [Lead,Lead-1,blüb_tbl,customer,db_order_test,geom_tbl,json_tbl,loadtest,reftable,vdiff_order] will be updated", diff --git a/go/test/endtoend/vreplication/vreplication_vtctldclient_cli_test.go b/go/test/endtoend/vreplication/vreplication_vtctldclient_cli_test.go index 4a3f16a1cc9..a69d55c3417 100644 --- a/go/test/endtoend/vreplication/vreplication_vtctldclient_cli_test.go +++ b/go/test/endtoend/vreplication/vreplication_vtctldclient_cli_test.go @@ -36,6 +36,7 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" vschemapb "vitess.io/vitess/go/vt/proto/vschema" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" + "vitess.io/vitess/go/vt/topo/topoproto" ) // TestVtctldclientCLI tests the vreplication vtctldclient CLI commands, primarily to check that non-standard flags @@ -395,6 +396,48 @@ func checkTablesExist(t *testing.T, tabletAlias string, tables []string) bool { return true } +func getMirrorRules(t *testing.T) *vschemapb.MirrorRules { + mirrorRules, err := vc.VtctldClient.ExecuteCommandWithOutput("GetMirrorRules") + require.NoError(t, err) + var mirrorRulesResponse vschemapb.MirrorRules + err = protojson.Unmarshal([]byte(mirrorRules), &mirrorRulesResponse) + require.NoError(t, err) + return &mirrorRulesResponse +} + +func confirmNoMirrorRules(t *testing.T) { + mirrorRulesResponse := getMirrorRules(t) + require.Zero(t, len(mirrorRulesResponse.Rules)) +} + +func confirmMirrorRulesExist(t *testing.T) { + mirrorRulesResponse := getMirrorRules(t) + require.NotZero(t, len(mirrorRulesResponse.Rules)) +} + +func expectMirrorRules(t *testing.T, sourceKeyspace, targetKeyspace string, tables []string, tabletTypes []topodatapb.TabletType, percent float32) { + t.Helper() + + // Each table should have a mirror rule for each serving type. + mirrorRules := getMirrorRules(t) + require.Len(t, mirrorRules.Rules, len(tables)*len(tabletTypes)) + fromTableToRule := make(map[string]*vschemapb.MirrorRule) + for _, rule := range mirrorRules.Rules { + fromTableToRule[rule.FromTable] = rule + } + for _, table := range tables { + for _, tabletType := range tabletTypes { + fromTable := fmt.Sprintf("%s.%s", sourceKeyspace, table) + if tabletType != topodatapb.TabletType_PRIMARY { + fromTable = fmt.Sprintf("%s@%s", fromTable, topoproto.TabletTypeLString(tabletType)) + } + require.Contains(t, fromTableToRule, fromTable) + require.Equal(t, fmt.Sprintf("%s.%s", targetKeyspace, table), fromTableToRule[fromTable].ToTable) + require.Equal(t, percent, fromTableToRule[fromTable].Percent) + } + } +} + func getRoutingRules(t *testing.T) *vschemapb.RoutingRules { routingRules, err := vc.VtctldClient.ExecuteCommandWithOutput("GetRoutingRules") require.NoError(t, err) diff --git a/go/test/endtoend/vreplication/wrappers_test.go b/go/test/endtoend/vreplication/wrappers_test.go index e1028fafa9f..96c54b89fe8 100644 --- a/go/test/endtoend/vreplication/wrappers_test.go +++ b/go/test/endtoend/vreplication/wrappers_test.go @@ -29,6 +29,7 @@ import ( type iWorkflow interface { Create() Show() + MirrorTraffic() SwitchReads() SwitchWrites() SwitchReadsAndWrites() @@ -79,6 +80,7 @@ type moveTablesWorkflow struct { lastOutput string createFlags []string completeFlags []string + mirrorFlags []string switchFlags []string showFlags []string } @@ -122,6 +124,11 @@ func (vmt *VtctlMoveTables) Create() { vmt.exec(workflowActionCreate) } +func (vmt *VtctlMoveTables) MirrorTraffic() { + // TODO implement me + panic("implement me") +} + func (vmt *VtctlMoveTables) SwitchReadsAndWrites() { err := tstWorkflowExecVtctl(vmt.vc.t, "", vmt.workflowName, vmt.sourceKeyspace, vmt.targetKeyspace, vmt.tables, workflowActionSwitchTraffic, "", "", "", defaultWorkflowExecOptions) @@ -218,6 +225,12 @@ func (v VtctldMoveTables) Create() { v.exec(args...) } +func (v VtctldMoveTables) MirrorTraffic() { + args := []string{"MirrorTraffic"} + args = append(args, v.mirrorFlags...) + v.exec(args...) +} + func (v VtctldMoveTables) SwitchReadsAndWrites() { args := []string{"SwitchTraffic"} args = append(args, v.switchFlags...) @@ -323,6 +336,11 @@ func (vrs *VtctlReshard) Create() { vrs.exec(workflowActionCreate) } +func (vrs *VtctlReshard) MirrorTraffic() { + // TODO implement me + panic("implement me") +} + func (vrs *VtctlReshard) SwitchReadsAndWrites() { vrs.exec(workflowActionSwitchTraffic) } @@ -411,6 +429,11 @@ func (v VtctldReshard) Create() { v.exec(args...) } +func (v VtctldReshard) MirrorTraffic() { + // TODO implement me + panic("implement me") +} + func (v VtctldReshard) SwitchReadsAndWrites() { args := []string{"SwitchTraffic"} args = append(args, v.switchFlags...) diff --git a/go/vt/proto/vschema/vschema.pb.go b/go/vt/proto/vschema/vschema.pb.go index 5cb14d3a522..131622aaf5b 100644 --- a/go/vt/proto/vschema/vschema.pb.go +++ b/go/vt/proto/vschema/vschema.pb.go @@ -784,6 +784,7 @@ type SrvVSchema struct { RoutingRules *RoutingRules `protobuf:"bytes,2,opt,name=routing_rules,json=routingRules,proto3" json:"routing_rules,omitempty"` // table routing rules ShardRoutingRules *ShardRoutingRules `protobuf:"bytes,3,opt,name=shard_routing_rules,json=shardRoutingRules,proto3" json:"shard_routing_rules,omitempty"` KeyspaceRoutingRules *KeyspaceRoutingRules `protobuf:"bytes,4,opt,name=keyspace_routing_rules,json=keyspaceRoutingRules,proto3" json:"keyspace_routing_rules,omitempty"` + MirrorRules *MirrorRules `protobuf:"bytes,5,opt,name=mirror_rules,json=mirrorRules,proto3" json:"mirror_rules,omitempty"` // mirror rules } func (x *SrvVSchema) Reset() { @@ -846,6 +847,13 @@ func (x *SrvVSchema) GetKeyspaceRoutingRules() *KeyspaceRoutingRules { return nil } +func (x *SrvVSchema) GetMirrorRules() *MirrorRules { + if x != nil { + return x.MirrorRules + } + return nil +} + // ShardRoutingRules specify the shard routing rules for the VSchema. type ShardRoutingRules struct { state protoimpl.MessageState @@ -1060,6 +1068,121 @@ func (x *KeyspaceRoutingRule) GetToKeyspace() string { return "" } +// MirrorRules specify the high level mirror rules for the VSchema. +type MirrorRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // rules should ideally be a map. However protos dont't allow + // repeated fields as elements of a map. So, we use a list + // instead. + Rules []*MirrorRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *MirrorRules) Reset() { + *x = MirrorRules{} + if protoimpl.UnsafeEnabled { + mi := &file_vschema_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MirrorRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorRules) ProtoMessage() {} + +func (x *MirrorRules) ProtoReflect() protoreflect.Message { + mi := &file_vschema_proto_msgTypes[14] + 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 MirrorRules.ProtoReflect.Descriptor instead. +func (*MirrorRules) Descriptor() ([]byte, []int) { + return file_vschema_proto_rawDescGZIP(), []int{14} +} + +func (x *MirrorRules) GetRules() []*MirrorRule { + if x != nil { + return x.Rules + } + return nil +} + +// MirrorRule specifies a mirror rule. +type MirrorRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FromTable string `protobuf:"bytes,1,opt,name=from_table,json=fromTable,proto3" json:"from_table,omitempty"` + ToTable string `protobuf:"bytes,2,opt,name=to_table,json=toTable,proto3" json:"to_table,omitempty"` + Percent float32 `protobuf:"fixed32,3,opt,name=percent,proto3" json:"percent,omitempty"` +} + +func (x *MirrorRule) Reset() { + *x = MirrorRule{} + if protoimpl.UnsafeEnabled { + mi := &file_vschema_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MirrorRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorRule) ProtoMessage() {} + +func (x *MirrorRule) ProtoReflect() protoreflect.Message { + mi := &file_vschema_proto_msgTypes[15] + 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 MirrorRule.ProtoReflect.Descriptor instead. +func (*MirrorRule) Descriptor() ([]byte, []int) { + return file_vschema_proto_rawDescGZIP(), []int{15} +} + +func (x *MirrorRule) GetFromTable() string { + if x != nil { + return x.FromTable + } + return "" +} + +func (x *MirrorRule) GetToTable() string { + if x != nil { + return x.ToTable + } + return "" +} + +func (x *MirrorRule) GetPercent() float32 { + if x != nil { + return x.Percent + } + return 0 +} + var File_vschema_proto protoreflect.FileDescriptor var file_vschema_proto_rawDesc = []byte{ @@ -1175,7 +1298,7 @@ var file_vschema_proto_rawDesc = []byte{ 0x00, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0xfc, 0x02, 0x0a, 0x0a, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, + 0x62, 0x6c, 0x65, 0x22, 0xb5, 0x03, 0x0a, 0x0a, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x40, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, @@ -1194,37 +1317,50 @@ var file_vschema_proto_rawDesc = []byte{ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x1a, 0x4f, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x44, 0x0a, 0x11, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, - 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x6e, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x4b, 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, 0x22, 0x4a, 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x32, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x22, 0x5b, 0x0a, 0x13, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 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, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0b, 0x6d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x4f, 0x0a, 0x0e, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x44, 0x0a, 0x11, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x2f, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x22, 0x6e, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, + 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x74, 0x6f, 0x4b, 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, 0x22, 0x4a, 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x5b, 0x0a, + 0x13, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, + 0x6d, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x38, 0x0a, 0x0b, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x0a, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, + 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 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, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1240,7 +1376,7 @@ func file_vschema_proto_rawDescGZIP() []byte { } var file_vschema_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_vschema_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_vschema_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_vschema_proto_goTypes = []any{ (Keyspace_ForeignKeyMode)(0), // 0: vschema.Keyspace.ForeignKeyMode (*RoutingRules)(nil), // 1: vschema.RoutingRules @@ -1257,38 +1393,42 @@ var file_vschema_proto_goTypes = []any{ (*ShardRoutingRule)(nil), // 12: vschema.ShardRoutingRule (*KeyspaceRoutingRules)(nil), // 13: vschema.KeyspaceRoutingRules (*KeyspaceRoutingRule)(nil), // 14: vschema.KeyspaceRoutingRule - nil, // 15: vschema.Keyspace.VindexesEntry - nil, // 16: vschema.Keyspace.TablesEntry - nil, // 17: vschema.Vindex.ParamsEntry - nil, // 18: vschema.SrvVSchema.KeyspacesEntry - (query.Type)(0), // 19: query.Type + (*MirrorRules)(nil), // 15: vschema.MirrorRules + (*MirrorRule)(nil), // 16: vschema.MirrorRule + nil, // 17: vschema.Keyspace.VindexesEntry + nil, // 18: vschema.Keyspace.TablesEntry + nil, // 19: vschema.Vindex.ParamsEntry + nil, // 20: vschema.SrvVSchema.KeyspacesEntry + (query.Type)(0), // 21: query.Type } var file_vschema_proto_depIdxs = []int32{ 2, // 0: vschema.RoutingRules.rules:type_name -> vschema.RoutingRule - 15, // 1: vschema.Keyspace.vindexes:type_name -> vschema.Keyspace.VindexesEntry - 16, // 2: vschema.Keyspace.tables:type_name -> vschema.Keyspace.TablesEntry + 17, // 1: vschema.Keyspace.vindexes:type_name -> vschema.Keyspace.VindexesEntry + 18, // 2: vschema.Keyspace.tables:type_name -> vschema.Keyspace.TablesEntry 0, // 3: vschema.Keyspace.foreign_key_mode:type_name -> vschema.Keyspace.ForeignKeyMode 4, // 4: vschema.Keyspace.multi_tenant_spec:type_name -> vschema.MultiTenantSpec - 19, // 5: vschema.MultiTenantSpec.tenant_id_column_type:type_name -> query.Type - 17, // 6: vschema.Vindex.params:type_name -> vschema.Vindex.ParamsEntry + 21, // 5: vschema.MultiTenantSpec.tenant_id_column_type:type_name -> query.Type + 19, // 6: vschema.Vindex.params:type_name -> vschema.Vindex.ParamsEntry 7, // 7: vschema.Table.column_vindexes:type_name -> vschema.ColumnVindex 8, // 8: vschema.Table.auto_increment:type_name -> vschema.AutoIncrement 9, // 9: vschema.Table.columns:type_name -> vschema.Column - 19, // 10: vschema.Column.type:type_name -> query.Type - 18, // 11: vschema.SrvVSchema.keyspaces:type_name -> vschema.SrvVSchema.KeyspacesEntry + 21, // 10: vschema.Column.type:type_name -> query.Type + 20, // 11: vschema.SrvVSchema.keyspaces:type_name -> vschema.SrvVSchema.KeyspacesEntry 1, // 12: vschema.SrvVSchema.routing_rules:type_name -> vschema.RoutingRules 11, // 13: vschema.SrvVSchema.shard_routing_rules:type_name -> vschema.ShardRoutingRules 13, // 14: vschema.SrvVSchema.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 12, // 15: vschema.ShardRoutingRules.rules:type_name -> vschema.ShardRoutingRule - 14, // 16: vschema.KeyspaceRoutingRules.rules:type_name -> vschema.KeyspaceRoutingRule - 5, // 17: vschema.Keyspace.VindexesEntry.value:type_name -> vschema.Vindex - 6, // 18: vschema.Keyspace.TablesEntry.value:type_name -> vschema.Table - 3, // 19: vschema.SrvVSchema.KeyspacesEntry.value:type_name -> vschema.Keyspace - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 15, // 15: vschema.SrvVSchema.mirror_rules:type_name -> vschema.MirrorRules + 12, // 16: vschema.ShardRoutingRules.rules:type_name -> vschema.ShardRoutingRule + 14, // 17: vschema.KeyspaceRoutingRules.rules:type_name -> vschema.KeyspaceRoutingRule + 16, // 18: vschema.MirrorRules.rules:type_name -> vschema.MirrorRule + 5, // 19: vschema.Keyspace.VindexesEntry.value:type_name -> vschema.Vindex + 6, // 20: vschema.Keyspace.TablesEntry.value:type_name -> vschema.Table + 3, // 21: vschema.SrvVSchema.KeyspacesEntry.value:type_name -> vschema.Keyspace + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_vschema_proto_init() } @@ -1465,6 +1605,30 @@ func file_vschema_proto_init() { return nil } } + file_vschema_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*MirrorRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vschema_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*MirrorRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_vschema_proto_msgTypes[8].OneofWrappers = []any{} type x struct{} @@ -1473,7 +1637,7 @@ func file_vschema_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vschema_proto_rawDesc, NumEnums: 1, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/vschema/vschema_vtproto.pb.go b/go/vt/proto/vschema/vschema_vtproto.pb.go index 8cf523f4009..1951f430a15 100644 --- a/go/vt/proto/vschema/vschema_vtproto.pb.go +++ b/go/vt/proto/vschema/vschema_vtproto.pb.go @@ -5,10 +5,12 @@ package vschema import ( + binary "encoding/binary" fmt "fmt" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" + math "math" bits "math/bits" query "vitess.io/vitess/go/vt/proto/query" ) @@ -266,6 +268,7 @@ func (m *SrvVSchema) CloneVT() *SrvVSchema { RoutingRules: m.RoutingRules.CloneVT(), ShardRoutingRules: m.ShardRoutingRules.CloneVT(), KeyspaceRoutingRules: m.KeyspaceRoutingRules.CloneVT(), + MirrorRules: m.MirrorRules.CloneVT(), } if rhs := m.Keyspaces; rhs != nil { tmpContainer := make(map[string]*Keyspace, len(rhs)) @@ -370,6 +373,49 @@ func (m *KeyspaceRoutingRule) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *MirrorRules) CloneVT() *MirrorRules { + if m == nil { + return (*MirrorRules)(nil) + } + r := &MirrorRules{} + if rhs := m.Rules; rhs != nil { + tmpContainer := make([]*MirrorRule, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Rules = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MirrorRules) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MirrorRule) CloneVT() *MirrorRule { + if m == nil { + return (*MirrorRule)(nil) + } + r := &MirrorRule{ + FromTable: m.FromTable, + ToTable: m.ToTable, + Percent: m.Percent, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MirrorRule) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *RoutingRules) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1016,6 +1062,16 @@ func (m *SrvVSchema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.MirrorRules != nil { + size, err := m.MirrorRules.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } if m.KeyspaceRoutingRules != nil { size, err := m.KeyspaceRoutingRules.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -1262,6 +1318,104 @@ func (m *KeyspaceRoutingRule) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MirrorRules) 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 *MirrorRules) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MirrorRules) 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 len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Rules[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MirrorRule) 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 *MirrorRule) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MirrorRule) 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.Percent != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Percent)))) + i-- + dAtA[i] = 0x1d + } + if len(m.ToTable) > 0 { + i -= len(m.ToTable) + copy(dAtA[i:], m.ToTable) + i = encodeVarint(dAtA, i, uint64(len(m.ToTable))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromTable) > 0 { + i -= len(m.FromTable) + copy(dAtA[i:], m.FromTable) + i = encodeVarint(dAtA, i, uint64(len(m.FromTable))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarint(dAtA []byte, offset int, v uint64) int { offset -= sov(v) base := offset @@ -1558,6 +1712,10 @@ func (m *SrvVSchema) SizeVT() (n int) { l = m.KeyspaceRoutingRules.SizeVT() n += 1 + l + sov(uint64(l)) } + if m.MirrorRules != nil { + l = m.MirrorRules.SizeVT() + n += 1 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -1634,6 +1792,43 @@ func (m *KeyspaceRoutingRule) SizeVT() (n int) { return n } +func (m *MirrorRules) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *MirrorRule) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromTable) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.ToTable) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Percent != 0 { + n += 5 + } + n += len(m.unknownFields) + return n +} + func sov(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } @@ -3664,6 +3859,42 @@ func (m *SrvVSchema) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MirrorRules", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MirrorRules == nil { + m.MirrorRules = &MirrorRules{} + } + if err := m.MirrorRules.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -4118,6 +4349,217 @@ func (m *KeyspaceRoutingRule) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *MirrorRules) 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: MirrorRules: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MirrorRules: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, &MirrorRule{}) + if err := m.Rules[len(m.Rules)-1].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 *MirrorRule) 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: MirrorRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MirrorRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromTable", 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.FromTable = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToTable", 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.ToTable = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Percent", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Percent = float32(math.Float32frombits(v)) + 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 skip(dAtA []byte) (n int, err error) { l := len(dAtA) diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 4a6f9e25f2e..ae20ac21ec1 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -15568,6 +15568,225 @@ func (x *WorkflowUpdateResponse) GetDetails() []*WorkflowUpdateResponse_TabletIn return nil } +type GetMirrorRulesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetMirrorRulesRequest) Reset() { + *x = GetMirrorRulesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[245] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMirrorRulesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMirrorRulesRequest) ProtoMessage() {} + +func (x *GetMirrorRulesRequest) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[245] + 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 GetMirrorRulesRequest.ProtoReflect.Descriptor instead. +func (*GetMirrorRulesRequest) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{245} +} + +type GetMirrorRulesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MirrorRules *vschema.MirrorRules `protobuf:"bytes,1,opt,name=mirror_rules,json=mirrorRules,proto3" json:"mirror_rules,omitempty"` +} + +func (x *GetMirrorRulesResponse) Reset() { + *x = GetMirrorRulesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[246] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMirrorRulesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMirrorRulesResponse) ProtoMessage() {} + +func (x *GetMirrorRulesResponse) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[246] + 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 GetMirrorRulesResponse.ProtoReflect.Descriptor instead. +func (*GetMirrorRulesResponse) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{246} +} + +func (x *GetMirrorRulesResponse) GetMirrorRules() *vschema.MirrorRules { + if x != nil { + return x.MirrorRules + } + return nil +} + +type WorkflowMirrorTrafficRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` + Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` + TabletTypes []topodata.TabletType `protobuf:"varint,3,rep,packed,name=tablet_types,json=tabletTypes,proto3,enum=topodata.TabletType" json:"tablet_types,omitempty"` + Percent float32 `protobuf:"fixed32,4,opt,name=percent,proto3" json:"percent,omitempty"` +} + +func (x *WorkflowMirrorTrafficRequest) Reset() { + *x = WorkflowMirrorTrafficRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[247] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowMirrorTrafficRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowMirrorTrafficRequest) ProtoMessage() {} + +func (x *WorkflowMirrorTrafficRequest) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[247] + 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 WorkflowMirrorTrafficRequest.ProtoReflect.Descriptor instead. +func (*WorkflowMirrorTrafficRequest) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{247} +} + +func (x *WorkflowMirrorTrafficRequest) GetKeyspace() string { + if x != nil { + return x.Keyspace + } + return "" +} + +func (x *WorkflowMirrorTrafficRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *WorkflowMirrorTrafficRequest) GetTabletTypes() []topodata.TabletType { + if x != nil { + return x.TabletTypes + } + return nil +} + +func (x *WorkflowMirrorTrafficRequest) GetPercent() float32 { + if x != nil { + return x.Percent + } + return 0 +} + +type WorkflowMirrorTrafficResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` + StartState string `protobuf:"bytes,2,opt,name=start_state,json=startState,proto3" json:"start_state,omitempty"` + CurrentState string `protobuf:"bytes,3,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"` +} + +func (x *WorkflowMirrorTrafficResponse) Reset() { + *x = WorkflowMirrorTrafficResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[248] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowMirrorTrafficResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowMirrorTrafficResponse) ProtoMessage() {} + +func (x *WorkflowMirrorTrafficResponse) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[248] + 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 WorkflowMirrorTrafficResponse.ProtoReflect.Descriptor instead. +func (*WorkflowMirrorTrafficResponse) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{248} +} + +func (x *WorkflowMirrorTrafficResponse) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *WorkflowMirrorTrafficResponse) GetStartState() string { + if x != nil { + return x.StartState + } + return "" +} + +func (x *WorkflowMirrorTrafficResponse) GetCurrentState() string { + if x != nil { + return x.CurrentState + } + return "" +} + type Workflow_ReplicationLocation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -15580,7 +15799,7 @@ type Workflow_ReplicationLocation struct { func (x *Workflow_ReplicationLocation) Reset() { *x = Workflow_ReplicationLocation{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[246] + mi := &file_vtctldata_proto_msgTypes[250] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15593,7 +15812,7 @@ func (x *Workflow_ReplicationLocation) String() string { func (*Workflow_ReplicationLocation) ProtoMessage() {} func (x *Workflow_ReplicationLocation) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[246] + mi := &file_vtctldata_proto_msgTypes[250] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15636,7 +15855,7 @@ type Workflow_ShardStream struct { func (x *Workflow_ShardStream) Reset() { *x = Workflow_ShardStream{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[247] + mi := &file_vtctldata_proto_msgTypes[251] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15649,7 +15868,7 @@ func (x *Workflow_ShardStream) String() string { func (*Workflow_ShardStream) ProtoMessage() {} func (x *Workflow_ShardStream) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[247] + mi := &file_vtctldata_proto_msgTypes[251] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15724,7 +15943,7 @@ type Workflow_Stream struct { func (x *Workflow_Stream) Reset() { *x = Workflow_Stream{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[248] + mi := &file_vtctldata_proto_msgTypes[252] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15737,7 +15956,7 @@ func (x *Workflow_Stream) String() string { func (*Workflow_Stream) ProtoMessage() {} func (x *Workflow_Stream) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[248] + mi := &file_vtctldata_proto_msgTypes[252] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15906,7 +16125,7 @@ type Workflow_Stream_CopyState struct { func (x *Workflow_Stream_CopyState) Reset() { *x = Workflow_Stream_CopyState{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[249] + mi := &file_vtctldata_proto_msgTypes[253] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15919,7 +16138,7 @@ func (x *Workflow_Stream_CopyState) String() string { func (*Workflow_Stream_CopyState) ProtoMessage() {} func (x *Workflow_Stream_CopyState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[249] + mi := &file_vtctldata_proto_msgTypes[253] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15974,7 +16193,7 @@ type Workflow_Stream_Log struct { func (x *Workflow_Stream_Log) Reset() { *x = Workflow_Stream_Log{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[250] + mi := &file_vtctldata_proto_msgTypes[254] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15987,7 +16206,7 @@ func (x *Workflow_Stream_Log) String() string { func (*Workflow_Stream_Log) ProtoMessage() {} func (x *Workflow_Stream_Log) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[250] + mi := &file_vtctldata_proto_msgTypes[254] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16071,7 +16290,7 @@ type Workflow_Stream_ThrottlerStatus struct { func (x *Workflow_Stream_ThrottlerStatus) Reset() { *x = Workflow_Stream_ThrottlerStatus{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[251] + mi := &file_vtctldata_proto_msgTypes[255] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16084,7 +16303,7 @@ func (x *Workflow_Stream_ThrottlerStatus) String() string { func (*Workflow_Stream_ThrottlerStatus) ProtoMessage() {} func (x *Workflow_Stream_ThrottlerStatus) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[251] + mi := &file_vtctldata_proto_msgTypes[255] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16125,7 +16344,7 @@ type ApplyVSchemaResponse_ParamList struct { func (x *ApplyVSchemaResponse_ParamList) Reset() { *x = ApplyVSchemaResponse_ParamList{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[254] + mi := &file_vtctldata_proto_msgTypes[258] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16138,7 +16357,7 @@ func (x *ApplyVSchemaResponse_ParamList) String() string { func (*ApplyVSchemaResponse_ParamList) ProtoMessage() {} func (x *ApplyVSchemaResponse_ParamList) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[254] + mi := &file_vtctldata_proto_msgTypes[258] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16185,7 +16404,7 @@ type CheckThrottlerResponse_Metric struct { func (x *CheckThrottlerResponse_Metric) Reset() { *x = CheckThrottlerResponse_Metric{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[256] + mi := &file_vtctldata_proto_msgTypes[260] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16198,7 +16417,7 @@ func (x *CheckThrottlerResponse_Metric) String() string { func (*CheckThrottlerResponse_Metric) ProtoMessage() {} func (x *CheckThrottlerResponse_Metric) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[256] + mi := &file_vtctldata_proto_msgTypes[260] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16274,7 +16493,7 @@ type GetSrvKeyspaceNamesResponse_NameList struct { func (x *GetSrvKeyspaceNamesResponse_NameList) Reset() { *x = GetSrvKeyspaceNamesResponse_NameList{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[265] + mi := &file_vtctldata_proto_msgTypes[269] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16287,7 +16506,7 @@ func (x *GetSrvKeyspaceNamesResponse_NameList) String() string { func (*GetSrvKeyspaceNamesResponse_NameList) ProtoMessage() {} func (x *GetSrvKeyspaceNamesResponse_NameList) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[265] + mi := &file_vtctldata_proto_msgTypes[269] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16322,7 +16541,7 @@ type GetThrottlerStatusResponse_MetricResult struct { func (x *GetThrottlerStatusResponse_MetricResult) Reset() { *x = GetThrottlerStatusResponse_MetricResult{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[268] + mi := &file_vtctldata_proto_msgTypes[272] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16335,7 +16554,7 @@ func (x *GetThrottlerStatusResponse_MetricResult) String() string { func (*GetThrottlerStatusResponse_MetricResult) ProtoMessage() {} func (x *GetThrottlerStatusResponse_MetricResult) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[268] + mi := &file_vtctldata_proto_msgTypes[272] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16377,7 +16596,7 @@ type GetThrottlerStatusResponse_MetricHealth struct { func (x *GetThrottlerStatusResponse_MetricHealth) Reset() { *x = GetThrottlerStatusResponse_MetricHealth{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[271] + mi := &file_vtctldata_proto_msgTypes[275] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16390,7 +16609,7 @@ func (x *GetThrottlerStatusResponse_MetricHealth) String() string { func (*GetThrottlerStatusResponse_MetricHealth) ProtoMessage() {} func (x *GetThrottlerStatusResponse_MetricHealth) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[271] + mi := &file_vtctldata_proto_msgTypes[275] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16432,7 +16651,7 @@ type GetThrottlerStatusResponse_RecentApp struct { func (x *GetThrottlerStatusResponse_RecentApp) Reset() { *x = GetThrottlerStatusResponse_RecentApp{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[275] + mi := &file_vtctldata_proto_msgTypes[279] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16445,7 +16664,7 @@ func (x *GetThrottlerStatusResponse_RecentApp) String() string { func (*GetThrottlerStatusResponse_RecentApp) ProtoMessage() {} func (x *GetThrottlerStatusResponse_RecentApp) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[275] + mi := &file_vtctldata_proto_msgTypes[279] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16488,7 +16707,7 @@ type MoveTablesCreateResponse_TabletInfo struct { func (x *MoveTablesCreateResponse_TabletInfo) Reset() { *x = MoveTablesCreateResponse_TabletInfo{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[278] + mi := &file_vtctldata_proto_msgTypes[282] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16501,7 +16720,7 @@ func (x *MoveTablesCreateResponse_TabletInfo) String() string { func (*MoveTablesCreateResponse_TabletInfo) ProtoMessage() {} func (x *MoveTablesCreateResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[278] + mi := &file_vtctldata_proto_msgTypes[282] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16544,7 +16763,7 @@ type WorkflowDeleteResponse_TabletInfo struct { func (x *WorkflowDeleteResponse_TabletInfo) Reset() { *x = WorkflowDeleteResponse_TabletInfo{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[288] + mi := &file_vtctldata_proto_msgTypes[292] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16557,7 +16776,7 @@ func (x *WorkflowDeleteResponse_TabletInfo) String() string { func (*WorkflowDeleteResponse_TabletInfo) ProtoMessage() {} func (x *WorkflowDeleteResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[288] + mi := &file_vtctldata_proto_msgTypes[292] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16603,7 +16822,7 @@ type WorkflowStatusResponse_TableCopyState struct { func (x *WorkflowStatusResponse_TableCopyState) Reset() { *x = WorkflowStatusResponse_TableCopyState{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[289] + mi := &file_vtctldata_proto_msgTypes[293] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16616,7 +16835,7 @@ func (x *WorkflowStatusResponse_TableCopyState) String() string { func (*WorkflowStatusResponse_TableCopyState) ProtoMessage() {} func (x *WorkflowStatusResponse_TableCopyState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[289] + mi := &file_vtctldata_proto_msgTypes[293] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16690,7 +16909,7 @@ type WorkflowStatusResponse_ShardStreamState struct { func (x *WorkflowStatusResponse_ShardStreamState) Reset() { *x = WorkflowStatusResponse_ShardStreamState{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[290] + mi := &file_vtctldata_proto_msgTypes[294] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16703,7 +16922,7 @@ func (x *WorkflowStatusResponse_ShardStreamState) String() string { func (*WorkflowStatusResponse_ShardStreamState) ProtoMessage() {} func (x *WorkflowStatusResponse_ShardStreamState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[290] + mi := &file_vtctldata_proto_msgTypes[294] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16772,7 +16991,7 @@ type WorkflowStatusResponse_ShardStreams struct { func (x *WorkflowStatusResponse_ShardStreams) Reset() { *x = WorkflowStatusResponse_ShardStreams{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[291] + mi := &file_vtctldata_proto_msgTypes[295] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16785,7 +17004,7 @@ func (x *WorkflowStatusResponse_ShardStreams) String() string { func (*WorkflowStatusResponse_ShardStreams) ProtoMessage() {} func (x *WorkflowStatusResponse_ShardStreams) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[291] + mi := &file_vtctldata_proto_msgTypes[295] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16822,7 +17041,7 @@ type WorkflowUpdateResponse_TabletInfo struct { func (x *WorkflowUpdateResponse_TabletInfo) Reset() { *x = WorkflowUpdateResponse_TabletInfo{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[294] + mi := &file_vtctldata_proto_msgTypes[298] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16835,7 +17054,7 @@ func (x *WorkflowUpdateResponse_TabletInfo) String() string { func (*WorkflowUpdateResponse_TabletInfo) ProtoMessage() {} func (x *WorkflowUpdateResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[294] + mi := &file_vtctldata_proto_msgTypes[298] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19410,19 +19629,44 @@ var file_vtctldata_proto_rawDesc = []byte{ 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x2a, 0x4a, 0x0a, - 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, - 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, - 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, - 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, - 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, 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, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x17, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0b, 0x6d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x1c, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x7f, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, + 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, + 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, + 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, + 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, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -19438,7 +19682,7 @@ func file_vtctldata_proto_rawDescGZIP() []byte { } var file_vtctldata_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 295) +var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 299) var file_vtctldata_proto_goTypes = []any{ (MaterializationIntent)(0), // 0: vtctldata.MaterializationIntent (QueryOrdering)(0), // 1: vtctldata.QueryOrdering @@ -19689,335 +19933,342 @@ var file_vtctldata_proto_goTypes = []any{ (*WorkflowSwitchTrafficResponse)(nil), // 246: vtctldata.WorkflowSwitchTrafficResponse (*WorkflowUpdateRequest)(nil), // 247: vtctldata.WorkflowUpdateRequest (*WorkflowUpdateResponse)(nil), // 248: vtctldata.WorkflowUpdateResponse - nil, // 249: vtctldata.Workflow.ShardStreamsEntry - (*Workflow_ReplicationLocation)(nil), // 250: vtctldata.Workflow.ReplicationLocation - (*Workflow_ShardStream)(nil), // 251: vtctldata.Workflow.ShardStream - (*Workflow_Stream)(nil), // 252: vtctldata.Workflow.Stream - (*Workflow_Stream_CopyState)(nil), // 253: vtctldata.Workflow.Stream.CopyState - (*Workflow_Stream_Log)(nil), // 254: vtctldata.Workflow.Stream.Log - (*Workflow_Stream_ThrottlerStatus)(nil), // 255: vtctldata.Workflow.Stream.ThrottlerStatus - nil, // 256: vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry - nil, // 257: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry - (*ApplyVSchemaResponse_ParamList)(nil), // 258: vtctldata.ApplyVSchemaResponse.ParamList - nil, // 259: vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry - (*CheckThrottlerResponse_Metric)(nil), // 260: vtctldata.CheckThrottlerResponse.Metric - nil, // 261: vtctldata.CheckThrottlerResponse.MetricsEntry - nil, // 262: vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 263: vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 264: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - nil, // 265: vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 266: vtctldata.GetCellsAliasesResponse.AliasesEntry - nil, // 267: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry - nil, // 268: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 269: vtctldata.GetSrvKeyspaceNamesResponse.NameList - nil, // 270: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - nil, // 271: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - (*GetThrottlerStatusResponse_MetricResult)(nil), // 272: vtctldata.GetThrottlerStatusResponse.MetricResult - nil, // 273: vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry - nil, // 274: vtctldata.GetThrottlerStatusResponse.MetricThresholdsEntry - (*GetThrottlerStatusResponse_MetricHealth)(nil), // 275: vtctldata.GetThrottlerStatusResponse.MetricHealth - nil, // 276: vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry - nil, // 277: vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry - nil, // 278: vtctldata.GetThrottlerStatusResponse.AppCheckedMetricsEntry - (*GetThrottlerStatusResponse_RecentApp)(nil), // 279: vtctldata.GetThrottlerStatusResponse.RecentApp - nil, // 280: vtctldata.GetThrottlerStatusResponse.RecentAppsEntry - nil, // 281: vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry - (*MoveTablesCreateResponse_TabletInfo)(nil), // 282: vtctldata.MoveTablesCreateResponse.TabletInfo - nil, // 283: vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 284: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - nil, // 285: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - nil, // 286: vtctldata.ValidateResponse.ResultsByKeyspaceEntry - nil, // 287: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - nil, // 288: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - nil, // 289: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - nil, // 290: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - nil, // 291: vtctldata.VDiffShowResponse.TabletResponsesEntry - (*WorkflowDeleteResponse_TabletInfo)(nil), // 292: vtctldata.WorkflowDeleteResponse.TabletInfo - (*WorkflowStatusResponse_TableCopyState)(nil), // 293: vtctldata.WorkflowStatusResponse.TableCopyState - (*WorkflowStatusResponse_ShardStreamState)(nil), // 294: vtctldata.WorkflowStatusResponse.ShardStreamState - (*WorkflowStatusResponse_ShardStreams)(nil), // 295: vtctldata.WorkflowStatusResponse.ShardStreams - nil, // 296: vtctldata.WorkflowStatusResponse.TableCopyStateEntry - nil, // 297: vtctldata.WorkflowStatusResponse.ShardStreamsEntry - (*WorkflowUpdateResponse_TabletInfo)(nil), // 298: vtctldata.WorkflowUpdateResponse.TabletInfo - (*logutil.Event)(nil), // 299: logutil.Event - (tabletmanagerdata.TabletSelectionPreference)(0), // 300: tabletmanagerdata.TabletSelectionPreference - (*topodata.Keyspace)(nil), // 301: topodata.Keyspace - (*vttime.Time)(nil), // 302: vttime.Time - (*topodata.TabletAlias)(nil), // 303: topodata.TabletAlias - (*vttime.Duration)(nil), // 304: vttime.Duration - (*topodata.Shard)(nil), // 305: topodata.Shard - (*topodata.CellInfo)(nil), // 306: topodata.CellInfo - (*vschema.KeyspaceRoutingRules)(nil), // 307: vschema.KeyspaceRoutingRules - (*vschema.RoutingRules)(nil), // 308: vschema.RoutingRules - (*vschema.ShardRoutingRules)(nil), // 309: vschema.ShardRoutingRules - (*vtrpc.CallerID)(nil), // 310: vtrpc.CallerID - (*vschema.Keyspace)(nil), // 311: vschema.Keyspace - (topodata.TabletType)(0), // 312: topodata.TabletType - (*topodata.Tablet)(nil), // 313: topodata.Tablet - (topodata.KeyspaceType)(0), // 314: topodata.KeyspaceType - (*query.QueryResult)(nil), // 315: query.QueryResult - (*tabletmanagerdata.ExecuteHookRequest)(nil), // 316: tabletmanagerdata.ExecuteHookRequest - (*tabletmanagerdata.ExecuteHookResponse)(nil), // 317: tabletmanagerdata.ExecuteHookResponse - (*mysqlctl.BackupInfo)(nil), // 318: mysqlctl.BackupInfo - (*replicationdata.FullStatus)(nil), // 319: replicationdata.FullStatus - (*tabletmanagerdata.Permissions)(nil), // 320: tabletmanagerdata.Permissions - (*tabletmanagerdata.SchemaDefinition)(nil), // 321: tabletmanagerdata.SchemaDefinition - (*topodata.ThrottledAppRule)(nil), // 322: topodata.ThrottledAppRule - (*vschema.SrvVSchema)(nil), // 323: vschema.SrvVSchema - (*topodata.ShardReplicationError)(nil), // 324: topodata.ShardReplicationError - (*topodata.KeyRange)(nil), // 325: topodata.KeyRange - (*topodata.CellsAlias)(nil), // 326: topodata.CellsAlias - (*tabletmanagerdata.UpdateVReplicationWorkflowRequest)(nil), // 327: tabletmanagerdata.UpdateVReplicationWorkflowRequest - (*topodata.Shard_TabletControl)(nil), // 328: topodata.Shard.TabletControl - (*binlogdata.BinlogSource)(nil), // 329: binlogdata.BinlogSource - (*topodata.ShardReplication)(nil), // 330: topodata.ShardReplication - (*topodata.SrvKeyspace)(nil), // 331: topodata.SrvKeyspace - (*replicationdata.Status)(nil), // 332: replicationdata.Status - (*tabletmanagerdata.VDiffResponse)(nil), // 333: tabletmanagerdata.VDiffResponse + (*GetMirrorRulesRequest)(nil), // 249: vtctldata.GetMirrorRulesRequest + (*GetMirrorRulesResponse)(nil), // 250: vtctldata.GetMirrorRulesResponse + (*WorkflowMirrorTrafficRequest)(nil), // 251: vtctldata.WorkflowMirrorTrafficRequest + (*WorkflowMirrorTrafficResponse)(nil), // 252: vtctldata.WorkflowMirrorTrafficResponse + nil, // 253: vtctldata.Workflow.ShardStreamsEntry + (*Workflow_ReplicationLocation)(nil), // 254: vtctldata.Workflow.ReplicationLocation + (*Workflow_ShardStream)(nil), // 255: vtctldata.Workflow.ShardStream + (*Workflow_Stream)(nil), // 256: vtctldata.Workflow.Stream + (*Workflow_Stream_CopyState)(nil), // 257: vtctldata.Workflow.Stream.CopyState + (*Workflow_Stream_Log)(nil), // 258: vtctldata.Workflow.Stream.Log + (*Workflow_Stream_ThrottlerStatus)(nil), // 259: vtctldata.Workflow.Stream.ThrottlerStatus + nil, // 260: vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry + nil, // 261: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry + (*ApplyVSchemaResponse_ParamList)(nil), // 262: vtctldata.ApplyVSchemaResponse.ParamList + nil, // 263: vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry + (*CheckThrottlerResponse_Metric)(nil), // 264: vtctldata.CheckThrottlerResponse.Metric + nil, // 265: vtctldata.CheckThrottlerResponse.MetricsEntry + nil, // 266: vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 267: vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 268: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + nil, // 269: vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 270: vtctldata.GetCellsAliasesResponse.AliasesEntry + nil, // 271: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry + nil, // 272: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 273: vtctldata.GetSrvKeyspaceNamesResponse.NameList + nil, // 274: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + nil, // 275: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + (*GetThrottlerStatusResponse_MetricResult)(nil), // 276: vtctldata.GetThrottlerStatusResponse.MetricResult + nil, // 277: vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry + nil, // 278: vtctldata.GetThrottlerStatusResponse.MetricThresholdsEntry + (*GetThrottlerStatusResponse_MetricHealth)(nil), // 279: vtctldata.GetThrottlerStatusResponse.MetricHealth + nil, // 280: vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry + nil, // 281: vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry + nil, // 282: vtctldata.GetThrottlerStatusResponse.AppCheckedMetricsEntry + (*GetThrottlerStatusResponse_RecentApp)(nil), // 283: vtctldata.GetThrottlerStatusResponse.RecentApp + nil, // 284: vtctldata.GetThrottlerStatusResponse.RecentAppsEntry + nil, // 285: vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry + (*MoveTablesCreateResponse_TabletInfo)(nil), // 286: vtctldata.MoveTablesCreateResponse.TabletInfo + nil, // 287: vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 288: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + nil, // 289: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + nil, // 290: vtctldata.ValidateResponse.ResultsByKeyspaceEntry + nil, // 291: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + nil, // 292: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + nil, // 293: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + nil, // 294: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + nil, // 295: vtctldata.VDiffShowResponse.TabletResponsesEntry + (*WorkflowDeleteResponse_TabletInfo)(nil), // 296: vtctldata.WorkflowDeleteResponse.TabletInfo + (*WorkflowStatusResponse_TableCopyState)(nil), // 297: vtctldata.WorkflowStatusResponse.TableCopyState + (*WorkflowStatusResponse_ShardStreamState)(nil), // 298: vtctldata.WorkflowStatusResponse.ShardStreamState + (*WorkflowStatusResponse_ShardStreams)(nil), // 299: vtctldata.WorkflowStatusResponse.ShardStreams + nil, // 300: vtctldata.WorkflowStatusResponse.TableCopyStateEntry + nil, // 301: vtctldata.WorkflowStatusResponse.ShardStreamsEntry + (*WorkflowUpdateResponse_TabletInfo)(nil), // 302: vtctldata.WorkflowUpdateResponse.TabletInfo + (*logutil.Event)(nil), // 303: logutil.Event + (tabletmanagerdata.TabletSelectionPreference)(0), // 304: tabletmanagerdata.TabletSelectionPreference + (*topodata.Keyspace)(nil), // 305: topodata.Keyspace + (*vttime.Time)(nil), // 306: vttime.Time + (*topodata.TabletAlias)(nil), // 307: topodata.TabletAlias + (*vttime.Duration)(nil), // 308: vttime.Duration + (*topodata.Shard)(nil), // 309: topodata.Shard + (*topodata.CellInfo)(nil), // 310: topodata.CellInfo + (*vschema.KeyspaceRoutingRules)(nil), // 311: vschema.KeyspaceRoutingRules + (*vschema.RoutingRules)(nil), // 312: vschema.RoutingRules + (*vschema.ShardRoutingRules)(nil), // 313: vschema.ShardRoutingRules + (*vtrpc.CallerID)(nil), // 314: vtrpc.CallerID + (*vschema.Keyspace)(nil), // 315: vschema.Keyspace + (topodata.TabletType)(0), // 316: topodata.TabletType + (*topodata.Tablet)(nil), // 317: topodata.Tablet + (topodata.KeyspaceType)(0), // 318: topodata.KeyspaceType + (*query.QueryResult)(nil), // 319: query.QueryResult + (*tabletmanagerdata.ExecuteHookRequest)(nil), // 320: tabletmanagerdata.ExecuteHookRequest + (*tabletmanagerdata.ExecuteHookResponse)(nil), // 321: tabletmanagerdata.ExecuteHookResponse + (*mysqlctl.BackupInfo)(nil), // 322: mysqlctl.BackupInfo + (*replicationdata.FullStatus)(nil), // 323: replicationdata.FullStatus + (*tabletmanagerdata.Permissions)(nil), // 324: tabletmanagerdata.Permissions + (*tabletmanagerdata.SchemaDefinition)(nil), // 325: tabletmanagerdata.SchemaDefinition + (*topodata.ThrottledAppRule)(nil), // 326: topodata.ThrottledAppRule + (*vschema.SrvVSchema)(nil), // 327: vschema.SrvVSchema + (*topodata.ShardReplicationError)(nil), // 328: topodata.ShardReplicationError + (*topodata.KeyRange)(nil), // 329: topodata.KeyRange + (*topodata.CellsAlias)(nil), // 330: topodata.CellsAlias + (*tabletmanagerdata.UpdateVReplicationWorkflowRequest)(nil), // 331: tabletmanagerdata.UpdateVReplicationWorkflowRequest + (*vschema.MirrorRules)(nil), // 332: vschema.MirrorRules + (*topodata.Shard_TabletControl)(nil), // 333: topodata.Shard.TabletControl + (*binlogdata.BinlogSource)(nil), // 334: binlogdata.BinlogSource + (*topodata.ShardReplication)(nil), // 335: topodata.ShardReplication + (*topodata.SrvKeyspace)(nil), // 336: topodata.SrvKeyspace + (*replicationdata.Status)(nil), // 337: replicationdata.Status + (*tabletmanagerdata.VDiffResponse)(nil), // 338: tabletmanagerdata.VDiffResponse } var file_vtctldata_proto_depIdxs = []int32{ - 299, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event + 303, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event 6, // 1: vtctldata.MaterializeSettings.table_settings:type_name -> vtctldata.TableMaterializeSettings 0, // 2: vtctldata.MaterializeSettings.materialization_intent:type_name -> vtctldata.MaterializationIntent - 300, // 3: vtctldata.MaterializeSettings.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 304, // 3: vtctldata.MaterializeSettings.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 11, // 4: vtctldata.MaterializeSettings.workflow_options:type_name -> vtctldata.WorkflowOptions - 301, // 5: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace + 305, // 5: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace 2, // 6: vtctldata.SchemaMigration.strategy:type_name -> vtctldata.SchemaMigration.Strategy - 302, // 7: vtctldata.SchemaMigration.added_at:type_name -> vttime.Time - 302, // 8: vtctldata.SchemaMigration.requested_at:type_name -> vttime.Time - 302, // 9: vtctldata.SchemaMigration.ready_at:type_name -> vttime.Time - 302, // 10: vtctldata.SchemaMigration.started_at:type_name -> vttime.Time - 302, // 11: vtctldata.SchemaMigration.liveness_timestamp:type_name -> vttime.Time - 302, // 12: vtctldata.SchemaMigration.completed_at:type_name -> vttime.Time - 302, // 13: vtctldata.SchemaMigration.cleaned_up_at:type_name -> vttime.Time + 306, // 7: vtctldata.SchemaMigration.added_at:type_name -> vttime.Time + 306, // 8: vtctldata.SchemaMigration.requested_at:type_name -> vttime.Time + 306, // 9: vtctldata.SchemaMigration.ready_at:type_name -> vttime.Time + 306, // 10: vtctldata.SchemaMigration.started_at:type_name -> vttime.Time + 306, // 11: vtctldata.SchemaMigration.liveness_timestamp:type_name -> vttime.Time + 306, // 12: vtctldata.SchemaMigration.completed_at:type_name -> vttime.Time + 306, // 13: vtctldata.SchemaMigration.cleaned_up_at:type_name -> vttime.Time 3, // 14: vtctldata.SchemaMigration.status:type_name -> vtctldata.SchemaMigration.Status - 303, // 15: vtctldata.SchemaMigration.tablet:type_name -> topodata.TabletAlias - 304, // 16: vtctldata.SchemaMigration.artifact_retention:type_name -> vttime.Duration - 302, // 17: vtctldata.SchemaMigration.last_throttled_at:type_name -> vttime.Time - 302, // 18: vtctldata.SchemaMigration.cancelled_at:type_name -> vttime.Time - 302, // 19: vtctldata.SchemaMigration.reviewed_at:type_name -> vttime.Time - 302, // 20: vtctldata.SchemaMigration.ready_to_complete_at:type_name -> vttime.Time - 305, // 21: vtctldata.Shard.shard:type_name -> topodata.Shard - 250, // 22: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation - 250, // 23: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation - 249, // 24: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry + 307, // 15: vtctldata.SchemaMigration.tablet:type_name -> topodata.TabletAlias + 308, // 16: vtctldata.SchemaMigration.artifact_retention:type_name -> vttime.Duration + 306, // 17: vtctldata.SchemaMigration.last_throttled_at:type_name -> vttime.Time + 306, // 18: vtctldata.SchemaMigration.cancelled_at:type_name -> vttime.Time + 306, // 19: vtctldata.SchemaMigration.reviewed_at:type_name -> vttime.Time + 306, // 20: vtctldata.SchemaMigration.ready_to_complete_at:type_name -> vttime.Time + 309, // 21: vtctldata.Shard.shard:type_name -> topodata.Shard + 254, // 22: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation + 254, // 23: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation + 253, // 24: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry 11, // 25: vtctldata.Workflow.options:type_name -> vtctldata.WorkflowOptions - 306, // 26: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 307, // 27: vtctldata.ApplyKeyspaceRoutingRulesRequest.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 307, // 28: vtctldata.ApplyKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 308, // 29: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules - 309, // 30: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 304, // 31: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration - 310, // 32: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID - 256, // 33: vtctldata.ApplySchemaResponse.rows_affected_by_shard:type_name -> vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry - 311, // 34: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace - 311, // 35: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace - 257, // 36: vtctldata.ApplyVSchemaResponse.unknown_vindex_params:type_name -> vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry - 303, // 37: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 38: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 299, // 39: vtctldata.BackupResponse.event:type_name -> logutil.Event - 259, // 40: vtctldata.CancelSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry - 303, // 41: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias - 312, // 42: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType - 313, // 43: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet - 313, // 44: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet - 303, // 45: vtctldata.CheckThrottlerRequest.tablet_alias:type_name -> topodata.TabletAlias - 261, // 46: vtctldata.CheckThrottlerResponse.metrics:type_name -> vtctldata.CheckThrottlerResponse.MetricsEntry - 262, // 47: vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry - 263, // 48: vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry - 314, // 49: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType - 302, // 50: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time + 310, // 26: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 311, // 27: vtctldata.ApplyKeyspaceRoutingRulesRequest.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 311, // 28: vtctldata.ApplyKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 312, // 29: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules + 313, // 30: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 308, // 31: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration + 314, // 32: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID + 260, // 33: vtctldata.ApplySchemaResponse.rows_affected_by_shard:type_name -> vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry + 315, // 34: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace + 315, // 35: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 261, // 36: vtctldata.ApplyVSchemaResponse.unknown_vindex_params:type_name -> vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry + 307, // 37: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 38: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 303, // 39: vtctldata.BackupResponse.event:type_name -> logutil.Event + 263, // 40: vtctldata.CancelSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry + 307, // 41: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias + 316, // 42: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType + 317, // 43: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet + 317, // 44: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet + 307, // 45: vtctldata.CheckThrottlerRequest.tablet_alias:type_name -> topodata.TabletAlias + 265, // 46: vtctldata.CheckThrottlerResponse.metrics:type_name -> vtctldata.CheckThrottlerResponse.MetricsEntry + 266, // 47: vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry + 267, // 48: vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry + 318, // 49: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType + 306, // 50: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time 8, // 51: vtctldata.CreateKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace 8, // 52: vtctldata.CreateShardResponse.keyspace:type_name -> vtctldata.Keyspace 10, // 53: vtctldata.CreateShardResponse.shard:type_name -> vtctldata.Shard 10, // 54: vtctldata.DeleteShardsRequest.shards:type_name -> vtctldata.Shard - 303, // 55: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 303, // 56: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 303, // 57: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias - 304, // 58: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 303, // 59: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 299, // 60: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event - 303, // 61: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias - 315, // 62: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult - 303, // 63: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 315, // 64: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult - 303, // 65: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias - 316, // 66: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest - 317, // 67: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse - 303, // 68: vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 315, // 69: vtctldata.ExecuteMultiFetchAsDBAResponse.results:type_name -> query.QueryResult - 264, // 70: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - 265, // 71: vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry - 318, // 72: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo - 306, // 73: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 266, // 74: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry - 303, // 75: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 319, // 76: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus + 307, // 55: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 307, // 56: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 307, // 57: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias + 308, // 58: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 307, // 59: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 303, // 60: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event + 307, // 61: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias + 319, // 62: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult + 307, // 63: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 319, // 64: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult + 307, // 65: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 66: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest + 321, // 67: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse + 307, // 68: vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 319, // 69: vtctldata.ExecuteMultiFetchAsDBAResponse.results:type_name -> query.QueryResult + 268, // 70: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + 269, // 71: vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry + 322, // 72: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo + 310, // 73: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 270, // 74: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry + 307, // 75: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 323, // 76: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus 8, // 77: vtctldata.GetKeyspacesResponse.keyspaces:type_name -> vtctldata.Keyspace 8, // 78: vtctldata.GetKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace - 303, // 79: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias - 320, // 80: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions - 307, // 81: vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 308, // 82: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules - 303, // 83: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 321, // 84: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition + 307, // 79: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias + 324, // 80: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions + 311, // 81: vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 312, // 82: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules + 307, // 83: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 325, // 84: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition 3, // 85: vtctldata.GetSchemaMigrationsRequest.status:type_name -> vtctldata.SchemaMigration.Status - 304, // 86: vtctldata.GetSchemaMigrationsRequest.recent:type_name -> vttime.Duration + 308, // 86: vtctldata.GetSchemaMigrationsRequest.recent:type_name -> vttime.Duration 1, // 87: vtctldata.GetSchemaMigrationsRequest.order:type_name -> vtctldata.QueryOrdering 9, // 88: vtctldata.GetSchemaMigrationsResponse.migrations:type_name -> vtctldata.SchemaMigration - 267, // 89: vtctldata.GetShardReplicationResponse.shard_replication_by_cell:type_name -> vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry + 271, // 89: vtctldata.GetShardReplicationResponse.shard_replication_by_cell:type_name -> vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry 10, // 90: vtctldata.GetShardResponse.shard:type_name -> vtctldata.Shard - 309, // 91: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 268, // 92: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - 270, // 93: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - 322, // 94: vtctldata.UpdateThrottlerConfigRequest.throttled_app:type_name -> topodata.ThrottledAppRule - 323, // 95: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema - 271, // 96: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - 303, // 97: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 313, // 98: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet - 303, // 99: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 312, // 100: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType - 313, // 101: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet - 303, // 102: vtctldata.GetThrottlerStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 273, // 103: vtctldata.GetThrottlerStatusResponse.aggregated_metrics:type_name -> vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry - 274, // 104: vtctldata.GetThrottlerStatusResponse.metric_thresholds:type_name -> vtctldata.GetThrottlerStatusResponse.MetricThresholdsEntry - 276, // 105: vtctldata.GetThrottlerStatusResponse.metrics_health:type_name -> vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry - 277, // 106: vtctldata.GetThrottlerStatusResponse.throttled_apps:type_name -> vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry - 278, // 107: vtctldata.GetThrottlerStatusResponse.app_checked_metrics:type_name -> vtctldata.GetThrottlerStatusResponse.AppCheckedMetricsEntry - 280, // 108: vtctldata.GetThrottlerStatusResponse.recent_apps:type_name -> vtctldata.GetThrottlerStatusResponse.RecentAppsEntry + 313, // 91: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 272, // 92: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + 274, // 93: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + 326, // 94: vtctldata.UpdateThrottlerConfigRequest.throttled_app:type_name -> topodata.ThrottledAppRule + 327, // 95: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema + 275, // 96: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + 307, // 97: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 317, // 98: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet + 307, // 99: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 316, // 100: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType + 317, // 101: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet + 307, // 102: vtctldata.GetThrottlerStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 277, // 103: vtctldata.GetThrottlerStatusResponse.aggregated_metrics:type_name -> vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry + 278, // 104: vtctldata.GetThrottlerStatusResponse.metric_thresholds:type_name -> vtctldata.GetThrottlerStatusResponse.MetricThresholdsEntry + 280, // 105: vtctldata.GetThrottlerStatusResponse.metrics_health:type_name -> vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry + 281, // 106: vtctldata.GetThrottlerStatusResponse.throttled_apps:type_name -> vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry + 282, // 107: vtctldata.GetThrottlerStatusResponse.app_checked_metrics:type_name -> vtctldata.GetThrottlerStatusResponse.AppCheckedMetricsEntry + 284, // 108: vtctldata.GetThrottlerStatusResponse.recent_apps:type_name -> vtctldata.GetThrottlerStatusResponse.RecentAppsEntry 118, // 109: vtctldata.GetTopologyPathResponse.cell:type_name -> vtctldata.TopologyCell - 303, // 110: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias - 311, // 111: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 307, // 110: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias + 315, // 111: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace 12, // 112: vtctldata.GetWorkflowsResponse.workflows:type_name -> vtctldata.Workflow - 303, // 113: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias - 304, // 114: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration - 299, // 115: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event - 281, // 116: vtctldata.LaunchSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry - 311, // 117: vtctldata.LookupVindexCreateRequest.vindex:type_name -> vschema.Keyspace - 312, // 118: vtctldata.LookupVindexCreateRequest.tablet_types:type_name -> topodata.TabletType - 300, // 119: vtctldata.LookupVindexCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 307, // 113: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias + 308, // 114: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration + 303, // 115: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event + 285, // 116: vtctldata.LaunchSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry + 315, // 117: vtctldata.LookupVindexCreateRequest.vindex:type_name -> vschema.Keyspace + 316, // 118: vtctldata.LookupVindexCreateRequest.tablet_types:type_name -> topodata.TabletType + 304, // 119: vtctldata.LookupVindexCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 7, // 120: vtctldata.MaterializeCreateRequest.settings:type_name -> vtctldata.MaterializeSettings - 312, // 121: vtctldata.MigrateCreateRequest.tablet_types:type_name -> topodata.TabletType - 300, // 122: vtctldata.MigrateCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 312, // 123: vtctldata.MoveTablesCreateRequest.tablet_types:type_name -> topodata.TabletType - 300, // 124: vtctldata.MoveTablesCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 316, // 121: vtctldata.MigrateCreateRequest.tablet_types:type_name -> topodata.TabletType + 304, // 122: vtctldata.MigrateCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 316, // 123: vtctldata.MoveTablesCreateRequest.tablet_types:type_name -> topodata.TabletType + 304, // 124: vtctldata.MoveTablesCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 11, // 125: vtctldata.MoveTablesCreateRequest.workflow_options:type_name -> vtctldata.WorkflowOptions - 282, // 126: vtctldata.MoveTablesCreateResponse.details:type_name -> vtctldata.MoveTablesCreateResponse.TabletInfo - 303, // 127: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 128: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 303, // 129: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias - 304, // 130: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 304, // 131: vtctldata.PlannedReparentShardRequest.tolerable_replication_lag:type_name -> vttime.Duration - 303, // 132: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 299, // 133: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event - 303, // 134: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 135: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 299, // 136: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event - 299, // 137: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event - 303, // 138: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias - 303, // 139: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias - 312, // 140: vtctldata.ReshardCreateRequest.tablet_types:type_name -> topodata.TabletType - 300, // 141: vtctldata.ReshardCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 303, // 142: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 302, // 143: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time - 302, // 144: vtctldata.RestoreFromBackupRequest.restore_to_timestamp:type_name -> vttime.Time - 303, // 145: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 299, // 146: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event - 283, // 147: vtctldata.RetrySchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry - 303, // 148: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias - 301, // 149: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace - 301, // 150: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace - 305, // 151: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard - 312, // 152: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType - 305, // 153: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard - 303, // 154: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 155: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias - 324, // 156: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError - 284, // 157: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - 285, // 158: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - 303, // 159: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 160: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 304, // 161: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration - 325, // 162: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange - 305, // 163: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard - 305, // 164: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard - 303, // 165: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 166: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 167: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias - 303, // 168: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias - 303, // 169: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias - 306, // 170: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 306, // 171: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 326, // 172: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias - 326, // 173: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias - 286, // 174: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry - 287, // 175: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - 288, // 176: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - 289, // 177: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - 290, // 178: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - 312, // 179: vtctldata.VDiffCreateRequest.tablet_types:type_name -> topodata.TabletType - 300, // 180: vtctldata.VDiffCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 304, // 181: vtctldata.VDiffCreateRequest.filtered_replication_wait_time:type_name -> vttime.Duration - 304, // 182: vtctldata.VDiffCreateRequest.wait_update_interval:type_name -> vttime.Duration - 304, // 183: vtctldata.VDiffCreateRequest.max_diff_duration:type_name -> vttime.Duration - 291, // 184: vtctldata.VDiffShowResponse.tablet_responses:type_name -> vtctldata.VDiffShowResponse.TabletResponsesEntry - 292, // 185: vtctldata.WorkflowDeleteResponse.details:type_name -> vtctldata.WorkflowDeleteResponse.TabletInfo - 296, // 186: vtctldata.WorkflowStatusResponse.table_copy_state:type_name -> vtctldata.WorkflowStatusResponse.TableCopyStateEntry - 297, // 187: vtctldata.WorkflowStatusResponse.shard_streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamsEntry - 312, // 188: vtctldata.WorkflowSwitchTrafficRequest.tablet_types:type_name -> topodata.TabletType - 304, // 189: vtctldata.WorkflowSwitchTrafficRequest.max_replication_lag_allowed:type_name -> vttime.Duration - 304, // 190: vtctldata.WorkflowSwitchTrafficRequest.timeout:type_name -> vttime.Duration - 327, // 191: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVReplicationWorkflowRequest - 298, // 192: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo - 251, // 193: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream - 252, // 194: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream - 328, // 195: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl - 303, // 196: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias - 329, // 197: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource - 302, // 198: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time - 302, // 199: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time - 253, // 200: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState - 254, // 201: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log - 255, // 202: vtctldata.Workflow.Stream.throttler_status:type_name -> vtctldata.Workflow.Stream.ThrottlerStatus - 312, // 203: vtctldata.Workflow.Stream.tablet_types:type_name -> topodata.TabletType - 300, // 204: vtctldata.Workflow.Stream.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 302, // 205: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time - 302, // 206: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time - 302, // 207: vtctldata.Workflow.Stream.ThrottlerStatus.time_throttled:type_name -> vttime.Time - 258, // 208: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry.value:type_name -> vtctldata.ApplyVSchemaResponse.ParamList - 260, // 209: vtctldata.CheckThrottlerResponse.MetricsEntry.value:type_name -> vtctldata.CheckThrottlerResponse.Metric - 10, // 210: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard - 326, // 211: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias - 330, // 212: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry.value:type_name -> topodata.ShardReplication - 269, // 213: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList - 331, // 214: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace - 323, // 215: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema - 272, // 216: vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.MetricResult - 302, // 217: vtctldata.GetThrottlerStatusResponse.MetricHealth.last_healthy_at:type_name -> vttime.Time - 275, // 218: vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.MetricHealth - 322, // 219: vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry.value:type_name -> topodata.ThrottledAppRule - 302, // 220: vtctldata.GetThrottlerStatusResponse.RecentApp.checked_at:type_name -> vttime.Time - 279, // 221: vtctldata.GetThrottlerStatusResponse.RecentAppsEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.RecentApp - 303, // 222: vtctldata.MoveTablesCreateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 332, // 223: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status - 313, // 224: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet - 220, // 225: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse - 224, // 226: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 224, // 227: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 224, // 228: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 224, // 229: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 333, // 230: vtctldata.VDiffShowResponse.TabletResponsesEntry.value:type_name -> tabletmanagerdata.VDiffResponse - 303, // 231: vtctldata.WorkflowDeleteResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 303, // 232: vtctldata.WorkflowStatusResponse.ShardStreamState.tablet:type_name -> topodata.TabletAlias - 294, // 233: vtctldata.WorkflowStatusResponse.ShardStreams.streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamState - 293, // 234: vtctldata.WorkflowStatusResponse.TableCopyStateEntry.value:type_name -> vtctldata.WorkflowStatusResponse.TableCopyState - 295, // 235: vtctldata.WorkflowStatusResponse.ShardStreamsEntry.value:type_name -> vtctldata.WorkflowStatusResponse.ShardStreams - 303, // 236: vtctldata.WorkflowUpdateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 237, // [237:237] is the sub-list for method output_type - 237, // [237:237] is the sub-list for method input_type - 237, // [237:237] is the sub-list for extension type_name - 237, // [237:237] is the sub-list for extension extendee - 0, // [0:237] is the sub-list for field type_name + 286, // 126: vtctldata.MoveTablesCreateResponse.details:type_name -> vtctldata.MoveTablesCreateResponse.TabletInfo + 307, // 127: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 128: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 307, // 129: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias + 308, // 130: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 308, // 131: vtctldata.PlannedReparentShardRequest.tolerable_replication_lag:type_name -> vttime.Duration + 307, // 132: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 303, // 133: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event + 307, // 134: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 135: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 303, // 136: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event + 303, // 137: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event + 307, // 138: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias + 307, // 139: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias + 316, // 140: vtctldata.ReshardCreateRequest.tablet_types:type_name -> topodata.TabletType + 304, // 141: vtctldata.ReshardCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 307, // 142: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 306, // 143: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time + 306, // 144: vtctldata.RestoreFromBackupRequest.restore_to_timestamp:type_name -> vttime.Time + 307, // 145: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 303, // 146: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event + 287, // 147: vtctldata.RetrySchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry + 307, // 148: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias + 305, // 149: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace + 305, // 150: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace + 309, // 151: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard + 316, // 152: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType + 309, // 153: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard + 307, // 154: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 155: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias + 328, // 156: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError + 288, // 157: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + 289, // 158: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + 307, // 159: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 160: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 308, // 161: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration + 329, // 162: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange + 309, // 163: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard + 309, // 164: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard + 307, // 165: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 166: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 307, // 167: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias + 307, // 168: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias + 307, // 169: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias + 310, // 170: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 310, // 171: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 330, // 172: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias + 330, // 173: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias + 290, // 174: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry + 291, // 175: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + 292, // 176: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + 293, // 177: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + 294, // 178: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + 316, // 179: vtctldata.VDiffCreateRequest.tablet_types:type_name -> topodata.TabletType + 304, // 180: vtctldata.VDiffCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 308, // 181: vtctldata.VDiffCreateRequest.filtered_replication_wait_time:type_name -> vttime.Duration + 308, // 182: vtctldata.VDiffCreateRequest.wait_update_interval:type_name -> vttime.Duration + 308, // 183: vtctldata.VDiffCreateRequest.max_diff_duration:type_name -> vttime.Duration + 295, // 184: vtctldata.VDiffShowResponse.tablet_responses:type_name -> vtctldata.VDiffShowResponse.TabletResponsesEntry + 296, // 185: vtctldata.WorkflowDeleteResponse.details:type_name -> vtctldata.WorkflowDeleteResponse.TabletInfo + 300, // 186: vtctldata.WorkflowStatusResponse.table_copy_state:type_name -> vtctldata.WorkflowStatusResponse.TableCopyStateEntry + 301, // 187: vtctldata.WorkflowStatusResponse.shard_streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamsEntry + 316, // 188: vtctldata.WorkflowSwitchTrafficRequest.tablet_types:type_name -> topodata.TabletType + 308, // 189: vtctldata.WorkflowSwitchTrafficRequest.max_replication_lag_allowed:type_name -> vttime.Duration + 308, // 190: vtctldata.WorkflowSwitchTrafficRequest.timeout:type_name -> vttime.Duration + 331, // 191: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVReplicationWorkflowRequest + 302, // 192: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo + 332, // 193: vtctldata.GetMirrorRulesResponse.mirror_rules:type_name -> vschema.MirrorRules + 316, // 194: vtctldata.WorkflowMirrorTrafficRequest.tablet_types:type_name -> topodata.TabletType + 255, // 195: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream + 256, // 196: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream + 333, // 197: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl + 307, // 198: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias + 334, // 199: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource + 306, // 200: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time + 306, // 201: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time + 257, // 202: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState + 258, // 203: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log + 259, // 204: vtctldata.Workflow.Stream.throttler_status:type_name -> vtctldata.Workflow.Stream.ThrottlerStatus + 316, // 205: vtctldata.Workflow.Stream.tablet_types:type_name -> topodata.TabletType + 304, // 206: vtctldata.Workflow.Stream.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 306, // 207: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time + 306, // 208: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time + 306, // 209: vtctldata.Workflow.Stream.ThrottlerStatus.time_throttled:type_name -> vttime.Time + 262, // 210: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry.value:type_name -> vtctldata.ApplyVSchemaResponse.ParamList + 264, // 211: vtctldata.CheckThrottlerResponse.MetricsEntry.value:type_name -> vtctldata.CheckThrottlerResponse.Metric + 10, // 212: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard + 330, // 213: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias + 335, // 214: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry.value:type_name -> topodata.ShardReplication + 273, // 215: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList + 336, // 216: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace + 327, // 217: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema + 276, // 218: vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.MetricResult + 306, // 219: vtctldata.GetThrottlerStatusResponse.MetricHealth.last_healthy_at:type_name -> vttime.Time + 279, // 220: vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.MetricHealth + 326, // 221: vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry.value:type_name -> topodata.ThrottledAppRule + 306, // 222: vtctldata.GetThrottlerStatusResponse.RecentApp.checked_at:type_name -> vttime.Time + 283, // 223: vtctldata.GetThrottlerStatusResponse.RecentAppsEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.RecentApp + 307, // 224: vtctldata.MoveTablesCreateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 337, // 225: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status + 317, // 226: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet + 220, // 227: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse + 224, // 228: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 224, // 229: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 224, // 230: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 224, // 231: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 338, // 232: vtctldata.VDiffShowResponse.TabletResponsesEntry.value:type_name -> tabletmanagerdata.VDiffResponse + 307, // 233: vtctldata.WorkflowDeleteResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 307, // 234: vtctldata.WorkflowStatusResponse.ShardStreamState.tablet:type_name -> topodata.TabletAlias + 298, // 235: vtctldata.WorkflowStatusResponse.ShardStreams.streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamState + 297, // 236: vtctldata.WorkflowStatusResponse.TableCopyStateEntry.value:type_name -> vtctldata.WorkflowStatusResponse.TableCopyState + 299, // 237: vtctldata.WorkflowStatusResponse.ShardStreamsEntry.value:type_name -> vtctldata.WorkflowStatusResponse.ShardStreams + 307, // 238: vtctldata.WorkflowUpdateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 239, // [239:239] is the sub-list for method output_type + 239, // [239:239] is the sub-list for method input_type + 239, // [239:239] is the sub-list for extension type_name + 239, // [239:239] is the sub-list for extension extendee + 0, // [0:239] is the sub-list for field type_name } func init() { file_vtctldata_proto_init() } @@ -22966,8 +23217,20 @@ func file_vtctldata_proto_init() { return nil } } + file_vtctldata_proto_msgTypes[245].Exporter = func(v any, i int) any { + switch v := v.(*GetMirrorRulesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_vtctldata_proto_msgTypes[246].Exporter = func(v any, i int) any { - switch v := v.(*Workflow_ReplicationLocation); i { + switch v := v.(*GetMirrorRulesResponse); i { case 0: return &v.state case 1: @@ -22979,7 +23242,7 @@ func file_vtctldata_proto_init() { } } file_vtctldata_proto_msgTypes[247].Exporter = func(v any, i int) any { - switch v := v.(*Workflow_ShardStream); i { + switch v := v.(*WorkflowMirrorTrafficRequest); i { case 0: return &v.state case 1: @@ -22991,6 +23254,42 @@ func file_vtctldata_proto_init() { } } file_vtctldata_proto_msgTypes[248].Exporter = func(v any, i int) any { + switch v := v.(*WorkflowMirrorTrafficResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtctldata_proto_msgTypes[250].Exporter = func(v any, i int) any { + switch v := v.(*Workflow_ReplicationLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtctldata_proto_msgTypes[251].Exporter = func(v any, i int) any { + switch v := v.(*Workflow_ShardStream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtctldata_proto_msgTypes[252].Exporter = func(v any, i int) any { switch v := v.(*Workflow_Stream); i { case 0: return &v.state @@ -23002,7 +23301,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[249].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[253].Exporter = func(v any, i int) any { switch v := v.(*Workflow_Stream_CopyState); i { case 0: return &v.state @@ -23014,7 +23313,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[250].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[254].Exporter = func(v any, i int) any { switch v := v.(*Workflow_Stream_Log); i { case 0: return &v.state @@ -23026,7 +23325,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[251].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[255].Exporter = func(v any, i int) any { switch v := v.(*Workflow_Stream_ThrottlerStatus); i { case 0: return &v.state @@ -23038,7 +23337,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[254].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[258].Exporter = func(v any, i int) any { switch v := v.(*ApplyVSchemaResponse_ParamList); i { case 0: return &v.state @@ -23050,7 +23349,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[256].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[260].Exporter = func(v any, i int) any { switch v := v.(*CheckThrottlerResponse_Metric); i { case 0: return &v.state @@ -23062,7 +23361,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[265].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[269].Exporter = func(v any, i int) any { switch v := v.(*GetSrvKeyspaceNamesResponse_NameList); i { case 0: return &v.state @@ -23074,7 +23373,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[268].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[272].Exporter = func(v any, i int) any { switch v := v.(*GetThrottlerStatusResponse_MetricResult); i { case 0: return &v.state @@ -23086,7 +23385,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[271].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[275].Exporter = func(v any, i int) any { switch v := v.(*GetThrottlerStatusResponse_MetricHealth); i { case 0: return &v.state @@ -23098,7 +23397,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[275].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[279].Exporter = func(v any, i int) any { switch v := v.(*GetThrottlerStatusResponse_RecentApp); i { case 0: return &v.state @@ -23110,7 +23409,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[278].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[282].Exporter = func(v any, i int) any { switch v := v.(*MoveTablesCreateResponse_TabletInfo); i { case 0: return &v.state @@ -23122,7 +23421,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[288].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[292].Exporter = func(v any, i int) any { switch v := v.(*WorkflowDeleteResponse_TabletInfo); i { case 0: return &v.state @@ -23134,7 +23433,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[289].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[293].Exporter = func(v any, i int) any { switch v := v.(*WorkflowStatusResponse_TableCopyState); i { case 0: return &v.state @@ -23146,7 +23445,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[290].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[294].Exporter = func(v any, i int) any { switch v := v.(*WorkflowStatusResponse_ShardStreamState); i { case 0: return &v.state @@ -23158,7 +23457,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[291].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[295].Exporter = func(v any, i int) any { switch v := v.(*WorkflowStatusResponse_ShardStreams); i { case 0: return &v.state @@ -23170,7 +23469,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[294].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[298].Exporter = func(v any, i int) any { switch v := v.(*WorkflowUpdateResponse_TabletInfo); i { case 0: return &v.state @@ -23189,7 +23488,7 @@ func file_vtctldata_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vtctldata_proto_rawDesc, NumEnums: 4, - NumMessages: 295, + NumMessages: 299, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go index 0c23573ec48..cd52155d618 100644 --- a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go +++ b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go @@ -5792,6 +5792,85 @@ func (m *WorkflowUpdateResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *GetMirrorRulesRequest) CloneVT() *GetMirrorRulesRequest { + if m == nil { + return (*GetMirrorRulesRequest)(nil) + } + r := &GetMirrorRulesRequest{} + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetMirrorRulesRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetMirrorRulesResponse) CloneVT() *GetMirrorRulesResponse { + if m == nil { + return (*GetMirrorRulesResponse)(nil) + } + r := &GetMirrorRulesResponse{ + MirrorRules: m.MirrorRules.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetMirrorRulesResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *WorkflowMirrorTrafficRequest) CloneVT() *WorkflowMirrorTrafficRequest { + if m == nil { + return (*WorkflowMirrorTrafficRequest)(nil) + } + r := &WorkflowMirrorTrafficRequest{ + Keyspace: m.Keyspace, + Workflow: m.Workflow, + Percent: m.Percent, + } + if rhs := m.TabletTypes; rhs != nil { + tmpContainer := make([]topodata.TabletType, len(rhs)) + copy(tmpContainer, rhs) + r.TabletTypes = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *WorkflowMirrorTrafficRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *WorkflowMirrorTrafficResponse) CloneVT() *WorkflowMirrorTrafficResponse { + if m == nil { + return (*WorkflowMirrorTrafficResponse)(nil) + } + r := &WorkflowMirrorTrafficResponse{ + Summary: m.Summary, + StartState: m.StartState, + CurrentState: m.CurrentState, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *WorkflowMirrorTrafficResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *ExecuteVtctlCommandRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -21228,6 +21307,210 @@ func (m *WorkflowUpdateResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *GetMirrorRulesRequest) 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 *GetMirrorRulesRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetMirrorRulesRequest) 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) + } + return len(dAtA) - i, nil +} + +func (m *GetMirrorRulesResponse) 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 *GetMirrorRulesResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetMirrorRulesResponse) 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.MirrorRules != nil { + size, err := m.MirrorRules.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WorkflowMirrorTrafficRequest) 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 *WorkflowMirrorTrafficRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *WorkflowMirrorTrafficRequest) 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.Percent != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Percent)))) + i-- + dAtA[i] = 0x25 + } + if len(m.TabletTypes) > 0 { + var pksize2 int + for _, num := range m.TabletTypes { + pksize2 += sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range m.TabletTypes { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = encodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(m.Workflow) > 0 { + i -= len(m.Workflow) + copy(dAtA[i:], m.Workflow) + i = encodeVarint(dAtA, i, uint64(len(m.Workflow))) + i-- + dAtA[i] = 0x12 + } + 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WorkflowMirrorTrafficResponse) 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 *WorkflowMirrorTrafficResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *WorkflowMirrorTrafficResponse) 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 len(m.CurrentState) > 0 { + i -= len(m.CurrentState) + copy(dAtA[i:], m.CurrentState) + i = encodeVarint(dAtA, i, uint64(len(m.CurrentState))) + i-- + dAtA[i] = 0x1a + } + if len(m.StartState) > 0 { + i -= len(m.StartState) + copy(dAtA[i:], m.StartState) + i = encodeVarint(dAtA, i, uint64(len(m.StartState))) + i-- + dAtA[i] = 0x12 + } + if len(m.Summary) > 0 { + i -= len(m.Summary) + copy(dAtA[i:], m.Summary) + i = encodeVarint(dAtA, i, uint64(len(m.Summary))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarint(dAtA []byte, offset int, v uint64) int { offset -= sov(v) base := offset @@ -27074,6 +27357,80 @@ func (m *WorkflowUpdateResponse) SizeVT() (n int) { return n } +func (m *GetMirrorRulesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *GetMirrorRulesResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MirrorRules != nil { + l = m.MirrorRules.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *WorkflowMirrorTrafficRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Keyspace) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Workflow) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.TabletTypes) > 0 { + l = 0 + for _, e := range m.TabletTypes { + l += sov(uint64(e)) + } + n += 1 + sov(uint64(l)) + l + } + if m.Percent != 0 { + n += 5 + } + n += len(m.unknownFields) + return n +} + +func (m *WorkflowMirrorTrafficResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Summary) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.StartState) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.CurrentState) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func sov(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } @@ -65422,6 +65779,486 @@ func (m *WorkflowUpdateResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *GetMirrorRulesRequest) 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: GetMirrorRulesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetMirrorRulesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *GetMirrorRulesResponse) 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: GetMirrorRulesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetMirrorRulesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MirrorRules", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MirrorRules == nil { + m.MirrorRules = &vschema.MirrorRules{} + } + if err := m.MirrorRules.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 *WorkflowMirrorTrafficRequest) 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: WorkflowMirrorTrafficRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WorkflowMirrorTrafficRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Workflow", 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.Workflow = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v topodata.TabletType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= topodata.TabletType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TabletTypes = append(m.TabletTypes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.TabletTypes) == 0 { + m.TabletTypes = make([]topodata.TabletType, 0, elementCount) + } + for iNdEx < postIndex { + var v topodata.TabletType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= topodata.TabletType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TabletTypes = append(m.TabletTypes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field TabletTypes", wireType) + } + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Percent", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Percent = float32(math.Float32frombits(v)) + 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 *WorkflowMirrorTrafficResponse) 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: WorkflowMirrorTrafficResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WorkflowMirrorTrafficResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Summary", 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.Summary = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartState", 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.StartState = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentState", 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.CurrentState = 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]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skip(dAtA []byte) (n int, err error) { l := len(dAtA) diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index 194571e550d..e5ff978e853 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -51,7 +51,7 @@ var file_vtctlservice_proto_rawDesc = []byte{ 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0x98, 0x56, 0x0a, 0x06, 0x56, 0x74, 0x63, 0x74, 0x6c, + 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0xdf, 0x57, 0x0a, 0x06, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, @@ -741,10 +741,22 @@ var file_vtctlservice_proto_rawDesc = []byte{ 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x2b, 0x5a, 0x29, 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, 0x63, 0x74, 0x6c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x63, 0x12, 0x27, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2b, 0x5a, 0x29, 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, 0x63, 0x74, 0x6c, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_vtctlservice_proto_goTypes = []any{ @@ -866,120 +878,124 @@ var file_vtctlservice_proto_goTypes = []any{ (*vtctldata.WorkflowStatusRequest)(nil), // 115: vtctldata.WorkflowStatusRequest (*vtctldata.WorkflowSwitchTrafficRequest)(nil), // 116: vtctldata.WorkflowSwitchTrafficRequest (*vtctldata.WorkflowUpdateRequest)(nil), // 117: vtctldata.WorkflowUpdateRequest - (*vtctldata.ExecuteVtctlCommandResponse)(nil), // 118: vtctldata.ExecuteVtctlCommandResponse - (*vtctldata.AddCellInfoResponse)(nil), // 119: vtctldata.AddCellInfoResponse - (*vtctldata.AddCellsAliasResponse)(nil), // 120: vtctldata.AddCellsAliasResponse - (*vtctldata.ApplyRoutingRulesResponse)(nil), // 121: vtctldata.ApplyRoutingRulesResponse - (*vtctldata.ApplySchemaResponse)(nil), // 122: vtctldata.ApplySchemaResponse - (*vtctldata.ApplyKeyspaceRoutingRulesResponse)(nil), // 123: vtctldata.ApplyKeyspaceRoutingRulesResponse - (*vtctldata.ApplyShardRoutingRulesResponse)(nil), // 124: vtctldata.ApplyShardRoutingRulesResponse - (*vtctldata.ApplyVSchemaResponse)(nil), // 125: vtctldata.ApplyVSchemaResponse - (*vtctldata.BackupResponse)(nil), // 126: vtctldata.BackupResponse - (*vtctldata.CancelSchemaMigrationResponse)(nil), // 127: vtctldata.CancelSchemaMigrationResponse - (*vtctldata.ChangeTabletTypeResponse)(nil), // 128: vtctldata.ChangeTabletTypeResponse - (*vtctldata.CheckThrottlerResponse)(nil), // 129: vtctldata.CheckThrottlerResponse - (*vtctldata.CleanupSchemaMigrationResponse)(nil), // 130: vtctldata.CleanupSchemaMigrationResponse - (*vtctldata.CompleteSchemaMigrationResponse)(nil), // 131: vtctldata.CompleteSchemaMigrationResponse - (*vtctldata.CreateKeyspaceResponse)(nil), // 132: vtctldata.CreateKeyspaceResponse - (*vtctldata.CreateShardResponse)(nil), // 133: vtctldata.CreateShardResponse - (*vtctldata.DeleteCellInfoResponse)(nil), // 134: vtctldata.DeleteCellInfoResponse - (*vtctldata.DeleteCellsAliasResponse)(nil), // 135: vtctldata.DeleteCellsAliasResponse - (*vtctldata.DeleteKeyspaceResponse)(nil), // 136: vtctldata.DeleteKeyspaceResponse - (*vtctldata.DeleteShardsResponse)(nil), // 137: vtctldata.DeleteShardsResponse - (*vtctldata.DeleteSrvVSchemaResponse)(nil), // 138: vtctldata.DeleteSrvVSchemaResponse - (*vtctldata.DeleteTabletsResponse)(nil), // 139: vtctldata.DeleteTabletsResponse - (*vtctldata.EmergencyReparentShardResponse)(nil), // 140: vtctldata.EmergencyReparentShardResponse - (*vtctldata.ExecuteFetchAsAppResponse)(nil), // 141: vtctldata.ExecuteFetchAsAppResponse - (*vtctldata.ExecuteFetchAsDBAResponse)(nil), // 142: vtctldata.ExecuteFetchAsDBAResponse - (*vtctldata.ExecuteHookResponse)(nil), // 143: vtctldata.ExecuteHookResponse - (*vtctldata.ExecuteMultiFetchAsDBAResponse)(nil), // 144: vtctldata.ExecuteMultiFetchAsDBAResponse - (*vtctldata.FindAllShardsInKeyspaceResponse)(nil), // 145: vtctldata.FindAllShardsInKeyspaceResponse - (*vtctldata.ForceCutOverSchemaMigrationResponse)(nil), // 146: vtctldata.ForceCutOverSchemaMigrationResponse - (*vtctldata.GetBackupsResponse)(nil), // 147: vtctldata.GetBackupsResponse - (*vtctldata.GetCellInfoResponse)(nil), // 148: vtctldata.GetCellInfoResponse - (*vtctldata.GetCellInfoNamesResponse)(nil), // 149: vtctldata.GetCellInfoNamesResponse - (*vtctldata.GetCellsAliasesResponse)(nil), // 150: vtctldata.GetCellsAliasesResponse - (*vtctldata.GetFullStatusResponse)(nil), // 151: vtctldata.GetFullStatusResponse - (*vtctldata.GetKeyspaceResponse)(nil), // 152: vtctldata.GetKeyspaceResponse - (*vtctldata.GetKeyspacesResponse)(nil), // 153: vtctldata.GetKeyspacesResponse - (*vtctldata.GetKeyspaceRoutingRulesResponse)(nil), // 154: vtctldata.GetKeyspaceRoutingRulesResponse - (*vtctldata.GetPermissionsResponse)(nil), // 155: vtctldata.GetPermissionsResponse - (*vtctldata.GetRoutingRulesResponse)(nil), // 156: vtctldata.GetRoutingRulesResponse - (*vtctldata.GetSchemaResponse)(nil), // 157: vtctldata.GetSchemaResponse - (*vtctldata.GetSchemaMigrationsResponse)(nil), // 158: vtctldata.GetSchemaMigrationsResponse - (*vtctldata.GetShardReplicationResponse)(nil), // 159: vtctldata.GetShardReplicationResponse - (*vtctldata.GetShardResponse)(nil), // 160: vtctldata.GetShardResponse - (*vtctldata.GetShardRoutingRulesResponse)(nil), // 161: vtctldata.GetShardRoutingRulesResponse - (*vtctldata.GetSrvKeyspaceNamesResponse)(nil), // 162: vtctldata.GetSrvKeyspaceNamesResponse - (*vtctldata.GetSrvKeyspacesResponse)(nil), // 163: vtctldata.GetSrvKeyspacesResponse - (*vtctldata.UpdateThrottlerConfigResponse)(nil), // 164: vtctldata.UpdateThrottlerConfigResponse - (*vtctldata.GetSrvVSchemaResponse)(nil), // 165: vtctldata.GetSrvVSchemaResponse - (*vtctldata.GetSrvVSchemasResponse)(nil), // 166: vtctldata.GetSrvVSchemasResponse - (*vtctldata.GetTabletResponse)(nil), // 167: vtctldata.GetTabletResponse - (*vtctldata.GetTabletsResponse)(nil), // 168: vtctldata.GetTabletsResponse - (*vtctldata.GetThrottlerStatusResponse)(nil), // 169: vtctldata.GetThrottlerStatusResponse - (*vtctldata.GetTopologyPathResponse)(nil), // 170: vtctldata.GetTopologyPathResponse - (*vtctldata.GetVersionResponse)(nil), // 171: vtctldata.GetVersionResponse - (*vtctldata.GetVSchemaResponse)(nil), // 172: vtctldata.GetVSchemaResponse - (*vtctldata.GetWorkflowsResponse)(nil), // 173: vtctldata.GetWorkflowsResponse - (*vtctldata.InitShardPrimaryResponse)(nil), // 174: vtctldata.InitShardPrimaryResponse - (*vtctldata.LaunchSchemaMigrationResponse)(nil), // 175: vtctldata.LaunchSchemaMigrationResponse - (*vtctldata.LookupVindexCreateResponse)(nil), // 176: vtctldata.LookupVindexCreateResponse - (*vtctldata.LookupVindexExternalizeResponse)(nil), // 177: vtctldata.LookupVindexExternalizeResponse - (*vtctldata.MaterializeCreateResponse)(nil), // 178: vtctldata.MaterializeCreateResponse - (*vtctldata.WorkflowStatusResponse)(nil), // 179: vtctldata.WorkflowStatusResponse - (*vtctldata.MountRegisterResponse)(nil), // 180: vtctldata.MountRegisterResponse - (*vtctldata.MountUnregisterResponse)(nil), // 181: vtctldata.MountUnregisterResponse - (*vtctldata.MountShowResponse)(nil), // 182: vtctldata.MountShowResponse - (*vtctldata.MountListResponse)(nil), // 183: vtctldata.MountListResponse - (*vtctldata.MoveTablesCompleteResponse)(nil), // 184: vtctldata.MoveTablesCompleteResponse - (*vtctldata.PingTabletResponse)(nil), // 185: vtctldata.PingTabletResponse - (*vtctldata.PlannedReparentShardResponse)(nil), // 186: vtctldata.PlannedReparentShardResponse - (*vtctldata.RebuildKeyspaceGraphResponse)(nil), // 187: vtctldata.RebuildKeyspaceGraphResponse - (*vtctldata.RebuildVSchemaGraphResponse)(nil), // 188: vtctldata.RebuildVSchemaGraphResponse - (*vtctldata.RefreshStateResponse)(nil), // 189: vtctldata.RefreshStateResponse - (*vtctldata.RefreshStateByShardResponse)(nil), // 190: vtctldata.RefreshStateByShardResponse - (*vtctldata.ReloadSchemaResponse)(nil), // 191: vtctldata.ReloadSchemaResponse - (*vtctldata.ReloadSchemaKeyspaceResponse)(nil), // 192: vtctldata.ReloadSchemaKeyspaceResponse - (*vtctldata.ReloadSchemaShardResponse)(nil), // 193: vtctldata.ReloadSchemaShardResponse - (*vtctldata.RemoveBackupResponse)(nil), // 194: vtctldata.RemoveBackupResponse - (*vtctldata.RemoveKeyspaceCellResponse)(nil), // 195: vtctldata.RemoveKeyspaceCellResponse - (*vtctldata.RemoveShardCellResponse)(nil), // 196: vtctldata.RemoveShardCellResponse - (*vtctldata.ReparentTabletResponse)(nil), // 197: vtctldata.ReparentTabletResponse - (*vtctldata.RestoreFromBackupResponse)(nil), // 198: vtctldata.RestoreFromBackupResponse - (*vtctldata.RetrySchemaMigrationResponse)(nil), // 199: vtctldata.RetrySchemaMigrationResponse - (*vtctldata.RunHealthCheckResponse)(nil), // 200: vtctldata.RunHealthCheckResponse - (*vtctldata.SetKeyspaceDurabilityPolicyResponse)(nil), // 201: vtctldata.SetKeyspaceDurabilityPolicyResponse - (*vtctldata.SetShardIsPrimaryServingResponse)(nil), // 202: vtctldata.SetShardIsPrimaryServingResponse - (*vtctldata.SetShardTabletControlResponse)(nil), // 203: vtctldata.SetShardTabletControlResponse - (*vtctldata.SetWritableResponse)(nil), // 204: vtctldata.SetWritableResponse - (*vtctldata.ShardReplicationAddResponse)(nil), // 205: vtctldata.ShardReplicationAddResponse - (*vtctldata.ShardReplicationFixResponse)(nil), // 206: vtctldata.ShardReplicationFixResponse - (*vtctldata.ShardReplicationPositionsResponse)(nil), // 207: vtctldata.ShardReplicationPositionsResponse - (*vtctldata.ShardReplicationRemoveResponse)(nil), // 208: vtctldata.ShardReplicationRemoveResponse - (*vtctldata.SleepTabletResponse)(nil), // 209: vtctldata.SleepTabletResponse - (*vtctldata.SourceShardAddResponse)(nil), // 210: vtctldata.SourceShardAddResponse - (*vtctldata.SourceShardDeleteResponse)(nil), // 211: vtctldata.SourceShardDeleteResponse - (*vtctldata.StartReplicationResponse)(nil), // 212: vtctldata.StartReplicationResponse - (*vtctldata.StopReplicationResponse)(nil), // 213: vtctldata.StopReplicationResponse - (*vtctldata.TabletExternallyReparentedResponse)(nil), // 214: vtctldata.TabletExternallyReparentedResponse - (*vtctldata.UpdateCellInfoResponse)(nil), // 215: vtctldata.UpdateCellInfoResponse - (*vtctldata.UpdateCellsAliasResponse)(nil), // 216: vtctldata.UpdateCellsAliasResponse - (*vtctldata.ValidateResponse)(nil), // 217: vtctldata.ValidateResponse - (*vtctldata.ValidateKeyspaceResponse)(nil), // 218: vtctldata.ValidateKeyspaceResponse - (*vtctldata.ValidateSchemaKeyspaceResponse)(nil), // 219: vtctldata.ValidateSchemaKeyspaceResponse - (*vtctldata.ValidateShardResponse)(nil), // 220: vtctldata.ValidateShardResponse - (*vtctldata.ValidateVersionKeyspaceResponse)(nil), // 221: vtctldata.ValidateVersionKeyspaceResponse - (*vtctldata.ValidateVersionShardResponse)(nil), // 222: vtctldata.ValidateVersionShardResponse - (*vtctldata.ValidateVSchemaResponse)(nil), // 223: vtctldata.ValidateVSchemaResponse - (*vtctldata.VDiffCreateResponse)(nil), // 224: vtctldata.VDiffCreateResponse - (*vtctldata.VDiffDeleteResponse)(nil), // 225: vtctldata.VDiffDeleteResponse - (*vtctldata.VDiffResumeResponse)(nil), // 226: vtctldata.VDiffResumeResponse - (*vtctldata.VDiffShowResponse)(nil), // 227: vtctldata.VDiffShowResponse - (*vtctldata.VDiffStopResponse)(nil), // 228: vtctldata.VDiffStopResponse - (*vtctldata.WorkflowDeleteResponse)(nil), // 229: vtctldata.WorkflowDeleteResponse - (*vtctldata.WorkflowSwitchTrafficResponse)(nil), // 230: vtctldata.WorkflowSwitchTrafficResponse - (*vtctldata.WorkflowUpdateResponse)(nil), // 231: vtctldata.WorkflowUpdateResponse + (*vtctldata.GetMirrorRulesRequest)(nil), // 118: vtctldata.GetMirrorRulesRequest + (*vtctldata.WorkflowMirrorTrafficRequest)(nil), // 119: vtctldata.WorkflowMirrorTrafficRequest + (*vtctldata.ExecuteVtctlCommandResponse)(nil), // 120: vtctldata.ExecuteVtctlCommandResponse + (*vtctldata.AddCellInfoResponse)(nil), // 121: vtctldata.AddCellInfoResponse + (*vtctldata.AddCellsAliasResponse)(nil), // 122: vtctldata.AddCellsAliasResponse + (*vtctldata.ApplyRoutingRulesResponse)(nil), // 123: vtctldata.ApplyRoutingRulesResponse + (*vtctldata.ApplySchemaResponse)(nil), // 124: vtctldata.ApplySchemaResponse + (*vtctldata.ApplyKeyspaceRoutingRulesResponse)(nil), // 125: vtctldata.ApplyKeyspaceRoutingRulesResponse + (*vtctldata.ApplyShardRoutingRulesResponse)(nil), // 126: vtctldata.ApplyShardRoutingRulesResponse + (*vtctldata.ApplyVSchemaResponse)(nil), // 127: vtctldata.ApplyVSchemaResponse + (*vtctldata.BackupResponse)(nil), // 128: vtctldata.BackupResponse + (*vtctldata.CancelSchemaMigrationResponse)(nil), // 129: vtctldata.CancelSchemaMigrationResponse + (*vtctldata.ChangeTabletTypeResponse)(nil), // 130: vtctldata.ChangeTabletTypeResponse + (*vtctldata.CheckThrottlerResponse)(nil), // 131: vtctldata.CheckThrottlerResponse + (*vtctldata.CleanupSchemaMigrationResponse)(nil), // 132: vtctldata.CleanupSchemaMigrationResponse + (*vtctldata.CompleteSchemaMigrationResponse)(nil), // 133: vtctldata.CompleteSchemaMigrationResponse + (*vtctldata.CreateKeyspaceResponse)(nil), // 134: vtctldata.CreateKeyspaceResponse + (*vtctldata.CreateShardResponse)(nil), // 135: vtctldata.CreateShardResponse + (*vtctldata.DeleteCellInfoResponse)(nil), // 136: vtctldata.DeleteCellInfoResponse + (*vtctldata.DeleteCellsAliasResponse)(nil), // 137: vtctldata.DeleteCellsAliasResponse + (*vtctldata.DeleteKeyspaceResponse)(nil), // 138: vtctldata.DeleteKeyspaceResponse + (*vtctldata.DeleteShardsResponse)(nil), // 139: vtctldata.DeleteShardsResponse + (*vtctldata.DeleteSrvVSchemaResponse)(nil), // 140: vtctldata.DeleteSrvVSchemaResponse + (*vtctldata.DeleteTabletsResponse)(nil), // 141: vtctldata.DeleteTabletsResponse + (*vtctldata.EmergencyReparentShardResponse)(nil), // 142: vtctldata.EmergencyReparentShardResponse + (*vtctldata.ExecuteFetchAsAppResponse)(nil), // 143: vtctldata.ExecuteFetchAsAppResponse + (*vtctldata.ExecuteFetchAsDBAResponse)(nil), // 144: vtctldata.ExecuteFetchAsDBAResponse + (*vtctldata.ExecuteHookResponse)(nil), // 145: vtctldata.ExecuteHookResponse + (*vtctldata.ExecuteMultiFetchAsDBAResponse)(nil), // 146: vtctldata.ExecuteMultiFetchAsDBAResponse + (*vtctldata.FindAllShardsInKeyspaceResponse)(nil), // 147: vtctldata.FindAllShardsInKeyspaceResponse + (*vtctldata.ForceCutOverSchemaMigrationResponse)(nil), // 148: vtctldata.ForceCutOverSchemaMigrationResponse + (*vtctldata.GetBackupsResponse)(nil), // 149: vtctldata.GetBackupsResponse + (*vtctldata.GetCellInfoResponse)(nil), // 150: vtctldata.GetCellInfoResponse + (*vtctldata.GetCellInfoNamesResponse)(nil), // 151: vtctldata.GetCellInfoNamesResponse + (*vtctldata.GetCellsAliasesResponse)(nil), // 152: vtctldata.GetCellsAliasesResponse + (*vtctldata.GetFullStatusResponse)(nil), // 153: vtctldata.GetFullStatusResponse + (*vtctldata.GetKeyspaceResponse)(nil), // 154: vtctldata.GetKeyspaceResponse + (*vtctldata.GetKeyspacesResponse)(nil), // 155: vtctldata.GetKeyspacesResponse + (*vtctldata.GetKeyspaceRoutingRulesResponse)(nil), // 156: vtctldata.GetKeyspaceRoutingRulesResponse + (*vtctldata.GetPermissionsResponse)(nil), // 157: vtctldata.GetPermissionsResponse + (*vtctldata.GetRoutingRulesResponse)(nil), // 158: vtctldata.GetRoutingRulesResponse + (*vtctldata.GetSchemaResponse)(nil), // 159: vtctldata.GetSchemaResponse + (*vtctldata.GetSchemaMigrationsResponse)(nil), // 160: vtctldata.GetSchemaMigrationsResponse + (*vtctldata.GetShardReplicationResponse)(nil), // 161: vtctldata.GetShardReplicationResponse + (*vtctldata.GetShardResponse)(nil), // 162: vtctldata.GetShardResponse + (*vtctldata.GetShardRoutingRulesResponse)(nil), // 163: vtctldata.GetShardRoutingRulesResponse + (*vtctldata.GetSrvKeyspaceNamesResponse)(nil), // 164: vtctldata.GetSrvKeyspaceNamesResponse + (*vtctldata.GetSrvKeyspacesResponse)(nil), // 165: vtctldata.GetSrvKeyspacesResponse + (*vtctldata.UpdateThrottlerConfigResponse)(nil), // 166: vtctldata.UpdateThrottlerConfigResponse + (*vtctldata.GetSrvVSchemaResponse)(nil), // 167: vtctldata.GetSrvVSchemaResponse + (*vtctldata.GetSrvVSchemasResponse)(nil), // 168: vtctldata.GetSrvVSchemasResponse + (*vtctldata.GetTabletResponse)(nil), // 169: vtctldata.GetTabletResponse + (*vtctldata.GetTabletsResponse)(nil), // 170: vtctldata.GetTabletsResponse + (*vtctldata.GetThrottlerStatusResponse)(nil), // 171: vtctldata.GetThrottlerStatusResponse + (*vtctldata.GetTopologyPathResponse)(nil), // 172: vtctldata.GetTopologyPathResponse + (*vtctldata.GetVersionResponse)(nil), // 173: vtctldata.GetVersionResponse + (*vtctldata.GetVSchemaResponse)(nil), // 174: vtctldata.GetVSchemaResponse + (*vtctldata.GetWorkflowsResponse)(nil), // 175: vtctldata.GetWorkflowsResponse + (*vtctldata.InitShardPrimaryResponse)(nil), // 176: vtctldata.InitShardPrimaryResponse + (*vtctldata.LaunchSchemaMigrationResponse)(nil), // 177: vtctldata.LaunchSchemaMigrationResponse + (*vtctldata.LookupVindexCreateResponse)(nil), // 178: vtctldata.LookupVindexCreateResponse + (*vtctldata.LookupVindexExternalizeResponse)(nil), // 179: vtctldata.LookupVindexExternalizeResponse + (*vtctldata.MaterializeCreateResponse)(nil), // 180: vtctldata.MaterializeCreateResponse + (*vtctldata.WorkflowStatusResponse)(nil), // 181: vtctldata.WorkflowStatusResponse + (*vtctldata.MountRegisterResponse)(nil), // 182: vtctldata.MountRegisterResponse + (*vtctldata.MountUnregisterResponse)(nil), // 183: vtctldata.MountUnregisterResponse + (*vtctldata.MountShowResponse)(nil), // 184: vtctldata.MountShowResponse + (*vtctldata.MountListResponse)(nil), // 185: vtctldata.MountListResponse + (*vtctldata.MoveTablesCompleteResponse)(nil), // 186: vtctldata.MoveTablesCompleteResponse + (*vtctldata.PingTabletResponse)(nil), // 187: vtctldata.PingTabletResponse + (*vtctldata.PlannedReparentShardResponse)(nil), // 188: vtctldata.PlannedReparentShardResponse + (*vtctldata.RebuildKeyspaceGraphResponse)(nil), // 189: vtctldata.RebuildKeyspaceGraphResponse + (*vtctldata.RebuildVSchemaGraphResponse)(nil), // 190: vtctldata.RebuildVSchemaGraphResponse + (*vtctldata.RefreshStateResponse)(nil), // 191: vtctldata.RefreshStateResponse + (*vtctldata.RefreshStateByShardResponse)(nil), // 192: vtctldata.RefreshStateByShardResponse + (*vtctldata.ReloadSchemaResponse)(nil), // 193: vtctldata.ReloadSchemaResponse + (*vtctldata.ReloadSchemaKeyspaceResponse)(nil), // 194: vtctldata.ReloadSchemaKeyspaceResponse + (*vtctldata.ReloadSchemaShardResponse)(nil), // 195: vtctldata.ReloadSchemaShardResponse + (*vtctldata.RemoveBackupResponse)(nil), // 196: vtctldata.RemoveBackupResponse + (*vtctldata.RemoveKeyspaceCellResponse)(nil), // 197: vtctldata.RemoveKeyspaceCellResponse + (*vtctldata.RemoveShardCellResponse)(nil), // 198: vtctldata.RemoveShardCellResponse + (*vtctldata.ReparentTabletResponse)(nil), // 199: vtctldata.ReparentTabletResponse + (*vtctldata.RestoreFromBackupResponse)(nil), // 200: vtctldata.RestoreFromBackupResponse + (*vtctldata.RetrySchemaMigrationResponse)(nil), // 201: vtctldata.RetrySchemaMigrationResponse + (*vtctldata.RunHealthCheckResponse)(nil), // 202: vtctldata.RunHealthCheckResponse + (*vtctldata.SetKeyspaceDurabilityPolicyResponse)(nil), // 203: vtctldata.SetKeyspaceDurabilityPolicyResponse + (*vtctldata.SetShardIsPrimaryServingResponse)(nil), // 204: vtctldata.SetShardIsPrimaryServingResponse + (*vtctldata.SetShardTabletControlResponse)(nil), // 205: vtctldata.SetShardTabletControlResponse + (*vtctldata.SetWritableResponse)(nil), // 206: vtctldata.SetWritableResponse + (*vtctldata.ShardReplicationAddResponse)(nil), // 207: vtctldata.ShardReplicationAddResponse + (*vtctldata.ShardReplicationFixResponse)(nil), // 208: vtctldata.ShardReplicationFixResponse + (*vtctldata.ShardReplicationPositionsResponse)(nil), // 209: vtctldata.ShardReplicationPositionsResponse + (*vtctldata.ShardReplicationRemoveResponse)(nil), // 210: vtctldata.ShardReplicationRemoveResponse + (*vtctldata.SleepTabletResponse)(nil), // 211: vtctldata.SleepTabletResponse + (*vtctldata.SourceShardAddResponse)(nil), // 212: vtctldata.SourceShardAddResponse + (*vtctldata.SourceShardDeleteResponse)(nil), // 213: vtctldata.SourceShardDeleteResponse + (*vtctldata.StartReplicationResponse)(nil), // 214: vtctldata.StartReplicationResponse + (*vtctldata.StopReplicationResponse)(nil), // 215: vtctldata.StopReplicationResponse + (*vtctldata.TabletExternallyReparentedResponse)(nil), // 216: vtctldata.TabletExternallyReparentedResponse + (*vtctldata.UpdateCellInfoResponse)(nil), // 217: vtctldata.UpdateCellInfoResponse + (*vtctldata.UpdateCellsAliasResponse)(nil), // 218: vtctldata.UpdateCellsAliasResponse + (*vtctldata.ValidateResponse)(nil), // 219: vtctldata.ValidateResponse + (*vtctldata.ValidateKeyspaceResponse)(nil), // 220: vtctldata.ValidateKeyspaceResponse + (*vtctldata.ValidateSchemaKeyspaceResponse)(nil), // 221: vtctldata.ValidateSchemaKeyspaceResponse + (*vtctldata.ValidateShardResponse)(nil), // 222: vtctldata.ValidateShardResponse + (*vtctldata.ValidateVersionKeyspaceResponse)(nil), // 223: vtctldata.ValidateVersionKeyspaceResponse + (*vtctldata.ValidateVersionShardResponse)(nil), // 224: vtctldata.ValidateVersionShardResponse + (*vtctldata.ValidateVSchemaResponse)(nil), // 225: vtctldata.ValidateVSchemaResponse + (*vtctldata.VDiffCreateResponse)(nil), // 226: vtctldata.VDiffCreateResponse + (*vtctldata.VDiffDeleteResponse)(nil), // 227: vtctldata.VDiffDeleteResponse + (*vtctldata.VDiffResumeResponse)(nil), // 228: vtctldata.VDiffResumeResponse + (*vtctldata.VDiffShowResponse)(nil), // 229: vtctldata.VDiffShowResponse + (*vtctldata.VDiffStopResponse)(nil), // 230: vtctldata.VDiffStopResponse + (*vtctldata.WorkflowDeleteResponse)(nil), // 231: vtctldata.WorkflowDeleteResponse + (*vtctldata.WorkflowSwitchTrafficResponse)(nil), // 232: vtctldata.WorkflowSwitchTrafficResponse + (*vtctldata.WorkflowUpdateResponse)(nil), // 233: vtctldata.WorkflowUpdateResponse + (*vtctldata.GetMirrorRulesResponse)(nil), // 234: vtctldata.GetMirrorRulesResponse + (*vtctldata.WorkflowMirrorTrafficResponse)(nil), // 235: vtctldata.WorkflowMirrorTrafficResponse } var file_vtctlservice_proto_depIdxs = []int32{ 0, // 0: vtctlservice.Vtctl.ExecuteVtctlCommand:input_type -> vtctldata.ExecuteVtctlCommandRequest @@ -1100,126 +1116,130 @@ var file_vtctlservice_proto_depIdxs = []int32{ 115, // 115: vtctlservice.Vtctld.WorkflowStatus:input_type -> vtctldata.WorkflowStatusRequest 116, // 116: vtctlservice.Vtctld.WorkflowSwitchTraffic:input_type -> vtctldata.WorkflowSwitchTrafficRequest 117, // 117: vtctlservice.Vtctld.WorkflowUpdate:input_type -> vtctldata.WorkflowUpdateRequest - 118, // 118: vtctlservice.Vtctl.ExecuteVtctlCommand:output_type -> vtctldata.ExecuteVtctlCommandResponse - 119, // 119: vtctlservice.Vtctld.AddCellInfo:output_type -> vtctldata.AddCellInfoResponse - 120, // 120: vtctlservice.Vtctld.AddCellsAlias:output_type -> vtctldata.AddCellsAliasResponse - 121, // 121: vtctlservice.Vtctld.ApplyRoutingRules:output_type -> vtctldata.ApplyRoutingRulesResponse - 122, // 122: vtctlservice.Vtctld.ApplySchema:output_type -> vtctldata.ApplySchemaResponse - 123, // 123: vtctlservice.Vtctld.ApplyKeyspaceRoutingRules:output_type -> vtctldata.ApplyKeyspaceRoutingRulesResponse - 124, // 124: vtctlservice.Vtctld.ApplyShardRoutingRules:output_type -> vtctldata.ApplyShardRoutingRulesResponse - 125, // 125: vtctlservice.Vtctld.ApplyVSchema:output_type -> vtctldata.ApplyVSchemaResponse - 126, // 126: vtctlservice.Vtctld.Backup:output_type -> vtctldata.BackupResponse - 126, // 127: vtctlservice.Vtctld.BackupShard:output_type -> vtctldata.BackupResponse - 127, // 128: vtctlservice.Vtctld.CancelSchemaMigration:output_type -> vtctldata.CancelSchemaMigrationResponse - 128, // 129: vtctlservice.Vtctld.ChangeTabletType:output_type -> vtctldata.ChangeTabletTypeResponse - 129, // 130: vtctlservice.Vtctld.CheckThrottler:output_type -> vtctldata.CheckThrottlerResponse - 130, // 131: vtctlservice.Vtctld.CleanupSchemaMigration:output_type -> vtctldata.CleanupSchemaMigrationResponse - 131, // 132: vtctlservice.Vtctld.CompleteSchemaMigration:output_type -> vtctldata.CompleteSchemaMigrationResponse - 132, // 133: vtctlservice.Vtctld.CreateKeyspace:output_type -> vtctldata.CreateKeyspaceResponse - 133, // 134: vtctlservice.Vtctld.CreateShard:output_type -> vtctldata.CreateShardResponse - 134, // 135: vtctlservice.Vtctld.DeleteCellInfo:output_type -> vtctldata.DeleteCellInfoResponse - 135, // 136: vtctlservice.Vtctld.DeleteCellsAlias:output_type -> vtctldata.DeleteCellsAliasResponse - 136, // 137: vtctlservice.Vtctld.DeleteKeyspace:output_type -> vtctldata.DeleteKeyspaceResponse - 137, // 138: vtctlservice.Vtctld.DeleteShards:output_type -> vtctldata.DeleteShardsResponse - 138, // 139: vtctlservice.Vtctld.DeleteSrvVSchema:output_type -> vtctldata.DeleteSrvVSchemaResponse - 139, // 140: vtctlservice.Vtctld.DeleteTablets:output_type -> vtctldata.DeleteTabletsResponse - 140, // 141: vtctlservice.Vtctld.EmergencyReparentShard:output_type -> vtctldata.EmergencyReparentShardResponse - 141, // 142: vtctlservice.Vtctld.ExecuteFetchAsApp:output_type -> vtctldata.ExecuteFetchAsAppResponse - 142, // 143: vtctlservice.Vtctld.ExecuteFetchAsDBA:output_type -> vtctldata.ExecuteFetchAsDBAResponse - 143, // 144: vtctlservice.Vtctld.ExecuteHook:output_type -> vtctldata.ExecuteHookResponse - 144, // 145: vtctlservice.Vtctld.ExecuteMultiFetchAsDBA:output_type -> vtctldata.ExecuteMultiFetchAsDBAResponse - 145, // 146: vtctlservice.Vtctld.FindAllShardsInKeyspace:output_type -> vtctldata.FindAllShardsInKeyspaceResponse - 146, // 147: vtctlservice.Vtctld.ForceCutOverSchemaMigration:output_type -> vtctldata.ForceCutOverSchemaMigrationResponse - 147, // 148: vtctlservice.Vtctld.GetBackups:output_type -> vtctldata.GetBackupsResponse - 148, // 149: vtctlservice.Vtctld.GetCellInfo:output_type -> vtctldata.GetCellInfoResponse - 149, // 150: vtctlservice.Vtctld.GetCellInfoNames:output_type -> vtctldata.GetCellInfoNamesResponse - 150, // 151: vtctlservice.Vtctld.GetCellsAliases:output_type -> vtctldata.GetCellsAliasesResponse - 151, // 152: vtctlservice.Vtctld.GetFullStatus:output_type -> vtctldata.GetFullStatusResponse - 152, // 153: vtctlservice.Vtctld.GetKeyspace:output_type -> vtctldata.GetKeyspaceResponse - 153, // 154: vtctlservice.Vtctld.GetKeyspaces:output_type -> vtctldata.GetKeyspacesResponse - 154, // 155: vtctlservice.Vtctld.GetKeyspaceRoutingRules:output_type -> vtctldata.GetKeyspaceRoutingRulesResponse - 155, // 156: vtctlservice.Vtctld.GetPermissions:output_type -> vtctldata.GetPermissionsResponse - 156, // 157: vtctlservice.Vtctld.GetRoutingRules:output_type -> vtctldata.GetRoutingRulesResponse - 157, // 158: vtctlservice.Vtctld.GetSchema:output_type -> vtctldata.GetSchemaResponse - 158, // 159: vtctlservice.Vtctld.GetSchemaMigrations:output_type -> vtctldata.GetSchemaMigrationsResponse - 159, // 160: vtctlservice.Vtctld.GetShardReplication:output_type -> vtctldata.GetShardReplicationResponse - 160, // 161: vtctlservice.Vtctld.GetShard:output_type -> vtctldata.GetShardResponse - 161, // 162: vtctlservice.Vtctld.GetShardRoutingRules:output_type -> vtctldata.GetShardRoutingRulesResponse - 162, // 163: vtctlservice.Vtctld.GetSrvKeyspaceNames:output_type -> vtctldata.GetSrvKeyspaceNamesResponse - 163, // 164: vtctlservice.Vtctld.GetSrvKeyspaces:output_type -> vtctldata.GetSrvKeyspacesResponse - 164, // 165: vtctlservice.Vtctld.UpdateThrottlerConfig:output_type -> vtctldata.UpdateThrottlerConfigResponse - 165, // 166: vtctlservice.Vtctld.GetSrvVSchema:output_type -> vtctldata.GetSrvVSchemaResponse - 166, // 167: vtctlservice.Vtctld.GetSrvVSchemas:output_type -> vtctldata.GetSrvVSchemasResponse - 167, // 168: vtctlservice.Vtctld.GetTablet:output_type -> vtctldata.GetTabletResponse - 168, // 169: vtctlservice.Vtctld.GetTablets:output_type -> vtctldata.GetTabletsResponse - 169, // 170: vtctlservice.Vtctld.GetThrottlerStatus:output_type -> vtctldata.GetThrottlerStatusResponse - 170, // 171: vtctlservice.Vtctld.GetTopologyPath:output_type -> vtctldata.GetTopologyPathResponse - 171, // 172: vtctlservice.Vtctld.GetVersion:output_type -> vtctldata.GetVersionResponse - 172, // 173: vtctlservice.Vtctld.GetVSchema:output_type -> vtctldata.GetVSchemaResponse - 173, // 174: vtctlservice.Vtctld.GetWorkflows:output_type -> vtctldata.GetWorkflowsResponse - 174, // 175: vtctlservice.Vtctld.InitShardPrimary:output_type -> vtctldata.InitShardPrimaryResponse - 175, // 176: vtctlservice.Vtctld.LaunchSchemaMigration:output_type -> vtctldata.LaunchSchemaMigrationResponse - 176, // 177: vtctlservice.Vtctld.LookupVindexCreate:output_type -> vtctldata.LookupVindexCreateResponse - 177, // 178: vtctlservice.Vtctld.LookupVindexExternalize:output_type -> vtctldata.LookupVindexExternalizeResponse - 178, // 179: vtctlservice.Vtctld.MaterializeCreate:output_type -> vtctldata.MaterializeCreateResponse - 179, // 180: vtctlservice.Vtctld.MigrateCreate:output_type -> vtctldata.WorkflowStatusResponse - 180, // 181: vtctlservice.Vtctld.MountRegister:output_type -> vtctldata.MountRegisterResponse - 181, // 182: vtctlservice.Vtctld.MountUnregister:output_type -> vtctldata.MountUnregisterResponse - 182, // 183: vtctlservice.Vtctld.MountShow:output_type -> vtctldata.MountShowResponse - 183, // 184: vtctlservice.Vtctld.MountList:output_type -> vtctldata.MountListResponse - 179, // 185: vtctlservice.Vtctld.MoveTablesCreate:output_type -> vtctldata.WorkflowStatusResponse - 184, // 186: vtctlservice.Vtctld.MoveTablesComplete:output_type -> vtctldata.MoveTablesCompleteResponse - 185, // 187: vtctlservice.Vtctld.PingTablet:output_type -> vtctldata.PingTabletResponse - 186, // 188: vtctlservice.Vtctld.PlannedReparentShard:output_type -> vtctldata.PlannedReparentShardResponse - 187, // 189: vtctlservice.Vtctld.RebuildKeyspaceGraph:output_type -> vtctldata.RebuildKeyspaceGraphResponse - 188, // 190: vtctlservice.Vtctld.RebuildVSchemaGraph:output_type -> vtctldata.RebuildVSchemaGraphResponse - 189, // 191: vtctlservice.Vtctld.RefreshState:output_type -> vtctldata.RefreshStateResponse - 190, // 192: vtctlservice.Vtctld.RefreshStateByShard:output_type -> vtctldata.RefreshStateByShardResponse - 191, // 193: vtctlservice.Vtctld.ReloadSchema:output_type -> vtctldata.ReloadSchemaResponse - 192, // 194: vtctlservice.Vtctld.ReloadSchemaKeyspace:output_type -> vtctldata.ReloadSchemaKeyspaceResponse - 193, // 195: vtctlservice.Vtctld.ReloadSchemaShard:output_type -> vtctldata.ReloadSchemaShardResponse - 194, // 196: vtctlservice.Vtctld.RemoveBackup:output_type -> vtctldata.RemoveBackupResponse - 195, // 197: vtctlservice.Vtctld.RemoveKeyspaceCell:output_type -> vtctldata.RemoveKeyspaceCellResponse - 196, // 198: vtctlservice.Vtctld.RemoveShardCell:output_type -> vtctldata.RemoveShardCellResponse - 197, // 199: vtctlservice.Vtctld.ReparentTablet:output_type -> vtctldata.ReparentTabletResponse - 179, // 200: vtctlservice.Vtctld.ReshardCreate:output_type -> vtctldata.WorkflowStatusResponse - 198, // 201: vtctlservice.Vtctld.RestoreFromBackup:output_type -> vtctldata.RestoreFromBackupResponse - 199, // 202: vtctlservice.Vtctld.RetrySchemaMigration:output_type -> vtctldata.RetrySchemaMigrationResponse - 200, // 203: vtctlservice.Vtctld.RunHealthCheck:output_type -> vtctldata.RunHealthCheckResponse - 201, // 204: vtctlservice.Vtctld.SetKeyspaceDurabilityPolicy:output_type -> vtctldata.SetKeyspaceDurabilityPolicyResponse - 202, // 205: vtctlservice.Vtctld.SetShardIsPrimaryServing:output_type -> vtctldata.SetShardIsPrimaryServingResponse - 203, // 206: vtctlservice.Vtctld.SetShardTabletControl:output_type -> vtctldata.SetShardTabletControlResponse - 204, // 207: vtctlservice.Vtctld.SetWritable:output_type -> vtctldata.SetWritableResponse - 205, // 208: vtctlservice.Vtctld.ShardReplicationAdd:output_type -> vtctldata.ShardReplicationAddResponse - 206, // 209: vtctlservice.Vtctld.ShardReplicationFix:output_type -> vtctldata.ShardReplicationFixResponse - 207, // 210: vtctlservice.Vtctld.ShardReplicationPositions:output_type -> vtctldata.ShardReplicationPositionsResponse - 208, // 211: vtctlservice.Vtctld.ShardReplicationRemove:output_type -> vtctldata.ShardReplicationRemoveResponse - 209, // 212: vtctlservice.Vtctld.SleepTablet:output_type -> vtctldata.SleepTabletResponse - 210, // 213: vtctlservice.Vtctld.SourceShardAdd:output_type -> vtctldata.SourceShardAddResponse - 211, // 214: vtctlservice.Vtctld.SourceShardDelete:output_type -> vtctldata.SourceShardDeleteResponse - 212, // 215: vtctlservice.Vtctld.StartReplication:output_type -> vtctldata.StartReplicationResponse - 213, // 216: vtctlservice.Vtctld.StopReplication:output_type -> vtctldata.StopReplicationResponse - 214, // 217: vtctlservice.Vtctld.TabletExternallyReparented:output_type -> vtctldata.TabletExternallyReparentedResponse - 215, // 218: vtctlservice.Vtctld.UpdateCellInfo:output_type -> vtctldata.UpdateCellInfoResponse - 216, // 219: vtctlservice.Vtctld.UpdateCellsAlias:output_type -> vtctldata.UpdateCellsAliasResponse - 217, // 220: vtctlservice.Vtctld.Validate:output_type -> vtctldata.ValidateResponse - 218, // 221: vtctlservice.Vtctld.ValidateKeyspace:output_type -> vtctldata.ValidateKeyspaceResponse - 219, // 222: vtctlservice.Vtctld.ValidateSchemaKeyspace:output_type -> vtctldata.ValidateSchemaKeyspaceResponse - 220, // 223: vtctlservice.Vtctld.ValidateShard:output_type -> vtctldata.ValidateShardResponse - 221, // 224: vtctlservice.Vtctld.ValidateVersionKeyspace:output_type -> vtctldata.ValidateVersionKeyspaceResponse - 222, // 225: vtctlservice.Vtctld.ValidateVersionShard:output_type -> vtctldata.ValidateVersionShardResponse - 223, // 226: vtctlservice.Vtctld.ValidateVSchema:output_type -> vtctldata.ValidateVSchemaResponse - 224, // 227: vtctlservice.Vtctld.VDiffCreate:output_type -> vtctldata.VDiffCreateResponse - 225, // 228: vtctlservice.Vtctld.VDiffDelete:output_type -> vtctldata.VDiffDeleteResponse - 226, // 229: vtctlservice.Vtctld.VDiffResume:output_type -> vtctldata.VDiffResumeResponse - 227, // 230: vtctlservice.Vtctld.VDiffShow:output_type -> vtctldata.VDiffShowResponse - 228, // 231: vtctlservice.Vtctld.VDiffStop:output_type -> vtctldata.VDiffStopResponse - 229, // 232: vtctlservice.Vtctld.WorkflowDelete:output_type -> vtctldata.WorkflowDeleteResponse - 179, // 233: vtctlservice.Vtctld.WorkflowStatus:output_type -> vtctldata.WorkflowStatusResponse - 230, // 234: vtctlservice.Vtctld.WorkflowSwitchTraffic:output_type -> vtctldata.WorkflowSwitchTrafficResponse - 231, // 235: vtctlservice.Vtctld.WorkflowUpdate:output_type -> vtctldata.WorkflowUpdateResponse - 118, // [118:236] is the sub-list for method output_type - 0, // [0:118] is the sub-list for method input_type + 118, // 118: vtctlservice.Vtctld.GetMirrorRules:input_type -> vtctldata.GetMirrorRulesRequest + 119, // 119: vtctlservice.Vtctld.WorkflowMirrorTraffic:input_type -> vtctldata.WorkflowMirrorTrafficRequest + 120, // 120: vtctlservice.Vtctl.ExecuteVtctlCommand:output_type -> vtctldata.ExecuteVtctlCommandResponse + 121, // 121: vtctlservice.Vtctld.AddCellInfo:output_type -> vtctldata.AddCellInfoResponse + 122, // 122: vtctlservice.Vtctld.AddCellsAlias:output_type -> vtctldata.AddCellsAliasResponse + 123, // 123: vtctlservice.Vtctld.ApplyRoutingRules:output_type -> vtctldata.ApplyRoutingRulesResponse + 124, // 124: vtctlservice.Vtctld.ApplySchema:output_type -> vtctldata.ApplySchemaResponse + 125, // 125: vtctlservice.Vtctld.ApplyKeyspaceRoutingRules:output_type -> vtctldata.ApplyKeyspaceRoutingRulesResponse + 126, // 126: vtctlservice.Vtctld.ApplyShardRoutingRules:output_type -> vtctldata.ApplyShardRoutingRulesResponse + 127, // 127: vtctlservice.Vtctld.ApplyVSchema:output_type -> vtctldata.ApplyVSchemaResponse + 128, // 128: vtctlservice.Vtctld.Backup:output_type -> vtctldata.BackupResponse + 128, // 129: vtctlservice.Vtctld.BackupShard:output_type -> vtctldata.BackupResponse + 129, // 130: vtctlservice.Vtctld.CancelSchemaMigration:output_type -> vtctldata.CancelSchemaMigrationResponse + 130, // 131: vtctlservice.Vtctld.ChangeTabletType:output_type -> vtctldata.ChangeTabletTypeResponse + 131, // 132: vtctlservice.Vtctld.CheckThrottler:output_type -> vtctldata.CheckThrottlerResponse + 132, // 133: vtctlservice.Vtctld.CleanupSchemaMigration:output_type -> vtctldata.CleanupSchemaMigrationResponse + 133, // 134: vtctlservice.Vtctld.CompleteSchemaMigration:output_type -> vtctldata.CompleteSchemaMigrationResponse + 134, // 135: vtctlservice.Vtctld.CreateKeyspace:output_type -> vtctldata.CreateKeyspaceResponse + 135, // 136: vtctlservice.Vtctld.CreateShard:output_type -> vtctldata.CreateShardResponse + 136, // 137: vtctlservice.Vtctld.DeleteCellInfo:output_type -> vtctldata.DeleteCellInfoResponse + 137, // 138: vtctlservice.Vtctld.DeleteCellsAlias:output_type -> vtctldata.DeleteCellsAliasResponse + 138, // 139: vtctlservice.Vtctld.DeleteKeyspace:output_type -> vtctldata.DeleteKeyspaceResponse + 139, // 140: vtctlservice.Vtctld.DeleteShards:output_type -> vtctldata.DeleteShardsResponse + 140, // 141: vtctlservice.Vtctld.DeleteSrvVSchema:output_type -> vtctldata.DeleteSrvVSchemaResponse + 141, // 142: vtctlservice.Vtctld.DeleteTablets:output_type -> vtctldata.DeleteTabletsResponse + 142, // 143: vtctlservice.Vtctld.EmergencyReparentShard:output_type -> vtctldata.EmergencyReparentShardResponse + 143, // 144: vtctlservice.Vtctld.ExecuteFetchAsApp:output_type -> vtctldata.ExecuteFetchAsAppResponse + 144, // 145: vtctlservice.Vtctld.ExecuteFetchAsDBA:output_type -> vtctldata.ExecuteFetchAsDBAResponse + 145, // 146: vtctlservice.Vtctld.ExecuteHook:output_type -> vtctldata.ExecuteHookResponse + 146, // 147: vtctlservice.Vtctld.ExecuteMultiFetchAsDBA:output_type -> vtctldata.ExecuteMultiFetchAsDBAResponse + 147, // 148: vtctlservice.Vtctld.FindAllShardsInKeyspace:output_type -> vtctldata.FindAllShardsInKeyspaceResponse + 148, // 149: vtctlservice.Vtctld.ForceCutOverSchemaMigration:output_type -> vtctldata.ForceCutOverSchemaMigrationResponse + 149, // 150: vtctlservice.Vtctld.GetBackups:output_type -> vtctldata.GetBackupsResponse + 150, // 151: vtctlservice.Vtctld.GetCellInfo:output_type -> vtctldata.GetCellInfoResponse + 151, // 152: vtctlservice.Vtctld.GetCellInfoNames:output_type -> vtctldata.GetCellInfoNamesResponse + 152, // 153: vtctlservice.Vtctld.GetCellsAliases:output_type -> vtctldata.GetCellsAliasesResponse + 153, // 154: vtctlservice.Vtctld.GetFullStatus:output_type -> vtctldata.GetFullStatusResponse + 154, // 155: vtctlservice.Vtctld.GetKeyspace:output_type -> vtctldata.GetKeyspaceResponse + 155, // 156: vtctlservice.Vtctld.GetKeyspaces:output_type -> vtctldata.GetKeyspacesResponse + 156, // 157: vtctlservice.Vtctld.GetKeyspaceRoutingRules:output_type -> vtctldata.GetKeyspaceRoutingRulesResponse + 157, // 158: vtctlservice.Vtctld.GetPermissions:output_type -> vtctldata.GetPermissionsResponse + 158, // 159: vtctlservice.Vtctld.GetRoutingRules:output_type -> vtctldata.GetRoutingRulesResponse + 159, // 160: vtctlservice.Vtctld.GetSchema:output_type -> vtctldata.GetSchemaResponse + 160, // 161: vtctlservice.Vtctld.GetSchemaMigrations:output_type -> vtctldata.GetSchemaMigrationsResponse + 161, // 162: vtctlservice.Vtctld.GetShardReplication:output_type -> vtctldata.GetShardReplicationResponse + 162, // 163: vtctlservice.Vtctld.GetShard:output_type -> vtctldata.GetShardResponse + 163, // 164: vtctlservice.Vtctld.GetShardRoutingRules:output_type -> vtctldata.GetShardRoutingRulesResponse + 164, // 165: vtctlservice.Vtctld.GetSrvKeyspaceNames:output_type -> vtctldata.GetSrvKeyspaceNamesResponse + 165, // 166: vtctlservice.Vtctld.GetSrvKeyspaces:output_type -> vtctldata.GetSrvKeyspacesResponse + 166, // 167: vtctlservice.Vtctld.UpdateThrottlerConfig:output_type -> vtctldata.UpdateThrottlerConfigResponse + 167, // 168: vtctlservice.Vtctld.GetSrvVSchema:output_type -> vtctldata.GetSrvVSchemaResponse + 168, // 169: vtctlservice.Vtctld.GetSrvVSchemas:output_type -> vtctldata.GetSrvVSchemasResponse + 169, // 170: vtctlservice.Vtctld.GetTablet:output_type -> vtctldata.GetTabletResponse + 170, // 171: vtctlservice.Vtctld.GetTablets:output_type -> vtctldata.GetTabletsResponse + 171, // 172: vtctlservice.Vtctld.GetThrottlerStatus:output_type -> vtctldata.GetThrottlerStatusResponse + 172, // 173: vtctlservice.Vtctld.GetTopologyPath:output_type -> vtctldata.GetTopologyPathResponse + 173, // 174: vtctlservice.Vtctld.GetVersion:output_type -> vtctldata.GetVersionResponse + 174, // 175: vtctlservice.Vtctld.GetVSchema:output_type -> vtctldata.GetVSchemaResponse + 175, // 176: vtctlservice.Vtctld.GetWorkflows:output_type -> vtctldata.GetWorkflowsResponse + 176, // 177: vtctlservice.Vtctld.InitShardPrimary:output_type -> vtctldata.InitShardPrimaryResponse + 177, // 178: vtctlservice.Vtctld.LaunchSchemaMigration:output_type -> vtctldata.LaunchSchemaMigrationResponse + 178, // 179: vtctlservice.Vtctld.LookupVindexCreate:output_type -> vtctldata.LookupVindexCreateResponse + 179, // 180: vtctlservice.Vtctld.LookupVindexExternalize:output_type -> vtctldata.LookupVindexExternalizeResponse + 180, // 181: vtctlservice.Vtctld.MaterializeCreate:output_type -> vtctldata.MaterializeCreateResponse + 181, // 182: vtctlservice.Vtctld.MigrateCreate:output_type -> vtctldata.WorkflowStatusResponse + 182, // 183: vtctlservice.Vtctld.MountRegister:output_type -> vtctldata.MountRegisterResponse + 183, // 184: vtctlservice.Vtctld.MountUnregister:output_type -> vtctldata.MountUnregisterResponse + 184, // 185: vtctlservice.Vtctld.MountShow:output_type -> vtctldata.MountShowResponse + 185, // 186: vtctlservice.Vtctld.MountList:output_type -> vtctldata.MountListResponse + 181, // 187: vtctlservice.Vtctld.MoveTablesCreate:output_type -> vtctldata.WorkflowStatusResponse + 186, // 188: vtctlservice.Vtctld.MoveTablesComplete:output_type -> vtctldata.MoveTablesCompleteResponse + 187, // 189: vtctlservice.Vtctld.PingTablet:output_type -> vtctldata.PingTabletResponse + 188, // 190: vtctlservice.Vtctld.PlannedReparentShard:output_type -> vtctldata.PlannedReparentShardResponse + 189, // 191: vtctlservice.Vtctld.RebuildKeyspaceGraph:output_type -> vtctldata.RebuildKeyspaceGraphResponse + 190, // 192: vtctlservice.Vtctld.RebuildVSchemaGraph:output_type -> vtctldata.RebuildVSchemaGraphResponse + 191, // 193: vtctlservice.Vtctld.RefreshState:output_type -> vtctldata.RefreshStateResponse + 192, // 194: vtctlservice.Vtctld.RefreshStateByShard:output_type -> vtctldata.RefreshStateByShardResponse + 193, // 195: vtctlservice.Vtctld.ReloadSchema:output_type -> vtctldata.ReloadSchemaResponse + 194, // 196: vtctlservice.Vtctld.ReloadSchemaKeyspace:output_type -> vtctldata.ReloadSchemaKeyspaceResponse + 195, // 197: vtctlservice.Vtctld.ReloadSchemaShard:output_type -> vtctldata.ReloadSchemaShardResponse + 196, // 198: vtctlservice.Vtctld.RemoveBackup:output_type -> vtctldata.RemoveBackupResponse + 197, // 199: vtctlservice.Vtctld.RemoveKeyspaceCell:output_type -> vtctldata.RemoveKeyspaceCellResponse + 198, // 200: vtctlservice.Vtctld.RemoveShardCell:output_type -> vtctldata.RemoveShardCellResponse + 199, // 201: vtctlservice.Vtctld.ReparentTablet:output_type -> vtctldata.ReparentTabletResponse + 181, // 202: vtctlservice.Vtctld.ReshardCreate:output_type -> vtctldata.WorkflowStatusResponse + 200, // 203: vtctlservice.Vtctld.RestoreFromBackup:output_type -> vtctldata.RestoreFromBackupResponse + 201, // 204: vtctlservice.Vtctld.RetrySchemaMigration:output_type -> vtctldata.RetrySchemaMigrationResponse + 202, // 205: vtctlservice.Vtctld.RunHealthCheck:output_type -> vtctldata.RunHealthCheckResponse + 203, // 206: vtctlservice.Vtctld.SetKeyspaceDurabilityPolicy:output_type -> vtctldata.SetKeyspaceDurabilityPolicyResponse + 204, // 207: vtctlservice.Vtctld.SetShardIsPrimaryServing:output_type -> vtctldata.SetShardIsPrimaryServingResponse + 205, // 208: vtctlservice.Vtctld.SetShardTabletControl:output_type -> vtctldata.SetShardTabletControlResponse + 206, // 209: vtctlservice.Vtctld.SetWritable:output_type -> vtctldata.SetWritableResponse + 207, // 210: vtctlservice.Vtctld.ShardReplicationAdd:output_type -> vtctldata.ShardReplicationAddResponse + 208, // 211: vtctlservice.Vtctld.ShardReplicationFix:output_type -> vtctldata.ShardReplicationFixResponse + 209, // 212: vtctlservice.Vtctld.ShardReplicationPositions:output_type -> vtctldata.ShardReplicationPositionsResponse + 210, // 213: vtctlservice.Vtctld.ShardReplicationRemove:output_type -> vtctldata.ShardReplicationRemoveResponse + 211, // 214: vtctlservice.Vtctld.SleepTablet:output_type -> vtctldata.SleepTabletResponse + 212, // 215: vtctlservice.Vtctld.SourceShardAdd:output_type -> vtctldata.SourceShardAddResponse + 213, // 216: vtctlservice.Vtctld.SourceShardDelete:output_type -> vtctldata.SourceShardDeleteResponse + 214, // 217: vtctlservice.Vtctld.StartReplication:output_type -> vtctldata.StartReplicationResponse + 215, // 218: vtctlservice.Vtctld.StopReplication:output_type -> vtctldata.StopReplicationResponse + 216, // 219: vtctlservice.Vtctld.TabletExternallyReparented:output_type -> vtctldata.TabletExternallyReparentedResponse + 217, // 220: vtctlservice.Vtctld.UpdateCellInfo:output_type -> vtctldata.UpdateCellInfoResponse + 218, // 221: vtctlservice.Vtctld.UpdateCellsAlias:output_type -> vtctldata.UpdateCellsAliasResponse + 219, // 222: vtctlservice.Vtctld.Validate:output_type -> vtctldata.ValidateResponse + 220, // 223: vtctlservice.Vtctld.ValidateKeyspace:output_type -> vtctldata.ValidateKeyspaceResponse + 221, // 224: vtctlservice.Vtctld.ValidateSchemaKeyspace:output_type -> vtctldata.ValidateSchemaKeyspaceResponse + 222, // 225: vtctlservice.Vtctld.ValidateShard:output_type -> vtctldata.ValidateShardResponse + 223, // 226: vtctlservice.Vtctld.ValidateVersionKeyspace:output_type -> vtctldata.ValidateVersionKeyspaceResponse + 224, // 227: vtctlservice.Vtctld.ValidateVersionShard:output_type -> vtctldata.ValidateVersionShardResponse + 225, // 228: vtctlservice.Vtctld.ValidateVSchema:output_type -> vtctldata.ValidateVSchemaResponse + 226, // 229: vtctlservice.Vtctld.VDiffCreate:output_type -> vtctldata.VDiffCreateResponse + 227, // 230: vtctlservice.Vtctld.VDiffDelete:output_type -> vtctldata.VDiffDeleteResponse + 228, // 231: vtctlservice.Vtctld.VDiffResume:output_type -> vtctldata.VDiffResumeResponse + 229, // 232: vtctlservice.Vtctld.VDiffShow:output_type -> vtctldata.VDiffShowResponse + 230, // 233: vtctlservice.Vtctld.VDiffStop:output_type -> vtctldata.VDiffStopResponse + 231, // 234: vtctlservice.Vtctld.WorkflowDelete:output_type -> vtctldata.WorkflowDeleteResponse + 181, // 235: vtctlservice.Vtctld.WorkflowStatus:output_type -> vtctldata.WorkflowStatusResponse + 232, // 236: vtctlservice.Vtctld.WorkflowSwitchTraffic:output_type -> vtctldata.WorkflowSwitchTrafficResponse + 233, // 237: vtctlservice.Vtctld.WorkflowUpdate:output_type -> vtctldata.WorkflowUpdateResponse + 234, // 238: vtctlservice.Vtctld.GetMirrorRules:output_type -> vtctldata.GetMirrorRulesResponse + 235, // 239: vtctlservice.Vtctld.WorkflowMirrorTraffic:output_type -> vtctldata.WorkflowMirrorTrafficResponse + 120, // [120:240] is the sub-list for method output_type + 0, // [0:120] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go b/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go index 0d336619ac0..56cef8d1dcd 100644 --- a/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go @@ -464,6 +464,9 @@ type VtctldClient interface { // WorkflowUpdate updates the configuration of a vreplication workflow // using the provided updated parameters. WorkflowUpdate(ctx context.Context, in *vtctldata.WorkflowUpdateRequest, opts ...grpc.CallOption) (*vtctldata.WorkflowUpdateResponse, error) + // GetMirrorRules returns the VSchema routing rules. + GetMirrorRules(ctx context.Context, in *vtctldata.GetMirrorRulesRequest, opts ...grpc.CallOption) (*vtctldata.GetMirrorRulesResponse, error) + WorkflowMirrorTraffic(ctx context.Context, in *vtctldata.WorkflowMirrorTrafficRequest, opts ...grpc.CallOption) (*vtctldata.WorkflowMirrorTrafficResponse, error) } type vtctldClient struct { @@ -1596,6 +1599,24 @@ func (c *vtctldClient) WorkflowUpdate(ctx context.Context, in *vtctldata.Workflo return out, nil } +func (c *vtctldClient) GetMirrorRules(ctx context.Context, in *vtctldata.GetMirrorRulesRequest, opts ...grpc.CallOption) (*vtctldata.GetMirrorRulesResponse, error) { + out := new(vtctldata.GetMirrorRulesResponse) + err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetMirrorRules", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vtctldClient) WorkflowMirrorTraffic(ctx context.Context, in *vtctldata.WorkflowMirrorTrafficRequest, opts ...grpc.CallOption) (*vtctldata.WorkflowMirrorTrafficResponse, error) { + out := new(vtctldata.WorkflowMirrorTrafficResponse) + err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/WorkflowMirrorTraffic", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // VtctldServer is the server API for Vtctld service. // All implementations must embed UnimplementedVtctldServer // for forward compatibility @@ -1928,6 +1949,9 @@ type VtctldServer interface { // WorkflowUpdate updates the configuration of a vreplication workflow // using the provided updated parameters. WorkflowUpdate(context.Context, *vtctldata.WorkflowUpdateRequest) (*vtctldata.WorkflowUpdateResponse, error) + // GetMirrorRules returns the VSchema routing rules. + GetMirrorRules(context.Context, *vtctldata.GetMirrorRulesRequest) (*vtctldata.GetMirrorRulesResponse, error) + WorkflowMirrorTraffic(context.Context, *vtctldata.WorkflowMirrorTrafficRequest) (*vtctldata.WorkflowMirrorTrafficResponse, error) mustEmbedUnimplementedVtctldServer() } @@ -2286,6 +2310,12 @@ func (UnimplementedVtctldServer) WorkflowSwitchTraffic(context.Context, *vtctlda func (UnimplementedVtctldServer) WorkflowUpdate(context.Context, *vtctldata.WorkflowUpdateRequest) (*vtctldata.WorkflowUpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WorkflowUpdate not implemented") } +func (UnimplementedVtctldServer) GetMirrorRules(context.Context, *vtctldata.GetMirrorRulesRequest) (*vtctldata.GetMirrorRulesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMirrorRules not implemented") +} +func (UnimplementedVtctldServer) WorkflowMirrorTraffic(context.Context, *vtctldata.WorkflowMirrorTrafficRequest) (*vtctldata.WorkflowMirrorTrafficResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WorkflowMirrorTraffic not implemented") +} func (UnimplementedVtctldServer) mustEmbedUnimplementedVtctldServer() {} // UnsafeVtctldServer may be embedded to opt out of forward compatibility for this service. @@ -4414,6 +4444,42 @@ func _Vtctld_WorkflowUpdate_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Vtctld_GetMirrorRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(vtctldata.GetMirrorRulesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VtctldServer).GetMirrorRules(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtctlservice.Vtctld/GetMirrorRules", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VtctldServer).GetMirrorRules(ctx, req.(*vtctldata.GetMirrorRulesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Vtctld_WorkflowMirrorTraffic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(vtctldata.WorkflowMirrorTrafficRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VtctldServer).WorkflowMirrorTraffic(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtctlservice.Vtctld/WorkflowMirrorTraffic", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VtctldServer).WorkflowMirrorTraffic(ctx, req.(*vtctldata.WorkflowMirrorTrafficRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Vtctld_ServiceDesc is the grpc.ServiceDesc for Vtctld service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -4877,6 +4943,14 @@ var Vtctld_ServiceDesc = grpc.ServiceDesc{ MethodName: "WorkflowUpdate", Handler: _Vtctld_WorkflowUpdate_Handler, }, + { + MethodName: "GetMirrorRules", + Handler: _Vtctld_GetMirrorRules_Handler, + }, + { + MethodName: "WorkflowMirrorTraffic", + Handler: _Vtctld_WorkflowMirrorTraffic_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/go/vt/proto/vttest/vttest.pb.go b/go/vt/proto/vttest/vttest.pb.go index 0f34089ae16..8dca7c6f112 100644 --- a/go/vt/proto/vttest/vttest.pb.go +++ b/go/vt/proto/vttest/vttest.pb.go @@ -212,6 +212,8 @@ type VTTestTopology struct { Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"` // routing rules for the topology. RoutingRules *vschema.RoutingRules `protobuf:"bytes,3,opt,name=routing_rules,json=routingRules,proto3" json:"routing_rules,omitempty"` + // mirror rules for the topology. + MirrorRules *vschema.MirrorRules `protobuf:"bytes,4,opt,name=mirror_rules,json=mirrorRules,proto3" json:"mirror_rules,omitempty"` } func (x *VTTestTopology) Reset() { @@ -267,6 +269,13 @@ func (x *VTTestTopology) GetRoutingRules() *vschema.RoutingRules { return nil } +func (x *VTTestTopology) GetMirrorRules() *vschema.MirrorRules { + if x != nil { + return x.MirrorRules + } + return nil +} + var File_vttest_proto protoreflect.FileDescriptor var file_vttest_proto_rawDesc = []byte{ @@ -286,7 +295,7 @@ var file_vttest_proto_rawDesc = []byte{ 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x03, - 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x92, + 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xcb, 0x01, 0x0a, 0x0e, 0x56, 0x54, 0x54, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x2e, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x65, @@ -296,10 +305,13 @@ var file_vttest_proto_rawDesc = []byte{ 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x42, 0x25, 0x5a, 0x23, 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, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6c, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x0b, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x25, 0x5a, 0x23, + 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, 0x74, + 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -320,16 +332,18 @@ var file_vttest_proto_goTypes = []any{ (*Keyspace)(nil), // 1: vttest.Keyspace (*VTTestTopology)(nil), // 2: vttest.VTTestTopology (*vschema.RoutingRules)(nil), // 3: vschema.RoutingRules + (*vschema.MirrorRules)(nil), // 4: vschema.MirrorRules } var file_vttest_proto_depIdxs = []int32{ 0, // 0: vttest.Keyspace.shards:type_name -> vttest.Shard 1, // 1: vttest.VTTestTopology.keyspaces:type_name -> vttest.Keyspace 3, // 2: vttest.VTTestTopology.routing_rules:type_name -> vschema.RoutingRules - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 3: vttest.VTTestTopology.mirror_rules:type_name -> vschema.MirrorRules + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_vttest_proto_init() } diff --git a/go/vt/proto/vttest/vttest_vtproto.pb.go b/go/vt/proto/vttest/vttest_vtproto.pb.go index 8000a036a5f..82ad7a17e2c 100644 --- a/go/vt/proto/vttest/vttest_vtproto.pb.go +++ b/go/vt/proto/vttest/vttest_vtproto.pb.go @@ -72,6 +72,7 @@ func (m *VTTestTopology) CloneVT() *VTTestTopology { } r := &VTTestTopology{ RoutingRules: m.RoutingRules.CloneVT(), + MirrorRules: m.MirrorRules.CloneVT(), } if rhs := m.Keyspaces; rhs != nil { tmpContainer := make([]*Keyspace, len(rhs)) @@ -235,6 +236,16 @@ func (m *VTTestTopology) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.MirrorRules != nil { + size, err := m.MirrorRules.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } if m.RoutingRules != nil { size, err := m.RoutingRules.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -346,6 +357,10 @@ func (m *VTTestTopology) SizeVT() (n int) { l = m.RoutingRules.SizeVT() n += 1 + l + sov(uint64(l)) } + if m.MirrorRules != nil { + l = m.MirrorRules.SizeVT() + n += 1 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -757,6 +772,42 @@ func (m *VTTestTopology) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MirrorRules", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MirrorRules == nil { + m.MirrorRules = &vschema.MirrorRules{} + } + if err := m.MirrorRules.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/go/vt/topo/server.go b/go/vt/topo/server.go index 6e5fadd8b97..f2a3e8774e7 100644 --- a/go/vt/topo/server.go +++ b/go/vt/topo/server.go @@ -81,6 +81,7 @@ const ( ExternalClustersFile = "ExternalClusters" ShardRoutingRulesFile = "ShardRoutingRules" CommonRoutingRulesFile = "Rules" + MirrorRulesFile = "MirrorRules" ) // Path for all object types. diff --git a/go/vt/topo/srv_vschema.go b/go/vt/topo/srv_vschema.go index c118253e8a8..f69fca83537 100644 --- a/go/vt/topo/srv_vschema.go +++ b/go/vt/topo/srv_vschema.go @@ -210,6 +210,12 @@ func (ts *Server) RebuildSrvVSchema(ctx context.Context, cells []string) error { } srvVSchema.KeyspaceRoutingRules = krr + mr, err := ts.GetMirrorRules(ctx) + if err != nil { + return fmt.Errorf("GetMirrorRules failed: %v", err) + } + srvVSchema.MirrorRules = mr + // now save the SrvVSchema in all cells in parallel for _, cell := range cells { wg.Add(1) diff --git a/go/vt/topo/topotests/srv_vschema_test.go b/go/vt/topo/topotests/srv_vschema_test.go index 85a2d65c4ec..8fd818150b0 100644 --- a/go/vt/topo/topotests/srv_vschema_test.go +++ b/go/vt/topo/topotests/srv_vschema_test.go @@ -29,6 +29,7 @@ import ( func TestRebuildVSchema(t *testing.T) { emptySrvVSchema := &vschemapb.SrvVSchema{ + MirrorRules: &vschemapb.MirrorRules{}, RoutingRules: &vschemapb.RoutingRules{}, ShardRoutingRules: &vschemapb.ShardRoutingRules{}, } @@ -52,6 +53,7 @@ func TestRebuildVSchema(t *testing.T) { // create a keyspace, rebuild, should see an empty entry emptyKs1SrvVSchema := &vschemapb.SrvVSchema{ + MirrorRules: &vschemapb.MirrorRules{}, RoutingRules: &vschemapb.RoutingRules{}, ShardRoutingRules: &vschemapb.ShardRoutingRules{}, Keyspaces: map[string]*vschemapb.Keyspace{ @@ -81,6 +83,7 @@ func TestRebuildVSchema(t *testing.T) { t.Errorf("RebuildVSchema failed: %v", err) } wanted1 := &vschemapb.SrvVSchema{ + MirrorRules: &vschemapb.MirrorRules{}, RoutingRules: &vschemapb.RoutingRules{}, ShardRoutingRules: &vschemapb.ShardRoutingRules{}, Keyspaces: map[string]*vschemapb.Keyspace{ @@ -122,6 +125,7 @@ func TestRebuildVSchema(t *testing.T) { t.Errorf("RebuildVSchema failed: %v", err) } wanted2 := &vschemapb.SrvVSchema{ + MirrorRules: &vschemapb.MirrorRules{}, RoutingRules: &vschemapb.RoutingRules{}, ShardRoutingRules: &vschemapb.ShardRoutingRules{}, Keyspaces: map[string]*vschemapb.Keyspace{ @@ -160,6 +164,7 @@ func TestRebuildVSchema(t *testing.T) { t.Errorf("RebuildVSchema failed: %v", err) } wanted3 := &vschemapb.SrvVSchema{ + MirrorRules: &vschemapb.MirrorRules{}, RoutingRules: rr, ShardRoutingRules: &vschemapb.ShardRoutingRules{}, Keyspaces: map[string]*vschemapb.Keyspace{ diff --git a/go/vt/topo/vschema.go b/go/vt/topo/vschema.go index c6845691b25..d9802da2c35 100644 --- a/go/vt/topo/vschema.go +++ b/go/vt/topo/vschema.go @@ -212,3 +212,39 @@ func (ts *Server) GetKeyspaceRoutingRules(ctx context.Context) (*vschemapb.Keysp } return rules, nil } + +// GetMirrorRules fetches the mirror rules from the topo. +func (ts *Server) GetMirrorRules(ctx context.Context) (*vschemapb.MirrorRules, error) { + rr := &vschemapb.MirrorRules{} + data, _, err := ts.globalCell.Get(ctx, MirrorRulesFile) + if err != nil { + if IsErrType(err, NoNode) { + return rr, nil + } + return nil, err + } + err = rr.UnmarshalVT(data) + if err != nil { + return nil, vterrors.Wrapf(err, "bad mirror rules data: %q", data) + } + return rr, nil +} + +// SaveMirrorRules saves the mirror rules into the topo. +func (ts *Server) SaveMirrorRules(ctx context.Context, mirrorRules *vschemapb.MirrorRules) error { + data, err := mirrorRules.MarshalVT() + if err != nil { + return err + } + + if len(data) == 0 { + // No vschema, remove it. So we can remove the keyspace. + if err := ts.globalCell.Delete(ctx, MirrorRulesFile, nil); err != nil && !IsErrType(err, NoNode) { + return err + } + return nil + } + + _, err = ts.globalCell.Update(ctx, MirrorRulesFile, data, nil) + return err +} diff --git a/go/vt/topotools/mirror_rules.go b/go/vt/topotools/mirror_rules.go new file mode 100644 index 00000000000..3076a12b394 --- /dev/null +++ b/go/vt/topotools/mirror_rules.go @@ -0,0 +1,72 @@ +/* +Copyright 2024 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 topotools + +import ( + "context" + + "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/topo" + + vschemapb "vitess.io/vitess/go/vt/proto/vschema" +) + +func GetMirrorRulesMap(rules *vschemapb.MirrorRules) map[string]map[string]float32 { + if rules == nil { + return nil + } + rulesMap := make(map[string]map[string]float32) + for _, mr := range rules.Rules { + if _, ok := rulesMap[mr.FromTable]; !ok { + rulesMap[mr.FromTable] = make(map[string]float32) + } + rulesMap[mr.FromTable][mr.ToTable] = mr.Percent + } + return rulesMap +} + +// GetMirrorRules fetches mirror rules from the topology server and returns a +// mapping of fromTable=>toTable=>percent. +func GetMirrorRules(ctx context.Context, ts *topo.Server) (map[string]map[string]float32, error) { + mrs, err := ts.GetMirrorRules(ctx) + if err != nil { + return nil, err + } + + rules := GetMirrorRulesMap(mrs) + + return rules, nil +} + +// SaveMirrorRules converts a mapping of fromTable=>[]toTables into a +// vschemapb.MirrorRules protobuf message and saves it in the topology. +func SaveMirrorRules(ctx context.Context, ts *topo.Server, rules map[string]map[string]float32) error { + log.Infof("Saving mirror rules %v\n", rules) + + rrs := &vschemapb.MirrorRules{Rules: make([]*vschemapb.MirrorRule, 0)} + for fromTable, mrs := range rules { + for toTable, percent := range mrs { + rrs.Rules = append(rrs.Rules, &vschemapb.MirrorRule{ + FromTable: fromTable, + Percent: percent, + ToTable: toTable, + }) + } + } + + return ts.SaveMirrorRules(ctx, rrs) +} diff --git a/go/vt/topotools/mirror_rules_test.go b/go/vt/topotools/mirror_rules_test.go new file mode 100644 index 00000000000..3ce25cb4de6 --- /dev/null +++ b/go/vt/topotools/mirror_rules_test.go @@ -0,0 +1,79 @@ +/* +Copyright 2024 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 topotools + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/vt/topo/memorytopo" +) + +func TestMirrorRulesRoundTrip(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + ts := memorytopo.NewServer(ctx, "zone1") + defer ts.Close() + + rules := map[string]map[string]float32{ + "k1.t1@replica": { + "k2": 50.0, + }, + "k1.t4": { + "k3": 75.0, + }, + } + + err := SaveMirrorRules(ctx, ts, rules) + require.NoError(t, err, "could not save mirror rules to topo %v", rules) + + roundtripRules, err := GetMirrorRules(ctx, ts) + require.NoError(t, err, "could not fetch mirror rules from topo") + + assert.Equal(t, rules, roundtripRules) +} + +func TestMirrorRulesErrors(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + ts, factory := memorytopo.NewServerAndFactory(ctx, "zone1") + defer ts.Close() + factory.SetError(errors.New("topo failure for testing")) + + t.Run("GetMirrorRules error", func(t *testing.T) { + rules, err := GetMirrorRules(ctx, ts) + assert.Error(t, err, "expected error from GetMirrorRules, got rules=%v", rules) + }) + + t.Run("SaveMirrorRules error", func(t *testing.T) { + rules := map[string]map[string]float32{ + "k1.t1@replica": { + "k2": 50.0, + }, + "k1.t4": { + "k3": 75.0, + }, + } + + err := SaveMirrorRules(ctx, ts, rules) + assert.Error(t, err, "expected error from SaveMirrorRules, got rules=%v", rules) + }) +} diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index 27fbf2dd6e3..77db2d0afef 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -165,6 +165,23 @@ func InitRoutingRules( return ts.RebuildSrvVSchema(ctx, nil) } +// InitMirrorRules saves the mirror rules into ts and reloads the vschema. +func InitMirrorRules( + ctx context.Context, + ts *topo.Server, + mr *vschemapb.MirrorRules, +) error { + if mr == nil { + return nil + } + + if err := ts.SaveMirrorRules(ctx, mr); err != nil { + return err + } + + return ts.RebuildSrvVSchema(ctx, nil) +} + // InitTabletMap creates the action tms and associated data structures // for all tablets, based on the vttest proto parameter. func InitTabletMap( diff --git a/go/vt/vtctl/grpcvtctldclient/client_gen.go b/go/vt/vtctl/grpcvtctldclient/client_gen.go index e0b14337bba..2153d2c94f4 100644 --- a/go/vt/vtctl/grpcvtctldclient/client_gen.go +++ b/go/vt/vtctl/grpcvtctldclient/client_gen.go @@ -362,6 +362,15 @@ func (client *gRPCVtctldClient) GetKeyspaces(ctx context.Context, in *vtctldatap return client.c.GetKeyspaces(ctx, in, opts...) } +// GetMirrorRules is part of the vtctlservicepb.VtctldClient interface. +func (client *gRPCVtctldClient) GetMirrorRules(ctx context.Context, in *vtctldatapb.GetMirrorRulesRequest, opts ...grpc.CallOption) (*vtctldatapb.GetMirrorRulesResponse, error) { + if client.c == nil { + return nil, status.Error(codes.Unavailable, connClosedMsg) + } + + return client.c.GetMirrorRules(ctx, in, opts...) +} + // GetPermissions is part of the vtctlservicepb.VtctldClient interface. func (client *gRPCVtctldClient) GetPermissions(ctx context.Context, in *vtctldatapb.GetPermissionsRequest, opts ...grpc.CallOption) (*vtctldatapb.GetPermissionsResponse, error) { if client.c == nil { @@ -1055,6 +1064,15 @@ func (client *gRPCVtctldClient) WorkflowDelete(ctx context.Context, in *vtctldat return client.c.WorkflowDelete(ctx, in, opts...) } +// WorkflowMirrorTraffic is part of the vtctlservicepb.VtctldClient interface. +func (client *gRPCVtctldClient) WorkflowMirrorTraffic(ctx context.Context, in *vtctldatapb.WorkflowMirrorTrafficRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowMirrorTrafficResponse, error) { + if client.c == nil { + return nil, status.Error(codes.Unavailable, connClosedMsg) + } + + return client.c.WorkflowMirrorTraffic(ctx, in, opts...) +} + // WorkflowStatus is part of the vtctlservicepb.VtctldClient interface. func (client *gRPCVtctldClient) WorkflowStatus(ctx context.Context, in *vtctldatapb.WorkflowStatusRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowStatusResponse, error) { if client.c == nil { diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 92ae7c66146..65f99c43694 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -291,7 +291,6 @@ func (s *VtctldServer) ApplySchema(ctx context.Context, req *vtctldatapb.ApplySc schemamanager.NewPlainController(req.Sql, req.Keyspace), executor, ) - if err != nil { return nil, err } @@ -464,7 +463,6 @@ func (s *VtctldServer) BackupShard(req *vtctldatapb.BackupShardRequest, stream v span.Annotate("incremental_from_pos", req.IncrementalFromPos) tablets, stats, err := reparentutil.ShardReplicationStatuses(ctx, s.ts, s.tmc, req.Keyspace, req.Shard) - // Instead of return on err directly, only return err when no tablets for backup at all if err != nil { tablets = reparentutil.GetBackupCandidates(tablets, stats) @@ -517,7 +515,8 @@ func (s *VtctldServer) BackupShard(req *vtctldatapb.BackupShardRequest, stream v func (s *VtctldServer) backupTablet(ctx context.Context, tablet *topodatapb.Tablet, req *vtctldatapb.BackupRequest, stream interface { Send(resp *vtctldatapb.BackupResponse) error -}) error { +}, +) error { r := &tabletmanagerdatapb.BackupRequest{ Concurrency: req.Concurrency, AllowPrimary: req.AllowPrimary, @@ -1898,7 +1897,6 @@ func (s *VtctldServer) GetSrvKeyspaces(ctx context.Context, req *vtctldatapb.Get for _, cell := range cells { var srvKeyspace *topodatapb.SrvKeyspace srvKeyspace, err = s.ts.GetSrvKeyspace(ctx, cell, req.Keyspace) - if err != nil { if !topo.IsErrType(err, topo.NoNode) { return nil, err @@ -2036,7 +2034,6 @@ func (s *VtctldServer) GetSrvVSchemas(ctx context.Context, req *vtctldatapb.GetS for _, cell := range cells { var sv *vschemapb.SrvVSchema sv, err = s.ts.GetSrvVSchema(ctx, cell) - if err != nil { if !topo.IsErrType(err, topo.NoNode) { return nil, err @@ -3289,6 +3286,7 @@ func (s *VtctldServer) ReshardCreate(ctx context.Context, req *vtctldatapb.Resha resp, err = s.ws.ReshardCreate(ctx, req) return resp, err } + func (s *VtctldServer) RestoreFromBackup(req *vtctldatapb.RestoreFromBackupRequest, stream vtctlservicepb.Vtctld_RestoreFromBackupServer) (err error) { span, ctx := trace.NewSpan(stream.Context(), "VtctldServer.RestoreFromBackup") defer span.Finish() @@ -4119,7 +4117,6 @@ func (s *VtctldServer) UpdateCellInfo(ctx context.Context, req *vtctldatapb.Upda return nil }) - if err != nil { return nil, err } @@ -4150,7 +4147,6 @@ func (s *VtctldServer) UpdateCellsAlias(ctx context.Context, req *vtctldatapb.Up ca.Cells = req.CellsAlias.Cells return nil }) - if err != nil { return nil, err } @@ -5060,6 +5056,38 @@ func (s *VtctldServer) WorkflowUpdate(ctx context.Context, req *vtctldatapb.Work return resp, err } +// GetMirrorRules is part of the vtctlservicepb.VtctldServer interface. +func (s *VtctldServer) GetMirrorRules(ctx context.Context, req *vtctldatapb.GetMirrorRulesRequest) (resp *vtctldatapb.GetMirrorRulesResponse, err error) { + span, ctx := trace.NewSpan(ctx, "VtctldServer.GetMirrorRules") + defer span.Finish() + + defer panicHandler(&err) + + mr, err := s.ts.GetMirrorRules(ctx) + if err != nil { + return nil, err + } + + return &vtctldatapb.GetMirrorRulesResponse{ + MirrorRules: mr, + }, nil +} + +// WorkflowMirrorTraffic is part of the vtctlservicepb.VtctldServer interface. +func (s *VtctldServer) WorkflowMirrorTraffic(ctx context.Context, req *vtctldatapb.WorkflowMirrorTrafficRequest) (resp *vtctldatapb.WorkflowMirrorTrafficResponse, err error) { + span, ctx := trace.NewSpan(ctx, "VtctldServer.WorkflowMirrorTraffic") + defer span.Finish() + + defer panicHandler(&err) + + span.Annotate("keyspace", req.Keyspace) + span.Annotate("workflow", req.Workflow) + span.Annotate("percent", req.Percent) + + resp, err = s.ws.WorkflowMirrorTraffic(ctx, req) + return resp, err +} + // StartServer registers a VtctldServer for RPCs on the given gRPC server. func StartServer(s *grpc.Server, env *vtenv.Environment, ts *topo.Server) { vtctlservicepb.RegisterVtctldServer(s, NewVtctldServer(env, ts)) @@ -5150,8 +5178,10 @@ var getVersionFromTabletDebugVars = func(tabletAddr string) (string, error) { return version, nil } -var versionFuncMu sync.Mutex -var getVersionFromTablet = getVersionFromTabletDebugVars +var ( + versionFuncMu sync.Mutex + getVersionFromTablet = getVersionFromTabletDebugVars +) func SetVersionFunc(versionFunc func(string) (string, error)) { versionFuncMu.Lock() diff --git a/go/vt/vtctl/grpcvtctldserver/server_test.go b/go/vt/vtctl/grpcvtctldserver/server_test.go index f72b92479a1..1b641488e1a 100644 --- a/go/vt/vtctl/grpcvtctldserver/server_test.go +++ b/go/vt/vtctl/grpcvtctldserver/server_test.go @@ -665,6 +665,9 @@ func TestApplyVSchema(t *testing.T) { Sharded: false, }, }, + MirrorRules: &vschemapb.MirrorRules{ + Rules: []*vschemapb.MirrorRule{}, + }, RoutingRules: &vschemapb.RoutingRules{ Rules: []*vschemapb.RoutingRule{}, }, diff --git a/go/vt/vtctl/localvtctldclient/client_gen.go b/go/vt/vtctl/localvtctldclient/client_gen.go index 3457c355cb6..2738c771be3 100644 --- a/go/vt/vtctl/localvtctldclient/client_gen.go +++ b/go/vt/vtctl/localvtctldclient/client_gen.go @@ -306,6 +306,11 @@ func (client *localVtctldClient) GetKeyspaces(ctx context.Context, in *vtctldata return client.s.GetKeyspaces(ctx, in) } +// GetMirrorRules is part of the vtctlservicepb.VtctldClient interface. +func (client *localVtctldClient) GetMirrorRules(ctx context.Context, in *vtctldatapb.GetMirrorRulesRequest, opts ...grpc.CallOption) (*vtctldatapb.GetMirrorRulesResponse, error) { + return client.s.GetMirrorRules(ctx, in) +} + // GetPermissions is part of the vtctlservicepb.VtctldClient interface. func (client *localVtctldClient) GetPermissions(ctx context.Context, in *vtctldatapb.GetPermissionsRequest, opts ...grpc.CallOption) (*vtctldatapb.GetPermissionsResponse, error) { return client.s.GetPermissions(ctx, in) @@ -737,6 +742,11 @@ func (client *localVtctldClient) WorkflowDelete(ctx context.Context, in *vtctlda return client.s.WorkflowDelete(ctx, in) } +// WorkflowMirrorTraffic is part of the vtctlservicepb.VtctldClient interface. +func (client *localVtctldClient) WorkflowMirrorTraffic(ctx context.Context, in *vtctldatapb.WorkflowMirrorTrafficRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowMirrorTrafficResponse, error) { + return client.s.WorkflowMirrorTraffic(ctx, in) +} + // WorkflowStatus is part of the vtctlservicepb.VtctldClient interface. func (client *localVtctldClient) WorkflowStatus(ctx context.Context, in *vtctldatapb.WorkflowStatusRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowStatusResponse, error) { return client.s.WorkflowStatus(ctx, in) diff --git a/go/vt/vtctl/workflow/materializer_env_test.go b/go/vt/vtctl/workflow/materializer_env_test.go index fe49b24a10d..569651f85ca 100644 --- a/go/vt/vtctl/workflow/materializer_env_test.go +++ b/go/vt/vtctl/workflow/materializer_env_test.go @@ -25,13 +25,17 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/key" + "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/mysqlctl/tmutils" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/memorytopo" + "vitess.io/vitess/go/vt/topotools" "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tmclient" @@ -40,6 +44,7 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vschemapb "vitess.io/vitess/go/vt/proto/vschema" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" ) @@ -53,35 +58,60 @@ type testMaterializerEnv struct { topoServ *topo.Server cell string tmc *testMaterializerTMClient + venv *vtenv.Environment } //---------------------------------------------- // testMaterializerEnv -func newTestMaterializerEnv(t *testing.T, ctx context.Context, ms *vtctldatapb.MaterializeSettings, sources, targets []string) *testMaterializerEnv { +func newTestMaterializerEnv(t *testing.T, ctx context.Context, ms *vtctldatapb.MaterializeSettings, sourceShards, targetShards []string) *testMaterializerEnv { t.Helper() + + tmc := newTestMaterializerTMClient(ms.SourceKeyspace, sourceShards, ms.TableSettings) + topoServ := memorytopo.NewServer(ctx, "cell") + venv := vtenv.NewTestEnv() env := &testMaterializerEnv{ ms: ms, - sources: sources, - targets: targets, + sources: sourceShards, + targets: targetShards, tablets: make(map[int]*topodatapb.Tablet), - topoServ: memorytopo.NewServer(ctx, defaultCellName), - cell: defaultCellName, - tmc: newTestMaterializerTMClient(), + topoServ: topoServ, + cell: "cell", + tmc: tmc, + ws: NewServer(venv, topoServ, tmc), + venv: venv, } - venv := vtenv.NewTestEnv() - env.ws = NewServer(venv, env.topoServ, env.tmc) + + require.NoError(t, topoServ.CreateKeyspace(ctx, ms.SourceKeyspace, &topodatapb.Keyspace{})) + require.NoError(t, topoServ.SaveVSchema(ctx, ms.SourceKeyspace, &vschemapb.Keyspace{})) + if ms.SourceKeyspace != ms.TargetKeyspace { + require.NoError(t, topoServ.CreateKeyspace(ctx, ms.TargetKeyspace, &topodatapb.Keyspace{})) + require.NoError(t, topoServ.SaveVSchema(ctx, ms.TargetKeyspace, &vschemapb.Keyspace{})) + } + logger := logutil.NewConsoleLogger() + require.NoError(t, topoServ.RebuildSrvVSchema(ctx, []string{"cell"})) + tabletID := 100 - for _, shard := range sources { - _ = env.addTablet(tabletID, env.ms.SourceKeyspace, shard, topodatapb.TabletType_PRIMARY) + sourceShardsMap := make(map[string]any) + for _, shard := range sourceShards { + sourceShardsMap[shard] = nil + require.NoError(t, topoServ.CreateShard(ctx, ms.SourceKeyspace, shard)) + _ = env.addTablet(t, tabletID, env.ms.SourceKeyspace, shard, topodatapb.TabletType_PRIMARY) tabletID += 10 } - if ms.SourceKeyspace != ms.TargetKeyspace { - tabletID = 200 - for _, shard := range targets { - _ = env.addTablet(tabletID, env.ms.TargetKeyspace, shard, topodatapb.TabletType_PRIMARY) - tabletID += 10 + + require.NoError(t, topotools.RebuildKeyspace(ctx, logger, topoServ, ms.SourceKeyspace, []string{"cell"}, false)) + + tabletID = 200 + for _, shard := range targetShards { + if ms.SourceKeyspace == ms.TargetKeyspace { + if _, ok := sourceShardsMap[shard]; ok { + continue + } } + require.NoError(t, topoServ.CreateShard(ctx, ms.TargetKeyspace, shard)) + _ = env.addTablet(t, tabletID, env.ms.TargetKeyspace, shard, topodatapb.TabletType_PRIMARY) + tabletID += 10 } for _, ts := range ms.TableSettings { @@ -103,6 +133,11 @@ func newTestMaterializerEnv(t *testing.T, ctx context.Context, ms *vtctldatapb.M }}, } } + + if ms.SourceKeyspace != ms.TargetKeyspace { + require.NoError(t, topotools.RebuildKeyspace(ctx, logger, topoServ, ms.TargetKeyspace, []string{"cell"}, false)) + } + return env } @@ -112,7 +147,10 @@ func (env *testMaterializerEnv) close() { } } -func (env *testMaterializerEnv) addTablet(id int, keyspace, shard string, tabletType topodatapb.TabletType) *topodatapb.Tablet { +func (env *testMaterializerEnv) addTablet(t *testing.T, id int, keyspace, shard string, tabletType topodatapb.TabletType) *topodatapb.Tablet { + keyRanges, err := key.ParseShardingSpec(shard) + require.NoError(t, err) + require.Len(t, keyRanges, 1) tablet := &topodatapb.Tablet{ Alias: &topodatapb.TabletAlias{ Cell: env.cell, @@ -120,7 +158,7 @@ func (env *testMaterializerEnv) addTablet(id int, keyspace, shard string, tablet }, Keyspace: keyspace, Shard: shard, - KeyRange: &topodatapb.KeyRange{}, + KeyRange: keyRanges[0], Type: tabletType, PortMap: map[string]int32{ "test": int32(id), @@ -148,12 +186,16 @@ func (env *testMaterializerEnv) deleteTablet(tablet *topodatapb.Tablet) { delete(env.tablets, int(tablet.Alias.Uid)) } -//---------------------------------------------- +// ---------------------------------------------- // testMaterializerTMClient +type readVReplicationWorkflowFunc = func(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.ReadVReplicationWorkflowRequest) (*tabletmanagerdatapb.ReadVReplicationWorkflowResponse, error) type testMaterializerTMClient struct { tmclient.TabletManagerClient - schema map[string]*tabletmanagerdatapb.SchemaDefinition + keyspace string + schema map[string]*tabletmanagerdatapb.SchemaDefinition + sourceShards []string + tableSettings []*vtctldatapb.TableMaterializeSettings mu sync.Mutex vrQueries map[int][]*queryResult @@ -161,11 +203,17 @@ type testMaterializerTMClient struct { // Used to confirm the number of times WorkflowDelete was called. workflowDeleteCalls int + + // Used to override the response to ReadVReplicationWorkflow. + readVReplicationWorkflow readVReplicationWorkflowFunc } -func newTestMaterializerTMClient() *testMaterializerTMClient { +func newTestMaterializerTMClient(keyspace string, sourceShards []string, tableSettings []*vtctldatapb.TableMaterializeSettings) *testMaterializerTMClient { return &testMaterializerTMClient{ + keyspace: keyspace, schema: make(map[string]*tabletmanagerdatapb.SchemaDefinition), + sourceShards: sourceShards, + tableSettings: tableSettings, vrQueries: make(map[int][]*queryResult), createVReplicationWorkflowRequests: make(map[uint32]*tabletmanagerdatapb.CreateVReplicationWorkflowRequest), } @@ -182,29 +230,44 @@ func (tmc *testMaterializerTMClient) CreateVReplicationWorkflow(ctx context.Cont } func (tmc *testMaterializerTMClient) ReadVReplicationWorkflow(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.ReadVReplicationWorkflowRequest) (*tabletmanagerdatapb.ReadVReplicationWorkflowResponse, error) { + if tmc.readVReplicationWorkflow != nil { + return tmc.readVReplicationWorkflow(ctx, tablet, request) + } + workflowType := binlogdatapb.VReplicationWorkflowType_MoveTables if strings.Contains(request.Workflow, "lookup") { workflowType = binlogdatapb.VReplicationWorkflowType_CreateLookupIndex } + + rules := make([]*binlogdatapb.Rule, len(tmc.tableSettings)) + if len(rules) == 0 { + rules = append(rules, &binlogdatapb.Rule{Match: "table1"}) + } else { + for i, tableSetting := range tmc.tableSettings { + rules[i] = &binlogdatapb.Rule{ + Match: tableSetting.TargetTable, + Filter: tableSetting.SourceExpression, + } + } + } + + streams := make([]*tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream, len(tmc.sourceShards)) + for i, shard := range tmc.sourceShards { + streams[i] = &tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream{ + Id: int32(i + 1), + Bls: &binlogdatapb.BinlogSource{ + Keyspace: tmc.keyspace, + Shard: shard, + Filter: &binlogdatapb.Filter{ + Rules: rules, + }, + }, + } + } return &tabletmanagerdatapb.ReadVReplicationWorkflowResponse{ Workflow: request.Workflow, WorkflowType: workflowType, - Streams: []*tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream{ - { - Id: 1, - Bls: &binlogdatapb.BinlogSource{ - Keyspace: "sourceks", - Shard: "0", - Filter: &binlogdatapb.Filter{ - Rules: []*binlogdatapb.Rule{ - { - Match: ".*", - }, - }, - }, - }, - }, - }, + Streams: streams, }, nil } @@ -347,31 +410,33 @@ func (tmc *testMaterializerTMClient) ReadVReplicationWorkflows(ctx context.Conte workflowType = binlogdatapb.VReplicationWorkflowType_CreateLookupIndex } } + streams := make([]*tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream, len(tmc.sourceShards)) + for i, shard := range tmc.sourceShards { + streams[i] = &tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream{ + Id: 1, + State: binlogdatapb.VReplicationWorkflowState_Running, + Bls: &binlogdatapb.BinlogSource{ + Keyspace: tmc.keyspace, + Shard: shard, + Filter: &binlogdatapb.Filter{ + Rules: []*binlogdatapb.Rule{ + { + Match: ".*", + }, + }, + }, + }, + Pos: "MySQL56/" + position, + TimeUpdated: protoutil.TimeToProto(time.Now()), + TimeHeartbeat: protoutil.TimeToProto(time.Now()), + } + } return &tabletmanagerdatapb.ReadVReplicationWorkflowsResponse{ Workflows: []*tabletmanagerdatapb.ReadVReplicationWorkflowResponse{ { Workflow: req.IncludeWorkflows[0], WorkflowType: workflowType, - Streams: []*tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream{ - { - Id: 1, - State: binlogdatapb.VReplicationWorkflowState_Running, - Bls: &binlogdatapb.BinlogSource{ - Keyspace: "sourceks", - Shard: "0", - Filter: &binlogdatapb.Filter{ - Rules: []*binlogdatapb.Rule{ - { - Match: ".*", - }, - }, - }, - }, - Pos: "MySQL56/" + position, - TimeUpdated: protoutil.TimeToProto(time.Now()), - TimeHeartbeat: protoutil.TimeToProto(time.Now()), - }, - }, + Streams: streams, }, }, }, nil diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index 19268866253..86a3a6c6ead 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -66,6 +66,7 @@ import ( binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" querypb "vitess.io/vitess/go/vt/proto/query" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" + "vitess.io/vitess/go/vt/proto/topodata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vschemapb "vitess.io/vitess/go/vt/proto/vschema" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" @@ -958,10 +959,7 @@ func (s *Server) getWorkflowState(ctx context.Context, targetKeyspace, workflowN return ts, state, nil } - var ( - reverse bool - sourceKeyspace string - ) + var sourceKeyspace string // We reverse writes by using the source_keyspace.workflowname_reverse workflow // spec, so we need to use the source of the reverse workflow, which is the @@ -970,7 +968,7 @@ func (s *Server) getWorkflowState(ctx context.Context, targetKeyspace, workflowN // source to check if writes have been switched. if strings.HasSuffix(workflowName, "_reverse") { - reverse = true + state.IsReverse = true // Flip the source and target keyspaces. sourceKeyspace = state.TargetKeyspace targetKeyspace = state.SourceKeyspace @@ -1039,7 +1037,7 @@ func (s *Server) getWorkflowState(ctx context.Context, targetKeyspace, workflowN // We assume a consistent state, so only choose one shard. var shard *topo.ShardInfo - if reverse { + if state.IsReverse { shard = ts.TargetShards()[0] } else { shard = ts.SourceShards()[0] @@ -3239,6 +3237,12 @@ func (s *Server) switchReads(ctx context.Context, req *vtctldatapb.WorkflowSwitc return handleError("workflow validation failed", err) } + // Remove mirror rules for the specified tablet types. + if err := sw.mirrorTableTraffic(ctx, roTabletTypes, 0); err != nil { + return handleError(fmt.Sprintf("failed to remove mirror rules from source keyspace %s to target keyspace %s, workflow %s, for read-only tablet types", + ts.SourceKeyspaceName(), ts.TargetKeyspaceName(), ts.WorkflowName()), err) + } + // For reads, locking the source keyspace is sufficient. ctx, unlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "SwitchReads") if lockErr != nil { @@ -3311,6 +3315,12 @@ func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwit } } + // Remove mirror rules for the primary tablet type. + if err := sw.mirrorTableTraffic(ctx, []topodata.TabletType{topodatapb.TabletType_PRIMARY}, 0); err != nil { + return handleError(fmt.Sprintf("failed to remove mirror rules from source keyspace %s to target keyspace %s, workflow %s, for primary tablet type", + ts.SourceKeyspaceName(), ts.TargetKeyspaceName(), ts.WorkflowName()), err) + } + // Need to lock both source and target keyspaces. tctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "SwitchWrites") if lockErr != nil { @@ -4068,3 +4078,94 @@ func (s *Server) getWorkflowStatus(ctx context.Context, keyspace string, workflo } return workflowStatus, nil } + +// WorkflowMirrorTraffic mirrors traffic from the source keyspace to the target keyspace. +func (s *Server) WorkflowMirrorTraffic(ctx context.Context, req *vtctldatapb.WorkflowMirrorTrafficRequest) (*vtctldatapb.WorkflowMirrorTrafficResponse, error) { + ts, startState, err := s.getWorkflowState(ctx, req.Keyspace, req.Workflow) + if err != nil { + return nil, err + } + + // Traffic mirroring was built with basic MoveTables workflows in mind. In + // theory, other workflow types (e.g. Migrate) and variants (e.g. partial, + // multi-tenant) could be supported. Until demand for these use cases + // arises, reject everything but basic MoveTables. + if startState.WorkflowType != TypeMoveTables { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid action for %s workflow: MirrorTraffic", string(startState.WorkflowType)) + } + if startState.IsReverse { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid action for reverse workflow: MirrorTraffic") + } + if ts.MigrationType() != binlogdatapb.MigrationType_TABLES { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid action for %s migration type: MirrorTraffic", binlogdatapb.MigrationType_name[int32(ts.MigrationType())]) + } + if ts.IsPartialMigration() { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid action for partial migration: MirrorTraffic") + } + if ts.IsMultiTenantMigration() { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid action for multi-tenant migration: MirrorTraffic") + } + + // Don't allow traffic to be mirrored if any traffic has been switched over + // to the target keyspace. + var cannotSwitchTabletTypes []string + for _, tt := range req.TabletTypes { + if tt == topodatapb.TabletType_RDONLY && len(startState.RdonlyCellsSwitched) > 0 { + cannotSwitchTabletTypes = append(cannotSwitchTabletTypes, "rdonly") + } + if tt == topodatapb.TabletType_REPLICA && len(startState.ReplicaCellsSwitched) > 0 { + cannotSwitchTabletTypes = append(cannotSwitchTabletTypes, "replica") + } + if tt == topodatapb.TabletType_PRIMARY && startState.WritesSwitched { + cannotSwitchTabletTypes = append(cannotSwitchTabletTypes, "primary") + } + } + if len(cannotSwitchTabletTypes) > 0 { + return nil, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "cannot mirror [%s] traffic for workflow %s at this time: traffic for those tablet types is switched", strings.Join(cannotSwitchTabletTypes, ","), startState.Workflow) + } + + if err := s.mirrorTraffic(ctx, req, ts, startState); err != nil { + return nil, err + } + + cmd := "MirrorTraffic" + resp := &vtctldatapb.WorkflowMirrorTrafficResponse{} + log.Infof("Mirror Traffic done for workflow %s.%s", req.Keyspace, req.Workflow) + resp.Summary = fmt.Sprintf("%s was successful for workflow %s.%s", cmd, req.Keyspace, req.Workflow) + // Reload the state after the MirrorTraffic operation + // and return that as a string. + keyspace := req.Keyspace + workflow := req.Workflow + resp.StartState = startState.String() + log.Infof("Before reloading workflow state after mirror traffic: %+v\n", resp.StartState) + _, currentState, err := s.getWorkflowState(ctx, keyspace, workflow) + if err != nil { + resp.CurrentState = fmt.Sprintf("Error reloading workflow state after mirror traffic: %v", err) + } else { + resp.CurrentState = currentState.String() + } + return resp, nil +} + +// mirrorTraffic manages mirror routing rules for tables in the workflow. +func (s *Server) mirrorTraffic(ctx context.Context, req *vtctldatapb.WorkflowMirrorTrafficRequest, ts *trafficSwitcher, state *State) (err error) { + // Consistently handle errors by logging and returning them. + handleError := func(message string, err error) error { + ts.Logger().Error(err) + return err + } + + log.Infof("Mirroring traffic: %s.%s, workflow state: %s", ts.targetKeyspace, ts.workflow, state.String()) + + sw := &switcher{ts: ts, s: s} + + if err := ts.validate(ctx); err != nil { + return handleError("workflow validation failed", err) + } + + if err := sw.mirrorTableTraffic(ctx, req.TabletTypes, req.Percent); err != nil { + return handleError("failed to mirror traffic for the tables", err) + } + + return nil +} diff --git a/go/vt/vtctl/workflow/server_test.go b/go/vt/vtctl/workflow/server_test.go index fb432403155..f2b9f6b2496 100644 --- a/go/vt/vtctl/workflow/server_test.go +++ b/go/vt/vtctl/workflow/server_test.go @@ -18,6 +18,7 @@ package workflow import ( "context" + "encoding/json" "fmt" "slices" "sort" @@ -34,6 +35,7 @@ import ( "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/memorytopo" "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/topotools" "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/vt/vttablet/tmclient" @@ -405,11 +407,13 @@ func TestMoveTablesTrafficSwitching(t *testing.T) { sourceKeyspaceName := "sourceks" targetKeyspaceName := "targetks" vrID := 1 + tabletTypes := []topodatapb.TabletType{ topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY, } + schema := map[string]*tabletmanagerdatapb.SchemaDefinition{ tableName: { TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ @@ -420,6 +424,7 @@ func TestMoveTablesTrafficSwitching(t *testing.T) { }, }, } + copyTableQR := &queryResult{ query: fmt.Sprintf("select vrepl_id, table_name, lastpk from _vt.copy_state where vrepl_id in (%d) and id in (select max(id) from _vt.copy_state where vrepl_id in (%d) group by vrepl_id, table_name)", vrID, vrID), @@ -684,10 +689,12 @@ func TestMoveTablesTrafficSwitchingDryRun(t *testing.T) { DryRun: true, }, want: []string{ + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [REPLICA,RDONLY]", sourceKeyspaceName, targetKeyspaceName), fmt.Sprintf("Lock keyspace %s", sourceKeyspaceName), fmt.Sprintf("Switch reads for tables [%s] to keyspace %s for tablet types [REPLICA,RDONLY]", tablesStr, targetKeyspaceName), fmt.Sprintf("Routing rules for tables [%s] will be updated", tablesStr), fmt.Sprintf("Unlock keyspace %s", sourceKeyspaceName), + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [PRIMARY]", sourceKeyspaceName, targetKeyspaceName), fmt.Sprintf("Lock keyspace %s", sourceKeyspaceName), fmt.Sprintf("Lock keyspace %s", targetKeyspaceName), fmt.Sprintf("Stop writes on keyspace %s for tables [%s]: [keyspace:%s;shard:-80;position:%s,keyspace:%s;shard:80-;position:%s]", @@ -723,10 +730,12 @@ func TestMoveTablesTrafficSwitchingDryRun(t *testing.T) { DryRun: true, }, want: []string{ + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [REPLICA,RDONLY]", targetKeyspaceName, sourceKeyspaceName), fmt.Sprintf("Lock keyspace %s", targetKeyspaceName), fmt.Sprintf("Switch reads for tables [%s] to keyspace %s for tablet types [REPLICA,RDONLY]", tablesStr, targetKeyspaceName), fmt.Sprintf("Routing rules for tables [%s] will be updated", tablesStr), fmt.Sprintf("Unlock keyspace %s", targetKeyspaceName), + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [PRIMARY]", targetKeyspaceName, sourceKeyspaceName), fmt.Sprintf("Lock keyspace %s", targetKeyspaceName), fmt.Sprintf("Lock keyspace %s", sourceKeyspaceName), fmt.Sprintf("Stop writes on keyspace %s for tables [%s]: [keyspace:%s;shard:-80;position:%s,keyspace:%s;shard:80-;position:%s]", @@ -780,3 +789,416 @@ func TestMoveTablesTrafficSwitchingDryRun(t *testing.T) { }) } } + +func TestMirrorTraffic(t *testing.T) { + ctx := context.Background() + sourceKs := "source" + sourceShards := []string{"-"} + targetKs := "target" + targetShards := []string{"-80", "80-"} + table1 := "table1" + table2 := "table2" + workflow := "src2target" + + mirrorRules := map[string]map[string]float32{} + routingRules := map[string][]string{ + fmt.Sprintf("%s.%s@rdonly", sourceKs, table1): {fmt.Sprintf("%s.%s", targetKs, table1)}, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table2): {fmt.Sprintf("%s.%s", targetKs, table2)}, + } + + tabletTypes := []topodatapb.TabletType{ + topodatapb.TabletType_PRIMARY, + topodatapb.TabletType_REPLICA, + topodatapb.TabletType_RDONLY, + } + + tests := []struct { + name string + + req *vtctldatapb.WorkflowMirrorTrafficRequest + mirrorRules map[string]map[string]float32 + routingRules map[string][]string + setup func(*testing.T, context.Context, *testMaterializerEnv) + sourceKeyspace string + sourceShards []string + targetKeyspace string + targetShards []string + + wantErr string + wantMirrorRules map[string]map[string]float32 + }{ + { + name: "no such keyspace", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: "no_ks", + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + wantErr: "FindAllShardsInKeyspace(no_ks): List: node doesn't exist: keyspaces/no_ks/shards", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "no such workflow", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: "no_workflow", + TabletTypes: tabletTypes, + Percent: 50.0, + }, + setup: func(t *testing.T, ctx context.Context, te *testMaterializerEnv) { + te.tmc.readVReplicationWorkflow = func( + ctx context.Context, + tablet *topodatapb.Tablet, + request *tabletmanagerdatapb.ReadVReplicationWorkflowRequest, + ) (*tabletmanagerdatapb.ReadVReplicationWorkflowResponse, error) { + return nil, nil + } + }, + wantErr: "no streams found in keyspace target for no_workflow", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "cannot mirror traffic for migrate workflows", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: "migrate", + TabletTypes: tabletTypes, + Percent: 50.0, + }, + setup: func(t *testing.T, ctx context.Context, te *testMaterializerEnv) { + te.tmc.readVReplicationWorkflow = createReadVReplicationWorkflowFunc(t, binlogdatapb.VReplicationWorkflowType_Migrate, nil, te.tmc.keyspace, sourceShards, []string{table1, table2}) + }, + wantErr: "invalid action for Migrate workflow: MirrorTraffic", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "cannot mirror traffic for reshard workflows", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: sourceKs, + Workflow: "reshard", + TabletTypes: tabletTypes, + Percent: 50.0, + }, + sourceKeyspace: sourceKs, + sourceShards: []string{"-80", "80-"}, + targetKeyspace: sourceKs, + targetShards: []string{"-55", "55-aa", "55-"}, + setup: func(t *testing.T, ctx context.Context, te *testMaterializerEnv) { + te.tmc.readVReplicationWorkflow = createReadVReplicationWorkflowFunc(t, binlogdatapb.VReplicationWorkflowType_Reshard, nil, sourceKs, []string{"-80", "80-"}, []string{table1, table2}) + }, + wantErr: "invalid action for Reshard workflow: MirrorTraffic", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "cannot mirror rdonly traffic after switch rdonly traffic", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + routingRules: map[string][]string{ + fmt.Sprintf("%s.%s@rdonly", targetKs, table1): {fmt.Sprintf("%s.%s@rdonly", targetKs, table1)}, + fmt.Sprintf("%s.%s@rdonly", targetKs, table2): {fmt.Sprintf("%s.%s@rdonly", targetKs, table2)}, + }, + wantErr: "cannot mirror [rdonly] traffic for workflow src2target at this time: traffic for those tablet types is switched", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "cannot mirror replica traffic after switch replica traffic", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + routingRules: map[string][]string{ + fmt.Sprintf("%s.%s@replica", targetKs, table1): {fmt.Sprintf("%s.%s@replica", targetKs, table1)}, + fmt.Sprintf("%s.%s@replica", targetKs, table2): {fmt.Sprintf("%s.%s@replica", targetKs, table2)}, + }, + wantErr: "cannot mirror [replica] traffic for workflow src2target at this time: traffic for those tablet types is switched", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "cannot mirror write traffic after switch traffic", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + routingRules: map[string][]string{ + table1: {fmt.Sprintf("%s.%s", targetKs, table1)}, + table2: {fmt.Sprintf("%s.%s", targetKs, table2)}, + }, + wantErr: "cannot mirror [primary] traffic for workflow src2target at this time: traffic for those tablet types is switched", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "does not mirror traffic for partial move tables", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + setup: func(t *testing.T, ctx context.Context, te *testMaterializerEnv) { + te.tmc.readVReplicationWorkflow = func( + ctx context.Context, + tablet *topodatapb.Tablet, + request *tabletmanagerdatapb.ReadVReplicationWorkflowRequest, + ) (*tabletmanagerdatapb.ReadVReplicationWorkflowResponse, error) { + if tablet.Shard != "-80" { + return nil, nil + } + return &tabletmanagerdatapb.ReadVReplicationWorkflowResponse{ + Workflow: request.Workflow, + WorkflowType: binlogdatapb.VReplicationWorkflowType_MoveTables, + Streams: []*tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream{ + { + Id: 1, + Bls: &binlogdatapb.BinlogSource{ + Keyspace: sourceKs, + Shard: "-80", + Filter: &binlogdatapb.Filter{ + Rules: []*binlogdatapb.Rule{ + {Match: table1}, + {Match: table2}, + }, + }, + }, + }, + }, + }, nil + } + }, + sourceShards: []string{"-80", "80-"}, + targetShards: []string{"-80", "80-"}, + wantErr: "invalid action for partial migration: MirrorTraffic", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "does not mirror traffic for multi-tenant move tables", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + setup: func(t *testing.T, ctx context.Context, te *testMaterializerEnv) { + te.tmc.readVReplicationWorkflow = createReadVReplicationWorkflowFunc(t, binlogdatapb.VReplicationWorkflowType_MoveTables, &vtctldatapb.WorkflowOptions{TenantId: "123"}, te.tmc.keyspace, sourceShards, []string{table1, table2}) + }, + wantErr: "invalid action for multi-tenant migration: MirrorTraffic", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "does not mirror traffic for reverse move tables", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow + "_reverse", + TabletTypes: tabletTypes, + Percent: 50.0, + }, + wantErr: "invalid action for reverse workflow: MirrorTraffic", + wantMirrorRules: make(map[string]map[string]float32), + }, + { + name: "ok", + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + wantMirrorRules: map[string]map[string]float32{ + fmt.Sprintf("%s.%s", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 50.0, + }, + fmt.Sprintf("%s.%s@replica", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 50.0, + }, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 50.0, + }, + fmt.Sprintf("%s.%s", sourceKs, table2): { + fmt.Sprintf("%s.%s", targetKs, table2): 50.0, + }, + fmt.Sprintf("%s.%s@replica", sourceKs, table2): { + fmt.Sprintf("%s.%s", targetKs, table2): 50.0, + }, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table2): { + fmt.Sprintf("%s.%s", targetKs, table2): 50.0, + }, + }, + }, + { + name: "does not overwrite unrelated mirror rules", + mirrorRules: map[string]map[string]float32{ + "other_source.table2": { + fmt.Sprintf("%s.table2", targetKs): 25.0, + }, + }, + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + wantMirrorRules: map[string]map[string]float32{ + fmt.Sprintf("%s.%s", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 50.0, + }, + fmt.Sprintf("%s.%s@replica", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 50.0, + }, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 50.0, + }, + fmt.Sprintf("%s.%s", sourceKs, table2): { + fmt.Sprintf("%s.%s", targetKs, table2): 50.0, + }, + fmt.Sprintf("%s.%s@replica", sourceKs, table2): { + fmt.Sprintf("%s.%s", targetKs, table2): 50.0, + }, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table2): { + fmt.Sprintf("%s.%s", targetKs, table2): 50.0, + }, + "other_source.table2": { + fmt.Sprintf("%s.table2", targetKs): 25.0, + }, + }, + }, + { + name: "does not overwrite when some but not all mirror rules already exist", + mirrorRules: map[string]map[string]float32{ + fmt.Sprintf("%s.%s", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 25.0, + }, + fmt.Sprintf("%s.%s@replica", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 25.0, + }, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 25.0, + }, + }, + req: &vtctldatapb.WorkflowMirrorTrafficRequest{ + Keyspace: targetKs, + Workflow: workflow, + TabletTypes: tabletTypes, + Percent: 50.0, + }, + wantErr: "wrong number of pre-existing mirror rules", + wantMirrorRules: map[string]map[string]float32{ + fmt.Sprintf("%s.%s", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 25.0, + }, + fmt.Sprintf("%s.%s@replica", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 25.0, + }, + fmt.Sprintf("%s.%s@rdonly", sourceKs, table1): { + fmt.Sprintf("%s.%s", targetKs, table1): 25.0, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if tt.mirrorRules == nil { + tt.mirrorRules = mirrorRules + } + if tt.routingRules == nil { + tt.routingRules = routingRules + } + if tt.sourceKeyspace == "" { + tt.sourceKeyspace = sourceKs + } + if tt.sourceShards == nil { + tt.sourceShards = sourceShards + } + if tt.targetKeyspace == "" { + tt.targetKeyspace = targetKs + } + if tt.targetShards == nil { + tt.targetShards = targetShards + } + + te := newTestMaterializerEnv(t, ctx, &vtctldatapb.MaterializeSettings{ + SourceKeyspace: tt.sourceKeyspace, + TargetKeyspace: tt.targetKeyspace, + Workflow: workflow, + TableSettings: []*vtctldatapb.TableMaterializeSettings{ + { + TargetTable: table1, + SourceExpression: fmt.Sprintf("select * from %s", table1), + }, + { + TargetTable: table2, + SourceExpression: fmt.Sprintf("select * from %s", table2), + }, + }, + }, tt.sourceShards, tt.targetShards) + + require.NoError(t, topotools.SaveMirrorRules(ctx, te.topoServ, tt.mirrorRules)) + require.NoError(t, topotools.SaveRoutingRules(ctx, te.topoServ, tt.routingRules)) + require.NoError(t, te.topoServ.RebuildSrvVSchema(ctx, []string{te.cell})) + + if tt.setup != nil { + tt.setup(t, ctx, te) + } + + got, err := te.ws.WorkflowMirrorTraffic(ctx, tt.req) + if tt.wantErr != "" { + require.EqualError(t, err, tt.wantErr) + } else { + require.NoError(t, err) + require.NotNil(t, got) + } + mr, err := topotools.GetMirrorRules(ctx, te.topoServ) + require.NoError(t, err) + wantMirrorRules := tt.mirrorRules + if tt.wantMirrorRules != nil { + wantMirrorRules = tt.wantMirrorRules + } + require.Equal(t, wantMirrorRules, mr) + }) + } +} + +func createReadVReplicationWorkflowFunc(t *testing.T, workflowType binlogdatapb.VReplicationWorkflowType, workflowOptions *vtctldatapb.WorkflowOptions, sourceKeyspace string, sourceShards []string, sourceTables []string) readVReplicationWorkflowFunc { + return func(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.ReadVReplicationWorkflowRequest) (*tabletmanagerdatapb.ReadVReplicationWorkflowResponse, error) { + streams := make([]*tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream, 0) + for i, shard := range sourceShards { + if shard == tablet.Shard { + return nil, nil + } + rules := make([]*binlogdatapb.Rule, len(sourceTables)) + for i, table := range sourceTables { + rules[i] = &binlogdatapb.Rule{Match: table} + } + streams = append(streams, &tabletmanagerdatapb.ReadVReplicationWorkflowResponse_Stream{ + Id: int32(i + 1), + Bls: &binlogdatapb.BinlogSource{ + Keyspace: sourceKeyspace, + Shard: shard, + Filter: &binlogdatapb.Filter{Rules: rules}, + }, + }) + } + + var err error + var options []byte + if workflowOptions != nil { + options, err = json.Marshal(workflowOptions) + require.NoError(t, err) + } + + return &tabletmanagerdatapb.ReadVReplicationWorkflowResponse{ + Workflow: request.Workflow, + Options: string(options), + WorkflowType: workflowType, + Streams: streams, + }, nil + } +} diff --git a/go/vt/vtctl/workflow/state.go b/go/vt/vtctl/workflow/state.go index 927f5a9db56..9d2d1f23def 100644 --- a/go/vt/vtctl/workflow/state.go +++ b/go/vt/vtctl/workflow/state.go @@ -61,6 +61,7 @@ type State struct { SourceKeyspace string TargetKeyspace string WorkflowType Type + IsReverse bool ReplicaCellsSwitched []string ReplicaCellsNotSwitched []string diff --git a/go/vt/vtctl/workflow/switcher.go b/go/vt/vtctl/workflow/switcher.go index aa41655aab8..3fbd1c507e2 100644 --- a/go/vt/vtctl/workflow/switcher.go +++ b/go/vt/vtctl/workflow/switcher.go @@ -161,3 +161,7 @@ func (r *switcher) resetSequences(ctx context.Context) error { func (r *switcher) initializeTargetSequences(ctx context.Context, sequencesByBackingTable map[string]*sequenceMetadata) error { return r.ts.initializeTargetSequences(ctx, sequencesByBackingTable) } + +func (r *switcher) mirrorTableTraffic(ctx context.Context, types []topodatapb.TabletType, percent float32) error { + return r.ts.mirrorTableTraffic(ctx, types, percent) +} diff --git a/go/vt/vtctl/workflow/switcher_dry_run.go b/go/vt/vtctl/workflow/switcher_dry_run.go index b8b1369bdf7..55c843b07cb 100644 --- a/go/vt/vtctl/workflow/switcher_dry_run.go +++ b/go/vt/vtctl/workflow/switcher_dry_run.go @@ -63,6 +63,17 @@ func (dr *switcherDryRun) deleteKeyspaceRoutingRules(ctx context.Context) error return nil } +func (dr *switcherDryRun) mirrorTableTraffic(ctx context.Context, types []topodatapb.TabletType, percent float32) error { + var tabletTypes []string + for _, servedType := range types { + tabletTypes = append(tabletTypes, servedType.String()) + } + dr.drLog.Logf("Mirroring %.2f percent of traffic from keyspace %s to keyspace %s for tablet types [%s]", + percent, dr.ts.SourceKeyspaceName(), dr.ts.TargetKeyspaceName(), strings.Join(tabletTypes, ",")) + + return nil +} + func (dr *switcherDryRun) switchKeyspaceReads(ctx context.Context, types []topodatapb.TabletType) error { var tabletTypes []string for _, servedType := range types { diff --git a/go/vt/vtctl/workflow/switcher_interface.go b/go/vt/vtctl/workflow/switcher_interface.go index 0780aaf484c..9dea0af30a1 100644 --- a/go/vt/vtctl/workflow/switcher_interface.go +++ b/go/vt/vtctl/workflow/switcher_interface.go @@ -34,6 +34,7 @@ type iswitcher interface { createJournals(ctx context.Context, sourceWorkflows []string) error allowTargetWrites(ctx context.Context) error changeRouting(ctx context.Context) error + mirrorTableTraffic(ctx context.Context, types []topodatapb.TabletType, percent float32) error streamMigraterfinalize(ctx context.Context, ts *trafficSwitcher, workflows []string) error startReverseVReplication(ctx context.Context) error switchKeyspaceReads(ctx context.Context, types []topodatapb.TabletType) error diff --git a/go/vt/vtctl/workflow/traffic_switcher.go b/go/vt/vtctl/workflow/traffic_switcher.go index 7511315af15..954f4e6a9b3 100644 --- a/go/vt/vtctl/workflow/traffic_switcher.go +++ b/go/vt/vtctl/workflow/traffic_switcher.go @@ -353,7 +353,7 @@ func (ts *trafficSwitcher) getSourceAndTargetShardsNames() ([]string, []string) return sourceShards, targetShards } -// isPartialMoveTables returns true if whe workflow is MoveTables, has the same +// isPartialMoveTables returns true if the workflow is MoveTables, has the same // number of shards, is not covering the entire shard range, and has one-to-one // shards in source and target. func (ts *trafficSwitcher) isPartialMoveTables(sourceShards, targetShards []string) (bool, error) { @@ -1745,3 +1745,50 @@ func (ts *trafficSwitcher) IsMultiTenantMigration() bool { } return false } + +func (ts *trafficSwitcher) mirrorTableTraffic(ctx context.Context, types []topodatapb.TabletType, percent float32) error { + log.Infof("mirrorTableTraffic") + + mrs, err := topotools.GetMirrorRules(ctx, ts.TopoServer()) + if err != nil { + return err + } + + var numExisting int + for _, table := range ts.tables { + for _, tabletType := range types { + fromTable := fmt.Sprintf("%s.%s", ts.SourceKeyspaceName(), table) + if tabletType != topodatapb.TabletType_PRIMARY { + fromTable = fmt.Sprintf("%s@%s", fromTable, topoproto.TabletTypeLString(tabletType)) + } + toTable := fmt.Sprintf("%s.%s", ts.TargetKeyspaceName(), table) + + if _, ok := mrs[fromTable]; !ok { + mrs[fromTable] = make(map[string]float32) + } + + if _, ok := mrs[fromTable][toTable]; ok { + numExisting++ + } + + if percent == 0 { + // When percent is 0, remove mirror rule if it exists. + if _, ok := mrs[fromTable][toTable]; ok { + delete(mrs, fromTable) + } + } else { + mrs[fromTable][toTable] = percent + } + } + } + + if numExisting > 0 && numExisting != (len(types)*len(ts.tables)) { + return vterrors.Errorf(vtrpcpb.Code_ALREADY_EXISTS, "wrong number of pre-existing mirror rules") + } + + if err := topotools.SaveMirrorRules(ctx, ts.TopoServer(), mrs); err != nil { + return err + } + + return ts.TopoServer().RebuildSrvVSchema(ctx, nil) +} diff --git a/proto/vschema.proto b/proto/vschema.proto index dd327f863dc..f0d12278fcd 100644 --- a/proto/vschema.proto +++ b/proto/vschema.proto @@ -153,6 +153,7 @@ message SrvVSchema { RoutingRules routing_rules = 2; // table routing rules ShardRoutingRules shard_routing_rules = 3; KeyspaceRoutingRules keyspace_routing_rules = 4; + MirrorRules mirror_rules = 5; // mirror rules } // ShardRoutingRules specify the shard routing rules for the VSchema. @@ -176,3 +177,17 @@ message KeyspaceRoutingRule { string to_keyspace = 2; } +// MirrorRules specify the high level mirror rules for the VSchema. +message MirrorRules { + // rules should ideally be a map. However protos dont't allow + // repeated fields as elements of a map. So, we use a list + // instead. + repeated MirrorRule rules = 1; +} + +// MirrorRule specifies a mirror rule. +message MirrorRule { + string from_table = 1; + string to_table = 2; + float percent = 3; +} diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 0d2f2d1441e..398357c0423 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -2080,3 +2080,23 @@ message WorkflowUpdateResponse { string summary = 1; repeated TabletInfo details = 2; } + +message GetMirrorRulesRequest { +} + +message GetMirrorRulesResponse { + vschema.MirrorRules mirror_rules = 1; +} + +message WorkflowMirrorTrafficRequest { + string keyspace = 1; + string workflow = 2; + repeated topodata.TabletType tablet_types = 3; + float percent = 4; +} + +message WorkflowMirrorTrafficResponse { + string summary = 1; + string start_state = 2; + string current_state = 3; +} diff --git a/proto/vtctlservice.proto b/proto/vtctlservice.proto index 45100cd3d74..672374038b5 100644 --- a/proto/vtctlservice.proto +++ b/proto/vtctlservice.proto @@ -364,4 +364,7 @@ service Vtctld { // WorkflowUpdate updates the configuration of a vreplication workflow // using the provided updated parameters. rpc WorkflowUpdate(vtctldata.WorkflowUpdateRequest) returns (vtctldata.WorkflowUpdateResponse) {}; + // GetMirrorRules returns the VSchema routing rules. + rpc GetMirrorRules(vtctldata.GetMirrorRulesRequest) returns (vtctldata.GetMirrorRulesResponse) {}; + rpc WorkflowMirrorTraffic(vtctldata.WorkflowMirrorTrafficRequest) returns (vtctldata.WorkflowMirrorTrafficResponse) {}; } diff --git a/proto/vttest.proto b/proto/vttest.proto index b48107044d7..fdabe7c40f5 100644 --- a/proto/vttest.proto +++ b/proto/vttest.proto @@ -94,4 +94,7 @@ message VTTestTopology { // routing rules for the topology. vschema.RoutingRules routing_rules = 3; + + // mirror rules for the topology. + vschema.MirrorRules mirror_rules = 4; } diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 021ece60596..67b1fca3d05 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -45018,6 +45018,9 @@ export namespace vschema { /** SrvVSchema keyspace_routing_rules */ keyspace_routing_rules?: (vschema.IKeyspaceRoutingRules|null); + + /** SrvVSchema mirror_rules */ + mirror_rules?: (vschema.IMirrorRules|null); } /** Represents a SrvVSchema. */ @@ -45041,6 +45044,9 @@ export namespace vschema { /** SrvVSchema keyspace_routing_rules. */ public keyspace_routing_rules?: (vschema.IKeyspaceRoutingRules|null); + /** SrvVSchema mirror_rules. */ + public mirror_rules?: (vschema.IMirrorRules|null); + /** * Creates a new SrvVSchema instance using the specified properties. * @param [properties] Properties to set @@ -45524,6 +45530,212 @@ export namespace vschema { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a MirrorRules. */ + interface IMirrorRules { + + /** MirrorRules rules */ + rules?: (vschema.IMirrorRule[]|null); + } + + /** Represents a MirrorRules. */ + class MirrorRules implements IMirrorRules { + + /** + * Constructs a new MirrorRules. + * @param [properties] Properties to set + */ + constructor(properties?: vschema.IMirrorRules); + + /** MirrorRules rules. */ + public rules: vschema.IMirrorRule[]; + + /** + * Creates a new MirrorRules instance using the specified properties. + * @param [properties] Properties to set + * @returns MirrorRules instance + */ + public static create(properties?: vschema.IMirrorRules): vschema.MirrorRules; + + /** + * Encodes the specified MirrorRules message. Does not implicitly {@link vschema.MirrorRules.verify|verify} messages. + * @param message MirrorRules message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vschema.IMirrorRules, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MirrorRules message, length delimited. Does not implicitly {@link vschema.MirrorRules.verify|verify} messages. + * @param message MirrorRules message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vschema.IMirrorRules, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MirrorRules message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MirrorRules + * @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): vschema.MirrorRules; + + /** + * Decodes a MirrorRules message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MirrorRules + * @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)): vschema.MirrorRules; + + /** + * Verifies a MirrorRules 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 MirrorRules message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MirrorRules + */ + public static fromObject(object: { [k: string]: any }): vschema.MirrorRules; + + /** + * Creates a plain object from a MirrorRules message. Also converts values to other types if specified. + * @param message MirrorRules + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vschema.MirrorRules, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MirrorRules to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MirrorRules + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MirrorRule. */ + interface IMirrorRule { + + /** MirrorRule from_table */ + from_table?: (string|null); + + /** MirrorRule to_table */ + to_table?: (string|null); + + /** MirrorRule percent */ + percent?: (number|null); + } + + /** Represents a MirrorRule. */ + class MirrorRule implements IMirrorRule { + + /** + * Constructs a new MirrorRule. + * @param [properties] Properties to set + */ + constructor(properties?: vschema.IMirrorRule); + + /** MirrorRule from_table. */ + public from_table: string; + + /** MirrorRule to_table. */ + public to_table: string; + + /** MirrorRule percent. */ + public percent: number; + + /** + * Creates a new MirrorRule instance using the specified properties. + * @param [properties] Properties to set + * @returns MirrorRule instance + */ + public static create(properties?: vschema.IMirrorRule): vschema.MirrorRule; + + /** + * Encodes the specified MirrorRule message. Does not implicitly {@link vschema.MirrorRule.verify|verify} messages. + * @param message MirrorRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vschema.IMirrorRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MirrorRule message, length delimited. Does not implicitly {@link vschema.MirrorRule.verify|verify} messages. + * @param message MirrorRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vschema.IMirrorRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MirrorRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MirrorRule + * @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): vschema.MirrorRule; + + /** + * Decodes a MirrorRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MirrorRule + * @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)): vschema.MirrorRule; + + /** + * Verifies a MirrorRule 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 MirrorRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MirrorRule + */ + public static fromObject(object: { [k: string]: any }): vschema.MirrorRule; + + /** + * Creates a plain object from a MirrorRule message. Also converts values to other types if specified. + * @param message MirrorRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vschema.MirrorRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MirrorRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MirrorRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Namespace vtctldata. */ @@ -73976,4 +74188,416 @@ export namespace vtctldata { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Properties of a GetMirrorRulesRequest. */ + interface IGetMirrorRulesRequest { + } + + /** Represents a GetMirrorRulesRequest. */ + class GetMirrorRulesRequest implements IGetMirrorRulesRequest { + + /** + * Constructs a new GetMirrorRulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.IGetMirrorRulesRequest); + + /** + * Creates a new GetMirrorRulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMirrorRulesRequest instance + */ + public static create(properties?: vtctldata.IGetMirrorRulesRequest): vtctldata.GetMirrorRulesRequest; + + /** + * Encodes the specified GetMirrorRulesRequest message. Does not implicitly {@link vtctldata.GetMirrorRulesRequest.verify|verify} messages. + * @param message GetMirrorRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.IGetMirrorRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMirrorRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetMirrorRulesRequest.verify|verify} messages. + * @param message GetMirrorRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.IGetMirrorRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMirrorRulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMirrorRulesRequest + * @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): vtctldata.GetMirrorRulesRequest; + + /** + * Decodes a GetMirrorRulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMirrorRulesRequest + * @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)): vtctldata.GetMirrorRulesRequest; + + /** + * Verifies a GetMirrorRulesRequest 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 GetMirrorRulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMirrorRulesRequest + */ + public static fromObject(object: { [k: string]: any }): vtctldata.GetMirrorRulesRequest; + + /** + * Creates a plain object from a GetMirrorRulesRequest message. Also converts values to other types if specified. + * @param message GetMirrorRulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.GetMirrorRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMirrorRulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMirrorRulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMirrorRulesResponse. */ + interface IGetMirrorRulesResponse { + + /** GetMirrorRulesResponse mirror_rules */ + mirror_rules?: (vschema.IMirrorRules|null); + } + + /** Represents a GetMirrorRulesResponse. */ + class GetMirrorRulesResponse implements IGetMirrorRulesResponse { + + /** + * Constructs a new GetMirrorRulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.IGetMirrorRulesResponse); + + /** GetMirrorRulesResponse mirror_rules. */ + public mirror_rules?: (vschema.IMirrorRules|null); + + /** + * Creates a new GetMirrorRulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMirrorRulesResponse instance + */ + public static create(properties?: vtctldata.IGetMirrorRulesResponse): vtctldata.GetMirrorRulesResponse; + + /** + * Encodes the specified GetMirrorRulesResponse message. Does not implicitly {@link vtctldata.GetMirrorRulesResponse.verify|verify} messages. + * @param message GetMirrorRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.IGetMirrorRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMirrorRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetMirrorRulesResponse.verify|verify} messages. + * @param message GetMirrorRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.IGetMirrorRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMirrorRulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMirrorRulesResponse + * @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): vtctldata.GetMirrorRulesResponse; + + /** + * Decodes a GetMirrorRulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMirrorRulesResponse + * @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)): vtctldata.GetMirrorRulesResponse; + + /** + * Verifies a GetMirrorRulesResponse 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 GetMirrorRulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMirrorRulesResponse + */ + public static fromObject(object: { [k: string]: any }): vtctldata.GetMirrorRulesResponse; + + /** + * Creates a plain object from a GetMirrorRulesResponse message. Also converts values to other types if specified. + * @param message GetMirrorRulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.GetMirrorRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMirrorRulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMirrorRulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkflowMirrorTrafficRequest. */ + interface IWorkflowMirrorTrafficRequest { + + /** WorkflowMirrorTrafficRequest keyspace */ + keyspace?: (string|null); + + /** WorkflowMirrorTrafficRequest workflow */ + workflow?: (string|null); + + /** WorkflowMirrorTrafficRequest tablet_types */ + tablet_types?: (topodata.TabletType[]|null); + + /** WorkflowMirrorTrafficRequest percent */ + percent?: (number|null); + } + + /** Represents a WorkflowMirrorTrafficRequest. */ + class WorkflowMirrorTrafficRequest implements IWorkflowMirrorTrafficRequest { + + /** + * Constructs a new WorkflowMirrorTrafficRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.IWorkflowMirrorTrafficRequest); + + /** WorkflowMirrorTrafficRequest keyspace. */ + public keyspace: string; + + /** WorkflowMirrorTrafficRequest workflow. */ + public workflow: string; + + /** WorkflowMirrorTrafficRequest tablet_types. */ + public tablet_types: topodata.TabletType[]; + + /** WorkflowMirrorTrafficRequest percent. */ + public percent: number; + + /** + * Creates a new WorkflowMirrorTrafficRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowMirrorTrafficRequest instance + */ + public static create(properties?: vtctldata.IWorkflowMirrorTrafficRequest): vtctldata.WorkflowMirrorTrafficRequest; + + /** + * Encodes the specified WorkflowMirrorTrafficRequest message. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficRequest.verify|verify} messages. + * @param message WorkflowMirrorTrafficRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.IWorkflowMirrorTrafficRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowMirrorTrafficRequest message, length delimited. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficRequest.verify|verify} messages. + * @param message WorkflowMirrorTrafficRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.IWorkflowMirrorTrafficRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowMirrorTrafficRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowMirrorTrafficRequest + * @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): vtctldata.WorkflowMirrorTrafficRequest; + + /** + * Decodes a WorkflowMirrorTrafficRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowMirrorTrafficRequest + * @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)): vtctldata.WorkflowMirrorTrafficRequest; + + /** + * Verifies a WorkflowMirrorTrafficRequest 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 WorkflowMirrorTrafficRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowMirrorTrafficRequest + */ + public static fromObject(object: { [k: string]: any }): vtctldata.WorkflowMirrorTrafficRequest; + + /** + * Creates a plain object from a WorkflowMirrorTrafficRequest message. Also converts values to other types if specified. + * @param message WorkflowMirrorTrafficRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.WorkflowMirrorTrafficRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowMirrorTrafficRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowMirrorTrafficRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkflowMirrorTrafficResponse. */ + interface IWorkflowMirrorTrafficResponse { + + /** WorkflowMirrorTrafficResponse summary */ + summary?: (string|null); + + /** WorkflowMirrorTrafficResponse start_state */ + start_state?: (string|null); + + /** WorkflowMirrorTrafficResponse current_state */ + current_state?: (string|null); + } + + /** Represents a WorkflowMirrorTrafficResponse. */ + class WorkflowMirrorTrafficResponse implements IWorkflowMirrorTrafficResponse { + + /** + * Constructs a new WorkflowMirrorTrafficResponse. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.IWorkflowMirrorTrafficResponse); + + /** WorkflowMirrorTrafficResponse summary. */ + public summary: string; + + /** WorkflowMirrorTrafficResponse start_state. */ + public start_state: string; + + /** WorkflowMirrorTrafficResponse current_state. */ + public current_state: string; + + /** + * Creates a new WorkflowMirrorTrafficResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowMirrorTrafficResponse instance + */ + public static create(properties?: vtctldata.IWorkflowMirrorTrafficResponse): vtctldata.WorkflowMirrorTrafficResponse; + + /** + * Encodes the specified WorkflowMirrorTrafficResponse message. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficResponse.verify|verify} messages. + * @param message WorkflowMirrorTrafficResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.IWorkflowMirrorTrafficResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowMirrorTrafficResponse message, length delimited. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficResponse.verify|verify} messages. + * @param message WorkflowMirrorTrafficResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.IWorkflowMirrorTrafficResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowMirrorTrafficResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowMirrorTrafficResponse + * @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): vtctldata.WorkflowMirrorTrafficResponse; + + /** + * Decodes a WorkflowMirrorTrafficResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowMirrorTrafficResponse + * @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)): vtctldata.WorkflowMirrorTrafficResponse; + + /** + * Verifies a WorkflowMirrorTrafficResponse 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 WorkflowMirrorTrafficResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowMirrorTrafficResponse + */ + public static fromObject(object: { [k: string]: any }): vtctldata.WorkflowMirrorTrafficResponse; + + /** + * Creates a plain object from a WorkflowMirrorTrafficResponse message. Also converts values to other types if specified. + * @param message WorkflowMirrorTrafficResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.WorkflowMirrorTrafficResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowMirrorTrafficResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowMirrorTrafficResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index eca2d8aa0e7..f36e43dadec 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -110457,6 +110457,7 @@ export const vschema = $root.vschema = (() => { * @property {vschema.IRoutingRules|null} [routing_rules] SrvVSchema routing_rules * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] SrvVSchema shard_routing_rules * @property {vschema.IKeyspaceRoutingRules|null} [keyspace_routing_rules] SrvVSchema keyspace_routing_rules + * @property {vschema.IMirrorRules|null} [mirror_rules] SrvVSchema mirror_rules */ /** @@ -110507,6 +110508,14 @@ export const vschema = $root.vschema = (() => { */ SrvVSchema.prototype.keyspace_routing_rules = null; + /** + * SrvVSchema mirror_rules. + * @member {vschema.IMirrorRules|null|undefined} mirror_rules + * @memberof vschema.SrvVSchema + * @instance + */ + SrvVSchema.prototype.mirror_rules = null; + /** * Creates a new SrvVSchema instance using the specified properties. * @function create @@ -110542,6 +110551,8 @@ export const vschema = $root.vschema = (() => { $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.keyspace_routing_rules != null && Object.hasOwnProperty.call(message, "keyspace_routing_rules")) $root.vschema.KeyspaceRoutingRules.encode(message.keyspace_routing_rules, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.mirror_rules != null && Object.hasOwnProperty.call(message, "mirror_rules")) + $root.vschema.MirrorRules.encode(message.mirror_rules, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -110611,6 +110622,10 @@ export const vschema = $root.vschema = (() => { message.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.decode(reader, reader.uint32()); break; } + case 5: { + message.mirror_rules = $root.vschema.MirrorRules.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -110671,6 +110686,11 @@ export const vschema = $root.vschema = (() => { if (error) return "keyspace_routing_rules." + error; } + if (message.mirror_rules != null && message.hasOwnProperty("mirror_rules")) { + let error = $root.vschema.MirrorRules.verify(message.mirror_rules); + if (error) + return "mirror_rules." + error; + } return null; }; @@ -110711,6 +110731,11 @@ export const vschema = $root.vschema = (() => { throw TypeError(".vschema.SrvVSchema.keyspace_routing_rules: object expected"); message.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.fromObject(object.keyspace_routing_rules); } + if (object.mirror_rules != null) { + if (typeof object.mirror_rules !== "object") + throw TypeError(".vschema.SrvVSchema.mirror_rules: object expected"); + message.mirror_rules = $root.vschema.MirrorRules.fromObject(object.mirror_rules); + } return message; }; @@ -110733,6 +110758,7 @@ export const vschema = $root.vschema = (() => { object.routing_rules = null; object.shard_routing_rules = null; object.keyspace_routing_rules = null; + object.mirror_rules = null; } let keys2; if (message.keyspaces && (keys2 = Object.keys(message.keyspaces)).length) { @@ -110746,6 +110772,8 @@ export const vschema = $root.vschema = (() => { object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); if (message.keyspace_routing_rules != null && message.hasOwnProperty("keyspace_routing_rules")) object.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.toObject(message.keyspace_routing_rules, options); + if (message.mirror_rules != null && message.hasOwnProperty("mirror_rules")) + object.mirror_rules = $root.vschema.MirrorRules.toObject(message.mirror_rules, options); return object; }; @@ -111703,6 +111731,480 @@ export const vschema = $root.vschema = (() => { return KeyspaceRoutingRule; })(); + vschema.MirrorRules = (function() { + + /** + * Properties of a MirrorRules. + * @memberof vschema + * @interface IMirrorRules + * @property {Array.|null} [rules] MirrorRules rules + */ + + /** + * Constructs a new MirrorRules. + * @memberof vschema + * @classdesc Represents a MirrorRules. + * @implements IMirrorRules + * @constructor + * @param {vschema.IMirrorRules=} [properties] Properties to set + */ + function MirrorRules(properties) { + this.rules = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MirrorRules rules. + * @member {Array.} rules + * @memberof vschema.MirrorRules + * @instance + */ + MirrorRules.prototype.rules = $util.emptyArray; + + /** + * Creates a new MirrorRules instance using the specified properties. + * @function create + * @memberof vschema.MirrorRules + * @static + * @param {vschema.IMirrorRules=} [properties] Properties to set + * @returns {vschema.MirrorRules} MirrorRules instance + */ + MirrorRules.create = function create(properties) { + return new MirrorRules(properties); + }; + + /** + * Encodes the specified MirrorRules message. Does not implicitly {@link vschema.MirrorRules.verify|verify} messages. + * @function encode + * @memberof vschema.MirrorRules + * @static + * @param {vschema.IMirrorRules} message MirrorRules message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MirrorRules.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (let i = 0; i < message.rules.length; ++i) + $root.vschema.MirrorRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MirrorRules message, length delimited. Does not implicitly {@link vschema.MirrorRules.verify|verify} messages. + * @function encodeDelimited + * @memberof vschema.MirrorRules + * @static + * @param {vschema.IMirrorRules} message MirrorRules message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MirrorRules.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MirrorRules message from the specified reader or buffer. + * @function decode + * @memberof vschema.MirrorRules + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vschema.MirrorRules} MirrorRules + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MirrorRules.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.MirrorRules(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.vschema.MirrorRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MirrorRules message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vschema.MirrorRules + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vschema.MirrorRules} MirrorRules + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MirrorRules.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MirrorRules message. + * @function verify + * @memberof vschema.MirrorRules + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MirrorRules.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (let i = 0; i < message.rules.length; ++i) { + let error = $root.vschema.MirrorRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a MirrorRules message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vschema.MirrorRules + * @static + * @param {Object.} object Plain object + * @returns {vschema.MirrorRules} MirrorRules + */ + MirrorRules.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.MirrorRules) + return object; + let message = new $root.vschema.MirrorRules(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".vschema.MirrorRules.rules: array expected"); + message.rules = []; + for (let i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".vschema.MirrorRules.rules: object expected"); + message.rules[i] = $root.vschema.MirrorRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MirrorRules message. Also converts values to other types if specified. + * @function toObject + * @memberof vschema.MirrorRules + * @static + * @param {vschema.MirrorRules} message MirrorRules + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MirrorRules.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (let j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.vschema.MirrorRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this MirrorRules to JSON. + * @function toJSON + * @memberof vschema.MirrorRules + * @instance + * @returns {Object.} JSON object + */ + MirrorRules.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MirrorRules + * @function getTypeUrl + * @memberof vschema.MirrorRules + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MirrorRules.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vschema.MirrorRules"; + }; + + return MirrorRules; + })(); + + vschema.MirrorRule = (function() { + + /** + * Properties of a MirrorRule. + * @memberof vschema + * @interface IMirrorRule + * @property {string|null} [from_table] MirrorRule from_table + * @property {string|null} [to_table] MirrorRule to_table + * @property {number|null} [percent] MirrorRule percent + */ + + /** + * Constructs a new MirrorRule. + * @memberof vschema + * @classdesc Represents a MirrorRule. + * @implements IMirrorRule + * @constructor + * @param {vschema.IMirrorRule=} [properties] Properties to set + */ + function MirrorRule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MirrorRule from_table. + * @member {string} from_table + * @memberof vschema.MirrorRule + * @instance + */ + MirrorRule.prototype.from_table = ""; + + /** + * MirrorRule to_table. + * @member {string} to_table + * @memberof vschema.MirrorRule + * @instance + */ + MirrorRule.prototype.to_table = ""; + + /** + * MirrorRule percent. + * @member {number} percent + * @memberof vschema.MirrorRule + * @instance + */ + MirrorRule.prototype.percent = 0; + + /** + * Creates a new MirrorRule instance using the specified properties. + * @function create + * @memberof vschema.MirrorRule + * @static + * @param {vschema.IMirrorRule=} [properties] Properties to set + * @returns {vschema.MirrorRule} MirrorRule instance + */ + MirrorRule.create = function create(properties) { + return new MirrorRule(properties); + }; + + /** + * Encodes the specified MirrorRule message. Does not implicitly {@link vschema.MirrorRule.verify|verify} messages. + * @function encode + * @memberof vschema.MirrorRule + * @static + * @param {vschema.IMirrorRule} message MirrorRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MirrorRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.from_table != null && Object.hasOwnProperty.call(message, "from_table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_table); + if (message.to_table != null && Object.hasOwnProperty.call(message, "to_table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_table); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.percent); + return writer; + }; + + /** + * Encodes the specified MirrorRule message, length delimited. Does not implicitly {@link vschema.MirrorRule.verify|verify} messages. + * @function encodeDelimited + * @memberof vschema.MirrorRule + * @static + * @param {vschema.IMirrorRule} message MirrorRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MirrorRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MirrorRule message from the specified reader or buffer. + * @function decode + * @memberof vschema.MirrorRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vschema.MirrorRule} MirrorRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MirrorRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.MirrorRule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.from_table = reader.string(); + break; + } + case 2: { + message.to_table = reader.string(); + break; + } + case 3: { + message.percent = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MirrorRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vschema.MirrorRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vschema.MirrorRule} MirrorRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MirrorRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MirrorRule message. + * @function verify + * @memberof vschema.MirrorRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MirrorRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.from_table != null && message.hasOwnProperty("from_table")) + if (!$util.isString(message.from_table)) + return "from_table: string expected"; + if (message.to_table != null && message.hasOwnProperty("to_table")) + if (!$util.isString(message.to_table)) + return "to_table: string expected"; + if (message.percent != null && message.hasOwnProperty("percent")) + if (typeof message.percent !== "number") + return "percent: number expected"; + return null; + }; + + /** + * Creates a MirrorRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vschema.MirrorRule + * @static + * @param {Object.} object Plain object + * @returns {vschema.MirrorRule} MirrorRule + */ + MirrorRule.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.MirrorRule) + return object; + let message = new $root.vschema.MirrorRule(); + if (object.from_table != null) + message.from_table = String(object.from_table); + if (object.to_table != null) + message.to_table = String(object.to_table); + if (object.percent != null) + message.percent = Number(object.percent); + return message; + }; + + /** + * Creates a plain object from a MirrorRule message. Also converts values to other types if specified. + * @function toObject + * @memberof vschema.MirrorRule + * @static + * @param {vschema.MirrorRule} message MirrorRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MirrorRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.from_table = ""; + object.to_table = ""; + object.percent = 0; + } + if (message.from_table != null && message.hasOwnProperty("from_table")) + object.from_table = message.from_table; + if (message.to_table != null && message.hasOwnProperty("to_table")) + object.to_table = message.to_table; + if (message.percent != null && message.hasOwnProperty("percent")) + object.percent = options.json && !isFinite(message.percent) ? String(message.percent) : message.percent; + return object; + }; + + /** + * Converts this MirrorRule to JSON. + * @function toJSON + * @memberof vschema.MirrorRule + * @instance + * @returns {Object.} JSON object + */ + MirrorRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MirrorRule + * @function getTypeUrl + * @memberof vschema.MirrorRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MirrorRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vschema.MirrorRule"; + }; + + return MirrorRule; + })(); + return vschema; })(); @@ -181347,6 +181849,1001 @@ export const vtctldata = $root.vtctldata = (() => { return WorkflowUpdateResponse; })(); + vtctldata.GetMirrorRulesRequest = (function() { + + /** + * Properties of a GetMirrorRulesRequest. + * @memberof vtctldata + * @interface IGetMirrorRulesRequest + */ + + /** + * Constructs a new GetMirrorRulesRequest. + * @memberof vtctldata + * @classdesc Represents a GetMirrorRulesRequest. + * @implements IGetMirrorRulesRequest + * @constructor + * @param {vtctldata.IGetMirrorRulesRequest=} [properties] Properties to set + */ + function GetMirrorRulesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GetMirrorRulesRequest instance using the specified properties. + * @function create + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {vtctldata.IGetMirrorRulesRequest=} [properties] Properties to set + * @returns {vtctldata.GetMirrorRulesRequest} GetMirrorRulesRequest instance + */ + GetMirrorRulesRequest.create = function create(properties) { + return new GetMirrorRulesRequest(properties); + }; + + /** + * Encodes the specified GetMirrorRulesRequest message. Does not implicitly {@link vtctldata.GetMirrorRulesRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {vtctldata.IGetMirrorRulesRequest} message GetMirrorRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMirrorRulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified GetMirrorRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetMirrorRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {vtctldata.IGetMirrorRulesRequest} message GetMirrorRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMirrorRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMirrorRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetMirrorRulesRequest} GetMirrorRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMirrorRulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetMirrorRulesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMirrorRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetMirrorRulesRequest} GetMirrorRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMirrorRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMirrorRulesRequest message. + * @function verify + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMirrorRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GetMirrorRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetMirrorRulesRequest} GetMirrorRulesRequest + */ + GetMirrorRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetMirrorRulesRequest) + return object; + return new $root.vtctldata.GetMirrorRulesRequest(); + }; + + /** + * Creates a plain object from a GetMirrorRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {vtctldata.GetMirrorRulesRequest} message GetMirrorRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMirrorRulesRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GetMirrorRulesRequest to JSON. + * @function toJSON + * @memberof vtctldata.GetMirrorRulesRequest + * @instance + * @returns {Object.} JSON object + */ + GetMirrorRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMirrorRulesRequest + * @function getTypeUrl + * @memberof vtctldata.GetMirrorRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMirrorRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.GetMirrorRulesRequest"; + }; + + return GetMirrorRulesRequest; + })(); + + vtctldata.GetMirrorRulesResponse = (function() { + + /** + * Properties of a GetMirrorRulesResponse. + * @memberof vtctldata + * @interface IGetMirrorRulesResponse + * @property {vschema.IMirrorRules|null} [mirror_rules] GetMirrorRulesResponse mirror_rules + */ + + /** + * Constructs a new GetMirrorRulesResponse. + * @memberof vtctldata + * @classdesc Represents a GetMirrorRulesResponse. + * @implements IGetMirrorRulesResponse + * @constructor + * @param {vtctldata.IGetMirrorRulesResponse=} [properties] Properties to set + */ + function GetMirrorRulesResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMirrorRulesResponse mirror_rules. + * @member {vschema.IMirrorRules|null|undefined} mirror_rules + * @memberof vtctldata.GetMirrorRulesResponse + * @instance + */ + GetMirrorRulesResponse.prototype.mirror_rules = null; + + /** + * Creates a new GetMirrorRulesResponse instance using the specified properties. + * @function create + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {vtctldata.IGetMirrorRulesResponse=} [properties] Properties to set + * @returns {vtctldata.GetMirrorRulesResponse} GetMirrorRulesResponse instance + */ + GetMirrorRulesResponse.create = function create(properties) { + return new GetMirrorRulesResponse(properties); + }; + + /** + * Encodes the specified GetMirrorRulesResponse message. Does not implicitly {@link vtctldata.GetMirrorRulesResponse.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {vtctldata.IGetMirrorRulesResponse} message GetMirrorRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMirrorRulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mirror_rules != null && Object.hasOwnProperty.call(message, "mirror_rules")) + $root.vschema.MirrorRules.encode(message.mirror_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetMirrorRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetMirrorRulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {vtctldata.IGetMirrorRulesResponse} message GetMirrorRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMirrorRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMirrorRulesResponse message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetMirrorRulesResponse} GetMirrorRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMirrorRulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetMirrorRulesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mirror_rules = $root.vschema.MirrorRules.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMirrorRulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetMirrorRulesResponse} GetMirrorRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMirrorRulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMirrorRulesResponse message. + * @function verify + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMirrorRulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mirror_rules != null && message.hasOwnProperty("mirror_rules")) { + let error = $root.vschema.MirrorRules.verify(message.mirror_rules); + if (error) + return "mirror_rules." + error; + } + return null; + }; + + /** + * Creates a GetMirrorRulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetMirrorRulesResponse} GetMirrorRulesResponse + */ + GetMirrorRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetMirrorRulesResponse) + return object; + let message = new $root.vtctldata.GetMirrorRulesResponse(); + if (object.mirror_rules != null) { + if (typeof object.mirror_rules !== "object") + throw TypeError(".vtctldata.GetMirrorRulesResponse.mirror_rules: object expected"); + message.mirror_rules = $root.vschema.MirrorRules.fromObject(object.mirror_rules); + } + return message; + }; + + /** + * Creates a plain object from a GetMirrorRulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {vtctldata.GetMirrorRulesResponse} message GetMirrorRulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMirrorRulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.mirror_rules = null; + if (message.mirror_rules != null && message.hasOwnProperty("mirror_rules")) + object.mirror_rules = $root.vschema.MirrorRules.toObject(message.mirror_rules, options); + return object; + }; + + /** + * Converts this GetMirrorRulesResponse to JSON. + * @function toJSON + * @memberof vtctldata.GetMirrorRulesResponse + * @instance + * @returns {Object.} JSON object + */ + GetMirrorRulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMirrorRulesResponse + * @function getTypeUrl + * @memberof vtctldata.GetMirrorRulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMirrorRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.GetMirrorRulesResponse"; + }; + + return GetMirrorRulesResponse; + })(); + + vtctldata.WorkflowMirrorTrafficRequest = (function() { + + /** + * Properties of a WorkflowMirrorTrafficRequest. + * @memberof vtctldata + * @interface IWorkflowMirrorTrafficRequest + * @property {string|null} [keyspace] WorkflowMirrorTrafficRequest keyspace + * @property {string|null} [workflow] WorkflowMirrorTrafficRequest workflow + * @property {Array.|null} [tablet_types] WorkflowMirrorTrafficRequest tablet_types + * @property {number|null} [percent] WorkflowMirrorTrafficRequest percent + */ + + /** + * Constructs a new WorkflowMirrorTrafficRequest. + * @memberof vtctldata + * @classdesc Represents a WorkflowMirrorTrafficRequest. + * @implements IWorkflowMirrorTrafficRequest + * @constructor + * @param {vtctldata.IWorkflowMirrorTrafficRequest=} [properties] Properties to set + */ + function WorkflowMirrorTrafficRequest(properties) { + this.tablet_types = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowMirrorTrafficRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @instance + */ + WorkflowMirrorTrafficRequest.prototype.keyspace = ""; + + /** + * WorkflowMirrorTrafficRequest workflow. + * @member {string} workflow + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @instance + */ + WorkflowMirrorTrafficRequest.prototype.workflow = ""; + + /** + * WorkflowMirrorTrafficRequest tablet_types. + * @member {Array.} tablet_types + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @instance + */ + WorkflowMirrorTrafficRequest.prototype.tablet_types = $util.emptyArray; + + /** + * WorkflowMirrorTrafficRequest percent. + * @member {number} percent + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @instance + */ + WorkflowMirrorTrafficRequest.prototype.percent = 0; + + /** + * Creates a new WorkflowMirrorTrafficRequest instance using the specified properties. + * @function create + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {vtctldata.IWorkflowMirrorTrafficRequest=} [properties] Properties to set + * @returns {vtctldata.WorkflowMirrorTrafficRequest} WorkflowMirrorTrafficRequest instance + */ + WorkflowMirrorTrafficRequest.create = function create(properties) { + return new WorkflowMirrorTrafficRequest(properties); + }; + + /** + * Encodes the specified WorkflowMirrorTrafficRequest message. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {vtctldata.IWorkflowMirrorTrafficRequest} message WorkflowMirrorTrafficRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowMirrorTrafficRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.workflow); + if (message.tablet_types != null && message.tablet_types.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.tablet_types.length; ++i) + writer.int32(message.tablet_types[i]); + writer.ldelim(); + } + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.percent); + return writer; + }; + + /** + * Encodes the specified WorkflowMirrorTrafficRequest message, length delimited. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {vtctldata.IWorkflowMirrorTrafficRequest} message WorkflowMirrorTrafficRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowMirrorTrafficRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowMirrorTrafficRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.WorkflowMirrorTrafficRequest} WorkflowMirrorTrafficRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowMirrorTrafficRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowMirrorTrafficRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keyspace = reader.string(); + break; + } + case 2: { + message.workflow = reader.string(); + break; + } + case 3: { + if (!(message.tablet_types && message.tablet_types.length)) + message.tablet_types = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.tablet_types.push(reader.int32()); + } else + message.tablet_types.push(reader.int32()); + break; + } + case 4: { + message.percent = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowMirrorTrafficRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.WorkflowMirrorTrafficRequest} WorkflowMirrorTrafficRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowMirrorTrafficRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowMirrorTrafficRequest message. + * @function verify + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowMirrorTrafficRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.workflow != null && message.hasOwnProperty("workflow")) + if (!$util.isString(message.workflow)) + return "workflow: string expected"; + if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) { + if (!Array.isArray(message.tablet_types)) + return "tablet_types: array expected"; + for (let i = 0; i < message.tablet_types.length; ++i) + switch (message.tablet_types[i]) { + default: + return "tablet_types: enum value[] expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message.percent != null && message.hasOwnProperty("percent")) + if (typeof message.percent !== "number") + return "percent: number expected"; + return null; + }; + + /** + * Creates a WorkflowMirrorTrafficRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.WorkflowMirrorTrafficRequest} WorkflowMirrorTrafficRequest + */ + WorkflowMirrorTrafficRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.WorkflowMirrorTrafficRequest) + return object; + let message = new $root.vtctldata.WorkflowMirrorTrafficRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.workflow != null) + message.workflow = String(object.workflow); + if (object.tablet_types) { + if (!Array.isArray(object.tablet_types)) + throw TypeError(".vtctldata.WorkflowMirrorTrafficRequest.tablet_types: array expected"); + message.tablet_types = []; + for (let i = 0; i < object.tablet_types.length; ++i) + switch (object.tablet_types[i]) { + default: + if (typeof object.tablet_types[i] === "number") { + message.tablet_types[i] = object.tablet_types[i]; + break; + } + case "UNKNOWN": + case 0: + message.tablet_types[i] = 0; + break; + case "PRIMARY": + case 1: + message.tablet_types[i] = 1; + break; + case "MASTER": + case 1: + message.tablet_types[i] = 1; + break; + case "REPLICA": + case 2: + message.tablet_types[i] = 2; + break; + case "RDONLY": + case 3: + message.tablet_types[i] = 3; + break; + case "BATCH": + case 3: + message.tablet_types[i] = 3; + break; + case "SPARE": + case 4: + message.tablet_types[i] = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_types[i] = 5; + break; + case "BACKUP": + case 6: + message.tablet_types[i] = 6; + break; + case "RESTORE": + case 7: + message.tablet_types[i] = 7; + break; + case "DRAINED": + case 8: + message.tablet_types[i] = 8; + break; + } + } + if (object.percent != null) + message.percent = Number(object.percent); + return message; + }; + + /** + * Creates a plain object from a WorkflowMirrorTrafficRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {vtctldata.WorkflowMirrorTrafficRequest} message WorkflowMirrorTrafficRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowMirrorTrafficRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.tablet_types = []; + if (options.defaults) { + object.keyspace = ""; + object.workflow = ""; + object.percent = 0; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.workflow != null && message.hasOwnProperty("workflow")) + object.workflow = message.workflow; + if (message.tablet_types && message.tablet_types.length) { + object.tablet_types = []; + for (let j = 0; j < message.tablet_types.length; ++j) + object.tablet_types[j] = options.enums === String ? $root.topodata.TabletType[message.tablet_types[j]] === undefined ? message.tablet_types[j] : $root.topodata.TabletType[message.tablet_types[j]] : message.tablet_types[j]; + } + if (message.percent != null && message.hasOwnProperty("percent")) + object.percent = options.json && !isFinite(message.percent) ? String(message.percent) : message.percent; + return object; + }; + + /** + * Converts this WorkflowMirrorTrafficRequest to JSON. + * @function toJSON + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @instance + * @returns {Object.} JSON object + */ + WorkflowMirrorTrafficRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowMirrorTrafficRequest + * @function getTypeUrl + * @memberof vtctldata.WorkflowMirrorTrafficRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowMirrorTrafficRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.WorkflowMirrorTrafficRequest"; + }; + + return WorkflowMirrorTrafficRequest; + })(); + + vtctldata.WorkflowMirrorTrafficResponse = (function() { + + /** + * Properties of a WorkflowMirrorTrafficResponse. + * @memberof vtctldata + * @interface IWorkflowMirrorTrafficResponse + * @property {string|null} [summary] WorkflowMirrorTrafficResponse summary + * @property {string|null} [start_state] WorkflowMirrorTrafficResponse start_state + * @property {string|null} [current_state] WorkflowMirrorTrafficResponse current_state + */ + + /** + * Constructs a new WorkflowMirrorTrafficResponse. + * @memberof vtctldata + * @classdesc Represents a WorkflowMirrorTrafficResponse. + * @implements IWorkflowMirrorTrafficResponse + * @constructor + * @param {vtctldata.IWorkflowMirrorTrafficResponse=} [properties] Properties to set + */ + function WorkflowMirrorTrafficResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowMirrorTrafficResponse summary. + * @member {string} summary + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @instance + */ + WorkflowMirrorTrafficResponse.prototype.summary = ""; + + /** + * WorkflowMirrorTrafficResponse start_state. + * @member {string} start_state + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @instance + */ + WorkflowMirrorTrafficResponse.prototype.start_state = ""; + + /** + * WorkflowMirrorTrafficResponse current_state. + * @member {string} current_state + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @instance + */ + WorkflowMirrorTrafficResponse.prototype.current_state = ""; + + /** + * Creates a new WorkflowMirrorTrafficResponse instance using the specified properties. + * @function create + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {vtctldata.IWorkflowMirrorTrafficResponse=} [properties] Properties to set + * @returns {vtctldata.WorkflowMirrorTrafficResponse} WorkflowMirrorTrafficResponse instance + */ + WorkflowMirrorTrafficResponse.create = function create(properties) { + return new WorkflowMirrorTrafficResponse(properties); + }; + + /** + * Encodes the specified WorkflowMirrorTrafficResponse message. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficResponse.verify|verify} messages. + * @function encode + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {vtctldata.IWorkflowMirrorTrafficResponse} message WorkflowMirrorTrafficResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowMirrorTrafficResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); + if (message.start_state != null && Object.hasOwnProperty.call(message, "start_state")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.start_state); + if (message.current_state != null && Object.hasOwnProperty.call(message, "current_state")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.current_state); + return writer; + }; + + /** + * Encodes the specified WorkflowMirrorTrafficResponse message, length delimited. Does not implicitly {@link vtctldata.WorkflowMirrorTrafficResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {vtctldata.IWorkflowMirrorTrafficResponse} message WorkflowMirrorTrafficResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowMirrorTrafficResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowMirrorTrafficResponse message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.WorkflowMirrorTrafficResponse} WorkflowMirrorTrafficResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowMirrorTrafficResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowMirrorTrafficResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.summary = reader.string(); + break; + } + case 2: { + message.start_state = reader.string(); + break; + } + case 3: { + message.current_state = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowMirrorTrafficResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.WorkflowMirrorTrafficResponse} WorkflowMirrorTrafficResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowMirrorTrafficResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowMirrorTrafficResponse message. + * @function verify + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowMirrorTrafficResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + if (message.start_state != null && message.hasOwnProperty("start_state")) + if (!$util.isString(message.start_state)) + return "start_state: string expected"; + if (message.current_state != null && message.hasOwnProperty("current_state")) + if (!$util.isString(message.current_state)) + return "current_state: string expected"; + return null; + }; + + /** + * Creates a WorkflowMirrorTrafficResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.WorkflowMirrorTrafficResponse} WorkflowMirrorTrafficResponse + */ + WorkflowMirrorTrafficResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.WorkflowMirrorTrafficResponse) + return object; + let message = new $root.vtctldata.WorkflowMirrorTrafficResponse(); + if (object.summary != null) + message.summary = String(object.summary); + if (object.start_state != null) + message.start_state = String(object.start_state); + if (object.current_state != null) + message.current_state = String(object.current_state); + return message; + }; + + /** + * Creates a plain object from a WorkflowMirrorTrafficResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {vtctldata.WorkflowMirrorTrafficResponse} message WorkflowMirrorTrafficResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowMirrorTrafficResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.summary = ""; + object.start_state = ""; + object.current_state = ""; + } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.start_state != null && message.hasOwnProperty("start_state")) + object.start_state = message.start_state; + if (message.current_state != null && message.hasOwnProperty("current_state")) + object.current_state = message.current_state; + return object; + }; + + /** + * Converts this WorkflowMirrorTrafficResponse to JSON. + * @function toJSON + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @instance + * @returns {Object.} JSON object + */ + WorkflowMirrorTrafficResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowMirrorTrafficResponse + * @function getTypeUrl + * @memberof vtctldata.WorkflowMirrorTrafficResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowMirrorTrafficResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.WorkflowMirrorTrafficResponse"; + }; + + return WorkflowMirrorTrafficResponse; + })(); + return vtctldata; })(); From e827f6bbb36dc9c4ff9960af95b15ed89e29724c Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:40:39 -0400 Subject: [PATCH 03/55] Add a note on `QueryCacheHits` and `QueryCacheMisses` in the release notes (#16299) Signed-off-by: Florent Poinsard --- changelog/20.0/20.0.0/release_notes.md | 8 ++++++-- changelog/20.0/20.0.0/summary.md | 8 ++++++-- go/vt/vttablet/tabletserver/query_engine.go | 12 ++++++------ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/changelog/20.0/20.0.0/release_notes.md b/changelog/20.0/20.0.0/release_notes.md index 23aa3a79052..32cf7fb7e81 100644 --- a/changelog/20.0/20.0.0/release_notes.md +++ b/changelog/20.0/20.0.0/release_notes.md @@ -360,8 +360,12 @@ You can now run `VDiff`s on OnlineDDL schema change migrations, which are not ye VTTablet exposes two new counter stats: - * `QueryCacheHits`: Query engine query cache hits - * `QueryCacheMisses`: Query engine query cache misses + * `QueryCacheHits`: Query engine query plan cache hits + * `QueryCacheMisses`: Query engine query plan cache misses + +> [!NOTE] +> `QueryCache` does not refer to a query cache, but to a query plan cache. +> In v21, these metrics will be deprecated and renamed. ### VTTablet Query Text Characters Processed diff --git a/changelog/20.0/20.0.0/summary.md b/changelog/20.0/20.0.0/summary.md index edb85a6a3e4..3e7731a79b8 100644 --- a/changelog/20.0/20.0.0/summary.md +++ b/changelog/20.0/20.0.0/summary.md @@ -359,8 +359,12 @@ You can now run `VDiff`s on OnlineDDL schema change migrations, which are not ye VTTablet exposes two new counter stats: - * `QueryCacheHits`: Query engine query cache hits - * `QueryCacheMisses`: Query engine query cache misses + * `QueryCacheHits`: Query engine query plan cache hits + * `QueryCacheMisses`: Query engine query plan cache misses + +> [!NOTE] +> `QueryCache` does not refer to a query cache, but to a query plan cache. +> In v21, these metrics will be deprecated and renamed. ### VTTablet Query Text Characters Processed diff --git a/go/vt/vttablet/tabletserver/query_engine.go b/go/vt/vttablet/tabletserver/query_engine.go index 46b08b5d83d..f8245ac8e2f 100644 --- a/go/vt/vttablet/tabletserver/query_engine.go +++ b/go/vt/vttablet/tabletserver/query_engine.go @@ -269,22 +269,22 @@ func NewQueryEngine(env tabletenv.Env, se *schema.Engine) *QueryEngine { env.Exporter().NewGaugeFunc("StreamBufferSize", "Query engine stream buffer size", qe.streamBufferSize.Load) env.Exporter().NewCounterFunc("TableACLExemptCount", "Query engine table ACL exempt count", qe.tableaclExemptCount.Load) - env.Exporter().NewGaugeFunc("QueryCacheLength", "Query engine query cache length", func() int64 { + env.Exporter().NewGaugeFunc("QueryCacheLength", "Query engine query plan cache length", func() int64 { return int64(qe.plans.Len()) }) - env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query cache size", func() int64 { + env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query plan cache size", func() int64 { return int64(qe.plans.UsedCapacity()) }) - env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query cache capacity", func() int64 { + env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query plan cache capacity", func() int64 { return int64(qe.plans.MaxCapacity()) }) - env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query cache evictions", func() int64 { + env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query plan cache evictions", func() int64 { return qe.plans.Metrics.Evicted() }) - qe.queryCacheHits = env.Exporter().NewCounterFunc("QueryCacheHits", "Query engine query cache hits", func() int64 { + qe.queryCacheHits = env.Exporter().NewCounterFunc("QueryCacheHits", "Query engine query plan cache hits", func() int64 { return qe.plans.Metrics.Hits() }) - qe.queryCacheMisses = env.Exporter().NewCounterFunc("QueryCacheMisses", "Query engine query cache misses", func() int64 { + qe.queryCacheMisses = env.Exporter().NewCounterFunc("QueryCacheMisses", "Query engine query plan cache misses", func() int64 { return qe.plans.Metrics.Misses() }) From 05d7e768e88972bcafba352c4af6bf2b9cde888a Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Tue, 2 Jul 2024 10:26:00 -0400 Subject: [PATCH 04/55] VDiff: Copy non in_keyrange workflow filters to target tablet query (#16307) Signed-off-by: Matt Lord --- .../tabletmanager/vdiff/table_plan.go | 10 +++++++-- go/vt/vttablet/tabletmanager/vdiff/utils.go | 21 +++++++++++++++++++ .../vdiff/workflow_differ_test.go | 12 ++++------- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_plan.go b/go/vt/vttablet/tabletmanager/vdiff/table_plan.go index 548f902e9ac..becce6f90e6 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_plan.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_plan.go @@ -174,8 +174,14 @@ func (td *tableDiffer) buildTablePlan(dbClient binlogplayer.DBClient, dbName str return nil, err } - // Remove in_keyrange. It's not understood by mysql. - sourceSelect.Where = sel.Where // removeKeyrange(sel.Where) + // Copy all workflow filters for the source query. + sourceSelect.Where = sel.Where + + // Copy all non-in_keyrange workflow filters to the target query. + // This is important for things like multi-tenant migrations where + // an additional tenant_id filter is applied in the workflow. + targetSelect.Where = copyNonKeyRangeExpressions(sel.Where) + // The source should also perform the group by. sourceSelect.GroupBy = sel.GroupBy sourceSelect.OrderBy = tp.orderBy diff --git a/go/vt/vttablet/tabletmanager/vdiff/utils.go b/go/vt/vttablet/tabletmanager/vdiff/utils.go index 07e070976a9..aeaa28972e0 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/utils.go +++ b/go/vt/vttablet/tabletmanager/vdiff/utils.go @@ -21,6 +21,7 @@ import ( "fmt" "strings" + "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/binlog/binlogplayer" @@ -89,3 +90,23 @@ func stringListContains(lst []string, item string) bool { } return contains } + +// copyNonKeyRangeExpressions copies all expressions from the input WHERE clause +// to the output WHERE clause except for any in_keyrange() expressions. +func copyNonKeyRangeExpressions(where *sqlparser.Where) *sqlparser.Where { + if where == nil { + return nil + } + exprs := sqlparser.SplitAndExpression(nil, where.Expr) + newWhere := &sqlparser.Where{} + for _, expr := range exprs { + switch expr := expr.(type) { + case *sqlparser.FuncExpr: + if expr.Name.EqualString("in_keyrange") { + continue + } + } + newWhere.Expr = sqlparser.AndExpressions(newWhere.Expr, expr) + } + return newWhere +} diff --git a/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go b/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go index a460b87a4f6..d4f9ddb001d 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go +++ b/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go @@ -364,7 +364,6 @@ func TestBuildPlanSuccess(t *testing.T) { }, }, { // in_keyrange on RHS of AND. - // This is currently not a valid construct, but will be supported in the future. input: &binlogdatapb.Rule{ Match: "t1", Filter: "select * from t1 where c2 = 2 and in_keyrange('-80')", @@ -374,7 +373,7 @@ func TestBuildPlanSuccess(t *testing.T) { dbName: vdiffDBName, table: testSchema.TableDefinitions[tableDefMap["t1"]], sourceQuery: "select c1, c2 from t1 where c2 = 2 and in_keyrange('-80') order by c1 asc", - targetQuery: "select c1, c2 from t1 order by c1 asc", + targetQuery: "select c1, c2 from t1 where c2 = 2 order by c1 asc", compareCols: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}, {1, collations.MySQL8().LookupByName(sqltypes.NULL.String()), false, "c2"}}, comparePKs: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}}, pkCols: []int{0}, @@ -386,7 +385,6 @@ func TestBuildPlanSuccess(t *testing.T) { }, }, { // in_keyrange on LHS of AND. - // This is currently not a valid construct, but will be supported in the future. input: &binlogdatapb.Rule{ Match: "t1", Filter: "select * from t1 where in_keyrange('-80') and c2 = 2", @@ -396,7 +394,7 @@ func TestBuildPlanSuccess(t *testing.T) { dbName: vdiffDBName, table: testSchema.TableDefinitions[tableDefMap["t1"]], sourceQuery: "select c1, c2 from t1 where in_keyrange('-80') and c2 = 2 order by c1 asc", - targetQuery: "select c1, c2 from t1 order by c1 asc", + targetQuery: "select c1, c2 from t1 where c2 = 2 order by c1 asc", compareCols: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}, {1, collations.MySQL8().LookupByName(sqltypes.NULL.String()), false, "c2"}}, comparePKs: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}}, pkCols: []int{0}, @@ -408,7 +406,6 @@ func TestBuildPlanSuccess(t *testing.T) { }, }, { // in_keyrange on cascaded AND expression. - // This is currently not a valid construct, but will be supported in the future. input: &binlogdatapb.Rule{ Match: "t1", Filter: "select * from t1 where c2 = 2 and c1 = 1 and in_keyrange('-80')", @@ -418,7 +415,7 @@ func TestBuildPlanSuccess(t *testing.T) { dbName: vdiffDBName, table: testSchema.TableDefinitions[tableDefMap["t1"]], sourceQuery: "select c1, c2 from t1 where c2 = 2 and c1 = 1 and in_keyrange('-80') order by c1 asc", - targetQuery: "select c1, c2 from t1 order by c1 asc", + targetQuery: "select c1, c2 from t1 where c2 = 2 and c1 = 1 order by c1 asc", compareCols: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}, {1, collations.MySQL8().LookupByName(sqltypes.NULL.String()), false, "c2"}}, comparePKs: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}}, pkCols: []int{0}, @@ -430,7 +427,6 @@ func TestBuildPlanSuccess(t *testing.T) { }, }, { // in_keyrange parenthesized. - // This is currently not a valid construct, but will be supported in the future. input: &binlogdatapb.Rule{ Match: "t1", Filter: "select * from t1 where (c2 = 2 and in_keyrange('-80'))", @@ -440,7 +436,7 @@ func TestBuildPlanSuccess(t *testing.T) { dbName: vdiffDBName, table: testSchema.TableDefinitions[tableDefMap["t1"]], sourceQuery: "select c1, c2 from t1 where c2 = 2 and in_keyrange('-80') order by c1 asc", - targetQuery: "select c1, c2 from t1 order by c1 asc", + targetQuery: "select c1, c2 from t1 where c2 = 2 order by c1 asc", compareCols: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}, {1, collations.MySQL8().LookupByName(sqltypes.NULL.String()), false, "c2"}}, comparePKs: []compareColInfo{{0, collations.MySQL8().LookupByName(sqltypes.NULL.String()), true, "c1"}}, pkCols: []int{0}, From 780abdd9c4017f08c29f26c7883abd5081b525d2 Mon Sep 17 00:00:00 2001 From: Rohit Nayak <57520317+rohit-nayak-ps@users.noreply.github.com> Date: Tue, 2 Jul 2024 21:21:10 +0200 Subject: [PATCH 05/55] [cleanup] Protos: Use UnmarshalPB() when unmarshalling a proto object (#16311) Signed-off-by: Rohit Nayak --- go/cmd/vtctldclient/command/vschemas.go | 2 +- go/test/endtoend/backup/vtctlbackup/backup_utils.go | 4 ++-- go/test/endtoend/cluster/vtctldclient_process.go | 8 ++++---- go/test/endtoend/recovery/pitr/shardedpitr_test.go | 8 ++++---- .../tabletgateway/buffer/reshard/sharded_buffer_test.go | 2 +- go/test/endtoend/tabletmanager/commands_test.go | 2 +- go/vt/tableacl/tableacl.go | 2 +- go/vt/vtctl/endtoend/get_schema_test.go | 4 ++-- go/vt/vtctl/vtctl.go | 8 ++++---- go/vt/vtctl/workflow/traffic_switcher.go | 2 +- go/vt/vtexplain/vtexplain_vtgate.go | 2 +- go/vt/vtgate/planbuilder/fuzz.go | 4 ++-- go/vt/vtgate/sandbox_test.go | 2 +- go/vt/vtgate/vindexes/vschema.go | 4 ++-- go/vt/vtgate/vindexes/vschema_test.go | 2 +- go/vt/vttablet/tabletserver/vstreamer/planbuilder_test.go | 2 +- go/vt/vttablet/tabletserver/vstreamer/testenv/testenv.go | 2 +- go/vt/wrangler/materializer.go | 2 +- go/vt/wrangler/traffic_switcher.go | 4 ++-- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/go/cmd/vtctldclient/command/vschemas.go b/go/cmd/vtctldclient/command/vschemas.go index 37ad00ccb6b..0965b81a785 100644 --- a/go/cmd/vtctldclient/command/vschemas.go +++ b/go/cmd/vtctldclient/command/vschemas.go @@ -102,7 +102,7 @@ func commandApplyVSchema(cmd *cobra.Command, args []string) error { } var vs vschemapb.Keyspace - err = json2.Unmarshal(schema, &vs) + err = json2.UnmarshalPB(schema, &vs) if err != nil { return err } diff --git a/go/test/endtoend/backup/vtctlbackup/backup_utils.go b/go/test/endtoend/backup/vtctlbackup/backup_utils.go index a234082a4a2..707c9010b0c 100644 --- a/go/test/endtoend/backup/vtctlbackup/backup_utils.go +++ b/go/test/endtoend/backup/vtctlbackup/backup_utils.go @@ -837,7 +837,7 @@ func checkTabletType(t *testing.T, alias string, tabletType topodata.TabletType) output, err := localCluster.VtctldClientProcess.ExecuteCommandWithOutput("GetTablet", alias) require.NoError(t, err) var tabletPB topodata.Tablet - err = json2.Unmarshal([]byte(output), &tabletPB) + err = json2.UnmarshalPB([]byte(output), &tabletPB) require.NoError(t, err) if tabletType == tabletPB.Type { return @@ -1058,7 +1058,7 @@ func terminateBackup(t *testing.T, alias string) { text := scanner.Text() if strings.Contains(text, stopBackupMsg) { tmpProcess.Process.Signal(syscall.SIGTERM) - found = true //nolint + found = true // nolint return } } diff --git a/go/test/endtoend/cluster/vtctldclient_process.go b/go/test/endtoend/cluster/vtctldclient_process.go index 4ed5acde518..5373f351f86 100644 --- a/go/test/endtoend/cluster/vtctldclient_process.go +++ b/go/test/endtoend/cluster/vtctldclient_process.go @@ -173,7 +173,7 @@ func (vtctldclient *VtctldClientProcess) GetShardReplication(keyspace string, sh } var resp vtctldatapb.GetShardReplicationResponse - err = json2.Unmarshal([]byte(out), &resp) + err = json2.UnmarshalPB([]byte(out), &resp) return resp.ShardReplicationByCell, err } @@ -252,7 +252,7 @@ func (vtctldclient *VtctldClientProcess) GetKeyspace(keyspace string) (*vtctldat } var ks vtctldatapb.Keyspace - err = json2.Unmarshal([]byte(data), &ks) + err = json2.UnmarshalPB([]byte(data), &ks) if err != nil { return nil, vterrors.Wrapf(err, "failed to parse keyspace output: %s", data) } @@ -267,7 +267,7 @@ func (vtctldclient *VtctldClientProcess) GetShard(keyspace string, shard string) } var si vtctldatapb.Shard - err = json2.Unmarshal([]byte(data), &si) + err = json2.UnmarshalPB([]byte(data), &si) if err != nil { return nil, vterrors.Wrapf(err, "failed to parse shard output: %s", data) } @@ -282,7 +282,7 @@ func (vtctldclient *VtctldClientProcess) GetTablet(alias string) (*topodatapb.Ta } var tablet topodatapb.Tablet - err = json2.Unmarshal([]byte(data), &tablet) + err = json2.UnmarshalPB([]byte(data), &tablet) if err != nil { return nil, vterrors.Wrapf(err, "failed to parse tablet output: %s", data) } diff --git a/go/test/endtoend/recovery/pitr/shardedpitr_test.go b/go/test/endtoend/recovery/pitr/shardedpitr_test.go index 03fcf76b07c..f2a76662918 100644 --- a/go/test/endtoend/recovery/pitr/shardedpitr_test.go +++ b/go/test/endtoend/recovery/pitr/shardedpitr_test.go @@ -130,7 +130,7 @@ func TestPITRRecovery(t *testing.T) { initializeCluster(t) defer clusterInstance.Teardown() - //start the binlog server and point it to primary + // start the binlog server and point it to primary bs := startBinlogServer(t, primary) defer bs.stop() @@ -167,11 +167,11 @@ func TestPITRRecovery(t *testing.T) { // starting resharding process performResharding(t) - //start the binlog server and point it to shard0Primary + // start the binlog server and point it to shard0Primary bs0 := startBinlogServer(t, shard0Primary) defer bs0.stop() - //start the binlog server and point it to shard1Primary + // start the binlog server and point it to shard1Primary bs1 := startBinlogServer(t, shard1Primary) defer bs1.stop() @@ -585,7 +585,7 @@ func waitForNoWorkflowLag(t *testing.T, vc *cluster.LocalProcessCluster, ks stri require.NoError(t, err) var resp vtctldatapb.GetWorkflowsResponse - err = json2.Unmarshal([]byte(output), &resp) + err = json2.UnmarshalPB([]byte(output), &resp) require.NoError(t, err) require.GreaterOrEqual(t, len(resp.Workflows), 1, "responce should have at least one workflow") lag = resp.Workflows[0].MaxVReplicationTransactionLag diff --git a/go/test/endtoend/tabletgateway/buffer/reshard/sharded_buffer_test.go b/go/test/endtoend/tabletgateway/buffer/reshard/sharded_buffer_test.go index 5e439cc9fff..39b7cbb7266 100644 --- a/go/test/endtoend/tabletgateway/buffer/reshard/sharded_buffer_test.go +++ b/go/test/endtoend/tabletgateway/buffer/reshard/sharded_buffer_test.go @@ -46,7 +46,7 @@ func waitForLowLag(t *testing.T, clusterInstance *cluster.LocalProcessCluster, k require.NoError(t, err) var resp vtctldatapb.GetWorkflowsResponse - err = json2.Unmarshal([]byte(output), &resp) + err = json2.UnmarshalPB([]byte(output), &resp) require.NoError(t, err) require.GreaterOrEqual(t, len(resp.Workflows), 1, "responce should have at least one workflow") lagSeconds := resp.Workflows[0].MaxVReplicationTransactionLag diff --git a/go/test/endtoend/tabletmanager/commands_test.go b/go/test/endtoend/tabletmanager/commands_test.go index 970e89c7037..e89a471b1e4 100644 --- a/go/test/endtoend/tabletmanager/commands_test.go +++ b/go/test/endtoend/tabletmanager/commands_test.go @@ -197,7 +197,7 @@ func runHookAndAssert(t *testing.T, params []string, expectedStatus int64, expec require.Nil(t, err) var resp vtctldatapb.ExecuteHookResponse - err = json2.Unmarshal([]byte(hr), &resp) + err = json2.UnmarshalPB([]byte(hr), &resp) require.Nil(t, err) assert.Equal(t, expectedStatus, resp.HookResult.ExitStatus) diff --git a/go/vt/tableacl/tableacl.go b/go/vt/tableacl/tableacl.go index 9a6e6eeba4e..1b236cb1812 100644 --- a/go/vt/tableacl/tableacl.go +++ b/go/vt/tableacl/tableacl.go @@ -113,7 +113,7 @@ func (tacl *tableACL) init(configFile string, aclCB func()) error { config := &tableaclpb.Config{} if err := config.UnmarshalVT(data); err != nil { // try to parse tableacl as json file - if jsonErr := json2.Unmarshal(data, config); jsonErr != nil { + if jsonErr := json2.UnmarshalPB(data, config); jsonErr != nil { log.Infof("unable to parse tableACL config file as a protobuf or json file. protobuf err: %v json err: %v", err, jsonErr) return fmt.Errorf("unable to unmarshal Table ACL data: %s", data) } diff --git a/go/vt/vtctl/endtoend/get_schema_test.go b/go/vt/vtctl/endtoend/get_schema_test.go index a9829a193f3..58e6b220aad 100644 --- a/go/vt/vtctl/endtoend/get_schema_test.go +++ b/go/vt/vtctl/endtoend/get_schema_test.go @@ -173,7 +173,7 @@ func TestGetSchema(t *testing.T) { val := events[0].Value actual := &tabletmanagerdatapb.SchemaDefinition{} - err = json2.Unmarshal([]byte(val), actual) + err = json2.UnmarshalPB([]byte(val), actual) require.NoError(t, err) utils.MustMatch(t, sd, actual) @@ -214,7 +214,7 @@ func TestGetSchema(t *testing.T) { val = events[0].Value actual = &tabletmanagerdatapb.SchemaDefinition{} - err = json2.Unmarshal([]byte(val), actual) + err = json2.UnmarshalPB([]byte(val), actual) require.NoError(t, err) utils.MustMatch(t, sd, actual) diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index 324cdda0a76..7d0a053f477 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -2507,7 +2507,7 @@ func commandCreateLookupVindex(ctx context.Context, wr *wrangler.Wrangler, subFl } keyspace := subFlags.Arg(0) specs := &vschemapb.Keyspace{} - if err := json2.Unmarshal([]byte(subFlags.Arg(1)), specs); err != nil { + if err := json2.UnmarshalPB([]byte(subFlags.Arg(1)), specs); err != nil { return err } return wr.CreateLookupVindex(ctx, keyspace, specs, *cells, *tabletTypes, *continueAfterCopyWithOwner) @@ -2533,7 +2533,7 @@ func commandMaterialize(ctx context.Context, wr *wrangler.Wrangler, subFlags *pf return fmt.Errorf("a single argument is required: ") } ms := &vtctldatapb.MaterializeSettings{} - if err := json2.Unmarshal([]byte(subFlags.Arg(0)), ms); err != nil { + if err := json2.UnmarshalPB([]byte(subFlags.Arg(0)), ms); err != nil { return err } ms.Cell = *cells @@ -3402,7 +3402,7 @@ func commandApplyVSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *p } vs = &vschemapb.Keyspace{} - err := json2.Unmarshal(schema, vs) + err := json2.UnmarshalPB(schema, vs) if err != nil { return err } @@ -3490,7 +3490,7 @@ func commandApplyRoutingRules(ctx context.Context, wr *wrangler.Wrangler, subFla } rr := &vschemapb.RoutingRules{} - if err := json2.Unmarshal(rulesBytes, rr); err != nil { + if err := json2.UnmarshalPB(rulesBytes, rr); err != nil { return err } diff --git a/go/vt/vtctl/workflow/traffic_switcher.go b/go/vt/vtctl/workflow/traffic_switcher.go index 954f4e6a9b3..35930bc3e97 100644 --- a/go/vt/vtctl/workflow/traffic_switcher.go +++ b/go/vt/vtctl/workflow/traffic_switcher.go @@ -390,7 +390,7 @@ func (ts *trafficSwitcher) addParticipatingTablesToKeyspace(ctx context.Context, if strings.HasPrefix(tableSpecs, "{") { // user defined the vschema snippet, typically for a sharded target wrap := fmt.Sprintf(`{"tables": %s}`, tableSpecs) ks := &vschemapb.Keyspace{} - if err := json2.Unmarshal([]byte(wrap), ks); err != nil { + if err := json2.UnmarshalPB([]byte(wrap), ks); err != nil { return err } for table, vtab := range ks.Tables { diff --git a/go/vt/vtexplain/vtexplain_vtgate.go b/go/vt/vtexplain/vtexplain_vtgate.go index 22939efde20..d511e2d2ea0 100644 --- a/go/vt/vtexplain/vtexplain_vtgate.go +++ b/go/vt/vtexplain/vtexplain_vtgate.go @@ -101,7 +101,7 @@ func (vte *VTExplain) buildTopology(ctx context.Context, ts *topo.Server, opts * // handle string->enum conversion correctly. var srvVSchema vschemapb.SrvVSchema wrappedStr := fmt.Sprintf(`{"keyspaces": %s}`, vschemaStr) - err := json2.Unmarshal([]byte(wrappedStr), &srvVSchema) + err := json2.UnmarshalPB([]byte(wrappedStr), &srvVSchema) if err != nil { return err } diff --git a/go/vt/vtgate/planbuilder/fuzz.go b/go/vt/vtgate/planbuilder/fuzz.go index 79dcca01a53..a3ce38bc0d0 100644 --- a/go/vt/vtgate/planbuilder/fuzz.go +++ b/go/vt/vtgate/planbuilder/fuzz.go @@ -37,7 +37,7 @@ func onceInit() { // loadSchemaForFuzzing is a helper to load *vindexes.VSchema // for fuzzing. func loadSchemaForFuzzing(f *fuzz.ConsumeFuzzer) (*vindexes.VSchema, error) { - //formal, err := vindexes.LoadFormal(filename) + // formal, err := vindexes.LoadFormal(filename) formal, err := loadFormalForFuzzing(f) if err != nil { return nil, err @@ -69,7 +69,7 @@ func loadFormalForFuzzing(f *fuzz.ConsumeFuzzer) (*vschemapb.SrvVSchema, error) if err != nil { return nil, err } - err = json2.Unmarshal(data, formal) + err = json2.UnmarshalPB(data, formal) if err != nil { return nil, err } diff --git a/go/vt/vtgate/sandbox_test.go b/go/vt/vtgate/sandbox_test.go index dc3c1f103af..70b96a63126 100644 --- a/go/vt/vtgate/sandbox_test.go +++ b/go/vt/vtgate/sandbox_test.go @@ -81,7 +81,7 @@ func getSandboxSrvVSchema() *vschemapb.SrvVSchema { defer sandboxMu.Unlock() for keyspace, sandbox := range ksToSandbox { var vs vschemapb.Keyspace - if err := json2.Unmarshal([]byte(sandbox.VSchema), &vs); err != nil { + if err := json2.UnmarshalPB([]byte(sandbox.VSchema), &vs); err != nil { panic(err) } result.Keyspaces[keyspace] = &vs diff --git a/go/vt/vtgate/vindexes/vschema.go b/go/vt/vtgate/vindexes/vschema.go index 838476f061f..eba3ac49969 100644 --- a/go/vt/vtgate/vindexes/vschema.go +++ b/go/vt/vtgate/vindexes/vschema.go @@ -1349,7 +1349,7 @@ func LoadFormal(filename string) (*vschemapb.SrvVSchema, error) { if err != nil { return nil, err } - err = json2.Unmarshal(data, formal) + err = json2.UnmarshalPB(data, formal) if err != nil { return nil, err } @@ -1367,7 +1367,7 @@ func LoadFormalKeyspace(filename string) (*vschemapb.Keyspace, error) { if err != nil { return nil, err } - err = json2.Unmarshal(data, formal) + err = json2.UnmarshalPB(data, formal) if err != nil { return nil, err } diff --git a/go/vt/vtgate/vindexes/vschema_test.go b/go/vt/vtgate/vindexes/vschema_test.go index 0cb47294c91..7761b6ae8ab 100644 --- a/go/vt/vtgate/vindexes/vschema_test.go +++ b/go/vt/vtgate/vindexes/vschema_test.go @@ -2735,7 +2735,7 @@ func TestVSchemaPBJSON(t *testing.T) { } ` var got vschemapb.Keyspace - if err := json2.Unmarshal([]byte(in), &got); err != nil { + if err := json2.UnmarshalPB([]byte(in), &got); err != nil { t.Error(err) } want := vschemapb.Keyspace{ diff --git a/go/vt/vttablet/tabletserver/vstreamer/planbuilder_test.go b/go/vt/vttablet/tabletserver/vstreamer/planbuilder_test.go index e9721daa693..ba345b2a00b 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/planbuilder_test.go +++ b/go/vt/vttablet/tabletserver/vstreamer/planbuilder_test.go @@ -77,7 +77,7 @@ func init() { } }` var kspb vschemapb.Keyspace - if err := json2.Unmarshal([]byte(input), &kspb); err != nil { + if err := json2.UnmarshalPB([]byte(input), &kspb); err != nil { panic(fmt.Errorf("Unmarshal failed: %v", err)) } srvVSchema := &vschemapb.SrvVSchema{ diff --git a/go/vt/vttablet/tabletserver/vstreamer/testenv/testenv.go b/go/vt/vttablet/tabletserver/vstreamer/testenv/testenv.go index 1d49db8c503..632579551c0 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/testenv/testenv.go +++ b/go/vt/vttablet/tabletserver/vstreamer/testenv/testenv.go @@ -202,7 +202,7 @@ func (te *Env) Close() { func (te *Env) SetVSchema(vs string) error { ctx := context.Background() var kspb vschemapb.Keyspace - if err := json2.Unmarshal([]byte(vs), &kspb); err != nil { + if err := json2.UnmarshalPB([]byte(vs), &kspb); err != nil { return err } if err := te.TopoServ.SaveVSchema(ctx, te.KeyspaceName, &kspb); err != nil { diff --git a/go/vt/wrangler/materializer.go b/go/vt/wrangler/materializer.go index bd3f7b232ef..9367c43c310 100644 --- a/go/vt/wrangler/materializer.go +++ b/go/vt/wrangler/materializer.go @@ -162,7 +162,7 @@ func (wr *Wrangler) MoveTables(ctx context.Context, workflow, sourceKeyspace, ta } wrap := fmt.Sprintf(`{"tables": %s}`, tableSpecs) ks := &vschemapb.Keyspace{} - if err := json2.Unmarshal([]byte(wrap), ks); err != nil { + if err := json2.UnmarshalPB([]byte(wrap), ks); err != nil { return err } for table, vtab := range ks.Tables { diff --git a/go/vt/wrangler/traffic_switcher.go b/go/vt/wrangler/traffic_switcher.go index fb76b8e8f21..448f4f99734 100644 --- a/go/vt/wrangler/traffic_switcher.go +++ b/go/vt/wrangler/traffic_switcher.go @@ -1743,7 +1743,7 @@ func doValidateWorkflowHasCompleted(ctx context.Context, ts *trafficSwitcher) er wg.Wait() if !ts.keepRoutingRules { - //check if table is routable + // check if table is routable if ts.MigrationType() == binlogdatapb.MigrationType_TABLES { rules, err := topotools.GetRoutingRules(ctx, ts.TopoServer()) if err != nil { @@ -1981,7 +1981,7 @@ func (ts *trafficSwitcher) addParticipatingTablesToKeyspace(ctx context.Context, if strings.HasPrefix(tableSpecs, "{") { // user defined the vschema snippet, typically for a sharded target wrap := fmt.Sprintf(`{"tables": %s}`, tableSpecs) ks := &vschemapb.Keyspace{} - if err := json2.Unmarshal([]byte(wrap), ks); err != nil { + if err := json2.UnmarshalPB([]byte(wrap), ks); err != nil { return err } for table, vtab := range ks.Tables { From 3db70b6b73fe211f95d1b547cbc6b7eb8544dd48 Mon Sep 17 00:00:00 2001 From: Sam Wronski Date: Tue, 2 Jul 2024 13:56:33 -0700 Subject: [PATCH 06/55] Add `vtctldclient` container image (#16318) Signed-off-by: Sam Wronski Signed-off-by: Sam Wronski Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> --- .github/workflows/docker_build_images.yml | 2 +- docker/binaries/vtctldclient/Dockerfile | 35 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 docker/binaries/vtctldclient/Dockerfile diff --git a/.github/workflows/docker_build_images.yml b/.github/workflows/docker_build_images.yml index 59885351808..a923b7f57c3 100644 --- a/.github/workflows/docker_build_images.yml +++ b/.github/workflows/docker_build_images.yml @@ -85,7 +85,7 @@ jobs: fail-fast: true matrix: debian: [ bullseye, bookworm ] - component: [ vtadmin, vtorc, vtgate, vttablet, mysqlctld, mysqlctl, vtctl, vtctlclient, vtctld, logrotate, logtail, vtbackup, vtexplain ] + component: [ vtadmin, vtorc, vtgate, vttablet, mysqlctld, mysqlctl, vtctl, vtctlclient, vtctld, vtctldclient, logrotate, logtail, vtbackup, vtexplain ] steps: - name: Check out code diff --git a/docker/binaries/vtctldclient/Dockerfile b/docker/binaries/vtctldclient/Dockerfile new file mode 100644 index 00000000000..4dc8678827e --- /dev/null +++ b/docker/binaries/vtctldclient/Dockerfile @@ -0,0 +1,35 @@ +# Copyright 2024 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. + +ARG VT_BASE_VER=latest +ARG DEBIAN_VER=stable-slim + +FROM vitess/lite:${VT_BASE_VER} AS lite + +FROM debian:${DEBIAN_VER} + +RUN apt-get update && \ + apt-get upgrade -qq && \ + apt-get install jq curl -qq --no-install-recommends && \ + apt-get autoremove && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=lite /vt/bin/vtctldclient /usr/bin/ + +# add vitess user/group and add permissions +RUN groupadd -r --gid 2000 vitess && \ + useradd -r -g vitess --uid 1000 vitess + +CMD ["/usr/bin/vtctldclient"] From de39000d4b715999aecca74bc17d18e0c2d12599 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Wed, 3 Jul 2024 07:59:59 +0300 Subject: [PATCH 07/55] A couple changes in Online DDL CI (#16272) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- .../endtoend/onlineddl/flow/onlineddl_flow_test.go | 4 ++-- .../vrepl_suite/onlineddl_vrepl_suite_test.go | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go b/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go index aed3efcde2f..eee244ea6ed 100644 --- a/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go +++ b/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go @@ -339,7 +339,7 @@ func TestSchemaChange(t *testing.T) { }) isComplete := false t.Run("optimistic wait for migration completion", func(t *testing.T) { - status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusRunning, schema.OnlineDDLStatusComplete) + status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusComplete) isComplete = (status == schema.OnlineDDLStatusComplete) fmt.Printf("# Migration status (for debug purposes): <%s>\n", status) }) @@ -348,7 +348,7 @@ func TestSchemaChange(t *testing.T) { onlineddl.CheckForceMigrationCutOver(t, &vtParams, shards, uuid, true) }) t.Run("another optimistic wait for migration completion", func(t *testing.T) { - status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusRunning, schema.OnlineDDLStatusComplete) + status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusComplete) isComplete = (status == schema.OnlineDDLStatusComplete) fmt.Printf("# Migration status (for debug purposes): <%s>\n", status) }) diff --git a/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go b/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go index 6122a71aa44..d31f92695f1 100644 --- a/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go +++ b/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go @@ -56,16 +56,21 @@ var ( beforeTableName = `onlineddl_test_before` afterTableName = `onlineddl_test_after` eventName = `onlineddl_test` + + testsFilter = "" ) const ( - testDataPath = "testdata" + testDataPath = "testdata" + testFilterEnvVar = "ONLINEDDL_SUITE_TEST_FILTER" ) func TestMain(m *testing.M) { defer cluster.PanicHandler(nil) flag.Parse() + testsFilter = os.Getenv(testFilterEnvVar) + exitcode, err := func() (int, error) { clusterInstance = cluster.NewCluster(cell, hostname) schemaChangeDirectory = path.Join("/tmp", fmt.Sprintf("schema_change_dir_%d", clusterInstance.GetAndReserveTabletUID())) @@ -183,6 +188,10 @@ func readTestFile(t *testing.T, testName string, fileName string) (content strin // testSingle is the main testing function for a single test in the suite. // It prepares the grounds, creates the test data, runs a migration, expects results/error, cleans up. func testSingle(t *testing.T, testName string, fkOnlineDDLPossible bool) { + if !strings.Contains(testName, testsFilter) { + t.Skipf("Skipping test %s due to filter: %s=%s", testName, testFilterEnvVar, testsFilter) + return + } if _, exists := readTestFile(t, testName, "require_rename_table_preserve_foreign_key"); exists { if !fkOnlineDDLPossible { t.Skipf("Skipping test due to require_rename_table_preserve_foreign_key") From 79c54e5459096460cf23a161180cba4e609b27ad Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:39:06 +0300 Subject: [PATCH 08/55] Heartbeat writer can always generate on-demand leased heartbeats, even if not at all configured (#16014) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- .../onlineddl/vrepl/onlineddl_vrepl_test.go | 1 - go/timer/rate_limiter.go | 12 +- go/timer/rate_limiter_test.go | 22 ++ .../tabletserver/repltracker/repltracker.go | 26 +- .../repltracker/repltracker_test.go | 131 ++++++--- .../tabletserver/repltracker/writer.go | 276 ++++++++++-------- .../tabletserver/repltracker/writer_test.go | 235 ++++++++++++++- 7 files changed, 507 insertions(+), 196 deletions(-) diff --git a/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go b/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go index e5df3051612..f9f203c7cd9 100644 --- a/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go +++ b/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go @@ -177,7 +177,6 @@ func TestMain(m *testing.M) { clusterInstance.VtTabletExtraArgs = []string{ "--heartbeat_interval", "250ms", - "--heartbeat_on_demand_duration", "5s", "--migration_check_interval", "5s", "--watch_replication_stream", } diff --git a/go/timer/rate_limiter.go b/go/timer/rate_limiter.go index d42a4d7e14c..7ff602fb658 100644 --- a/go/timer/rate_limiter.go +++ b/go/timer/rate_limiter.go @@ -77,6 +77,14 @@ func (r *RateLimiter) DoEmpty() { _ = r.Do(nil) } +// AllowOne allows the next Do() call to run, even if the rate limiter would otherwise skip it. +func (r *RateLimiter) AllowOne() { + r.mu.Lock() + defer r.mu.Unlock() + + r.lastDoValue = r.tickerValue.Load() - 1 +} + // Diff returns the logical clock diff between the ticker and the last Do() call. func (r *RateLimiter) Diff() int64 { r.mu.Lock() @@ -87,7 +95,9 @@ func (r *RateLimiter) Diff() int64 { // Stop terminates rate limiter's operation and will not allow any more Do() executions. func (r *RateLimiter) Stop() { - r.cancel() + if r.cancel != nil { + r.cancel() + } r.mu.Lock() defer r.mu.Unlock() diff --git a/go/timer/rate_limiter_test.go b/go/timer/rate_limiter_test.go index 83690b98a22..70a3240d5f5 100644 --- a/go/timer/rate_limiter_test.go +++ b/go/timer/rate_limiter_test.go @@ -54,6 +54,23 @@ func TestRateLimiterShort(t *testing.T) { assert.Less(t, val, 10) } +func TestRateLimiterAllowOne(t *testing.T) { + r := NewRateLimiter(time.Millisecond * 250) + require.NotNil(t, r) + defer r.Stop() + val := 0 + incr := func() error { val++; return nil } + times := 10 + for range times { + time.Sleep(time.Millisecond * 100) + r.AllowOne() + err := r.Do(incr) + assert.NoError(t, err) + } + // we expect exactly 10 successful entries. + assert.Equal(t, times, val) +} + func TestRateLimiterStop(t *testing.T) { r := NewRateLimiter(time.Millisecond * 10) require.NotNil(t, r) @@ -91,3 +108,8 @@ func TestRateLimiterDiff(t *testing.T) { r.DoEmpty() assert.LessOrEqual(t, r.Diff(), int64(1)) } + +func TestRateLimiterUninitialized(t *testing.T) { + r := &RateLimiter{} + r.Stop() +} diff --git a/go/vt/vttablet/tabletserver/repltracker/repltracker.go b/go/vt/vttablet/tabletserver/repltracker/repltracker.go index c98005851d1..59d2db128da 100644 --- a/go/vt/vttablet/tabletserver/repltracker/repltracker.go +++ b/go/vt/vttablet/tabletserver/repltracker/repltracker.go @@ -52,8 +52,7 @@ var ( // ReplTracker tracks replication lag. type ReplTracker struct { - mode string - forceHeartbeat bool + mode string mu sync.Mutex isPrimary bool @@ -66,11 +65,10 @@ type ReplTracker struct { // NewReplTracker creates a new ReplTracker. func NewReplTracker(env tabletenv.Env, alias *topodatapb.TabletAlias) *ReplTracker { return &ReplTracker{ - mode: env.Config().ReplicationTracker.Mode, - forceHeartbeat: env.Config().ReplicationTracker.HeartbeatOnDemand > 0, - hw: newHeartbeatWriter(env, alias), - hr: newHeartbeatReader(env), - poller: &poller{}, + mode: env.Config().ReplicationTracker.Mode, + hw: newHeartbeatWriter(env, alias), + hr: newHeartbeatReader(env), + poller: &poller{}, } } @@ -97,9 +95,7 @@ func (rt *ReplTracker) MakePrimary() { rt.hr.Close() rt.hw.Open() } - if rt.forceHeartbeat { - rt.hw.Open() - } + rt.hw.Open() } // MakeNonPrimary must be called if the tablet type becomes non-PRIMARY. @@ -117,9 +113,7 @@ func (rt *ReplTracker) MakeNonPrimary() { // Run the status once to pre-initialize values. rt.poller.Status() } - if rt.forceHeartbeat { - rt.hw.Close() - } + rt.hw.Close() } // Close closes ReplTracker. @@ -147,5 +141,9 @@ func (rt *ReplTracker) Status() (time.Duration, error) { // EnableHeartbeat enables or disables writes of heartbeat. This functionality // is only used by tests. func (rt *ReplTracker) EnableHeartbeat(enable bool) { - rt.hw.enableWrites(enable) + if enable { + rt.hw.enableWrites() + } else { + rt.hw.disableWrites() + } } diff --git a/go/vt/vttablet/tabletserver/repltracker/repltracker_test.go b/go/vt/vttablet/tabletserver/repltracker/repltracker_test.go index 5e6150ddeb3..40827fdcbda 100644 --- a/go/vt/vttablet/tabletserver/repltracker/repltracker_test.go +++ b/go/vt/vttablet/tabletserver/repltracker/repltracker_test.go @@ -22,6 +22,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "vitess.io/vitess/go/mysql/fakesqldb" "vitess.io/vitess/go/vt/dbconfigs" @@ -50,49 +51,89 @@ func TestReplTracker(t *testing.T) { target := &querypb.Target{} mysqld := mysqlctl.NewFakeMysqlDaemon(nil) - rt := NewReplTracker(env, alias) - rt.InitDBConfig(target, mysqld) - assert.Equal(t, tabletenv.Heartbeat, rt.mode) - assert.True(t, rt.hw.enabled) - assert.True(t, rt.hr.enabled) - - rt.MakePrimary() - assert.True(t, rt.hw.isOpen) - assert.False(t, rt.hr.isOpen) - assert.True(t, rt.isPrimary) - - lag, err := rt.Status() - assert.NoError(t, err) - assert.Equal(t, time.Duration(0), lag) - - rt.MakeNonPrimary() - assert.False(t, rt.hw.isOpen) - assert.True(t, rt.hr.isOpen) - assert.False(t, rt.isPrimary) - - rt.hr.lastKnownLag = 1 * time.Second - lag, err = rt.Status() - assert.NoError(t, err) - assert.Equal(t, 1*time.Second, lag) - - rt.Close() - assert.False(t, rt.hw.isOpen) - assert.False(t, rt.hr.isOpen) - - cfg.ReplicationTracker.Mode = tabletenv.Polling - rt = NewReplTracker(env, alias) - rt.InitDBConfig(target, mysqld) - assert.Equal(t, tabletenv.Polling, rt.mode) - assert.Equal(t, mysqld, rt.poller.mysqld) - assert.False(t, rt.hw.enabled) - assert.False(t, rt.hr.enabled) - - rt.MakeNonPrimary() - assert.False(t, rt.hw.isOpen) - assert.False(t, rt.hr.isOpen) - assert.False(t, rt.isPrimary) - - mysqld.ReplicationStatusError = errors.New("err") - _, err = rt.Status() - assert.Equal(t, "err", err.Error()) + t.Run("always-on heartbeat", func(t *testing.T) { + rt := NewReplTracker(env, alias) + rt.InitDBConfig(target, mysqld) + assert.Equal(t, tabletenv.Heartbeat, rt.mode) + assert.Equal(t, HeartbeatConfigTypeAlways, rt.hw.configType) + assert.Zero(t, rt.hw.onDemandDuration) + assert.True(t, rt.hr.enabled) + + rt.MakePrimary() + assert.True(t, rt.hw.isOpen) + assert.False(t, rt.hr.isOpen) + assert.True(t, rt.isPrimary) + + lag, err := rt.Status() + assert.NoError(t, err) + assert.Equal(t, time.Duration(0), lag) + + rt.MakeNonPrimary() + assert.False(t, rt.hw.isOpen) + assert.True(t, rt.hr.isOpen) + assert.False(t, rt.isPrimary) + + rt.hr.lastKnownLag = 1 * time.Second + lag, err = rt.Status() + assert.NoError(t, err) + assert.Equal(t, 1*time.Second, lag) + + rt.Close() + assert.False(t, rt.hw.isOpen) + assert.False(t, rt.hr.isOpen) + }) + t.Run("disabled heartbeat", func(t *testing.T) { + cfg.ReplicationTracker.Mode = tabletenv.Polling + rt := NewReplTracker(env, alias) + rt.InitDBConfig(target, mysqld) + assert.Equal(t, tabletenv.Polling, rt.mode) + assert.Equal(t, mysqld, rt.poller.mysqld) + assert.Equal(t, HeartbeatConfigTypeNone, rt.hw.configType) + require.NotZero(t, defaultOnDemandDuration) + assert.Equal(t, defaultOnDemandDuration, rt.hw.onDemandDuration) + assert.False(t, rt.hr.enabled) + + rt.MakeNonPrimary() + assert.False(t, rt.hw.isOpen) + assert.False(t, rt.hr.isOpen) + assert.False(t, rt.isPrimary) + + mysqld.ReplicationStatusError = errors.New("err") + _, err := rt.Status() + assert.Equal(t, "err", err.Error()) + }) + t.Run("on-demand heartbeat", func(t *testing.T) { + cfg.ReplicationTracker.Mode = tabletenv.Heartbeat + cfg.ReplicationTracker.HeartbeatOnDemand = time.Second + + rt := NewReplTracker(env, alias) + rt.InitDBConfig(target, mysqld) + assert.Equal(t, tabletenv.Heartbeat, rt.mode) + assert.Equal(t, HeartbeatConfigTypeOnDemand, rt.hw.configType) + assert.Equal(t, minimalOnDemandDuration, rt.hw.onDemandDuration) + assert.True(t, rt.hr.enabled) + + rt.MakePrimary() + assert.True(t, rt.hw.isOpen) + assert.False(t, rt.hr.isOpen) + assert.True(t, rt.isPrimary) + + lag, err := rt.Status() + assert.NoError(t, err) + assert.Equal(t, time.Duration(0), lag) + + rt.MakeNonPrimary() + assert.False(t, rt.hw.isOpen) + assert.True(t, rt.hr.isOpen) + assert.False(t, rt.isPrimary) + + rt.hr.lastKnownLag = 1 * time.Second + lag, err = rt.Status() + assert.NoError(t, err) + assert.Equal(t, 1*time.Second, lag) + + rt.Close() + assert.False(t, rt.hw.isOpen) + assert.False(t, rt.hr.isOpen) + }) } diff --git a/go/vt/vttablet/tabletserver/repltracker/writer.go b/go/vt/vttablet/tabletserver/repltracker/writer.go index a72b44d1845..11492fa92e4 100644 --- a/go/vt/vttablet/tabletserver/repltracker/writer.go +++ b/go/vt/vttablet/tabletserver/repltracker/writer.go @@ -38,52 +38,87 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) +// We identify these heartbeat configuration types: +// - No configuration: the heartbeat writer is generally disabled and does not produce heartbeats (but see below). +// - On-demand: on-demand heartbeat interval was specified. +// - Always: the heartbeat writer is always on and produces heartbeats at a regular interval. +type HeartbeatConfigType int + +const ( + HeartbeatConfigTypeNone HeartbeatConfigType = iota + HeartbeatConfigTypeOnDemand + HeartbeatConfigTypeAlways +) + const ( - sqlUpsertHeartbeat = "INSERT INTO %s.heartbeat (ts, tabletUid, keyspaceShard) VALUES (%a, %a, %a) ON DUPLICATE KEY UPDATE ts=VALUES(ts), tabletUid=VALUES(tabletUid)" + sqlUpsertHeartbeat = "INSERT INTO %s.heartbeat (ts, tabletUid, keyspaceShard) VALUES (%a, %a, %a) ON DUPLICATE KEY UPDATE ts=VALUES(ts), tabletUid=VALUES(tabletUid)" + minimalOnDemandDuration = 4 * time.Second +) + +var ( + // Can be overridden by unit tests + defaultOnDemandDuration = 10 * time.Second + defaultHeartbeatInterval = 1 * time.Second ) // heartbeatWriter runs on primary tablets and writes heartbeats to the heartbeat -// table at a regular interval, defined by heartbeat_interval. +// table, depending on the configuration: +// - HeartbeatConfigTypeAlways: while open, the writer produces heartbeats at a regular interval. +// RequetHeartbeats() is meaningless in this mode. +// - HeartbeatConfigTypeOnDemand: when opened, the writer produces heartbeats for the configured lease. +// The heartbeats then expire. Lease can be renewed (after expired) or extended (while running) via +// RequetHeartbeats(). +// - HeartbeatConfigTypeNone: the writer does not initiate any heartbeats. However, RequetHeartbeats() +// can be called to request a heartbeat lease. The lease duration is predetermined as `defaultOnDemandDuration`. type heartbeatWriter struct { env tabletenv.Env - enabled bool + configType HeartbeatConfigType interval time.Duration tabletAlias *topodatapb.TabletAlias keyspaceShard string now func() time.Time errorLog *logutil.ThrottledLogger - mu sync.Mutex - isOpen bool - appPool *dbconnpool.ConnectionPool - allPrivsPool *dbconnpool.ConnectionPool - ticks *timer.Timer - writeConnID atomic.Int64 - - onDemandDuration time.Duration - onDemandMu sync.Mutex - concurrentHeartbeatRequests int64 - onDemandRequestTicks int64 - onDemandLastRequestTick int64 + mu sync.Mutex + isOpen bool + appPool *dbconnpool.ConnectionPool + allPrivsPool *dbconnpool.ConnectionPool + ticks *timer.Timer + onDemandRequestsRateLimiter atomic.Pointer[timer.RateLimiter] + writeConnID atomic.Int64 + + onDemandDuration time.Duration } // newHeartbeatWriter creates a new heartbeatWriter. func newHeartbeatWriter(env tabletenv.Env, alias *topodatapb.TabletAlias) *heartbeatWriter { config := env.Config() - // config.EnableLagThrottler is a feature flag for the throttler; if throttler runs, then heartbeat must also run - if config.ReplicationTracker.Mode != tabletenv.Heartbeat && config.ReplicationTracker.HeartbeatOnDemand == 0 { - return &heartbeatWriter{} + configType := HeartbeatConfigTypeNone + onDemandDuration := defaultOnDemandDuration + switch { + case config.ReplicationTracker.HeartbeatOnDemand > 0: + configType = HeartbeatConfigTypeOnDemand + onDemandDuration = config.ReplicationTracker.HeartbeatOnDemand + if onDemandDuration < minimalOnDemandDuration { + onDemandDuration = minimalOnDemandDuration + } + case config.ReplicationTracker.Mode == tabletenv.Heartbeat: + configType = HeartbeatConfigTypeAlways + onDemandDuration = 0 } heartbeatInterval := config.ReplicationTracker.HeartbeatInterval + if heartbeatInterval == 0 { + heartbeatInterval = defaultHeartbeatInterval + } w := &heartbeatWriter{ env: env, - enabled: true, + configType: configType, tabletAlias: alias.CloneVT(), now: time.Now, interval: heartbeatInterval, - onDemandDuration: config.ReplicationTracker.HeartbeatOnDemand, + onDemandDuration: onDemandDuration, ticks: timer.NewTimer(heartbeatInterval), errorLog: logutil.NewThrottledLogger("HeartbeatWriter", 60*time.Second), // We make this pool size 2; to prevent pool exhausted @@ -91,21 +126,8 @@ func newHeartbeatWriter(env tabletenv.Env, alias *topodatapb.TabletAlias) *heart appPool: dbconnpool.NewConnectionPool("HeartbeatWriteAppPool", env.Exporter(), 2, mysqlctl.DbaIdleTimeout, 0, mysqlctl.PoolDynamicHostnameResolution), allPrivsPool: dbconnpool.NewConnectionPool("HeartbeatWriteAllPrivsPool", env.Exporter(), 2, mysqlctl.DbaIdleTimeout, 0, mysqlctl.PoolDynamicHostnameResolution), } + w.writeConnID.Store(-1) - if w.onDemandDuration > 0 { - // see RequestHeartbeats() for use of onDemandRequestTicks - // it's basically a mechanism to rate limit operation RequestHeartbeats(). - // and selectively drop excessive requests. - w.allowNextHeartbeatRequest() - go func() { - // this will allow up to 1 request per (w.onDemandDuration / 4) to pass through - tick := time.NewTicker(w.onDemandDuration / 4) - defer tick.Stop() - for range tick.C { - w.allowNextHeartbeatRequest() - } - }() - } return w } @@ -117,14 +139,14 @@ func (w *heartbeatWriter) InitDBConfig(target *querypb.Target) { // Open sets up the heartbeatWriter's db connection and launches the ticker // responsible for periodically writing to the heartbeat table. func (w *heartbeatWriter) Open() { - if !w.enabled { - return - } w.mu.Lock() defer w.mu.Unlock() if w.isOpen { return } + defer func() { + w.isOpen = true + }() log.Info("Heartbeat Writer: opening") // We cannot create the database and tables in this Open function @@ -133,34 +155,56 @@ func (w *heartbeatWriter) Open() { // block this thread, and we could end up in a deadlock. // Instead, we try creating the database and table in each tick which runs in a go routine // keeping us safe from hanging the main thread. - w.appPool.Open(w.env.Config().DB.AppWithDB()) - w.allPrivsPool.Open(w.env.Config().DB.AllPrivsWithDB()) - if w.onDemandDuration == 0 { - w.enableWrites(true) - // when onDemandDuration > 0 we only enable writes per request - } else { + + // This function could be running from within a unit test scope, in which case we use + // mock pools that are already open. This is why we test for the pool being open. + if !w.appPool.IsOpen() { + w.appPool.Open(w.env.Config().DB.AppWithDB()) + } + if !w.allPrivsPool.IsOpen() { + w.allPrivsPool.Open(w.env.Config().DB.AllPrivsWithDB()) + } + + if w.onDemandDuration > 0 { + // Clients are given access to RequestHeartbeats(). But such clients can also abuse + // the system by initiating heartbeats too frequently. We rate-limit these requests. + rateLimiter := timer.NewRateLimiter(time.Second) + w.onDemandRequestsRateLimiter.Store(rateLimiter) + } + + switch w.configType { + case HeartbeatConfigTypeNone: + // Do not kick any heartbeats + return + case HeartbeatConfigTypeAlways: + // Heartbeats are always on + w.enableWrites() + case HeartbeatConfigTypeOnDemand: // A one-time kick off of heartbeats upon Open() go w.RequestHeartbeats() } - - w.isOpen = true } // Close closes the heartbeatWriter's db connection and stops the periodic ticker. func (w *heartbeatWriter) Close() { - if !w.enabled { - return - } w.mu.Lock() defer w.mu.Unlock() if !w.isOpen { return } + defer func() { + w.isOpen = false + }() - w.enableWrites(false) + w.disableWrites() w.appPool.Close() w.allPrivsPool.Close() - w.isOpen = false + + if rateLimiter := w.onDemandRequestsRateLimiter.Load(); rateLimiter != nil { + rateLimiter.Stop() + } + w.onDemandRequestsRateLimiter.Store(nil) + log.Info("Heartbeat Writer: closed") } @@ -185,11 +229,23 @@ func (w *heartbeatWriter) bindHeartbeatVars(query string) (string, error) { func (w *heartbeatWriter) writeHeartbeat() { if err := w.write(); err != nil { w.recordError(err) - return + } else { + writes.Add(1) + } + + if w.onDemandDuration > 0 { + // See if we need to expire the heartbeats + go func() { + if rateLimiter := w.onDemandRequestsRateLimiter.Load(); rateLimiter != nil { + if rateLimiter.Diff() > int64(w.onDemandDuration.Seconds()) { + w.disableWrites() + } + } + }() } - writes.Add(1) } +// write writes a single heartbeat update. func (w *heartbeatWriter) write() error { defer w.env.LogError() ctx, cancel := context.WithDeadline(context.Background(), w.now().Add(w.interval)) @@ -221,41 +277,36 @@ func (w *heartbeatWriter) recordError(err error) { writeErrors.Add(1) } -// enableWrites activates or deactivates heartbeat writes -func (w *heartbeatWriter) enableWrites(enable bool) { - if w.ticks == nil { - return - } - switch enable { - case true: - // We must combat a potential race condition: the writer is Open, and a request comes - // to enableWrites(true), but simultaneously the writes gets Close()d. - // We must not send any more ticks while the writer is closed. - go func() { - w.mu.Lock() - defer w.mu.Unlock() - if !w.isOpen { - return - } - w.ticks.Start(w.writeHeartbeat) - }() - case false: - // We stop the ticks in a separate go routine because it can block if the write is stuck on semi-sync ACKs. - // At the same time we try and kill the write that is in progress. We use the context and its cancellation - // for coordination between the two go-routines. In the end we will have guaranteed that the ticks have stopped - // and no write is in progress. - ctx, cancel := context.WithCancel(context.Background()) - go func() { - w.ticks.Stop() - cancel() - }() - w.killWritesUntilStopped(ctx) - - if w.onDemandDuration > 0 { - // Let the next RequestHeartbeats() go through - w.allowNextHeartbeatRequest() +// enableWrites activates heartbeat writes +func (w *heartbeatWriter) enableWrites() { + // We must combat a potential race condition: the writer is Open, and a request comes + // to enableWrites(), but simultaneously the writes gets Close()d. + // We must not send any more ticks while the writer is closed. + go func() { + w.mu.Lock() + defer w.mu.Unlock() + if !w.isOpen { + return } - } + w.ticks.Start(w.writeHeartbeat) + }() +} + +// disableWrites deactivates heartbeat writes +func (w *heartbeatWriter) disableWrites() { + // We stop the ticks in a separate go routine because it can block if the write is stuck on semi-sync ACKs. + // At the same time we try and kill the write that is in progress. We use the context and its cancellation + // for coordination between the two go-routines. In the end we will have guaranteed that the ticks have stopped + // and no write is in progress. + ctx, cancel := context.WithCancel(context.Background()) + go func() { + w.ticks.Stop() + cancel() + }() + w.killWritesUntilStopped(ctx) + + // Let the next RequestHeartbeats() go through + w.allowNextHeartbeatRequest() } // killWritesUntilStopped tries to kill the write in progress until the ticks have stopped. @@ -298,9 +349,15 @@ func (w *heartbeatWriter) killWrite() error { } // allowNextHeartbeatRequest ensures that the next call to RequestHeartbeats() passes through and -// is not dropped. +// is not rate-limited. +// Use case: just as the on-demand lease expires, a new request for heartbeat comes, and it's in the same timeslot +// as the one before the expiration. We want to allow the new request to re-lease on demand heartbeats. func (w *heartbeatWriter) allowNextHeartbeatRequest() { - atomic.AddInt64(&w.onDemandRequestTicks, 1) + // The writer could be close()d while this function is running and thus the value of the rate limiter could be nil. + // We thus use golang atomic here to avoid locking mutexes. + if rateLimiter := w.onDemandRequestsRateLimiter.Load(); rateLimiter != nil { + rateLimiter.AllowOne() + } } // RequestHeartbeats implements heartbeat.HeartbeatWriter.RequestHeartbeats() @@ -309,41 +366,12 @@ func (w *heartbeatWriter) allowNextHeartbeatRequest() { // This function will selectively and silently drop some such requests, depending on arrival rate. // This function is safe to call concurrently from goroutines func (w *heartbeatWriter) RequestHeartbeats() { - if w.onDemandDuration == 0 { - // heartbeats are not by demand. Therefore they are just coming in on their own (if enabled) - return + // The writer could be close()d while this function is running and thus the value of the rate limiter could be nil. + // We thus use golang atomic here to avoid locking mutexes. + if rateLimiter := w.onDemandRequestsRateLimiter.Load(); rateLimiter != nil { + rateLimiter.Do(func() error { + w.enableWrites() + return nil + }) } - // In this function we're going to create a timer to activate heartbeats by-demand. Creating a timer has a cost. - // Now, this function can be spammed by clients (the lag throttler). We therefore only allow this function to - // actually operate once per X seconds (1/4 of onDemandDuration as a reasonable oversampling value): - if atomic.LoadInt64(&w.onDemandLastRequestTick) >= atomic.LoadInt64(&w.onDemandRequestTicks) { - // Too many requests. We're dropping this one. - return - } - atomic.StoreInt64(&w.onDemandLastRequestTick, atomic.LoadInt64(&w.onDemandRequestTicks)) - - // OK, the request passed through. - - w.onDemandMu.Lock() - defer w.onDemandMu.Unlock() - - // Now for the actual logic. A client requests heartbeats. If it were only this client, we would - // activate heartbeats for the duration of onDemandDuration, and then turn heartbeats off. - // However, there may be multiple clients interested in heartbeats, or maybe the same single client - // requesting heartbeats again and again. So we keep track of how many _concurrent_ requests we have. - // We enable heartbeats as soon as we have a request; we turn heartbeats off once - // we have zero concurrent requests - w.enableWrites(true) - w.concurrentHeartbeatRequests++ - - time.AfterFunc(w.onDemandDuration, func() { - w.onDemandMu.Lock() - defer w.onDemandMu.Unlock() - w.concurrentHeartbeatRequests-- - if w.concurrentHeartbeatRequests == 0 { - // means there are currently no more clients interested in heartbeats - w.enableWrites(false) - } - w.allowNextHeartbeatRequest() - }) } diff --git a/go/vt/vttablet/tabletserver/repltracker/writer_test.go b/go/vt/vttablet/tabletserver/repltracker/writer_test.go index 0add32a1de0..e9aead570a8 100644 --- a/go/vt/vttablet/tabletserver/repltracker/writer_test.go +++ b/go/vt/vttablet/tabletserver/repltracker/writer_test.go @@ -38,7 +38,8 @@ func TestWriteHeartbeat(t *testing.T) { defer db.Close() now := time.Now() - tw := newTestWriter(db, &now) + tw := newSimpleTestWriter(db, &now) + upsert := fmt.Sprintf("INSERT INTO %s.heartbeat (ts, tabletUid, keyspaceShard) VALUES (%d, %d, '%s') ON DUPLICATE KEY UPDATE ts=VALUES(ts), tabletUid=VALUES(tabletUid)", "_vt", now.UnixNano(), tw.tabletAlias.Uid, tw.keyspaceShard) db.AddQuery(upsert, &sqltypes.Result{}) @@ -47,8 +48,214 @@ func TestWriteHeartbeat(t *testing.T) { writeErrors.Reset() tw.writeHeartbeat() - assert.Equal(t, int64(1), writes.Get()) - assert.Equal(t, int64(0), writeErrors.Get()) + assert.EqualValues(t, 1, writes.Get()) + assert.EqualValues(t, 0, writeErrors.Get()) +} + +// TestWriteHeartbeatOpen tests that the heartbeat writer writes heartbeats when the writer is open. +func TestWriteHeartbeatOpen(t *testing.T) { + defaultOnDemandDuration = 3 * time.Second + + db := fakesqldb.New(t) + defer db.Close() + + tw := newSimpleTestWriter(db, nil) + + assert.Zero(t, tw.onDemandDuration) + + db.AddQueryPattern("^INSERT INTO.*", &sqltypes.Result{}) + + writes.Reset() + writeErrors.Reset() + + tw.writeHeartbeat() + lastWrites := writes.Get() + assert.EqualValues(t, 1, lastWrites) + assert.EqualValues(t, 0, writeErrors.Get()) + + t.Run("closed, no heartbeats", func(t *testing.T) { + <-time.After(3 * time.Second) + assert.EqualValues(t, 1, writes.Get()) + }) + + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.Nil(t, rateLimiter) + } + tw.Open() + defer tw.Close() + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.Nil(t, rateLimiter) + } + t.Run("open, heartbeats", func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + assert.EqualValues(t, 0, writeErrors.Get()) + currentWrites := writes.Get() + assert.Greater(t, currentWrites, lastWrites) + lastWrites = currentWrites + } + } + }) +} + +// TestWriteHeartbeatDisabled tests that the heartbeat writer doesn't write heartbeats when the writer is disabled, +// but that it does respond to RequestHeartbeats(), and generates heartbeats on a lease. +func TestWriteHeartbeatDisabled(t *testing.T) { + defaultOnDemandDuration = 3 * time.Second + + db := fakesqldb.New(t) + defer db.Close() + + tw := newTestWriter(db, nil, tabletenv.Disable, 0) + + // Even though disabled, the writer will have an on-demand duration set. + assert.Equal(t, defaultOnDemandDuration, tw.onDemandDuration) + + db.AddQueryPattern("^INSERT INTO.*", &sqltypes.Result{}) + + writes.Reset() + writeErrors.Reset() + + tw.writeHeartbeat() + lastWrites := writes.Get() + assert.EqualValues(t, 1, lastWrites) + assert.EqualValues(t, 0, writeErrors.Get()) + + t.Run("closed, no heartbeats", func(t *testing.T) { + <-time.After(3 * time.Second) + assert.EqualValues(t, 1, writes.Get()) + }) + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.Nil(t, rateLimiter) + } + tw.Open() + defer tw.Close() + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.NotNil(t, rateLimiter) + } + t.Run("open, no heartbeats", func(t *testing.T) { + <-time.After(3 * time.Second) + assert.EqualValues(t, 1, writes.Get()) + }) + t.Run("request heartbeats, heartbeats", func(t *testing.T) { + tw.RequestHeartbeats() + ctx, cancel := context.WithTimeout(context.Background(), tw.onDemandDuration-time.Second) + defer cancel() + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + assert.EqualValues(t, 0, writeErrors.Get()) + currentWrites := writes.Get() + assert.Greater(t, currentWrites, lastWrites) + lastWrites = currentWrites + } + } + }) + t.Run("exhaust lease, no heartbeats", func(t *testing.T) { + <-time.After(tw.onDemandDuration) + currentWrites := writes.Get() + <-time.After(3 * time.Second) + assert.EqualValues(t, currentWrites, writes.Get()) + }) + tw.Close() + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.Nil(t, rateLimiter) + } +} + +// TestWriteHeartbeatOnDemand tests that the heartbeat writer initiates leased heartbeats once opened, +// and then upon RequestHeartbeats(). +func TestWriteHeartbeatOnDemand(t *testing.T) { + defaultOnDemandDuration = 7 * time.Second + onDemandDuration := minimalOnDemandDuration + + db := fakesqldb.New(t) + defer db.Close() + + tw := newTestWriter(db, nil, tabletenv.Heartbeat, onDemandDuration) + + assert.Equal(t, onDemandDuration, tw.onDemandDuration) + + db.AddQueryPattern("^INSERT INTO.*", &sqltypes.Result{}) + + writes.Reset() + writeErrors.Reset() + + tw.writeHeartbeat() + lastWrites := writes.Get() + assert.EqualValues(t, 1, lastWrites) + assert.EqualValues(t, 0, writeErrors.Get()) + + t.Run("closed, no heartbeats", func(t *testing.T) { + <-time.After(3 * time.Second) + assert.EqualValues(t, 1, writes.Get()) + }) + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.Nil(t, rateLimiter) + } + tw.Open() + defer tw.Close() + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.NotNil(t, rateLimiter) + } + t.Run("open, initial heartbeats", func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), tw.onDemandDuration-time.Second) + defer cancel() + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + assert.EqualValues(t, 0, writeErrors.Get()) + currentWrites := writes.Get() + assert.Greater(t, currentWrites, lastWrites) + lastWrites = currentWrites + } + } + }) + t.Run("exhaust lease, no heartbeats", func(t *testing.T) { + <-time.After(tw.onDemandDuration) + currentWrites := writes.Get() + <-time.After(3 * time.Second) + assert.EqualValues(t, currentWrites, writes.Get()) + }) + t.Run("request heartbeats, heartbeats", func(t *testing.T) { + tw.RequestHeartbeats() + lastWrites := writes.Get() + <-time.After(tw.onDemandDuration) + assert.Greater(t, writes.Get(), lastWrites) + }) + t.Run("exhaust lease, no heartbeats", func(t *testing.T) { + <-time.After(tw.onDemandDuration) + currentWrites := writes.Get() + <-time.After(3 * time.Second) + assert.EqualValues(t, currentWrites, writes.Get()) + }) + tw.Close() + { + rateLimiter := tw.onDemandRequestsRateLimiter.Load() + assert.Nil(t, rateLimiter) + } } func TestWriteHeartbeatError(t *testing.T) { @@ -56,7 +263,7 @@ func TestWriteHeartbeatError(t *testing.T) { defer db.Close() now := time.Now() - tw := newTestWriter(db, &now) + tw := newSimpleTestWriter(db, &now) writes.Reset() writeErrors.Reset() @@ -69,7 +276,8 @@ func TestWriteHeartbeatError(t *testing.T) { // TestCloseWhileStuckWriting tests that Close shouldn't get stuck even if the heartbeat writer is stuck waiting for a semi-sync ACK. func TestCloseWhileStuckWriting(t *testing.T) { db := fakesqldb.New(t) - tw := newTestWriter(db, nil) + tw := newSimpleTestWriter(db, nil) + tw.isOpen = true killWg := sync.WaitGroup{} @@ -90,14 +298,14 @@ func TestCloseWhileStuckWriting(t *testing.T) { }) // Now we enable writes, but the first write will get blocked. - tw.enableWrites(true) + tw.enableWrites() // We wait until the write has blocked to ensure we only call Close after we are stuck writing. startedWaitWg.Wait() // Even if the write is blocked, we should be able to disable writes without waiting indefinitely. // This is what we call, when we try to Close the heartbeat writer. ctx, cancel := context.WithCancel(context.Background()) go func() { - tw.enableWrites(false) + tw.disableWrites() cancel() }() select { @@ -108,17 +316,22 @@ func TestCloseWhileStuckWriting(t *testing.T) { } } -func newTestWriter(db *fakesqldb.DB, frozenTime *time.Time) *heartbeatWriter { +func newSimpleTestWriter(db *fakesqldb.DB, frozenTime *time.Time) *heartbeatWriter { + return newTestWriter(db, frozenTime, tabletenv.Heartbeat, 0) +} + +func newTestWriter(db *fakesqldb.DB, frozenTime *time.Time, replTrackerMode string, onDemandInterval time.Duration) *heartbeatWriter { cfg := tabletenv.NewDefaultConfig() - cfg.ReplicationTracker.Mode = tabletenv.Heartbeat - cfg.ReplicationTracker.HeartbeatInterval = time.Second + cfg.ReplicationTracker.Mode = replTrackerMode + cfg.ReplicationTracker.HeartbeatOnDemand = onDemandInterval + cfg.ReplicationTracker.HeartbeatInterval = 250 * time.Millisecond // oversampling our 1*time.Second unit test interval in various functions params := db.ConnParams() cp := *params dbc := dbconfigs.NewTestDBConfigs(cp, cp, "") tw := newHeartbeatWriter(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "WriterTest"), &topodatapb.TabletAlias{Cell: "test", Uid: 1111}) - tw.keyspaceShard = "test:0" + tw.keyspaceShard = "test/-" if frozenTime != nil { tw.now = func() time.Time { From d236ccde133999ec533e6ef4d2b4226f4abd50f0 Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:58:42 -0400 Subject: [PATCH 09/55] Add new mysql connection drain (#16298) Signed-off-by: Florent Poinsard --- go/flags/endtoend/vtcombo.txt | 1 + go/flags/endtoend/vtgate.txt | 1 + go/test/endtoend/cluster/vtgate_process.go | 13 ++ .../vtgate/connectiondrain/main_test.go | 187 ++++++++++++++++++ .../vtgate/connectiondrain/schema.sql | 5 + go/vt/servenv/run.go | 2 +- go/vt/vtgate/plugin_mysql_server.go | 44 ++++- test/config.json | 9 + 8 files changed, 254 insertions(+), 8 deletions(-) create mode 100644 go/test/endtoend/vtgate/connectiondrain/main_test.go create mode 100644 go/test/endtoend/vtgate/connectiondrain/schema.sql diff --git a/go/flags/endtoend/vtcombo.txt b/go/flags/endtoend/vtcombo.txt index fa9b3d6907e..b404d28f875 100644 --- a/go/flags/endtoend/vtcombo.txt +++ b/go/flags/endtoend/vtcombo.txt @@ -231,6 +231,7 @@ Flags: --mysql_default_workload string Default session workload (OLTP, OLAP, DBA) (default "OLTP") --mysql_port int mysql port (default 3306) --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_drain_onterm If set, the server waits for --onterm_timeout for connected clients to drain --mysql_server_flush_delay duration Delay after which buffered response will be flushed to the client. (default 100ms) --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 diff --git a/go/flags/endtoend/vtgate.txt b/go/flags/endtoend/vtgate.txt index 16f261194ca..68899cecd56 100644 --- a/go/flags/endtoend/vtgate.txt +++ b/go/flags/endtoend/vtgate.txt @@ -141,6 +141,7 @@ Flags: --mysql_ldap_auth_config_string string JSON representation of LDAP server config. --mysql_ldap_auth_method string client-side authentication method to use. Supported values: mysql_clear_password, dialog. (default "mysql_clear_password") --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_drain_onterm If set, the server waits for --onterm_timeout for connected clients to drain --mysql_server_flush_delay duration Delay after which buffered response will be flushed to the client. (default 100ms) --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 diff --git a/go/test/endtoend/cluster/vtgate_process.go b/go/test/endtoend/cluster/vtgate_process.go index d1877fb89bb..5143e9ad8a4 100644 --- a/go/test/endtoend/cluster/vtgate_process.go +++ b/go/test/endtoend/cluster/vtgate_process.go @@ -237,6 +237,19 @@ func (vtgate *VtgateProcess) WaitForStatusOfTabletInShard(name string, endPoints return fmt.Errorf("wait for %s failed", name) } +// IsShutdown checks if the vtgate process is shutdown +func (vtgate *VtgateProcess) IsShutdown() bool { + return !vtgate.WaitForStatus() +} + +// Terminate sends a SIGTERM to vtgate +func (vtgate *VtgateProcess) Terminate() error { + if vtgate.proc == nil { + return nil + } + return vtgate.proc.Process.Signal(syscall.SIGTERM) +} + // TearDown shuts down the running vtgate service func (vtgate *VtgateProcess) TearDown() error { if vtgate.proc == nil || vtgate.exit == nil { diff --git a/go/test/endtoend/vtgate/connectiondrain/main_test.go b/go/test/endtoend/vtgate/connectiondrain/main_test.go new file mode 100644 index 00000000000..32807b22bde --- /dev/null +++ b/go/test/endtoend/vtgate/connectiondrain/main_test.go @@ -0,0 +1,187 @@ +/* +Copyright 2024 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 connectiondrain + +import ( + "context" + _ "embed" + "flag" + "os" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/utils" +) + +var ( + keyspaceName = "ks" + cell = "zone-1" + + //go:embed schema.sql + schemaSQL string +) + +func TestMain(m *testing.M) { + defer cluster.PanicHandler(nil) + flag.Parse() + os.Exit(m.Run()) +} + +func setupCluster(t *testing.T) (*cluster.LocalProcessCluster, mysql.ConnParams) { + clusterInstance := cluster.NewCluster(cell, "localhost") + + // Start topo server + err := clusterInstance.StartTopo() + require.NoError(t, err) + + // Start keyspace + keyspace := &cluster.Keyspace{ + Name: keyspaceName, + SchemaSQL: schemaSQL, + } + err = clusterInstance.StartUnshardedKeyspace(*keyspace, 0, false) + require.NoError(t, err) + + // Start vtgate + clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--mysql_server_drain_onterm", "--onterm_timeout", "30s") + err = clusterInstance.StartVtgate() + require.NoError(t, err) + + vtParams := clusterInstance.GetVTParams(keyspaceName) + return clusterInstance, vtParams +} + +func start(t *testing.T, vtParams mysql.ConnParams) (*mysql.Conn, func()) { + vtConn, err := mysql.Connect(context.Background(), &vtParams) + require.NoError(t, err) + + deleteAll := func() { + _, _ = utils.ExecAllowError(t, vtConn, "set workload = oltp") + + tables := []string{"t1"} + for _, table := range tables { + _, _ = utils.ExecAllowError(t, vtConn, "delete from "+table) + } + } + + deleteAll() + + return vtConn, func() { + deleteAll() + vtConn.Close() + cluster.PanicHandler(t) + } +} + +func TestConnectionDrainCloseConnections(t *testing.T) { + clusterInstance, vtParams := setupCluster(t) + defer clusterInstance.Teardown() + + vtConn, closer := start(t, vtParams) + defer closer() + + // Create a second connection, this connection will be used to create a transaction. + vtConn2, err := mysql.Connect(context.Background(), &vtParams) + require.NoError(t, err) + + // Start the transaction with the second connection + _, err = vtConn2.ExecuteFetch("BEGIN", 1, false) + require.NoError(t, err) + _, err = vtConn2.ExecuteFetch("select id1 from t1", 1, false) + require.NoError(t, err) + + _, err = vtConn.ExecuteFetch("select id1 from t1", 1, false) + require.NoError(t, err) + + // Tearing down vtgate here, from there on vtConn should still be able to conclude in-flight transaction and + // execute queries with idle connections. However, no new connections are allowed. + err = clusterInstance.VtgateProcess.Terminate() + require.NoError(t, err) + + // Give enough time to vtgate to receive and start processing the SIGTERM signal + time.Sleep(2 * time.Second) + + // Create a third connection, this connection should not be allowed. + // Set a connection timeout to 1s otherwise the connection will take forever + // and eventually vtgate will reach the --onterm_timeout. + vtParams.ConnectTimeoutMs = 1000 + defer func() { + vtParams.ConnectTimeoutMs = 0 + }() + _, err = mysql.Connect(context.Background(), &vtParams) + require.Error(t, err) + + // Idle connections should be allowed to execute queries until they are drained + _, err = vtConn.ExecuteFetch("select id1 from t1", 1, false) + require.NoError(t, err) + + // Finish the transaction + _, err = vtConn2.ExecuteFetch("select id1 from t1", 1, false) + require.NoError(t, err) + _, err = vtConn2.ExecuteFetch("COMMIT", 1, false) + require.NoError(t, err) + vtConn2.Close() + + // vtgate should still be running + require.False(t, clusterInstance.VtgateProcess.IsShutdown()) + + // This connection should still be allowed + _, err = vtConn.ExecuteFetch("select id1 from t1", 1, false) + require.NoError(t, err) + vtConn.Close() + + // Give enough time for vtgate to finish all the onterm hooks without reaching the 30s of --onterm_timeout + time.Sleep(10 * time.Second) + + // By now the vtgate should have shutdown on its own and without reaching --onterm_timeout + require.True(t, clusterInstance.VtgateProcess.IsShutdown()) +} + +func TestConnectionDrainOnTermTimeout(t *testing.T) { + clusterInstance, vtParams := setupCluster(t) + defer clusterInstance.Teardown() + + // Connect to vtgate again, this should work + vtConn, err := mysql.Connect(context.Background(), &vtParams) + require.NoError(t, err) + vtConn2, err := mysql.Connect(context.Background(), &vtParams) + require.NoError(t, err) + + defer func() { + vtConn.Close() + vtConn2.Close() + }() + + // Tearing down vtgate here, we want to reach the onterm_timeout of 30s + err = clusterInstance.VtgateProcess.Terminate() + require.NoError(t, err) + + // Run a busy query that returns only after the onterm_timeout is reached, this should fail when we reach the timeout + _, err = vtConn.ExecuteFetch("select sleep(40)", 1, false) + require.Error(t, err) + + // Running a query after we have reached the onterm_timeout should fail + _, err = vtConn2.ExecuteFetch("select id from t1", 1, false) + require.Error(t, err) + + // By now vtgate will be shutdown becaused it reached its onterm_timeout, despite idle connections still being opened + require.True(t, clusterInstance.VtgateProcess.IsShutdown()) +} diff --git a/go/test/endtoend/vtgate/connectiondrain/schema.sql b/go/test/endtoend/vtgate/connectiondrain/schema.sql new file mode 100644 index 00000000000..45db74d062f --- /dev/null +++ b/go/test/endtoend/vtgate/connectiondrain/schema.sql @@ -0,0 +1,5 @@ +create table t1( + id1 bigint, + id2 bigint, + primary key(id1) +) Engine=InnoDB; diff --git a/go/vt/servenv/run.go b/go/vt/servenv/run.go index 29b15a40008..cef81e87a99 100644 --- a/go/vt/servenv/run.go +++ b/go/vt/servenv/run.go @@ -59,7 +59,6 @@ func Run(bindAddress string, port int) { signal.Notify(ExitChan, syscall.SIGTERM, syscall.SIGINT) // Wait for signal <-ExitChan - l.Close() startTime := time.Now() log.Infof("Entering lameduck mode for at least %v", timeouts.LameduckPeriod) @@ -71,6 +70,7 @@ func Run(bindAddress string, port int) { log.Infof("Sleeping an extra %v after OnTermSync to finish lameduck period", remain) time.Sleep(remain) } + l.Close() log.Info("Shutting down gracefully") fireOnCloseHooks(timeouts.OnCloseTimeout) diff --git a/go/vt/vtgate/plugin_mysql_server.go b/go/vt/vtgate/plugin_mysql_server.go index 175f4b2cc8f..55954013862 100644 --- a/go/vt/vtgate/plugin_mysql_server.go +++ b/go/vt/vtgate/plugin_mysql_server.go @@ -75,6 +75,7 @@ var ( mysqlDefaultWorkloadName = "OLTP" mysqlDefaultWorkload int32 + mysqlDrainOnTerm bool mysqlServerFlushDelay = 100 * time.Millisecond ) @@ -102,6 +103,7 @@ func registerPluginFlags(fs *pflag.FlagSet) { fs.DurationVar(&mysqlKeepAlivePeriod, "mysql-server-keepalive-period", mysqlKeepAlivePeriod, "TCP period between keep-alives") fs.DurationVar(&mysqlServerFlushDelay, "mysql_server_flush_delay", mysqlServerFlushDelay, "Delay after which buffered response will be flushed to the client.") fs.StringVar(&mysqlDefaultWorkloadName, "mysql_default_workload", mysqlDefaultWorkloadName, "Default session workload (OLTP, OLAP, DBA)") + fs.BoolVar(&mysqlDrainOnTerm, "mysql_server_drain_onterm", mysqlDrainOnTerm, "If set, the server waits for --onterm_timeout for connected clients to drain") } // vtgateHandler implements the Listener interface. @@ -621,18 +623,34 @@ func newMysqlUnixSocket(address string, authServer mysql.AuthServer, handler mys } func (srv *mysqlServer) shutdownMysqlProtocolAndDrain() { - if srv.tcpListener != nil { - srv.tcpListener.Shutdown() - srv.tcpListener = nil + if srv.sigChan != nil { + signal.Stop(srv.sigChan) } - if srv.unixListener != nil { - srv.unixListener.Shutdown() + setListenerToNil := func() { + srv.tcpListener = nil srv.unixListener = nil } - if srv.sigChan != nil { - signal.Stop(srv.sigChan) + + if mysqlDrainOnTerm { + stopListener(srv.unixListener, false) + stopListener(srv.tcpListener, false) + setListenerToNil() + // We wait for connected clients to drain by themselves or to run into the onterm timeout + log.Infof("Starting drain loop, waiting for all clients to disconnect") + reported := time.Now() + for srv.vtgateHandle.numConnections() > 0 { + if time.Since(reported) > 2*time.Second { + log.Infof("Still waiting for client connections to drain (%d connected)...", srv.vtgateHandle.numConnections()) + reported = time.Now() + } + time.Sleep(1000 * time.Millisecond) + } + return } + stopListener(srv.unixListener, true) + stopListener(srv.tcpListener, true) + setListenerToNil() if busy := srv.vtgateHandle.busyConnections.Load(); busy > 0 { log.Infof("Waiting for all client connections to be idle (%d active)...", busy) start := time.Now() @@ -649,6 +667,18 @@ func (srv *mysqlServer) shutdownMysqlProtocolAndDrain() { } } +// stopListener Close or Shutdown a mysql listener depending on the shutdown argument. +func stopListener(listener *mysql.Listener, shutdown bool) { + if listener == nil { + return + } + if shutdown { + listener.Shutdown() + } else { + listener.Close() + } +} + func (srv *mysqlServer) rollbackAtShutdown() { defer log.Flush() if srv.vtgateHandle == nil { diff --git a/test/config.json b/test/config.json index 713faf97024..8b48ccc3ec0 100644 --- a/test/config.json +++ b/test/config.json @@ -500,6 +500,15 @@ "RetryMax": 2, "Tags": [] }, + "vtgate_connectiondrain": { + "File": "unused.go", + "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/connectiondrain"], + "Command": [], + "Manual": false, + "Shard": "vtgate_general_heavy", + "RetryMax": 2, + "Tags": [] + }, "vtgate_queries_derived": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/queries/derived"], From 1426de4f8047ccb372d9cc903eed992dee18617f Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Wed, 3 Jul 2024 13:23:17 -0400 Subject: [PATCH 10/55] CI: Fix for xtrabackup install failures (#16329) Signed-off-by: Matt Lord --- .github/workflows/codeql_analysis.yml | 6 ------ .github/workflows/upgrade_downgrade_test_backups_e2e.yml | 3 ++- .../upgrade_downgrade_test_backups_e2e_next_release.yml | 3 ++- .github/workflows/upgrade_downgrade_test_backups_manual.yml | 3 ++- .../upgrade_downgrade_test_backups_manual_next_release.yml | 3 ++- .github/workflows/upgrade_downgrade_test_onlineddl_flow.yml | 6 ------ .../upgrade_downgrade_test_query_serving_queries.yml | 6 ------ ...de_downgrade_test_query_serving_queries_next_release.yml | 6 ------ .../upgrade_downgrade_test_query_serving_schema.yml | 6 ------ ...ade_downgrade_test_query_serving_schema_next_release.yml | 6 ------ .../workflows/upgrade_downgrade_test_reparent_new_vtctl.yml | 6 ------ .../upgrade_downgrade_test_reparent_new_vttablet.yml | 3 ++- .../workflows/upgrade_downgrade_test_reparent_old_vtctl.yml | 6 ------ .../upgrade_downgrade_test_reparent_old_vttablet.yml | 6 ------ docker/bootstrap/Dockerfile.mysql57 | 1 + docker/bootstrap/Dockerfile.percona57 | 1 + docker/utils/install_dependencies.sh | 1 + test/templates/cluster_endtoend_test_mysql57.tpl | 1 + test/templates/dockerfile.tpl | 1 + 19 files changed, 15 insertions(+), 59 deletions(-) diff --git a/.github/workflows/codeql_analysis.yml b/.github/workflows/codeql_analysis.yml index c822cbee089..16c108b5c2a 100644 --- a/.github/workflows/codeql_analysis.yml +++ b/.github/workflows/codeql_analysis.yml @@ -75,12 +75,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - - name: Building binaries timeout-minutes: 30 run: | diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index 209c96fd539..6f76b81803a 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -100,8 +100,9 @@ jobs: 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 percona-release enable-only tools sudo apt-get update - sudo apt-get install -y percona-xtrabackup-24 + sudo apt-get install -y percona-xtrabackup-80 # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) 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 542c6a00483..bc5a6e80d2c 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -102,8 +102,9 @@ jobs: 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 percona-release enable-only tools sudo apt-get update - sudo apt-get install -y percona-xtrabackup-24 + sudo apt-get install -y percona-xtrabackup-80 # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual.yml b/.github/workflows/upgrade_downgrade_test_backups_manual.yml index e0d7402c8ce..136f5b8d8ef 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual.yml @@ -122,8 +122,9 @@ jobs: 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 percona-release enable-only tools sudo apt-get update - sudo apt-get install -y percona-xtrabackup-24 + sudo apt-get install -y percona-xtrabackup-80 # Checkout to the last release of Vitess - name: Checkout to the other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml index 15aa0f05a19..410b84d4a59 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml @@ -123,8 +123,9 @@ jobs: 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 percona-release enable-only tools sudo apt-get update - sudo apt-get install -y percona-xtrabackup-24 + sudo apt-get install -y percona-xtrabackup-80 # Checkout to the next release of Vitess - name: Checkout to the other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) diff --git a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml index c0f6ed9b058..c7aa887f5b6 100644 --- a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml +++ b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml @@ -124,12 +124,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the last release of Vitess - name: Check out last version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml index 9926336f9c7..a52cb1cd7e6 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml @@ -116,12 +116,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml index 233dd496a21..4f4c6a754ce 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml @@ -117,12 +117,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml index 6664951d12c..dd74e0e645b 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml @@ -116,12 +116,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml index d9a31b56ffe..e12dc79765f 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml @@ -117,12 +117,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml index a6e533cf735..8055d10b974 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml @@ -117,12 +117,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml index e13520fc46a..f3cbb31ed65 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml @@ -120,8 +120,9 @@ jobs: 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 percona-release enable-only tools sudo apt-get update - sudo apt-get install -y percona-xtrabackup-24 + sudo apt-get install -y percona-xtrabackup-80 # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml index dcfdf06ae65..1adb1696bfc 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml @@ -116,12 +116,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml index 9fec80feced..97db6f95cba 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml @@ -116,12 +116,6 @@ 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 - sudo apt-get install -y percona-xtrabackup-24 - # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/docker/bootstrap/Dockerfile.mysql57 b/docker/bootstrap/Dockerfile.mysql57 index c5be81c1cdc..983f3640472 100644 --- a/docker/bootstrap/Dockerfile.mysql57 +++ b/docker/bootstrap/Dockerfile.mysql57 @@ -16,6 +16,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins echo percona-server-server-5.7 percona-server-server/root_password password 'unused'; \ echo percona-server-server-5.7 percona-server-server/root_password_again password 'unused'; \ } | debconf-set-selections && \ + percona-release enable-only tools \ apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server libmysqlclient-dev libdbd-mysql-perl rsync libev4 percona-xtrabackup-24 && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/bootstrap/Dockerfile.percona57 b/docker/bootstrap/Dockerfile.percona57 index 96a23da221a..e9cd5043d44 100644 --- a/docker/bootstrap/Dockerfile.percona57 +++ b/docker/bootstrap/Dockerfile.percona57 @@ -13,6 +13,7 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.c echo percona-server-server-5.7 percona-server-server/root_password password 'unused'; \ echo percona-server-server-5.7 percona-server-server/root_password_again password 'unused'; \ } | debconf-set-selections && \ + percona-release enable-only tools \ apt-get update && \ apt-get install -y --no-install-recommends percona-server-server-5.7 && \ apt-get install -y --no-install-recommends libperconaserverclient20-dev percona-xtrabackup-24 && \ diff --git a/docker/utils/install_dependencies.sh b/docker/utils/install_dependencies.sh index b686c2418bf..380afc7ad4e 100755 --- a/docker/utils/install_dependencies.sh +++ b/docker/utils/install_dependencies.sh @@ -66,6 +66,7 @@ BASE_PACKAGES=( zstd ) +percona-release enable-only tools apt-get update apt-get install -y --no-install-recommends "${BASE_PACKAGES[@]}" diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index eaa9e366196..2b1be0599b2 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -147,6 +147,7 @@ jobs: 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 percona-release enable-only tools sudo apt-get update if [[ -n $XTRABACKUP_VERSION ]]; then debfile="percona-xtrabackup-24_$XTRABACKUP_VERSION.$(lsb_release -sc)_amd64.deb" diff --git a/test/templates/dockerfile.tpl b/test/templates/dockerfile.tpl index 502e553cabf..bb14889f9b1 100644 --- a/test/templates/dockerfile.tpl +++ b/test/templates/dockerfile.tpl @@ -15,6 +15,7 @@ RUN wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_ RUN apt-get update RUN apt-get install -y gnupg2 RUN dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb +RUN percona-release enable-only tools RUN apt-get update RUN apt-get install -y percona-xtrabackup-24 {{end}} From 8685b9ef3b7dad5ae683eeee2a57faebf58ba8e8 Mon Sep 17 00:00:00 2001 From: vitess-bot <139342327+vitess-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:40:43 -0600 Subject: [PATCH 11/55] [main] Upgrade the Golang version to `go1.22.5` (#16319) Signed-off-by: GitHub Signed-off-by: Florent Poinsard Co-authored-by: frouioui Co-authored-by: Florent Poinsard --- .github/workflows/assign_milestone.yml | 2 +- .../check_make_vtadmin_authz_testgen.yml | 2 +- .../check_make_vtadmin_web_proto.yml | 2 +- .github/workflows/cluster_endtoend_12.yml | 2 +- .github/workflows/cluster_endtoend_13.yml | 2 +- .github/workflows/cluster_endtoend_15.yml | 2 +- .github/workflows/cluster_endtoend_18.yml | 2 +- .github/workflows/cluster_endtoend_21.yml | 2 +- .../cluster_endtoend_backup_pitr.yml | 2 +- ...luster_endtoend_backup_pitr_xtrabackup.yml | 2 +- ...ter_endtoend_ers_prs_newfeatures_heavy.yml | 2 +- .../workflows/cluster_endtoend_mysql80.yml | 2 +- .../cluster_endtoend_mysql_server_vault.yml | 2 +- .../cluster_endtoend_onlineddl_revert.yml | 2 +- .../cluster_endtoend_onlineddl_scheduler.yml | 2 +- .../cluster_endtoend_onlineddl_vrepl.yml | 2 +- ...luster_endtoend_onlineddl_vrepl_stress.yml | 2 +- ..._endtoend_onlineddl_vrepl_stress_suite.yml | 2 +- ...cluster_endtoend_onlineddl_vrepl_suite.yml | 2 +- .../cluster_endtoend_schemadiff_vrepl.yml | 2 +- .../cluster_endtoend_tabletmanager_consul.yml | 2 +- ...cluster_endtoend_tabletmanager_tablegc.yml | 2 +- ..._endtoend_tabletmanager_throttler_topo.yml | 2 +- ...cluster_endtoend_topo_connection_cache.yml | 2 +- ...dtoend_vreplication_across_db_versions.yml | 2 +- .../cluster_endtoend_vreplication_basic.yml | 2 +- ...luster_endtoend_vreplication_cellalias.yml | 2 +- ...er_endtoend_vreplication_copy_parallel.yml | 2 +- ...dtoend_vreplication_foreign_key_stress.yml | 2 +- ...endtoend_vreplication_mariadb_to_mysql.yml | 2 +- ...vreplication_migrate_vdiff2_convert_tz.yml | 2 +- ...ter_endtoend_vreplication_multi_tenant.yml | 2 +- ...ion_partial_movetables_and_materialize.yml | 2 +- .../cluster_endtoend_vreplication_v2.yml | 2 +- .../workflows/cluster_endtoend_vstream.yml | 2 +- .../workflows/cluster_endtoend_vtbackup.yml | 2 +- ..._vtctlbackup_sharded_clustertest_heavy.yml | 2 +- .../cluster_endtoend_vtgate_concurrentdml.yml | 2 +- ...ster_endtoend_vtgate_foreignkey_stress.yml | 2 +- .../cluster_endtoend_vtgate_gen4.yml | 2 +- .../cluster_endtoend_vtgate_general_heavy.yml | 2 +- .../cluster_endtoend_vtgate_godriver.yml | 2 +- ...uster_endtoend_vtgate_partial_keyspace.yml | 2 +- .../cluster_endtoend_vtgate_queries.yml | 2 +- ...cluster_endtoend_vtgate_readafterwrite.yml | 2 +- .../cluster_endtoend_vtgate_reservedconn.yml | 2 +- .../cluster_endtoend_vtgate_schema.yml | 2 +- ...cluster_endtoend_vtgate_schema_tracker.yml | 2 +- ...dtoend_vtgate_tablet_healthcheck_cache.yml | 2 +- .../cluster_endtoend_vtgate_topo.yml | 2 +- .../cluster_endtoend_vtgate_topo_consul.yml | 2 +- .../cluster_endtoend_vtgate_topo_etcd.yml | 2 +- .../cluster_endtoend_vtgate_transaction.yml | 2 +- .../cluster_endtoend_vtgate_unsharded.yml | 2 +- .../cluster_endtoend_vtgate_vindex_heavy.yml | 2 +- .../cluster_endtoend_vtgate_vschema.yml | 2 +- .github/workflows/cluster_endtoend_vtorc.yml | 2 +- .../cluster_endtoend_vttablet_prscomplex.yml | 2 +- .../workflows/cluster_endtoend_xb_backup.yml | 2 +- .../cluster_endtoend_xb_recovery.yml | 2 +- .github/workflows/codecov.yml | 2 +- .github/workflows/codeql_analysis.yml | 2 +- .github/workflows/create_release.yml | 2 +- .github/workflows/docker_test_cluster_10.yml | 2 +- .github/workflows/docker_test_cluster_25.yml | 2 +- .github/workflows/e2e_race.yml | 2 +- .github/workflows/endtoend.yml | 2 +- .github/workflows/local_example.yml | 2 +- .github/workflows/region_example.yml | 2 +- .github/workflows/static_checks_etc.yml | 2 +- .github/workflows/unit_race.yml | 2 +- .github/workflows/unit_race_evalengine.yml | 2 +- .../unit_test_evalengine_mysql57.yml | 2 +- .../unit_test_evalengine_mysql80.yml | 2 +- .github/workflows/unit_test_mysql57.yml | 2 +- .github/workflows/unit_test_mysql80.yml | 2 +- .../workflows/update_golang_dependencies.yml | 2 +- .github/workflows/update_golang_version.yml | 4 +- .../upgrade_downgrade_test_backups_e2e.yml | 2 +- ...owngrade_test_backups_e2e_next_release.yml | 2 +- .../upgrade_downgrade_test_backups_manual.yml | 2 +- ...grade_test_backups_manual_next_release.yml | 2 +- .../upgrade_downgrade_test_onlineddl_flow.yml | 2 +- ...e_downgrade_test_query_serving_queries.yml | 2 +- ...est_query_serving_queries_next_release.yml | 2 +- ...de_downgrade_test_query_serving_schema.yml | 2 +- ...test_query_serving_schema_next_release.yml | 2 +- ...rade_downgrade_test_reparent_new_vtctl.yml | 2 +- ...e_downgrade_test_reparent_new_vttablet.yml | 2 +- ...rade_downgrade_test_reparent_old_vtctl.yml | 2 +- ...e_downgrade_test_reparent_old_vttablet.yml | 2 +- .github/workflows/vitess_tester_vtgate.yml | 2 +- Makefile | 2 +- build.env | 2 +- docker/bootstrap/CHANGELOG.md | 6 +- docker/bootstrap/Dockerfile.common | 2 +- docker/lite/Dockerfile | 2 +- docker/lite/Dockerfile.percona80 | 2 +- docker/local/Dockerfile | 2 +- docker/vttestserver/Dockerfile.mysql80 | 2 +- go.mod | 28 +++++----- go.sum | 56 +++++++++---------- test.go | 2 +- test/templates/cluster_endtoend_test.tpl | 2 +- .../cluster_endtoend_test_docker.tpl | 2 +- .../cluster_endtoend_test_mysql57.tpl | 2 +- test/templates/cluster_vitess_tester.tpl | 2 +- test/templates/dockerfile.tpl | 2 +- test/templates/unit_test.tpl | 2 +- vitess-mixin/go.mod | 2 +- 110 files changed, 155 insertions(+), 151 deletions(-) diff --git a/.github/workflows/assign_milestone.yml b/.github/workflows/assign_milestone.yml index 52542ad4c90..443d28e80d6 100644 --- a/.github/workflows/assign_milestone.yml +++ b/.github/workflows/assign_milestone.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/check_make_vtadmin_authz_testgen.yml b/.github/workflows/check_make_vtadmin_authz_testgen.yml index 182748ef5f7..3502c973632 100644 --- a/.github/workflows/check_make_vtadmin_authz_testgen.yml +++ b/.github/workflows/check_make_vtadmin_authz_testgen.yml @@ -50,7 +50,7 @@ jobs: uses: actions/setup-go@v5 if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' diff --git a/.github/workflows/check_make_vtadmin_web_proto.yml b/.github/workflows/check_make_vtadmin_web_proto.yml index f8694ae93bb..61c83168c23 100644 --- a/.github/workflows/check_make_vtadmin_web_proto.yml +++ b/.github/workflows/check_make_vtadmin_web_proto.yml @@ -52,7 +52,7 @@ jobs: uses: actions/setup-go@v5 if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Setup Node if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index 1049077d9d8..9bbef78eeb8 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index f79e0c7b0fa..f26195f49e5 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index ec3b339ff40..cae2e55e669 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index f80566e9f34..bcac80cf804 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index f6979a49abc..9434a280829 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_backup_pitr.yml b/.github/workflows/cluster_endtoend_backup_pitr.yml index 847fd84ae08..8a562120fdb 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml index a2a83812c23..1891d1a75d2 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml index 401185596d7..1d1627463b1 100644 --- a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml +++ b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index 8cbbdfb4607..8c2f3e4dd80 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_mysql_server_vault.yml b/.github/workflows/cluster_endtoend_mysql_server_vault.yml index e6a75d6b70b..48a4c5c1897 100644 --- a/.github/workflows/cluster_endtoend_mysql_server_vault.yml +++ b/.github/workflows/cluster_endtoend_mysql_server_vault.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index 76766f1bfa6..d48f9919055 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml index 0c685c4599c..bf06949472a 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index a63ad54c2c3..c920d49cbd3 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index 20c378695e0..f58e9239bcb 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index 3dfcd2cc99b..7a30bd2c476 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index 92dab0a55f1..f1ba097e3f9 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml index be568217503..0a239092a2f 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index bf6c8e8e87c..27b72d07b9e 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index 4d63b3a0cf1..90c07975836 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml index 700e78ac55d..f2643f2060c 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_topo_connection_cache.yml b/.github/workflows/cluster_endtoend_topo_connection_cache.yml index 3119d085c18..80883fb70d1 100644 --- a/.github/workflows/cluster_endtoend_topo_connection_cache.yml +++ b/.github/workflows/cluster_endtoend_topo_connection_cache.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml index 4d622675dcb..79a154c2ead 100644 --- a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml +++ b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index 1c0b8f922d8..9af84e462c9 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 96f30d4835a..3180f0ea723 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml b/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml index aae735aa7ec..b52e0cb433b 100644 --- a/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml +++ b/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml index f0ef175a170..26e670c3d08 100644 --- a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml +++ b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml b/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml index d2bb0a3d099..ab8ea8b7264 100644 --- a/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml +++ b/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' 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 1f6dfb6b7ef..924a45aa439 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml b/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml index f44ddf1d27f..35270501b38 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml b/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml index a1074fa2553..d93a59e2d50 100644 --- a/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml +++ b/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 1ee0bc3d5d0..65a3d58b2a0 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vstream.yml b/.github/workflows/cluster_endtoend_vstream.yml index 3f1399eece4..74ef2e73b86 100644 --- a/.github/workflows/cluster_endtoend_vstream.yml +++ b/.github/workflows/cluster_endtoend_vstream.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtbackup.yml b/.github/workflows/cluster_endtoend_vtbackup.yml index ef96875687a..c95fe428092 100644 --- a/.github/workflows/cluster_endtoend_vtbackup.yml +++ b/.github/workflows/cluster_endtoend_vtbackup.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml index 63574ed2858..72fd1c652eb 100644 --- a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index ca050f090eb..374ac97a4d7 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml index edcca203c4a..7f2c2f6e9ba 100644 --- a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml +++ b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index 8f0071a4815..5890970519f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml index 37b318650a9..6ac03c17e81 100644 --- a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_godriver.yml b/.github/workflows/cluster_endtoend_vtgate_godriver.yml index 79daa318661..9eba657c65d 100644 --- a/.github/workflows/cluster_endtoend_vtgate_godriver.yml +++ b/.github/workflows/cluster_endtoend_vtgate_godriver.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml index fc2540b5809..9600c48486f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml +++ b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index 8813a2ca6ac..dcc10cb9b4a 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index e4863b23353..8d95830e276 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index 0296b040b3a..ad95087a8f3 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index 5d1c36c0e3f..a3b79c0b8d0 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index 1436f891744..50a044c4bc2 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml index f04fce0e634..007289158ac 100644 --- a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml +++ b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index 5954f98e1ac..2384d8e6021 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index a67db05bde6..906f9aa04d8 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index 190c934ac5f..64861ef358a 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index a3210624126..41a84f42d3f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index 30dce8c0d6c..a879e88ba44 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml index 0a80cb59e88..964146c9829 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index dbc55e05eaf..c66c9959ab2 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index 04f3ac33a30..d6fb811f533 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -82,7 +82,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml index 451cf6013cc..248a611a864 100644 --- a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml +++ b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_xb_backup.yml b/.github/workflows/cluster_endtoend_xb_backup.yml index 551e98116d5..5a8acc66d8c 100644 --- a/.github/workflows/cluster_endtoend_xb_backup.yml +++ b/.github/workflows/cluster_endtoend_xb_backup.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index 1648f4d8fb6..94fb11320fb 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c277733a04a..3015309d2c2 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -32,7 +32,7 @@ jobs: if: steps.changes.outputs.changed_files == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.changes.outputs.changed_files == 'true' diff --git a/.github/workflows/codeql_analysis.yml b/.github/workflows/codeql_analysis.yml index 16c108b5c2a..154ce0fa822 100644 --- a/.github/workflows/codeql_analysis.yml +++ b/.github/workflows/codeql_analysis.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 33a7df3208c..cb393141ae3 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Setup node uses: actions/setup-node@v4 diff --git a/.github/workflows/docker_test_cluster_10.yml b/.github/workflows/docker_test_cluster_10.yml index ff3bbaf6e68..2a1c1050461 100644 --- a/.github/workflows/docker_test_cluster_10.yml +++ b/.github/workflows/docker_test_cluster_10.yml @@ -54,7 +54,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/docker_test_cluster_25.yml b/.github/workflows/docker_test_cluster_25.yml index 9e60e3a4b50..ba73f50252b 100644 --- a/.github/workflows/docker_test_cluster_25.yml +++ b/.github/workflows/docker_test_cluster_25.yml @@ -54,7 +54,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index 61e7349790d..cef0ea4d583 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -52,7 +52,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index ef390dae4eb..783d3305fc8 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -52,7 +52,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/local_example.yml b/.github/workflows/local_example.yml index 04d6839db2a..78cd2d1784f 100644 --- a/.github/workflows/local_example.yml +++ b/.github/workflows/local_example.yml @@ -57,7 +57,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' diff --git a/.github/workflows/region_example.yml b/.github/workflows/region_example.yml index e81abf25bbb..fa08d3d80cb 100644 --- a/.github/workflows/region_example.yml +++ b/.github/workflows/region_example.yml @@ -57,7 +57,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 7c09697fec2..75fb01e487e 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -123,7 +123,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.proto_changes == 'true') uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 277a29df216..3f6de3eb6f8 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -69,7 +69,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/.github/workflows/unit_race_evalengine.yml b/.github/workflows/unit_race_evalengine.yml index 02ac005a0a5..77ada6729bd 100644 --- a/.github/workflows/unit_race_evalengine.yml +++ b/.github/workflows/unit_race_evalengine.yml @@ -69,7 +69,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/.github/workflows/unit_test_evalengine_mysql57.yml b/.github/workflows/unit_test_evalengine_mysql57.yml index 1a979b122a3..7ab842835fb 100644 --- a/.github/workflows/unit_test_evalengine_mysql57.yml +++ b/.github/workflows/unit_test_evalengine_mysql57.yml @@ -71,7 +71,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/.github/workflows/unit_test_evalengine_mysql80.yml b/.github/workflows/unit_test_evalengine_mysql80.yml index c00217a172a..f5c127a8b77 100644 --- a/.github/workflows/unit_test_evalengine_mysql80.yml +++ b/.github/workflows/unit_test_evalengine_mysql80.yml @@ -71,7 +71,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml index cf708f0b117..cd28efef0d8 100644 --- a/.github/workflows/unit_test_mysql57.yml +++ b/.github/workflows/unit_test_mysql57.yml @@ -71,7 +71,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index 7dac5c3eb96..e66423ad1b7 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -71,7 +71,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index 0523eed6a97..7538090d51e 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Check out code uses: actions/checkout@v4 diff --git a/.github/workflows/update_golang_version.yml b/.github/workflows/update_golang_version.yml index 59daadb8f3a..df9677e7cf4 100644 --- a/.github/workflows/update_golang_version.yml +++ b/.github/workflows/update_golang_version.yml @@ -15,14 +15,14 @@ jobs: pull-requests: write strategy: matrix: - branch: [ main, release-20.0, release-19.0, release-18.0, release-17.0 ] + branch: [ main, release-20.0, release-19.0, release-18.0 ] name: Update Golang Version runs-on: ubuntu-latest steps: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Check out code uses: actions/checkout@v4 diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index 6f76b81803a..e8b8a688879 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -72,7 +72,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' 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 bc5a6e80d2c..0e24c534057 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -74,7 +74,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual.yml b/.github/workflows/upgrade_downgrade_test_backups_manual.yml index 136f5b8d8ef..3f25e2c8663 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual.yml @@ -76,7 +76,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml index 410b84d4a59..83a678fc065 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml @@ -77,7 +77,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml index c7aa887f5b6..a5361817739 100644 --- a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml +++ b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml @@ -83,7 +83,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml index a52cb1cd7e6..93360699f93 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml @@ -75,7 +75,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml index 4f4c6a754ce..6c3674a1d75 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml @@ -76,7 +76,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml index dd74e0e645b..cc519f335cf 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml @@ -75,7 +75,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml index e12dc79765f..c1864a9a3e7 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml @@ -76,7 +76,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml index 8055d10b974..66033484ce3 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml @@ -76,7 +76,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml index f3cbb31ed65..d937bc7bc11 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml @@ -76,7 +76,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml index 1adb1696bfc..ac6ef068654 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml @@ -75,7 +75,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml index 97db6f95cba..df0cdb9c7c9 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml @@ -75,7 +75,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/.github/workflows/vitess_tester_vtgate.yml b/.github/workflows/vitess_tester_vtgate.yml index dc84d511df6..0c2965fee9c 100644 --- a/.github/workflows/vitess_tester_vtgate.yml +++ b/.github/workflows/vitess_tester_vtgate.yml @@ -73,7 +73,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/Makefile b/Makefile index 91cafd489d5..2956f47ed4a 100644 --- a/Makefile +++ b/Makefile @@ -282,7 +282,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto # This rule builds the bootstrap images for all flavors. DOCKER_IMAGES_FOR_TEST = mysql57 mysql80 percona57 percona80 DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST) -BOOTSTRAP_VERSION=33 +BOOTSTRAP_VERSION=34 ensure_bootstrap_version: find docker/ -type f -exec sed -i "s/^\(ARG bootstrap_version\)=.*/\1=${BOOTSTRAP_VERSION}/" {} \; sed -i 's/\(^.*flag.String(\"bootstrap-version\",\) *\"[^\"]\+\"/\1 \"${BOOTSTRAP_VERSION}\"/' test.go diff --git a/build.env b/build.env index 18e3069fe09..ba741be4211 100755 --- a/build.env +++ b/build.env @@ -17,7 +17,7 @@ source ./tools/shell_functions.inc go version >/dev/null 2>&1 || fail "Go is not installed or is not in \$PATH. See https://vitess.io/contributing/build-from-source for install instructions." -goversion_min 1.22.4 || echo "Go version reported: `go version`. Version 1.22.4+ recommended. See https://vitess.io/contributing/build-from-source for install instructions." +goversion_min 1.22.5 || echo "Go version reported: `go version`. Version 1.22.5+ recommended. See https://vitess.io/contributing/build-from-source for install instructions." mkdir -p dist mkdir -p bin diff --git a/docker/bootstrap/CHANGELOG.md b/docker/bootstrap/CHANGELOG.md index 1fe7f8d6acb..dd9d1c19f17 100644 --- a/docker/bootstrap/CHANGELOG.md +++ b/docker/bootstrap/CHANGELOG.md @@ -128,4 +128,8 @@ List of changes between bootstrap image versions. ## [33] - 2024-06-05 ### Changes -- Update build to golang 1.22.4 \ No newline at end of file +- Update build to golang 1.22.4 + +## [34] - 2024-07-02 +### Changes +- Update build to golang 1.22.5 \ No newline at end of file diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index 7e340b79cd7..c48a485bec3 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 golang:1.22.4-bullseye +FROM --platform=linux/amd64 golang:1.22.5-bullseye # Install Vitess build dependencies RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ diff --git a/docker/lite/Dockerfile b/docker/lite/Dockerfile index d5c46cac133..fd01f7d9ef6 100644 --- a/docker/lite/Dockerfile +++ b/docker/lite/Dockerfile @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=33 +ARG bootstrap_version=34 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index 96523044eff..1e27f45e692 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=33 +ARG bootstrap_version=34 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" AS builder diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile index 33c2dfd6cd8..5e9d4aed326 100644 --- a/docker/local/Dockerfile +++ b/docker/local/Dockerfile @@ -1,4 +1,4 @@ -ARG bootstrap_version=33 +ARG bootstrap_version=34 ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index 7f1d989ee5b..d6b0a200fa7 100644 --- a/docker/vttestserver/Dockerfile.mysql80 +++ b/docker/vttestserver/Dockerfile.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=33 +ARG bootstrap_version=34 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/go.mod b/go.mod index f888a9a53d8..47dafd671f7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess -go 1.22.4 +go 1.22.5 require ( cloud.google.com/go/storage v1.42.0 @@ -10,7 +10,7 @@ require ( github.com/HdrHistogram/hdrhistogram-go v0.9.0 // indirect github.com/aquarapid/vaultlib v0.5.1 github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.54.11 + github.com/aws/aws-sdk-go v1.54.13 github.com/buger/jsonparser v1.1.1 github.com/cespare/xxhash/v2 v2.3.0 github.com/corpix/uarand v0.1.1 // indirect @@ -77,9 +77,9 @@ require ( golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 golang.org/x/tools v0.22.0 - google.golang.org/api v0.186.0 - google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d // indirect - google.golang.org/grpc v1.64.0 + google.golang.org/api v0.187.0 + google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/grpc v1.65.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b google.golang.org/protobuf v1.34.2 @@ -112,10 +112,10 @@ require ( require ( cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect + cloud.google.com/go/auth v0.6.1 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect + cloud.google.com/go/compute/metadata v0.4.0 // indirect + cloud.google.com/go/iam v1.1.10 // indirect github.com/DataDog/appsec-internal-go v1.6.0 // indirect github.com/DataDog/datadog-agent/pkg/obfuscate v0.54.0 // indirect github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0 // indirect @@ -178,20 +178,20 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect - modernc.org/libc v1.54.0 // indirect + modernc.org/libc v1.54.1 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.8.0 // indirect modernc.org/strutil v1.2.0 // indirect diff --git a/go.sum b/go.sum index 40ffbbd0854..35df734575e 100644 --- a/go.sum +++ b/go.sum @@ -2,16 +2,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= +cloud.google.com/go/auth v0.6.1 h1:T0Zw1XM5c1GlpN2HYr2s+m3vr1p2wy+8VN+Z1FKxW38= +cloud.google.com/go/auth v0.6.1/go.mod h1:eFHG7zDzbXHKmjJddFG/rBlcGp6t25SwRUiEQSlO4x4= cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= -cloud.google.com/go/longrunning v0.5.7 h1:WLbHekDbjK1fVFD3ibpFFVoyizlLRl73I7YKuAKilhU= -cloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng= +cloud.google.com/go/compute/metadata v0.4.0 h1:vHzJCWaM4g8XIcm8kopr3XmDA4Gy/lblD3EhhSux05c= +cloud.google.com/go/compute/metadata v0.4.0/go.mod h1:SIQh1Kkb4ZJ8zJ874fqVkslA29PRXuleyj6vOzlbK7M= +cloud.google.com/go/iam v1.1.10 h1:ZSAr64oEhQSClwBL670MsJAW5/RLiC6kfw3Bqmd5ZDI= +cloud.google.com/go/iam v1.1.10/go.mod h1:iEgMq62sg8zx446GCaijmA2Miwg5o3UbO+nI47WHJps= +cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= +cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= @@ -73,8 +73,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.54.11 h1:Zxuv/R+IVS0B66yz4uezhxH9FN9/G2nbxejYqAMFjxk= -github.com/aws/aws-sdk-go v1.54.11/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.54.13 h1:zpCuiG+/mFdDY/klKJvmSioAZWk45F4rLGq0JWVAAzk= +github.com/aws/aws-sdk-go v1.54.13/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -537,14 +537,14 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.5 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= @@ -692,8 +692,8 @@ golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSm golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.187.0 h1:Mxs7VATVC2v7CY+7Xwm4ndkX71hpElcvx0D1Ji/p1eo= +google.golang.org/api v0.187.0/go.mod h1:KIHlTc4x7N7gKKuVsdmfBXN13yEEWXWFURWY6SBp2gk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -701,12 +701,12 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d h1:PksQg4dV6Sem3/HkBX+Ltq8T0ke0PKIRBNBatoDTVls= -google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:s7iA721uChleev562UJO2OYB0PPT9CMFjV+Ce7VJH5M= -google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= -google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= +google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -715,8 +715,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b h1:D/GTYPo6I1oEo08Bfpuj3xl5XE+UGHj7//5fVyKxhsQ= @@ -779,8 +779,8 @@ modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b h1:BnN1t+pb1cy61zbvSUV7SeI0PwosMhlAEi/vBY4qxp8= modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= -modernc.org/libc v1.54.0 h1:lVBLfdyE5lDuDkxLbR/4JDvonpV6NZ60Vbgls5N5vGc= -modernc.org/libc v1.54.0/go.mod h1:B0D6klDmSmnq26T1iocn9kzyX6NtbzjuI3+oX/xfvng= +modernc.org/libc v1.54.1 h1:5vzs86ANQehsFZXqjxUam20JwgK2eODTOcGMIWcCdg4= +modernc.org/libc v1.54.1/go.mod h1:B0D6klDmSmnq26T1iocn9kzyX6NtbzjuI3+oX/xfvng= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= diff --git a/test.go b/test.go index ef0a28bafe0..74438cbb504 100755 --- a/test.go +++ b/test.go @@ -77,7 +77,7 @@ For example: // Flags var ( flavor = flag.String("flavor", "mysql80", "comma-separated bootstrap flavor(s) to run against (when using Docker mode). Available flavors: all,"+flavors) - bootstrapVersion = flag.String("bootstrap-version", "33", "the version identifier to use for the docker images") + bootstrapVersion = flag.String("bootstrap-version", "34", "the version identifier to use for the docker images") runCount = flag.Int("runs", 1, "run each test this many times") retryMax = flag.Int("retry", 3, "max number of retries, to detect flaky tests") logPass = flag.Bool("log-pass", false, "log test output even if it passes") diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 7532b51bb6e..46078cfcc0c 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -87,7 +87,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index 9aa49df5f18..2b63e6d3516 100644 --- a/test/templates/cluster_endtoend_test_docker.tpl +++ b/test/templates/cluster_endtoend_test_docker.tpl @@ -56,7 +56,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index 2b1be0599b2..17d49c382e2 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -92,7 +92,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/test/templates/cluster_vitess_tester.tpl b/test/templates/cluster_vitess_tester.tpl index 73175e5b892..bd34c2de088 100644 --- a/test/templates/cluster_vitess_tester.tpl +++ b/test/templates/cluster_vitess_tester.tpl @@ -71,7 +71,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/test/templates/dockerfile.tpl b/test/templates/dockerfile.tpl index bb14889f9b1..437971aa532 100644 --- a/test/templates/dockerfile.tpl +++ b/test/templates/dockerfile.tpl @@ -1,4 +1,4 @@ -ARG bootstrap_version=33 +ARG bootstrap_version=34 ARG image="vitess/bootstrap:${bootstrap_version}-{{.Platform}}" FROM "${image}" diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index ca31dcbcaf9..7fd872bde1d 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -69,7 +69,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@v5 with: - go-version: 1.22.4 + go-version: 1.22.5 - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' diff --git a/vitess-mixin/go.mod b/vitess-mixin/go.mod index 591803ff433..20d3f33eed8 100644 --- a/vitess-mixin/go.mod +++ b/vitess-mixin/go.mod @@ -1,6 +1,6 @@ module vitess-mixin -go 1.22.4 +go 1.22.5 require ( github.com/evanphx/json-patch v5.9.0+incompatible From c70031d29801426ee6f95b3cc7303d5a49fdf7f1 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:38:09 +0300 Subject: [PATCH 12/55] `schemadiff` small internal refactor: formalizing column charset/collation (#16239) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/schemadiff/column.go | 163 ++++++++++++++++--------------------- go/vt/schemadiff/table.go | 15 +++- 2 files changed, 82 insertions(+), 96 deletions(-) diff --git a/go/vt/schemadiff/column.go b/go/vt/schemadiff/column.go index da2145f3ab0..7e55192cb06 100644 --- a/go/vt/schemadiff/column.go +++ b/go/vt/schemadiff/column.go @@ -71,11 +71,66 @@ func NewModifyColumnDiffByDefinition(definition *sqlparser.ColumnDefinition) *Mo } type ColumnDefinitionEntity struct { - columnDefinition *sqlparser.ColumnDefinition + columnDefinition *sqlparser.ColumnDefinition + tableCharsetCollate *charsetCollate + Env *Environment } -func NewColumnDefinitionEntity(c *sqlparser.ColumnDefinition) *ColumnDefinitionEntity { - return &ColumnDefinitionEntity{columnDefinition: c} +func NewColumnDefinitionEntity(env *Environment, c *sqlparser.ColumnDefinition, tableCharsetCollate *charsetCollate) *ColumnDefinitionEntity { + return &ColumnDefinitionEntity{ + columnDefinition: c, + tableCharsetCollate: tableCharsetCollate, + Env: env, + } +} + +func (c *ColumnDefinitionEntity) Clone() *ColumnDefinitionEntity { + clone := &ColumnDefinitionEntity{ + columnDefinition: sqlparser.Clone(c.columnDefinition), + tableCharsetCollate: c.tableCharsetCollate, + Env: c.Env, + } + return clone +} + +// SetExplicitCharsetCollate enriches this column definition with collation and charset. Those may be +// already present, or perhaps just one of them is present (in which case we use the one to populate the other), +// or both might be missing, in which case we use the table's charset/collation. +func (c *ColumnDefinitionEntity) SetExplicitCharsetCollate() error { + if !c.IsTextual() { + return nil + } + // We will now denormalize the columns charset & collate as needed (if empty, populate from table.) + // Normalizing _this_ column definition: + if c.columnDefinition.Type.Charset.Name != "" && c.columnDefinition.Type.Options.Collate == "" { + // Charset defined without collation. Assign the default collation for that charset. + collation := c.Env.CollationEnv().DefaultCollationForCharset(c.columnDefinition.Type.Charset.Name) + if collation == collations.Unknown { + return &UnknownColumnCharsetCollationError{Column: c.columnDefinition.Name.String(), Charset: c.tableCharsetCollate.charset} + } + c.columnDefinition.Type.Options.Collate = c.Env.CollationEnv().LookupName(collation) + } + if c.columnDefinition.Type.Charset.Name == "" && c.columnDefinition.Type.Options.Collate != "" { + // Column has explicit collation but no charset. We can infer the charset from the collation. + collationID := c.Env.CollationEnv().LookupByName(c.columnDefinition.Type.Options.Collate) + charset := c.Env.CollationEnv().LookupCharsetName(collationID) + if charset == "" { + return &UnknownColumnCollationCharsetError{Column: c.columnDefinition.Name.String(), Collation: c.columnDefinition.Type.Options.Collate} + } + c.columnDefinition.Type.Charset.Name = charset + } + if c.columnDefinition.Type.Charset.Name == "" { + // Still nothing? Assign the table's charset/collation. + c.columnDefinition.Type.Charset.Name = c.tableCharsetCollate.charset + if c.columnDefinition.Type.Options.Collate = c.tableCharsetCollate.collate; c.columnDefinition.Type.Options.Collate == "" { + collation := c.Env.CollationEnv().DefaultCollationForCharset(c.tableCharsetCollate.charset) + if collation == collations.Unknown { + return &UnknownColumnCharsetCollationError{Column: c.columnDefinition.Name.String(), Charset: c.tableCharsetCollate.charset} + } + c.columnDefinition.Type.Options.Collate = c.Env.CollationEnv().LookupName(collation) + } + } + return nil } // ColumnDiff compares this table statement with another table statement, and sees what it takes to @@ -98,100 +153,22 @@ func (c *ColumnDefinitionEntity) ColumnDiff( env *Environment, tableName string, other *ColumnDefinitionEntity, - t1cc *charsetCollate, - t2cc *charsetCollate, hints *DiffHints, ) (*ModifyColumnDiff, error) { + cClone := c // not real clone yet + otherClone := other // not real clone yet if c.IsTextual() || other.IsTextual() { - // We will now denormalize the columns charset & collate as needed (if empty, populate from table.) - // Normalizing _this_ column definition: - if c.columnDefinition.Type.Charset.Name != "" && c.columnDefinition.Type.Options.Collate == "" { - // Charset defined without collation. Assign the default collation for that charset. - collation := env.CollationEnv().DefaultCollationForCharset(c.columnDefinition.Type.Charset.Name) - if collation == collations.Unknown { - return nil, &UnknownColumnCharsetCollationError{Column: c.columnDefinition.Name.String(), Charset: t1cc.charset} - } - defer func() { - c.columnDefinition.Type.Options.Collate = "" - }() - c.columnDefinition.Type.Options.Collate = env.CollationEnv().LookupName(collation) - } - if c.columnDefinition.Type.Charset.Name == "" && c.columnDefinition.Type.Options.Collate != "" { - // Column has explicit collation but no charset. We can infer the charset from the collation. - collationID := env.CollationEnv().LookupByName(c.columnDefinition.Type.Options.Collate) - charset := env.CollationEnv().LookupCharsetName(collationID) - if charset == "" { - return nil, &UnknownColumnCollationCharsetError{Column: c.columnDefinition.Name.String(), Collation: c.columnDefinition.Type.Options.Collate} - } - defer func() { - c.columnDefinition.Type.Charset.Name = "" - }() - c.columnDefinition.Type.Charset.Name = charset - } - if c.columnDefinition.Type.Charset.Name == "" { - // Still nothing? Assign the table's charset/collation. - defer func() { - c.columnDefinition.Type.Charset.Name = "" - c.columnDefinition.Type.Options.Collate = "" - }() - c.columnDefinition.Type.Charset.Name = t1cc.charset - if c.columnDefinition.Type.Options.Collate == "" { - defer func() { - c.columnDefinition.Type.Options.Collate = "" - }() - c.columnDefinition.Type.Options.Collate = t1cc.collate - } - if c.columnDefinition.Type.Options.Collate = t1cc.collate; c.columnDefinition.Type.Options.Collate == "" { - collation := env.CollationEnv().DefaultCollationForCharset(t1cc.charset) - if collation == collations.Unknown { - return nil, &UnknownColumnCharsetCollationError{Column: c.columnDefinition.Name.String(), Charset: t1cc.charset} - } - c.columnDefinition.Type.Options.Collate = env.CollationEnv().LookupName(collation) - } + cClone = c.Clone() + if err := cClone.SetExplicitCharsetCollate(); err != nil { + return nil, err } - // Normalizing _the other_ column definition: - if other.columnDefinition.Type.Charset.Name != "" && other.columnDefinition.Type.Options.Collate == "" { - // Charset defined without collation. Assign the default collation for that charset. - collation := env.CollationEnv().DefaultCollationForCharset(other.columnDefinition.Type.Charset.Name) - if collation == collations.Unknown { - return nil, &UnknownColumnCharsetCollationError{Column: other.columnDefinition.Name.String(), Charset: t2cc.charset} - } - defer func() { - other.columnDefinition.Type.Options.Collate = "" - }() - other.columnDefinition.Type.Options.Collate = env.CollationEnv().LookupName(collation) - } - if other.columnDefinition.Type.Charset.Name == "" && other.columnDefinition.Type.Options.Collate != "" { - // Column has explicit collation but no charset. We can infer the charset from the collation. - collationID := env.CollationEnv().LookupByName(other.columnDefinition.Type.Options.Collate) - charset := env.CollationEnv().LookupCharsetName(collationID) - if charset == "" { - return nil, &UnknownColumnCollationCharsetError{Column: other.columnDefinition.Name.String(), Collation: other.columnDefinition.Type.Options.Collate} - } - defer func() { - other.columnDefinition.Type.Charset.Name = "" - }() - other.columnDefinition.Type.Charset.Name = charset - } - - if other.columnDefinition.Type.Charset.Name == "" { - // Still nothing? Assign the table's charset/collation. - defer func() { - other.columnDefinition.Type.Charset.Name = "" - other.columnDefinition.Type.Options.Collate = "" - }() - other.columnDefinition.Type.Charset.Name = t2cc.charset - if other.columnDefinition.Type.Options.Collate = t2cc.collate; other.columnDefinition.Type.Options.Collate == "" { - collation := env.CollationEnv().DefaultCollationForCharset(t2cc.charset) - if collation == collations.Unknown { - return nil, &UnknownColumnCharsetCollationError{Column: other.columnDefinition.Name.String(), Charset: t2cc.charset} - } - other.columnDefinition.Type.Options.Collate = env.CollationEnv().LookupName(collation) - } + otherClone = other.Clone() + if err := otherClone.SetExplicitCharsetCollate(); err != nil { + return nil, err } } - if sqlparser.Equals.RefOfColumnDefinition(c.columnDefinition, other.columnDefinition) { + if sqlparser.Equals.RefOfColumnDefinition(cClone.columnDefinition, otherClone.columnDefinition) { return nil, nil } @@ -204,11 +181,11 @@ func (c *ColumnDefinitionEntity) ColumnDiff( } switch hints.EnumReorderStrategy { case EnumReorderStrategyReject: - otherEnumValuesMap := getEnumValuesMap(other.columnDefinition.Type.EnumValues) - for ordinal, enumValue := range c.columnDefinition.Type.EnumValues { + otherEnumValuesMap := getEnumValuesMap(otherClone.columnDefinition.Type.EnumValues) + for ordinal, enumValue := range cClone.columnDefinition.Type.EnumValues { if otherOrdinal, ok := otherEnumValuesMap[enumValue]; ok { if ordinal != otherOrdinal { - return nil, &EnumValueOrdinalChangedError{Table: tableName, Column: c.columnDefinition.Name.String(), Value: enumValue, Ordinal: ordinal, NewOrdinal: otherOrdinal} + return nil, &EnumValueOrdinalChangedError{Table: tableName, Column: cClone.columnDefinition.Name.String(), Value: enumValue, Ordinal: ordinal, NewOrdinal: otherOrdinal} } } } diff --git a/go/vt/schemadiff/table.go b/go/vt/schemadiff/table.go index 5d21d524704..5629210b6c1 100644 --- a/go/vt/schemadiff/table.go +++ b/go/vt/schemadiff/table.go @@ -454,6 +454,15 @@ func NewCreateTableEntity(env *Environment, c *sqlparser.CreateTable) (*CreateTa return entity, nil } +func (c *CreateTableEntity) ColumnDefinitionEntities() []*ColumnDefinitionEntity { + cc := getTableCharsetCollate(c.Env, &c.CreateTable.TableSpec.Options) + entities := make([]*ColumnDefinitionEntity, len(c.CreateTable.TableSpec.Columns)) + for i := range c.CreateTable.TableSpec.Columns { + entities[i] = NewColumnDefinitionEntity(c.Env, c.CreateTable.TableSpec.Columns[i], cc) + } + return entities +} + // normalize cleans up the table definition: // - setting names to all keys // - table option case (upper/lower/special) @@ -1731,11 +1740,11 @@ func (c *CreateTableEntity) diffColumns(alterTable *sqlparser.AlterTable, t2ColName := t2Col.Name.Lowered() // we know that column exists in both tables t1Col := t1ColumnsMap[t2ColName] - t1ColEntity := NewColumnDefinitionEntity(t1Col.col) - t2ColEntity := NewColumnDefinitionEntity(t2Col) + t1ColEntity := NewColumnDefinitionEntity(c.Env, t1Col.col, t1cc) + t2ColEntity := NewColumnDefinitionEntity(c.Env, t2Col, t2cc) // check diff between before/after columns: - modifyColumnDiff, err := t1ColEntity.ColumnDiff(c.Env, c.Name(), t2ColEntity, t1cc, t2cc, hints) + modifyColumnDiff, err := t1ColEntity.ColumnDiff(c.Env, c.Name(), t2ColEntity, hints) if err != nil { return err } From 05728fe9190df75eade5a7a93b03be9b9f1dad79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Thu, 4 Jul 2024 12:37:50 +0200 Subject: [PATCH 13/55] make sure to add weight_string for the right expression (#16325) Signed-off-by: Andres Taylor --- .../operators/aggregation_pushing.go | 1 + .../planbuilder/operators/aggregator.go | 12 +++++-- .../planbuilder/operators/queryprojection.go | 2 ++ .../planbuilder/testdata/aggr_cases.json | 34 +++++++++---------- .../planbuilder/testdata/cte_cases.json | 4 +-- .../planbuilder/testdata/select_cases.json | 4 +-- .../planbuilder/testdata/tpch_cases.json | 4 +-- 7 files changed, 36 insertions(+), 25 deletions(-) diff --git a/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go b/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go index 715e27ae9c7..ca896587a29 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go +++ b/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go @@ -177,6 +177,7 @@ func pushAggregations(ctx *plancontext.PlanningContext, aggregator *Aggregator, if !aggr.Distinct || canPushDistinctAggr { aggrBelowRoute.Aggregations = append(aggrBelowRoute.Aggregations, aggr) aggregateTheAggregate(aggregator, i) + aggregator.Aggregations[i].PushedDown = true continue } diff --git a/go/vt/vtgate/planbuilder/operators/aggregator.go b/go/vt/vtgate/planbuilder/operators/aggregator.go index 40ba20fe02d..4a619b2e831 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregator.go +++ b/go/vt/vtgate/planbuilder/operators/aggregator.go @@ -391,8 +391,16 @@ func (a *Aggregator) planOffsets(ctx *plancontext.PlanningContext) Operator { if !aggr.NeedsWeightString(ctx) { continue } - arg := aggr.getPushColumn() - offset := a.internalAddColumn(ctx, aeWrap(weightStringFor(arg)), true) + var offset int + if aggr.PushedDown { + // if we have already pushed down aggregation, we need to use + // the weight string of the aggregation and not the argument + offset = a.internalAddColumn(ctx, aeWrap(weightStringFor(aggr.Func)), false) + } else { + // If we have not pushed down the aggregation, we need the weight_string of the argument + arg := aggr.getPushColumn() + offset = a.internalAddColumn(ctx, aeWrap(weightStringFor(arg)), true) + } a.Aggregations[idx].WSOffset = offset } return nil diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index 352a5ffc7a7..2290927aef1 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -84,6 +84,8 @@ type ( WSOffset int // Offset for the weight string of the column SubQueryExpression []*SubQuery // Subqueries associated with this aggregation + + PushedDown bool // Whether the aggregation has been pushed down to the next layer } ) diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index 6942464665c..1ec5be4d49e 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -667,9 +667,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select col1, min(col2) as `min(distinct col2)`, weight_string(col1), weight_string(col2) from `user` where 1 != 1 group by col1, weight_string(col1), weight_string(col2)", + "FieldQuery": "select col1, min(col2) as `min(distinct col2)`, weight_string(col1), weight_string(min(col2)) from `user` where 1 != 1 group by col1, weight_string(col1)", "OrderBy": "(0|2) ASC", - "Query": "select col1, min(col2) as `min(distinct col2)`, weight_string(col1), weight_string(col2) from `user` group by col1, weight_string(col1), weight_string(col2) order by col1 asc", + "Query": "select col1, min(col2) as `min(distinct col2)`, weight_string(col1), weight_string(min(col2)) from `user` group by col1, weight_string(col1) order by col1 asc", "Table": "`user`" } ] @@ -2605,9 +2605,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select col1, min(id) as `min(distinct id)`, col3, weight_string(col1), weight_string(id), weight_string(col3) from `user` where 1 != 1 group by col1, col3, weight_string(col1), weight_string(id), weight_string(col3)", + "FieldQuery": "select col1, min(id) as `min(distinct id)`, col3, weight_string(col1), weight_string(min(id)), weight_string(col3) from `user` where 1 != 1 group by col1, col3, weight_string(col1), weight_string(col3)", "OrderBy": "(0|3) ASC, (2|5) ASC", - "Query": "select col1, min(id) as `min(distinct id)`, col3, weight_string(col1), weight_string(id), weight_string(col3) from `user` group by col1, col3, weight_string(col1), weight_string(id), weight_string(col3) order by col1 asc, col3 asc", + "Query": "select col1, min(id) as `min(distinct id)`, col3, weight_string(col1), weight_string(min(id)), weight_string(col3) from `user` group by col1, col3, weight_string(col1), weight_string(col3) order by col1 asc, col3 asc", "Table": "`user`" } ] @@ -4023,9 +4023,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select foo, max(baz) as bazo, weight_string(foo), weight_string(baz) from (select foo, baz from `user` where 1 != 1) as f where 1 != 1 group by foo, weight_string(foo), weight_string(baz)", + "FieldQuery": "select foo, max(baz) as bazo, weight_string(foo), weight_string(max(baz)) from (select foo, baz from `user` where 1 != 1) as f where 1 != 1 group by foo, weight_string(foo)", "OrderBy": "(0|2) ASC", - "Query": "select foo, max(baz) as bazo, weight_string(foo), weight_string(baz) from (select foo, baz from `user`) as f group by foo, weight_string(foo), weight_string(baz) order by foo asc", + "Query": "select foo, max(baz) as bazo, weight_string(foo), weight_string(max(baz)) from (select foo, baz from `user`) as f group by foo, weight_string(foo) order by foo asc", "Table": "`user`" } ] @@ -4949,9 +4949,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select min(textcol1), max(textcol2), textcol1, textcol1, weight_string(textcol2) from `user` where 1 != 1 group by textcol1, weight_string(textcol2)", + "FieldQuery": "select min(textcol1), max(textcol2), textcol1, textcol1, weight_string(max(textcol2)) from `user` where 1 != 1 group by textcol1", "OrderBy": "2 ASC COLLATE latin1_swedish_ci", - "Query": "select min(textcol1), max(textcol2), textcol1, textcol1, weight_string(textcol2) from `user` group by textcol1, weight_string(textcol2) order by textcol1 asc", + "Query": "select min(textcol1), max(textcol2), textcol1, textcol1, weight_string(max(textcol2)) from `user` group by textcol1 order by textcol1 asc", "Table": "`user`" } ] @@ -4981,9 +4981,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select col, min(textcol1), max(textcol2), textcol1, textcol1, weight_string(textcol2) from `user` where 1 != 1 group by col, textcol1, weight_string(textcol2)", + "FieldQuery": "select col, min(textcol1), max(textcol2), textcol1, textcol1, weight_string(max(textcol2)) from `user` where 1 != 1 group by col, textcol1", "OrderBy": "0 ASC, 3 ASC COLLATE latin1_swedish_ci", - "Query": "select col, min(textcol1), max(textcol2), textcol1, textcol1, weight_string(textcol2) from `user` group by col, textcol1, weight_string(textcol2) order by col asc, textcol1 asc", + "Query": "select col, min(textcol1), max(textcol2), textcol1, textcol1, weight_string(max(textcol2)) from `user` group by col, textcol1 order by col asc, textcol1 asc", "Table": "`user`" } ] @@ -5868,9 +5868,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select foo, min(bar) as `min(distinct bar)`, baz, baz, max(toto) as `max(distinct toto)`, weight_string(foo), weight_string(bar), weight_string(baz), weight_string(toto) from `user` where 1 != 1 group by foo, baz, weight_string(foo), weight_string(bar), weight_string(baz), weight_string(toto)", + "FieldQuery": "select foo, min(bar) as `min(distinct bar)`, baz, baz, max(toto) as `max(distinct toto)`, weight_string(foo), weight_string(min(bar)), weight_string(baz), weight_string(max(toto)) from `user` where 1 != 1 group by foo, baz, weight_string(foo), weight_string(baz)", "OrderBy": "(0|5) ASC, (2|7) ASC", - "Query": "select foo, min(bar) as `min(distinct bar)`, baz, baz, max(toto) as `max(distinct toto)`, weight_string(foo), weight_string(bar), weight_string(baz), weight_string(toto) from `user` group by foo, baz, weight_string(foo), weight_string(bar), weight_string(baz), weight_string(toto) order by foo asc, baz asc", + "Query": "select foo, min(bar) as `min(distinct bar)`, baz, baz, max(toto) as `max(distinct toto)`, weight_string(foo), weight_string(min(bar)), weight_string(baz), weight_string(max(toto)) from `user` group by foo, baz, weight_string(foo), weight_string(baz) order by foo asc, baz asc", "Table": "`user`" } ] @@ -6424,7 +6424,7 @@ { "OperatorType": "Aggregate", "Variant": "Scalar", - "Aggregates": "min(0|2) AS min_id, max(1|2) AS max_id", + "Aggregates": "min(0|2) AS min_id, max(1|3) AS max_id", "ResultColumns": 2, "Inputs": [ { @@ -6434,9 +6434,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select min(bb.id) as min_id, max(bb.id) as max_id, weight_string(bb.id) from `user` as bb where 1 != 1 group by weight_string(bb.id)", + "FieldQuery": "select min(bb.id) as min_id, max(bb.id) as max_id, weight_string(min(bb.id)), weight_string(max(bb.id)) from `user` as bb where 1 != 1", "OrderBy": "0 ASC COLLATE utf8mb4_0900_ai_ci", - "Query": "select min(bb.id) as min_id, max(bb.id) as max_id, weight_string(bb.id) from `user` as bb group by weight_string(bb.id) order by min(bb.id) asc", + "Query": "select min(bb.id) as min_id, max(bb.id) as max_id, weight_string(min(bb.id)), weight_string(max(bb.id)) from `user` as bb order by min(bb.id) asc", "Table": "`user`" } ] @@ -6909,8 +6909,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select max((select max(col2) from `user` as u1 where 1 != 1)), weight_string((select max(col2) from `user` as u1 where 1 != 1)) from `user` as u2 where 1 != 1 group by weight_string((select max(col2) from `user` as u1 where 1 != 1))", - "Query": "select max((select max(col2) from `user` as u1 where u1.id = u2.id)), weight_string((select max(col2) from `user` as u1 where u1.id = u2.id)) from `user` as u2 group by weight_string((select max(col2) from `user` as u1 where u1.id = u2.id))", + "FieldQuery": "select max((select max(col2) from `user` as u1 where 1 != 1)), weight_string(max((select max(col2) from `user` as u1 where 1 != 1))) from `user` as u2 where 1 != 1", + "Query": "select max((select max(col2) from `user` as u1 where u1.id = u2.id)), weight_string(max((select max(col2) from `user` as u1 where u1.id = u2.id))) from `user` as u2", "Table": "`user`" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/cte_cases.json b/go/vt/vtgate/planbuilder/testdata/cte_cases.json index 4a69fd85fad..7b54bcb5a4a 100644 --- a/go/vt/vtgate/planbuilder/testdata/cte_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/cte_cases.json @@ -488,9 +488,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select foo, max(baz) as bazo, weight_string(foo), weight_string(baz) from (select foo, baz from `user` where 1 != 1) as f where 1 != 1 group by foo, weight_string(foo), weight_string(baz)", + "FieldQuery": "select foo, max(baz) as bazo, weight_string(foo), weight_string(max(baz)) from (select foo, baz from `user` where 1 != 1) as f where 1 != 1 group by foo, weight_string(foo)", "OrderBy": "(0|2) ASC", - "Query": "select foo, max(baz) as bazo, weight_string(foo), weight_string(baz) from (select foo, baz from `user`) as f group by foo, weight_string(foo), weight_string(baz) order by foo asc", + "Query": "select foo, max(baz) as bazo, weight_string(foo), weight_string(max(baz)) from (select foo, baz from `user`) as f group by foo, weight_string(foo) order by foo asc", "Table": "`user`" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/select_cases.json b/go/vt/vtgate/planbuilder/testdata/select_cases.json index 51aae618daf..98d0f9d0cbd 100644 --- a/go/vt/vtgate/planbuilder/testdata/select_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/select_cases.json @@ -4350,8 +4350,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select max(music.id), weight_string(music.id) from music where 1 != 1 group by weight_string(music.id)", - "Query": "select max(music.id), weight_string(music.id) from music where music.user_id in ::__vals group by weight_string(music.id)", + "FieldQuery": "select max(music.id), weight_string(max(music.id)) from music where 1 != 1", + "Query": "select max(music.id), weight_string(max(music.id)) from music where music.user_id in ::__vals", "Table": "music", "Values": [ "(5, 6)" diff --git a/go/vt/vtgate/planbuilder/testdata/tpch_cases.json b/go/vt/vtgate/planbuilder/testdata/tpch_cases.json index 610a0ba1c23..559674ea8fc 100644 --- a/go/vt/vtgate/planbuilder/testdata/tpch_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/tpch_cases.json @@ -1908,8 +1908,8 @@ "Name": "main", "Sharded": true }, - "FieldQuery": "select max(total_revenue), weight_string(total_revenue) from revenue0 where 1 != 1 group by weight_string(total_revenue)", - "Query": "select max(total_revenue), weight_string(total_revenue) from revenue0 group by weight_string(total_revenue)", + "FieldQuery": "select max(total_revenue), weight_string(max(total_revenue)) from revenue0 where 1 != 1", + "Query": "select max(total_revenue), weight_string(max(total_revenue)) from revenue0", "Table": "revenue0" } ] From 694a0cf8d9e51aa4b130ad1656c4009427eb0e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Thu, 4 Jul 2024 14:30:54 +0200 Subject: [PATCH 14/55] Prevent Early Ordering Pushdown to Enable Aggregation Pushdown to MySQL (#16278) Signed-off-by: Andres Taylor --- .../queries/benchmark/benchmark_test.go | 51 + .../queries/benchmark/sharded_schema.sql | 37 +- .../vtgate/queries/benchmark/vschema.json | 16 + .../planbuilder/operator_transformers.go | 7 +- .../planbuilder/operators/SQL_builder.go | 2 +- .../operators/aggregation_pushing.go | 2 +- .../planbuilder/operators/aggregator.go | 2 +- .../planbuilder/operators/apply_join.go | 75 +- go/vt/vtgate/planbuilder/operators/horizon.go | 2 +- .../planbuilder/operators/offset_planning.go | 81 +- .../operators/projection_pushing.go | 10 +- .../planbuilder/operators/query_planning.go | 27 +- .../planbuilder/operators/queryprojection.go | 54 +- .../vtgate/planbuilder/operators/rewriters.go | 1 + .../operators/subquery_planning.go | 4 +- .../plancontext/planning_context.go | 37 + go/vt/vtgate/planbuilder/rewrite.go | 3 +- .../planbuilder/testdata/aggr_cases.json | 97 +- .../testdata/postprocess_cases.json | 4 +- .../planbuilder/testdata/tpch_cases.json | 1158 ++++++++++------- 20 files changed, 1008 insertions(+), 662 deletions(-) diff --git a/go/test/endtoend/vtgate/queries/benchmark/benchmark_test.go b/go/test/endtoend/vtgate/queries/benchmark/benchmark_test.go index 9a064c1769a..b76ae5a35c7 100644 --- a/go/test/endtoend/vtgate/queries/benchmark/benchmark_test.go +++ b/go/test/endtoend/vtgate/queries/benchmark/benchmark_test.go @@ -32,6 +32,35 @@ type testQuery struct { intTyp []bool } +var deleteUser, deleteUserExtra = "delete from user", "delete from user_extra" + +func generateInserts(userSize int, userExtraSize int) (string, string) { + var userInserts []string + var userExtraInserts []string + + // Generate user table inserts + for i := 1; i <= userSize; i++ { + id := i + notShardingKey := i + typeValue := i % 5 // Just an example for type values + teamID := i%userExtraSize + 1 // To ensure team_id references user_extra id + userInserts = append(userInserts, fmt.Sprintf("(%d, %d, %d, %d)", id, notShardingKey, typeValue, teamID)) + } + + // Generate user_extra table inserts + for i := 1; i <= userExtraSize; i++ { + id := i + notShardingKey := i + colValue := fmt.Sprintf("col_value_%d", i) + userExtraInserts = append(userExtraInserts, fmt.Sprintf("(%d, %d, '%s')", id, notShardingKey, colValue)) + } + + userInsertStatement := fmt.Sprintf("INSERT INTO user (id, not_sharding_key, type, team_id) VALUES %s;", strings.Join(userInserts, ", ")) + userExtraInsertStatement := fmt.Sprintf("INSERT INTO user_extra (id, not_sharding_key, col) VALUES %s;", strings.Join(userExtraInserts, ", ")) + + return userInsertStatement, userExtraInsertStatement +} + func (tq *testQuery) getInsertQuery(rows int) string { var allRows []string for i := 0; i < rows; i++ { @@ -146,3 +175,25 @@ func BenchmarkShardedTblDeleteIn(b *testing.B) { }) } } + +func BenchmarkShardedAggrPushDown(b *testing.B) { + conn, closer := start(b) + defer closer() + + sizes := []int{100, 500, 1000} + + for _, user := range sizes { + for _, userExtra := range sizes { + insert1, insert2 := generateInserts(user, userExtra) + _ = utils.Exec(b, conn, insert1) + _ = utils.Exec(b, conn, insert2) + b.Run(fmt.Sprintf("user-%d-user_extra-%d", user, userExtra), func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = utils.Exec(b, conn, "select sum(user.type) from user join user_extra on user.team_id = user_extra.id group by user_extra.id order by user_extra.id") + } + }) + _ = utils.Exec(b, conn, deleteUser) + _ = utils.Exec(b, conn, deleteUserExtra) + } + } +} diff --git a/go/test/endtoend/vtgate/queries/benchmark/sharded_schema.sql b/go/test/endtoend/vtgate/queries/benchmark/sharded_schema.sql index 850b6ffc15a..92f63c40f0f 100644 --- a/go/test/endtoend/vtgate/queries/benchmark/sharded_schema.sql +++ b/go/test/endtoend/vtgate/queries/benchmark/sharded_schema.sql @@ -1,16 +1,33 @@ create table tbl_no_lkp_vdx ( id bigint, - c1 varchar(50), - c2 varchar(50), - c3 varchar(50), - c4 varchar(50), - c5 varchar(50), - c6 varchar(50), - c7 varchar(50), - c8 varchar(50), - c9 varchar(50), + c1 varchar(50), + c2 varchar(50), + c3 varchar(50), + c4 varchar(50), + c5 varchar(50), + c6 varchar(50), + c7 varchar(50), + c8 varchar(50), + c9 varchar(50), c10 varchar(50), c11 varchar(50), c12 varchar(50) -) Engine = InnoDB; \ No newline at end of file +) Engine = InnoDB; + +create table user +( + id bigint, + not_sharding_key bigint, + type int, + team_id int, + primary key (id) +); + +create table user_extra +( + id bigint, + not_sharding_key bigint, + col varchar(50), + primary key (id) +); \ No newline at end of file diff --git a/go/test/endtoend/vtgate/queries/benchmark/vschema.json b/go/test/endtoend/vtgate/queries/benchmark/vschema.json index 4970e8b7437..efc854af8ff 100644 --- a/go/test/endtoend/vtgate/queries/benchmark/vschema.json +++ b/go/test/endtoend/vtgate/queries/benchmark/vschema.json @@ -13,6 +13,22 @@ "name": "xxhash" } ] + }, + "user": { + "column_vindexes": [ + { + "column": "id", + "name": "xxhash" + } + ] + }, + "user_extra": { + "column_vindexes": [ + { + "column": "id", + "name": "xxhash" + } + ] } } } \ No newline at end of file diff --git a/go/vt/vtgate/planbuilder/operator_transformers.go b/go/vt/vtgate/planbuilder/operator_transformers.go index da3f7348afd..546a9854f26 100644 --- a/go/vt/vtgate/planbuilder/operator_transformers.go +++ b/go/vt/vtgate/planbuilder/operator_transformers.go @@ -304,9 +304,14 @@ func transformAggregator(ctx *plancontext.PlanningContext, op *operators.Aggrega var groupByKeys []*engine.GroupByParams for _, aggr := range op.Aggregations { - if aggr.OpCode == opcode.AggregateUnassigned { + switch aggr.OpCode { + case opcode.AggregateUnassigned: return nil, vterrors.VT12001(fmt.Sprintf("in scatter query: aggregation function '%s'", sqlparser.String(aggr.Original))) + case opcode.AggregateUDF: + message := fmt.Sprintf("Aggregate UDF '%s' must be pushed down to MySQL", sqlparser.String(aggr.Original.Expr)) + return nil, vterrors.VT12001(message) } + aggrParam := engine.NewAggregateParam(aggr.OpCode, aggr.ColOffset, aggr.Alias, ctx.VSchema.Environment().CollationEnv()) aggrParam.Func = aggr.Func if gcFunc, isGc := aggrParam.Func.(*sqlparser.GroupConcatExpr); isGc && gcFunc.Separator == "" { diff --git a/go/vt/vtgate/planbuilder/operators/SQL_builder.go b/go/vt/vtgate/planbuilder/operators/SQL_builder.go index 0a2e545ea48..fef4ae2aee4 100644 --- a/go/vt/vtgate/planbuilder/operators/SQL_builder.go +++ b/go/vt/vtgate/planbuilder/operators/SQL_builder.go @@ -96,7 +96,7 @@ func (qb *queryBuilder) addPredicate(expr sqlparser.Expr) { switch stmt := qb.stmt.(type) { case *sqlparser.Select: - if ContainsAggr(qb.ctx, expr) { + if qb.ctx.ContainsAggr(expr) { addPred = stmt.AddHaving } else { addPred = stmt.AddWhere diff --git a/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go b/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go index ca896587a29..671f4b78954 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go +++ b/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go @@ -370,7 +370,6 @@ func pushAggregationThroughApplyJoin(ctx *plancontext.PlanningContext, rootAggr columns := &applyJoinColumns{} output, err := splitAggrColumnsToLeftAndRight(ctx, rootAggr, join, !join.JoinType.IsInner(), columns, lhs, rhs) - join.JoinColumns = columns if err != nil { // if we get this error, we just abort the splitting and fall back on simpler ways of solving the same query if errors.Is(err, errAbortAggrPushing) { @@ -378,6 +377,7 @@ func pushAggregationThroughApplyJoin(ctx *plancontext.PlanningContext, rootAggr } panic(err) } + join.JoinColumns = columns splitGroupingToLeftAndRight(ctx, rootAggr, lhs, rhs, join.JoinColumns) diff --git a/go/vt/vtgate/planbuilder/operators/aggregator.go b/go/vt/vtgate/planbuilder/operators/aggregator.go index 4a619b2e831..9db119bcaad 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregator.go +++ b/go/vt/vtgate/planbuilder/operators/aggregator.go @@ -101,7 +101,7 @@ func (a *Aggregator) addColumnWithoutPushing(ctx *plancontext.PlanningContext, e case sqlparser.AggrFunc: aggr = createAggrFromAggrFunc(e, expr) case *sqlparser.FuncExpr: - if IsAggr(ctx, e) { + if ctx.IsAggr(e) { aggr = NewAggr(opcode.AggregateUDF, nil, expr, expr.As.String()) } else { aggr = NewAggr(opcode.AggregateAnyValue, nil, expr, expr.As.String()) diff --git a/go/vt/vtgate/planbuilder/operators/apply_join.go b/go/vt/vtgate/planbuilder/operators/apply_join.go index 0d214c545d1..cd8f7b94dd5 100644 --- a/go/vt/vtgate/planbuilder/operators/apply_join.go +++ b/go/vt/vtgate/planbuilder/operators/apply_join.go @@ -202,19 +202,11 @@ func (aj *ApplyJoin) GetOrdering(ctx *plancontext.PlanningContext) []OrderBy { return aj.LHS.GetOrdering(ctx) } -func joinColumnToExpr(column applyJoinColumn) sqlparser.Expr { - return column.Original -} - func (aj *ApplyJoin) getJoinColumnFor(ctx *plancontext.PlanningContext, orig *sqlparser.AliasedExpr, e sqlparser.Expr, addToGroupBy bool) (col applyJoinColumn) { - defer func() { - col.Original = orig.Expr - }() lhs := TableID(aj.LHS) rhs := TableID(aj.RHS) both := lhs.Merge(rhs) deps := ctx.SemTable.RecursiveDeps(e) - col.GroupBy = addToGroupBy switch { case deps.IsSolvedBy(lhs): @@ -224,9 +216,12 @@ func (aj *ApplyJoin) getJoinColumnFor(ctx *plancontext.PlanningContext, orig *sq case deps.IsSolvedBy(both): col = breakExpressionInLHSandRHS(ctx, e, TableID(aj.LHS)) default: - panic(vterrors.VT13002(sqlparser.String(e))) + panic(vterrors.VT13001(fmt.Sprintf("expression depends on tables outside this join: %s", sqlparser.String(e)))) } + col.GroupBy = addToGroupBy + col.Original = orig.Expr + return } @@ -289,7 +284,7 @@ func (aj *ApplyJoin) AddWSColumn(ctx *plancontext.PlanningContext, offset int, u if out >= 0 { aj.addOffset(out) } else { - col := aj.getJoinColumnFor(ctx, aeWrap(wsExpr), wsExpr, !ContainsAggr(ctx, wsExpr)) + col := aj.getJoinColumnFor(ctx, aeWrap(wsExpr), wsExpr, !ctx.ContainsAggr(wsExpr)) aj.JoinColumns.add(col) aj.planOffsetFor(ctx, col) } @@ -323,33 +318,15 @@ func (aj *ApplyJoin) planOffsets(ctx *plancontext.PlanningContext) Operator { } func (aj *ApplyJoin) planOffsetFor(ctx *plancontext.PlanningContext, col applyJoinColumn) { - if col.DTColName != nil { - // If DTColName is set, then we already pushed the parts of the expression down while planning. - // We need to use this name and ask the correct side of the join for it. Nothing else is required. - if col.IsPureLeft() { - offset := aj.LHS.AddColumn(ctx, true, col.GroupBy, aeWrap(col.DTColName)) - aj.addOffset(ToLeftOffset(offset)) - } else { - for _, lhsExpr := range col.LHSExprs { - offset := aj.LHS.AddColumn(ctx, true, col.GroupBy, aeWrap(lhsExpr.Expr)) - aj.Vars[lhsExpr.Name] = offset - } - offset := aj.RHS.AddColumn(ctx, true, col.GroupBy, aeWrap(col.DTColName)) - aj.addOffset(ToRightOffset(offset)) - } - return - } - for _, lhsExpr := range col.LHSExprs { - offset := aj.LHS.AddColumn(ctx, true, col.GroupBy, aeWrap(lhsExpr.Expr)) - if col.RHSExpr == nil { - // if we don't have an RHS expr, it means that this is a pure LHS expression - aj.addOffset(ToLeftOffset(offset)) - } else { + if col.IsPureLeft() { + offset := aj.LHS.AddColumn(ctx, true, col.GroupBy, aeWrap(col.GetPureLeftExpr())) + aj.addOffset(ToLeftOffset(offset)) + } else { + for _, lhsExpr := range col.LHSExprs { + offset := aj.LHS.AddColumn(ctx, true, col.GroupBy, aeWrap(lhsExpr.Expr)) aj.Vars[lhsExpr.Name] = offset } - } - if col.RHSExpr != nil { - offset := aj.RHS.AddColumn(ctx, true, col.GroupBy, aeWrap(col.RHSExpr)) + offset := aj.RHS.AddColumn(ctx, true, col.GroupBy, aeWrap(col.GetRHSExpr())) aj.addOffset(ToRightOffset(offset)) } } @@ -443,17 +420,17 @@ func (aj *ApplyJoin) findOrAddColNameBindVarName(ctx *plancontext.PlanningContex return bvName } -func (a *ApplyJoin) LHSColumnsNeeded(ctx *plancontext.PlanningContext) (needed sqlparser.Exprs) { +func (aj *ApplyJoin) LHSColumnsNeeded(ctx *plancontext.PlanningContext) (needed sqlparser.Exprs) { f := func(from BindVarExpr) sqlparser.Expr { return from.Expr } - for _, jc := range a.JoinColumns.columns { + for _, jc := range aj.JoinColumns.columns { needed = append(needed, slice.Map(jc.LHSExprs, f)...) } - for _, jc := range a.JoinPredicates.columns { + for _, jc := range aj.JoinPredicates.columns { needed = append(needed, slice.Map(jc.LHSExprs, f)...) } - needed = append(needed, slice.Map(a.ExtraLHSVars, f)...) + needed = append(needed, slice.Map(aj.ExtraLHSVars, f)...) return ctx.SemTable.Uniquify(needed) } @@ -462,7 +439,11 @@ func (jc applyJoinColumn) String() string { lhs := slice.Map(jc.LHSExprs, func(e BindVarExpr) string { return sqlparser.String(e.Expr) }) - return fmt.Sprintf("[%s | %s | %s]", strings.Join(lhs, ", "), rhs, sqlparser.String(jc.Original)) + if jc.DTColName == nil { + return fmt.Sprintf("[%s | %s | %s]", strings.Join(lhs, ", "), rhs, sqlparser.String(jc.Original)) + } + + return fmt.Sprintf("[%s | %s | %s | %s]", strings.Join(lhs, ", "), rhs, sqlparser.String(jc.Original), sqlparser.String(jc.DTColName)) } func (jc applyJoinColumn) IsPureLeft() bool { @@ -477,6 +458,20 @@ func (jc applyJoinColumn) IsMixedLeftAndRight() bool { return len(jc.LHSExprs) > 0 && jc.RHSExpr != nil } +func (jc applyJoinColumn) GetPureLeftExpr() sqlparser.Expr { + if jc.DTColName != nil { + return jc.DTColName + } + return jc.LHSExprs[0].Expr +} + +func (jc applyJoinColumn) GetRHSExpr() sqlparser.Expr { + if jc.DTColName != nil { + return jc.DTColName + } + return jc.RHSExpr +} + func (bve BindVarExpr) String() string { if bve.Name == "" { return sqlparser.String(bve.Expr) diff --git a/go/vt/vtgate/planbuilder/operators/horizon.go b/go/vt/vtgate/planbuilder/operators/horizon.go index c28bc2dd5f0..7539704c2a9 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon.go +++ b/go/vt/vtgate/planbuilder/operators/horizon.go @@ -100,7 +100,7 @@ func (h *Horizon) AddPredicate(ctx *plancontext.PlanningContext, expr sqlparser. } newExpr := ctx.RewriteDerivedTableExpression(expr, tableInfo) - if ContainsAggr(ctx, newExpr) { + if ctx.ContainsAggr(newExpr) { return newFilter(h, expr) } h.Source = h.Source.AddPredicate(ctx, newExpr) diff --git a/go/vt/vtgate/planbuilder/operators/offset_planning.go b/go/vt/vtgate/planbuilder/operators/offset_planning.go index eb92cdf0920..7a9cedccb89 100644 --- a/go/vt/vtgate/planbuilder/operators/offset_planning.go +++ b/go/vt/vtgate/planbuilder/operators/offset_planning.go @@ -21,7 +21,6 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/semantics" ) @@ -96,62 +95,68 @@ func useOffsets(ctx *plancontext.PlanningContext, expr sqlparser.Expr, op Operat return rewritten.(sqlparser.Expr) } +func findAggregatorInSource(op Operator) *Aggregator { + // we'll just loop through the inputs until we find the aggregator + for { + aggr, ok := op.(*Aggregator) + if ok { + return aggr + } + inputs := op.Inputs() + if len(inputs) != 1 { + panic(vterrors.VT13001("unexpected multiple inputs")) + } + src := inputs[0] + _, isRoute := src.(*Route) + if isRoute { + panic(vterrors.VT13001("failed to find the aggregator")) + } + op = src + } +} + +// addColumnsToInput adds columns needed by an operator to its input. +// This happens only when the filter expression can be retrieved as an offset from the underlying mysql. func addColumnsToInput(ctx *plancontext.PlanningContext, root Operator) Operator { - // addColumnsToInput adds columns needed by an operator to its input. - // This happens only when the filter expression can be retrieved as an offset from the underlying mysql. + addColumnsNeededByFilter := func(in Operator, _ semantics.TableSet, _ bool) (Operator, *ApplyResult) { + addedCols := false filter, ok := in.(*Filter) if !ok { return in, NoRewrite } - proj, areOnTopOfProj := filter.Source.(selectExpressions) - if !areOnTopOfProj { - // not much we can do here - return in, NoRewrite - } - addedColumns := false - found := func(expr sqlparser.Expr, i int) {} - notFound := func(e sqlparser.Expr) { - _, addToGroupBy := e.(*sqlparser.ColName) - proj.addColumnWithoutPushing(ctx, aeWrap(e), addToGroupBy) - addedColumns = true + var neededAggrs []sqlparser.Expr + extractAggrs := func(cursor *sqlparser.CopyOnWriteCursor) { + node := cursor.Node() + if ctx.IsAggr(node) { + neededAggrs = append(neededAggrs, node.(sqlparser.Expr)) + } } - visitor := getOffsetRewritingVisitor(ctx, proj.FindCol, found, notFound) for _, expr := range filter.Predicates { - _ = sqlparser.CopyOnRewrite(expr, visitor, nil, ctx.SemTable.CopySemanticInfo) - } - if addedColumns { - return in, Rewrote("added columns because filter needs it") + _ = sqlparser.CopyOnRewrite(expr, dontEnterSubqueries, extractAggrs, nil) } - return in, NoRewrite - } - - // while we are out here walking the operator tree, if we find a UDF in an aggregation, we should fail - failUDFAggregation := func(in Operator, _ semantics.TableSet, _ bool) (Operator, *ApplyResult) { - aggrOp, ok := in.(*Aggregator) - if !ok { + if neededAggrs == nil { return in, NoRewrite } - for _, aggr := range aggrOp.Aggregations { - if aggr.OpCode == opcode.AggregateUDF { - // we don't support UDFs in aggregation if it's still above a route - message := fmt.Sprintf("Aggregate UDF '%s' must be pushed down to MySQL", sqlparser.String(aggr.Original.Expr)) - panic(vterrors.VT12001(message)) + + aggregator := findAggregatorInSource(filter.Source) + for _, aggr := range neededAggrs { + if aggregator.FindCol(ctx, aggr, false) == -1 { + aggregator.addColumnWithoutPushing(ctx, aeWrap(aggr), false) + addedCols = true } } - return in, NoRewrite - } - visitor := func(in Operator, _ semantics.TableSet, isRoot bool) (Operator, *ApplyResult) { - out, res := addColumnsNeededByFilter(in, semantics.EmptyTableSet(), isRoot) - failUDFAggregation(in, semantics.EmptyTableSet(), isRoot) - return out, res + if addedCols { + return in, Rewrote("added columns because filter needs it") + } + return in, NoRewrite } - return TopDown(root, TableID, visitor, stopAtRoute) + return TopDown(root, TableID, addColumnsNeededByFilter, stopAtRoute) } // isolateDistinctFromUnion will pull out the distinct from a union operator diff --git a/go/vt/vtgate/planbuilder/operators/projection_pushing.go b/go/vt/vtgate/planbuilder/operators/projection_pushing.go index d1baf6def62..b5c6a10bb78 100644 --- a/go/vt/vtgate/planbuilder/operators/projection_pushing.go +++ b/go/vt/vtgate/planbuilder/operators/projection_pushing.go @@ -284,7 +284,11 @@ func pushProjectionInApplyJoin( src.LHS = createProjectionWithTheseColumns(ctx, src.LHS, lhs, p.DT) src.RHS = createProjectionWithTheseColumns(ctx, src.RHS, rhs, p.DT) - return src, Rewrote("split projection to either side of join") + message := "split projection to either side of join" + if p.DT != nil { + message += " " + p.DT.Alias + } + return src, Rewrote(message) } // splitProjectionAcrossJoin creates JoinPredicates for all projections, @@ -396,14 +400,14 @@ func exposeColumnsThroughDerivedTable(ctx *plancontext.PlanningContext, p *Proje lhsIDs := TableID(src.LHS) rhsIDs := TableID(src.RHS) - rewriteColumnsForJoin(ctx, src.JoinPredicates.columns, lhsIDs, rhsIDs, lhs, rhs) + rewriteColumnsForJoin(ctx, src.JoinPredicates.columns, lhsIDs, rhsIDs, lhs) } func rewriteColumnsForJoin( ctx *plancontext.PlanningContext, columns []applyJoinColumn, lhsIDs, rhsIDs semantics.TableSet, - lhs, rhs *projector, + lhs *projector, ) { for colIdx, column := range columns { for lhsIdx, bve := range column.LHSExprs { diff --git a/go/vt/vtgate/planbuilder/operators/query_planning.go b/go/vt/vtgate/planbuilder/operators/query_planning.go index 2602e39f87e..e88fb53edb3 100644 --- a/go/vt/vtgate/planbuilder/operators/query_planning.go +++ b/go/vt/vtgate/planbuilder/operators/query_planning.go @@ -592,14 +592,23 @@ ordering: return true } +// pushOrderingUnderAggr pushes the ORDER BY clause under the aggregation if possible, +// to optimize the query plan by aligning the GROUP BY and ORDER BY clauses and +// potentially removing redundant ORDER BY clauses. func pushOrderingUnderAggr(ctx *plancontext.PlanningContext, order *Ordering, aggregator *Aggregator) (Operator, *ApplyResult) { - // If Aggregator is a derived table, then we should rewrite the ordering before pushing. + // Avoid pushing down too early to allow for aggregation pushdown to MySQL + if !reachedPhase(ctx, delegateAggregation) { + return order, NoRewrite + } + + // Rewrite ORDER BY if Aggregator is a derived table if aggregator.isDerived() { for idx, orderExpr := range order.Order { ti, err := ctx.SemTable.TableInfoFor(aggregator.DT.TableID) if err != nil { panic(err) } + // Rewrite expressions in ORDER BY to match derived table columns newOrderExpr := orderExpr.Map(func(expr sqlparser.Expr) sqlparser.Expr { return semantics.RewriteDerivedTableExpression(expr, ti) }) @@ -607,9 +616,7 @@ func pushOrderingUnderAggr(ctx *plancontext.PlanningContext, order *Ordering, ag } } - // Step 1: Align the GROUP BY and ORDER BY. - // Reorder the GROUP BY columns to match the ORDER BY columns. - // Since the GB clause is a set, we can reorder these columns freely. + // Align GROUP BY with ORDER BY by reordering GROUP BY columns to match ORDER BY var newGrouping []GroupBy used := make([]bool, len(aggregator.Grouping)) for _, orderExpr := range order.Order { @@ -621,11 +628,8 @@ func pushOrderingUnderAggr(ctx *plancontext.PlanningContext, order *Ordering, ag } } - // Step 2: Add any missing columns from the ORDER BY. - // The ORDER BY column is not a set, but we can add more elements - // to the end without changing the semantics of the query. + // Add any missing GROUP BY columns to ORDER BY if len(newGrouping) != len(aggregator.Grouping) { - // we are missing some groupings. We need to add them both to the new groupings list, but also to the ORDER BY for i, added := range used { if !added { groupBy := aggregator.Grouping[i] @@ -638,7 +642,7 @@ func pushOrderingUnderAggr(ctx *plancontext.PlanningContext, order *Ordering, ag aggregator.Grouping = newGrouping aggrSource, isOrdering := aggregator.Source.(*Ordering) if isOrdering { - // Transform the query plan tree: + // Optimize query plan by removing redundant ORDER BY // From: Ordering(1) To: Aggregation // | | // Aggregation Ordering(1) @@ -646,11 +650,8 @@ func pushOrderingUnderAggr(ctx *plancontext.PlanningContext, order *Ordering, ag // Ordering(2) // | // - // - // Remove Ordering(2) from the plan tree, as it's redundant - // after pushing down the higher ordering. order.Source = aggrSource.Source - aggrSource.Source = nil // removing from plan tree + aggrSource.Source = nil aggregator.Source = order return aggregator, Rewrote("push ordering under aggregation, removing extra ordering") } diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index 2290927aef1..548fc5aaa0b 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -19,7 +19,6 @@ package operators import ( "encoding/json" "fmt" - "io" "slices" "sort" "strings" @@ -169,7 +168,7 @@ func createQPFromSelect(ctx *plancontext.PlanningContext, sel *sqlparser.Select) qp.addGroupBy(ctx, sel.GroupBy) qp.addOrderBy(ctx, sel.OrderBy) if !qp.HasAggr && sel.Having != nil { - qp.HasAggr = ContainsAggr(ctx, sel.Having.Expr) + qp.HasAggr = ctx.ContainsAggr(sel.Having.Expr) } qp.calculateDistinct(ctx) @@ -183,7 +182,7 @@ func (qp *QueryProjection) addSelectExpressions(ctx *plancontext.PlanningContext col := SelectExpr{ Col: selExp, } - if ContainsAggr(ctx, selExp.Expr) { + if ctx.ContainsAggr(selExp.Expr) { col.Aggr = true qp.HasAggr = true } @@ -200,41 +199,6 @@ func (qp *QueryProjection) addSelectExpressions(ctx *plancontext.PlanningContext } } -func IsAggr(ctx *plancontext.PlanningContext, e sqlparser.SQLNode) bool { - switch node := e.(type) { - case sqlparser.AggrFunc: - return true - case *sqlparser.FuncExpr: - return node.Name.EqualsAnyString(ctx.VSchema.GetAggregateUDFs()) - } - - return false -} - -func ContainsAggr(ctx *plancontext.PlanningContext, e sqlparser.SQLNode) (hasAggr bool) { - _ = sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { - switch node.(type) { - case *sqlparser.Offset: - // offsets here indicate that a possible aggregation has already been handled by an input, - // so we don't need to worry about aggregation in the original - return false, nil - case sqlparser.AggrFunc: - hasAggr = true - return false, io.EOF - case *sqlparser.Subquery: - return false, nil - case *sqlparser.FuncExpr: - if IsAggr(ctx, node) { - hasAggr = true - return false, io.EOF - } - } - - return true, nil - }, e) - return -} - // createQPFromUnion creates the QueryProjection for the input *sqlparser.Union func createQPFromUnion(ctx *plancontext.PlanningContext, union *sqlparser.Union) *QueryProjection { qp := &QueryProjection{} @@ -277,7 +241,7 @@ func (qp *QueryProjection) addOrderBy(ctx *plancontext.PlanningContext, orderBy Inner: ctx.SemTable.Clone(order).(*sqlparser.Order), SimplifiedExpr: order.Expr, }) - canPushSorting = canPushSorting && !ContainsAggr(ctx, order.Expr) + canPushSorting = canPushSorting && !ctx.ContainsAggr(order.Expr) } } @@ -446,7 +410,7 @@ func (qp *QueryProjection) AggregationExpressions(ctx *plancontext.PlanningConte panic(err) } - if !ContainsAggr(ctx, expr.Col) { + if !ctx.ContainsAggr(expr.Col) { getExpr, err := expr.GetExpr() if err != nil { panic(err) @@ -457,7 +421,7 @@ func (qp *QueryProjection) AggregationExpressions(ctx *plancontext.PlanningConte } continue } - if !IsAggr(ctx, aliasedExpr.Expr) && !allowComplexExpression { + if !ctx.IsAggr(aliasedExpr.Expr) && !allowComplexExpression { panic(vterrors.VT12001("in scatter query: complex aggregate expression")) } @@ -486,14 +450,14 @@ func (qp *QueryProjection) extractAggr( addAggr(aggrFunc) return false } - if IsAggr(ctx, node) { + if ctx.IsAggr(node) { // If we are here, we have a function that is an aggregation but not parsed into an AggrFunc. // This is the case for UDFs - we have to be careful with these because we can't evaluate them in VTGate. aggr := NewAggr(opcode.AggregateUDF, nil, aeWrap(ex), "") addAggr(aggr) return false } - if ContainsAggr(ctx, node) { + if ctx.ContainsAggr(node) { makeComplex() return true } @@ -521,7 +485,7 @@ orderBy: } qp.SelectExprs = append(qp.SelectExprs, SelectExpr{ Col: &sqlparser.AliasedExpr{Expr: orderExpr}, - Aggr: ContainsAggr(ctx, orderExpr), + Aggr: ctx.ContainsAggr(orderExpr), }) qp.AddedColumn++ } @@ -702,7 +666,7 @@ func (qp *QueryProjection) useGroupingOverDistinct(ctx *plancontext.PlanningCont func checkForInvalidGroupingExpressions(ctx *plancontext.PlanningContext, expr sqlparser.Expr) { _ = sqlparser.Walk(func(node sqlparser.SQLNode) (bool, error) { - if IsAggr(ctx, node) { + if ctx.IsAggr(node) { panic(vterrors.VT03005(sqlparser.String(expr))) } _, isSubQ := node.(*sqlparser.Subquery) diff --git a/go/vt/vtgate/planbuilder/operators/rewriters.go b/go/vt/vtgate/planbuilder/operators/rewriters.go index d4d2c15f4ca..ab9fe66e368 100644 --- a/go/vt/vtgate/planbuilder/operators/rewriters.go +++ b/go/vt/vtgate/planbuilder/operators/rewriters.go @@ -232,6 +232,7 @@ func bottomUp( newOp, treeIdentity := rewriter(root, rootID, isRoot) anythingChanged = anythingChanged.Merge(treeIdentity) + return newOp, anythingChanged } diff --git a/go/vt/vtgate/planbuilder/operators/subquery_planning.go b/go/vt/vtgate/planbuilder/operators/subquery_planning.go index 5a0aed3f10d..aef54bd8c41 100644 --- a/go/vt/vtgate/planbuilder/operators/subquery_planning.go +++ b/go/vt/vtgate/planbuilder/operators/subquery_planning.go @@ -56,11 +56,11 @@ func isMergeable(ctx *plancontext.PlanningContext, query sqlparser.SelectStateme // if we have grouping, we have already checked that it's safe, and don't need to check for aggregations // but if we don't have groupings, we need to check if there are aggregations that will mess with us - if ContainsAggr(ctx, node.SelectExprs) { + if ctx.ContainsAggr(node.SelectExprs) { return false } - if ContainsAggr(ctx, node.Having) { + if ctx.ContainsAggr(node.Having) { return false } diff --git a/go/vt/vtgate/planbuilder/plancontext/planning_context.go b/go/vt/vtgate/planbuilder/plancontext/planning_context.go index 2f33539f858..7db192ab7f8 100644 --- a/go/vt/vtgate/planbuilder/plancontext/planning_context.go +++ b/go/vt/vtgate/planbuilder/plancontext/planning_context.go @@ -17,6 +17,8 @@ limitations under the License. package plancontext import ( + "io" + "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" @@ -232,3 +234,38 @@ func (ctx *PlanningContext) SQLTypeForExpr(e sqlparser.Expr) sqltypes.Type { } return t.Type() } + +func (ctx *PlanningContext) IsAggr(e sqlparser.SQLNode) bool { + switch node := e.(type) { + case sqlparser.AggrFunc: + return true + case *sqlparser.FuncExpr: + return node.Name.EqualsAnyString(ctx.VSchema.GetAggregateUDFs()) + } + + return false +} + +func (ctx *PlanningContext) ContainsAggr(e sqlparser.SQLNode) (hasAggr bool) { + _ = sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { + switch node.(type) { + case *sqlparser.Offset: + // offsets here indicate that a possible aggregation has already been handled by an input, + // so we don't need to worry about aggregation in the original + return false, nil + case sqlparser.AggrFunc: + hasAggr = true + return false, io.EOF + case *sqlparser.Subquery: + return false, nil + case *sqlparser.FuncExpr: + if ctx.IsAggr(node) { + hasAggr = true + return false, io.EOF + } + } + + return true, nil + }, e) + return +} diff --git a/go/vt/vtgate/planbuilder/rewrite.go b/go/vt/vtgate/planbuilder/rewrite.go index 30423229038..ef9bf099de6 100644 --- a/go/vt/vtgate/planbuilder/rewrite.go +++ b/go/vt/vtgate/planbuilder/rewrite.go @@ -18,7 +18,6 @@ package planbuilder import ( "vitess.io/vitess/go/vt/sqlparser" - "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" ) @@ -88,7 +87,7 @@ func (r *rewriter) rewriteHavingClause(node *sqlparser.Select) { exprs := sqlparser.SplitAndExpression(nil, node.Having.Expr) node.Having = nil for _, expr := range exprs { - if operators.ContainsAggr(r.ctx, expr) { + if r.ctx.ContainsAggr(expr) { node.AddHaving(expr) } else { node.AddWhere(expr) diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index 1ec5be4d49e..d51e2868f6c 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -1032,9 +1032,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` where 1 != 1 group by d, b, a, c, weight_string(d), weight_string(b), weight_string(a), weight_string(c)", + "FieldQuery": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` where 1 != 1 group by a, b, c, d, weight_string(d), weight_string(b), weight_string(a), weight_string(c)", "OrderBy": "(3|5) ASC, (1|6) ASC, (0|7) ASC, (2|8) ASC", - "Query": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` group by d, b, a, c, weight_string(d), weight_string(b), weight_string(a), weight_string(c) order by `user`.d asc, `user`.b asc, `user`.a asc, `user`.c asc", + "Query": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` group by a, b, c, d, weight_string(d), weight_string(b), weight_string(a), weight_string(c) order by `user`.d asc, `user`.b asc, `user`.a asc, `user`.c asc", "Table": "`user`" } ] @@ -1064,9 +1064,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` where 1 != 1 group by d, b, a, c, weight_string(d), weight_string(b), weight_string(a), weight_string(c)", + "FieldQuery": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` where 1 != 1 group by c, b, a, d, weight_string(d), weight_string(b), weight_string(a), weight_string(c)", "OrderBy": "(3|5) ASC, (1|6) ASC, (0|7) ASC, (2|8) ASC", - "Query": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` group by d, b, a, c, weight_string(d), weight_string(b), weight_string(a), weight_string(c) order by `user`.d asc, `user`.b asc, `user`.a asc, `user`.c asc", + "Query": "select a, b, c, d, count(*), weight_string(d), weight_string(b), weight_string(a), weight_string(c) from `user` group by c, b, a, d, weight_string(d), weight_string(b), weight_string(a), weight_string(c) order by `user`.d asc, `user`.b asc, `user`.a asc, `user`.c asc", "Table": "`user`" } ] @@ -1096,9 +1096,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select a, b, c, count(*), weight_string(a), weight_string(c), weight_string(b) from `user` where 1 != 1 group by a, c, b, weight_string(a), weight_string(c), weight_string(b)", + "FieldQuery": "select a, b, c, count(*), weight_string(a), weight_string(c), weight_string(b) from `user` where 1 != 1 group by c, b, a, weight_string(a), weight_string(c), weight_string(b)", "OrderBy": "(0|4) DESC, (2|5) DESC, (1|6) ASC", - "Query": "select a, b, c, count(*), weight_string(a), weight_string(c), weight_string(b) from `user` group by a, c, b, weight_string(a), weight_string(c), weight_string(b) order by a desc, c desc, `user`.b asc", + "Query": "select a, b, c, count(*), weight_string(a), weight_string(c), weight_string(b) from `user` group by c, b, a, weight_string(a), weight_string(c), weight_string(b) order by a desc, c desc, `user`.b asc", "Table": "`user`" } ] @@ -4759,8 +4759,8 @@ { "OperatorType": "Projection", "Expressions": [ - ":3 as col", - ":2 as intcol", + ":2 as col", + ":3 as intcol", "count(*) * count(*) as count(*)" ], "Inputs": [ @@ -4777,9 +4777,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select count(*), u.intcol, u.col from `user` as u where 1 != 1 group by u.intcol, u.col", - "OrderBy": "1 ASC, 2 ASC", - "Query": "select count(*), u.intcol, u.col from `user` as u group by u.intcol, u.col order by u.intcol asc, u.col asc", + "FieldQuery": "select count(*), u.col, u.intcol from `user` as u where 1 != 1 group by u.col, u.intcol", + "OrderBy": "2 ASC, 1 ASC", + "Query": "select count(*), u.col, u.intcol from `user` as u group by u.col, u.intcol order by u.intcol asc, u.col asc", "Table": "`user`" }, { @@ -5324,8 +5324,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select count(*), :user_id + user_extra.id, weight_string(:user_id + user_extra.id) from user_extra where 1 != 1 group by :user_id + user_extra.id", - "Query": "select count(*), :user_id + user_extra.id, weight_string(:user_id + user_extra.id) from user_extra group by :user_id + user_extra.id", + "FieldQuery": "select count(*), :user_id + user_extra.id, weight_string(:user_id + user_extra.id) from user_extra where 1 != 1 group by :user_id + user_extra.id, weight_string(:user_id + user_extra.id)", + "Query": "select count(*), :user_id + user_extra.id, weight_string(:user_id + user_extra.id) from user_extra group by :user_id + user_extra.id, weight_string(:user_id + user_extra.id)", "Table": "user_extra" } ] @@ -7145,5 +7145,76 @@ "user.user" ] } + }, + { + "comment": "should be able to push down aggregation", + "query": "select sum(user.type) from user join user_extra on user.team_id = user_extra.id group by user_extra.id order by user_extra.id", + "plan": { + "QueryType": "SELECT", + "Original": "select sum(user.type) from user join user_extra on user.team_id = user_extra.id group by user_extra.id order by user_extra.id", + "Instructions": { + "OperatorType": "Aggregate", + "Variant": "Ordered", + "Aggregates": "sum(0) AS sum(`user`.type)", + "GroupBy": "(1|2)", + "ResultColumns": 1, + "Inputs": [ + { + "OperatorType": "Projection", + "Expressions": [ + "sum(`user`.type) * count(*) as sum(`user`.type)", + ":2 as id", + ":3 as weight_string(user_extra.id)" + ], + "Inputs": [ + { + "OperatorType": "Sort", + "Variant": "Memory", + "OrderBy": "(2|3) ASC", + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2", + "JoinVars": { + "user_team_id": 1 + }, + "TableName": "`user`_user_extra", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select sum(`user`.type), `user`.team_id from `user` where 1 != 1 group by `user`.team_id", + "Query": "select sum(`user`.type), `user`.team_id from `user` group by `user`.team_id", + "Table": "`user`" + }, + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select count(*), user_extra.id, weight_string(user_extra.id) from user_extra where 1 != 1 group by user_extra.id, weight_string(user_extra.id)", + "Query": "select count(*), user_extra.id, weight_string(user_extra.id) from user_extra where user_extra.id = :user_team_id group by user_extra.id, weight_string(user_extra.id)", + "Table": "user_extra" + } + ] + } + ] + } + ] + } + ] + }, + "TablesUsed": [ + "user.user", + "user.user_extra" + ] + } } ] diff --git a/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json b/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json index 010e22c2108..8e2fd1e31cf 100644 --- a/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json @@ -2185,9 +2185,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select foo, col, weight_string(foo) from `user` where 1 != 1 group by col, foo, weight_string(foo)", + "FieldQuery": "select foo, col, weight_string(foo) from `user` where 1 != 1 group by foo, col, weight_string(foo)", "OrderBy": "1 ASC, (0|2) ASC", - "Query": "select foo, col, weight_string(foo) from `user` where id between :vtg1 and :vtg2 group by col, foo, weight_string(foo) order by `user`.col asc, foo asc", + "Query": "select foo, col, weight_string(foo) from `user` where id between :vtg1 and :vtg2 group by foo, col, weight_string(foo) order by `user`.col asc, foo asc", "Table": "`user`" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/tpch_cases.json b/go/vt/vtgate/planbuilder/testdata/tpch_cases.json index 559674ea8fc..442f4d6b8b6 100644 --- a/go/vt/vtgate/planbuilder/testdata/tpch_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/tpch_cases.json @@ -566,149 +566,208 @@ "ResultColumns": 4, "Inputs": [ { - "OperatorType": "Sort", - "Variant": "Memory", - "OrderBy": "(0|4) ASC, (1|5) ASC, (2|6) ASC", + "OperatorType": "Projection", + "Expressions": [ + ":2 as supp_nation", + ":3 as cust_nation", + ":4 as l_year", + "sum(volume) * count(*) as revenue", + ":5 as weight_string(supp_nation)", + ":6 as weight_string(cust_nation)", + ":7 as weight_string(l_year)" + ], "Inputs": [ { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "L:0,R:0,L:1,L:2,L:4,R:1,L:5", - "JoinVars": { - "n1_n_name": 0, - "o_custkey": 3 - }, - "TableName": "lineitem_orders_supplier_nation_customer_nation", + "OperatorType": "Sort", + "Variant": "Memory", + "OrderBy": "(2|5) ASC, (3|6) ASC, (4|7) ASC", "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "R:0,L:0,L:1,L:2,R:1,L:4", + "JoinColumnIndexes": "L:0,R:0,L:1,R:1,L:2,L:4,R:2,L:5", "JoinVars": { - "l_suppkey": 3 + "n1_n_name": 1, + "o_custkey": 3 }, - "TableName": "lineitem_orders_supplier_nation", + "TableName": "lineitem_orders_supplier_nation_customer_nation", "Inputs": [ { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "L:0,L:1,R:0,L:2,L:4", - "JoinVars": { - "l_orderkey": 3 - }, - "TableName": "lineitem_orders", + "OperatorType": "Projection", + "Expressions": [ + "sum(volume) * count(*) as revenue", + ":2 as supp_nation", + ":3 as l_year", + ":4 as o_custkey", + ":5 as weight_string(supp_nation)", + ":6 as weight_string(l_year)" + ], "Inputs": [ { - "OperatorType": "Route", - "Variant": "Scatter", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select shipping.l_year, shipping.volume, shipping.l_suppkey, shipping.l_orderkey, weight_string(shipping.l_year) from (select extract(year from l_shipdate) as l_year, l_extendedprice * (1 - l_discount) as volume, l_suppkey as l_suppkey, l_orderkey as l_orderkey from lineitem where 1 != 1) as shipping where 1 != 1", - "Query": "select shipping.l_year, shipping.volume, shipping.l_suppkey, shipping.l_orderkey, weight_string(shipping.l_year) from (select extract(year from l_shipdate) as l_year, l_extendedprice * (1 - l_discount) as volume, l_suppkey as l_suppkey, l_orderkey as l_orderkey from lineitem where l_shipdate between date('1995-01-01') and date('1996-12-31')) as shipping", - "Table": "lineitem" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,L:1,L:2,R:2,L:4", + "JoinVars": { + "l_suppkey": 3 }, - "FieldQuery": "select shipping.o_custkey from (select o_custkey as o_custkey from orders where 1 != 1) as shipping where 1 != 1", - "Query": "select shipping.o_custkey from (select o_custkey as o_custkey from orders where o_orderkey = :l_orderkey) as shipping", - "Table": "orders", - "Values": [ - ":l_orderkey" - ], - "Vindex": "hash" + "TableName": "lineitem_orders_supplier_nation", + "Inputs": [ + { + "OperatorType": "Projection", + "Expressions": [ + "sum(volume) * count(*) as revenue", + ":2 as l_year", + ":3 as o_custkey", + ":4 as l_suppkey", + ":5 as weight_string(l_year)" + ], + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,L:1,R:1,L:2,L:4", + "JoinVars": { + "l_orderkey": 3 + }, + "TableName": "lineitem_orders", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select sum(volume) as revenue, l_year, shipping.l_suppkey, shipping.l_orderkey, weight_string(l_year) from (select extract(year from l_shipdate) as l_year, l_extendedprice * (1 - l_discount) as volume, l_suppkey as l_suppkey, l_orderkey as l_orderkey from lineitem where 1 != 1) as shipping where 1 != 1 group by l_year, shipping.l_suppkey, shipping.l_orderkey, weight_string(l_year)", + "Query": "select sum(volume) as revenue, l_year, shipping.l_suppkey, shipping.l_orderkey, weight_string(l_year) from (select extract(year from l_shipdate) as l_year, l_extendedprice * (1 - l_discount) as volume, l_suppkey as l_suppkey, l_orderkey as l_orderkey from lineitem where l_shipdate between date('1995-01-01') and date('1996-12-31')) as shipping group by l_year, shipping.l_suppkey, shipping.l_orderkey, weight_string(l_year)", + "Table": "lineitem" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), shipping.o_custkey from (select o_custkey as o_custkey from orders where 1 != 1) as shipping where 1 != 1 group by shipping.o_custkey", + "Query": "select count(*), shipping.o_custkey from (select o_custkey as o_custkey from orders where o_orderkey = :l_orderkey) as shipping group by shipping.o_custkey", + "Table": "orders", + "Values": [ + ":l_orderkey" + ], + "Vindex": "hash" + } + ] + } + ] + }, + { + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)", + ":2 as supp_nation", + ":3 as weight_string(supp_nation)" + ], + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2", + "JoinVars": { + "s_nationkey": 1 + }, + "TableName": "supplier_nation", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), shipping.s_nationkey from (select s_nationkey as s_nationkey from supplier where 1 != 1) as shipping where 1 != 1 group by shipping.s_nationkey", + "Query": "select count(*), shipping.s_nationkey from (select s_nationkey as s_nationkey from supplier where s_suppkey = :l_suppkey) as shipping group by shipping.s_nationkey", + "Table": "supplier", + "Values": [ + ":l_suppkey" + ], + "Vindex": "hash" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), supp_nation, weight_string(supp_nation) from (select n1.n_name as supp_nation from nation as n1 where 1 != 1) as shipping where 1 != 1 group by supp_nation, weight_string(supp_nation)", + "Query": "select count(*), supp_nation, weight_string(supp_nation) from (select n1.n_name as supp_nation from nation as n1 where n1.n_nationkey = :s_nationkey) as shipping group by supp_nation, weight_string(supp_nation)", + "Table": "nation", + "Values": [ + ":s_nationkey" + ], + "Vindex": "hash" + } + ] + } + ] + } + ] } ] }, { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,R:1", - "JoinVars": { - "s_nationkey": 0 - }, - "TableName": "supplier_nation", + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)", + ":2 as cust_nation", + ":3 as weight_string(cust_nation)" + ], "Inputs": [ { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select shipping.s_nationkey from (select s_nationkey as s_nationkey from supplier where 1 != 1) as shipping where 1 != 1", - "Query": "select shipping.s_nationkey from (select s_nationkey as s_nationkey from supplier where s_suppkey = :l_suppkey) as shipping", - "Table": "supplier", - "Values": [ - ":l_suppkey" - ], - "Vindex": "hash" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2", + "JoinVars": { + "c_nationkey": 1 }, - "FieldQuery": "select shipping.supp_nation, weight_string(shipping.supp_nation) from (select n1.n_name as supp_nation from nation as n1 where 1 != 1) as shipping where 1 != 1", - "Query": "select shipping.supp_nation, weight_string(shipping.supp_nation) from (select n1.n_name as supp_nation from nation as n1 where n1.n_nationkey = :s_nationkey) as shipping", - "Table": "nation", - "Values": [ - ":s_nationkey" - ], - "Vindex": "hash" + "TableName": "customer_nation", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), shipping.c_nationkey from (select c_nationkey as c_nationkey from customer where 1 != 1) as shipping where 1 != 1 group by shipping.c_nationkey", + "Query": "select count(*), shipping.c_nationkey from (select c_nationkey as c_nationkey from customer where c_custkey = :o_custkey) as shipping group by shipping.c_nationkey", + "Table": "customer", + "Values": [ + ":o_custkey" + ], + "Vindex": "hash" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), cust_nation, weight_string(cust_nation) from (select n2.n_name as cust_nation from nation as n2 where 1 != 1) as shipping where 1 != 1 group by cust_nation, weight_string(cust_nation)", + "Query": "select count(*), cust_nation, weight_string(cust_nation) from (select n2.n_name as cust_nation from nation as n2 where (:n1_n_name = 'FRANCE' and n2.n_name = 'GERMANY' or :n1_n_name = 'GERMANY' and n2.n_name = 'FRANCE') and n2.n_nationkey = :c_nationkey) as shipping group by cust_nation, weight_string(cust_nation)", + "Table": "nation", + "Values": [ + ":c_nationkey" + ], + "Vindex": "hash" + } + ] } ] } ] - }, - { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,R:1", - "JoinVars": { - "c_nationkey": 0 - }, - "TableName": "customer_nation", - "Inputs": [ - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select shipping.c_nationkey from (select c_nationkey as c_nationkey from customer where 1 != 1) as shipping where 1 != 1", - "Query": "select shipping.c_nationkey from (select c_nationkey as c_nationkey from customer where c_custkey = :o_custkey) as shipping", - "Table": "customer", - "Values": [ - ":o_custkey" - ], - "Vindex": "hash" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select shipping.cust_nation, weight_string(shipping.cust_nation) from (select n2.n_name as cust_nation from nation as n2 where 1 != 1) as shipping where 1 != 1", - "Query": "select shipping.cust_nation, weight_string(shipping.cust_nation) from (select n2.n_name as cust_nation from nation as n2 where (:n1_n_name = 'FRANCE' and n2.n_name = 'GERMANY' or :n1_n_name = 'GERMANY' and n2.n_name = 'FRANCE') and n2.n_nationkey = :c_nationkey) as shipping", - "Table": "nation", - "Values": [ - ":c_nationkey" - ], - "Vindex": "hash" - } - ] } ] } @@ -746,200 +805,245 @@ "ResultColumns": 3, "Inputs": [ { - "OperatorType": "SimpleProjection", - "Columns": "0,3,1,4", + "OperatorType": "Projection", + "Expressions": [ + ":3 as o_year", + "sum(case when nation = 'BRAZIL' then volume else 0 end) * count(*) as sum(case when nation = 'BRAZIL' then volume else 0 end)", + "sum(volume) * count(*) as sum(volume)", + ":4 as weight_string(o_year)" + ], "Inputs": [ { "OperatorType": "Sort", "Variant": "Memory", - "OrderBy": "(0|4) ASC", + "OrderBy": "(3|4) ASC", "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "R:0,L:0,L:1,L:3,R:1", + "JoinColumnIndexes": "L:0,R:0,L:1,R:1,R:2", "JoinVars": { "l_orderkey": 2 }, "TableName": "lineitem_part_supplier_nation_orders_customer_nation_region", "Inputs": [ { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "L:0,R:0,L:1,R:1", - "JoinVars": { - "l_suppkey": 2, - "volume": 0 - }, - "TableName": "lineitem_part_supplier_nation", + "OperatorType": "Aggregate", + "Variant": "Ordered", + "Aggregates": "sum(0) AS sum(case when nation = 'BRAZIL' then volume else 0 end), sum(1) AS sum(volume)", + "GroupBy": "(2|3)", + "ResultColumns": 3, "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0,L:1,L:2", + "JoinColumnIndexes": "R:1,L:0,L:1,L:3", "JoinVars": { - "l_partkey": 3 + "l_suppkey": 2, + "volume": 0 }, - "TableName": "lineitem_part", + "TableName": "lineitem_part_supplier_nation", "Inputs": [ { - "OperatorType": "Route", - "Variant": "Scatter", - "Keyspace": { - "Name": "main", - "Sharded": true + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,L:1,L:2,L:4", + "JoinVars": { + "l_partkey": 3 }, - "FieldQuery": "select all_nations.volume, all_nations.l_orderkey, all_nations.l_suppkey, all_nations.l_partkey from (select l_extendedprice * (1 - l_discount) as volume, l_orderkey as l_orderkey, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where 1 != 1) as all_nations where 1 != 1", - "Query": "select all_nations.volume, all_nations.l_orderkey, all_nations.l_suppkey, all_nations.l_partkey from (select l_extendedprice * (1 - l_discount) as volume, l_orderkey as l_orderkey, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem) as all_nations", - "Table": "lineitem" + "TableName": "lineitem_part", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select all_nations.volume, all_nations.l_orderkey, all_nations.l_suppkey, all_nations.l_partkey, weight_string(all_nations.l_orderkey) from (select l_extendedprice * (1 - l_discount) as volume, l_orderkey as l_orderkey, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where 1 != 1) as all_nations where 1 != 1", + "OrderBy": "(1|4) ASC", + "Query": "select all_nations.volume, all_nations.l_orderkey, all_nations.l_suppkey, all_nations.l_partkey, weight_string(all_nations.l_orderkey) from (select l_extendedprice * (1 - l_discount) as volume, l_orderkey as l_orderkey, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem) as all_nations order by all_nations.l_orderkey asc", + "Table": "lineitem" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select 1 from part where 1 != 1", + "Query": "select 1 from part where p_type = 'ECONOMY ANODIZED STEEL' and p_partkey = :l_partkey", + "Table": "part", + "Values": [ + ":l_partkey" + ], + "Vindex": "hash" + } + ] }, { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "R:0,R:1", + "JoinVars": { + "s_nationkey": 0 }, - "FieldQuery": "select 1 from part where 1 != 1", - "Query": "select 1 from part where p_type = 'ECONOMY ANODIZED STEEL' and p_partkey = :l_partkey", - "Table": "part", - "Values": [ - ":l_partkey" - ], - "Vindex": "hash" - } - ] - }, - { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,R:1", - "JoinVars": { - "s_nationkey": 0 - }, - "TableName": "supplier_nation", - "Inputs": [ - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select all_nations.s_nationkey from (select s_nationkey as s_nationkey from supplier where 1 != 1) as all_nations where 1 != 1", - "Query": "select all_nations.s_nationkey from (select s_nationkey as s_nationkey from supplier where s_suppkey = :l_suppkey) as all_nations", - "Table": "supplier", - "Values": [ - ":l_suppkey" - ], - "Vindex": "hash" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select all_nations.nation, case when nation = 'BRAZIL' then :volume else 0 end from (select n2.n_name as nation from nation as n2 where 1 != 1) as all_nations where 1 != 1", - "Query": "select all_nations.nation, case when nation = 'BRAZIL' then :volume else 0 end from (select n2.n_name as nation from nation as n2 where n2.n_nationkey = :s_nationkey) as all_nations", - "Table": "nation", - "Values": [ - ":s_nationkey" - ], - "Vindex": "hash" + "TableName": "supplier_nation", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select all_nations.s_nationkey from (select s_nationkey as s_nationkey from supplier where 1 != 1) as all_nations where 1 != 1", + "Query": "select all_nations.s_nationkey from (select s_nationkey as s_nationkey from supplier where s_suppkey = :l_suppkey) as all_nations", + "Table": "supplier", + "Values": [ + ":l_suppkey" + ], + "Vindex": "hash" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select all_nations.nation, case when nation = 'BRAZIL' then :volume else 0 end from (select n2.n_name as nation from nation as n2 where 1 != 1) as all_nations where 1 != 1", + "Query": "select all_nations.nation, case when nation = 'BRAZIL' then :volume else 0 end from (select n2.n_name as nation from nation as n2 where n2.n_nationkey = :s_nationkey) as all_nations", + "Table": "nation", + "Values": [ + ":s_nationkey" + ], + "Vindex": "hash" + } + ] } ] } ] }, { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "L:0,L:2", - "JoinVars": { - "c_nationkey": 1 - }, - "TableName": "orders_customer_nation_region", + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)", + ":2 as o_year", + ":3 as weight_string(o_year)" + ], "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0,R:0,L:2", - "JoinVars": { - "o_custkey": 1 - }, - "TableName": "orders_customer", - "Inputs": [ - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select all_nations.o_year, all_nations.o_custkey, weight_string(all_nations.o_year) from (select extract(year from o_orderdate) as o_year, o_custkey as o_custkey from orders where 1 != 1) as all_nations where 1 != 1", - "Query": "select all_nations.o_year, all_nations.o_custkey, weight_string(all_nations.o_year) from (select extract(year from o_orderdate) as o_year, o_custkey as o_custkey from orders where o_orderdate between date'1995-01-01' and date('1996-12-31') and o_orderkey = :l_orderkey) as all_nations", - "Table": "orders", - "Values": [ - ":l_orderkey" - ], - "Vindex": "hash" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select all_nations.c_nationkey from (select c_nationkey as c_nationkey from customer where 1 != 1) as all_nations where 1 != 1", - "Query": "select all_nations.c_nationkey from (select c_nationkey as c_nationkey from customer where c_custkey = :o_custkey) as all_nations", - "Table": "customer", - "Values": [ - ":o_custkey" - ], - "Vindex": "hash" - } - ] - }, - { - "OperatorType": "Join", - "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,L:1,L:3", "JoinVars": { - "n1_n_regionkey": 0 + "c_nationkey": 2 }, - "TableName": "nation_region", + "TableName": "orders_customer_nation_region", "Inputs": [ { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select n1.n_regionkey from nation as n1 where 1 != 1", - "Query": "select n1.n_regionkey from nation as n1 where n1.n_nationkey = :c_nationkey", - "Table": "nation", - "Values": [ - ":c_nationkey" + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)", + ":2 as o_year", + ":3 as c_nationkey", + ":4 as weight_string(o_year)" ], - "Vindex": "hash" + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,L:1,R:1,L:3", + "JoinVars": { + "o_custkey": 2 + }, + "TableName": "orders_customer", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), o_year, all_nations.o_custkey, weight_string(o_year) from (select extract(year from o_orderdate) as o_year, o_custkey as o_custkey from orders where 1 != 1) as all_nations where 1 != 1 group by o_year, all_nations.o_custkey, weight_string(o_year)", + "Query": "select count(*), o_year, all_nations.o_custkey, weight_string(o_year) from (select extract(year from o_orderdate) as o_year, o_custkey as o_custkey from orders where o_orderdate between date'1995-01-01' and date('1996-12-31') and o_orderkey = :l_orderkey) as all_nations group by o_year, all_nations.o_custkey, weight_string(o_year)", + "Table": "orders", + "Values": [ + ":l_orderkey" + ], + "Vindex": "hash" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), all_nations.c_nationkey from (select c_nationkey as c_nationkey from customer where 1 != 1) as all_nations where 1 != 1 group by all_nations.c_nationkey", + "Query": "select count(*), all_nations.c_nationkey from (select c_nationkey as c_nationkey from customer where c_custkey = :o_custkey) as all_nations group by all_nations.c_nationkey", + "Table": "customer", + "Values": [ + ":o_custkey" + ], + "Vindex": "hash" + } + ] + } + ] }, { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select 1 from region where 1 != 1", - "Query": "select 1 from region where r_name = 'AMERICA' and r_regionkey = :n1_n_regionkey", - "Table": "region", - "Values": [ - ":n1_n_regionkey" + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)" ], - "Vindex": "hash" + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0", + "JoinVars": { + "n1_n_regionkey": 1 + }, + "TableName": "nation_region", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), n1.n_regionkey from nation as n1 where 1 != 1 group by n1.n_regionkey", + "Query": "select count(*), n1.n_regionkey from nation as n1 where n1.n_nationkey = :c_nationkey group by n1.n_regionkey", + "Table": "nation", + "Values": [ + ":c_nationkey" + ], + "Vindex": "hash" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*) from region where 1 != 1 group by .0", + "Query": "select count(*) from region where r_name = 'AMERICA' and r_regionkey = :n1_n_regionkey group by .0", + "Table": "region", + "Values": [ + ":n1_n_regionkey" + ], + "Vindex": "hash" + } + ] + } + ] } ] } @@ -980,61 +1084,144 @@ "ResultColumns": 3, "Inputs": [ { - "OperatorType": "Sort", - "Variant": "Memory", - "OrderBy": "(0|3) ASC, (1|4) DESC", + "OperatorType": "Projection", + "Expressions": [ + ":2 as nation", + ":3 as o_year", + "sum(amount) * count(*) as sum_profit", + ":4 as weight_string(nation)", + ":5 as weight_string(o_year)" + ], "Inputs": [ { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,L:0,L:1,R:1,L:3", - "JoinVars": { - "l_suppkey": 2 - }, - "TableName": "orders_lineitem_part_partsupp_supplier_nation", + "OperatorType": "Sort", + "Variant": "Memory", + "OrderBy": "(2|4) ASC, (3|5) DESC", "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0,R:0,L:4,L:6", + "JoinColumnIndexes": "L:0,R:0,R:1,L:1,R:2,L:3", "JoinVars": { - "l_discount": 2, - "l_extendedprice": 1, - "l_partkey": 5, - "l_quantity": 3, - "l_suppkey": 4 + "l_suppkey": 2 }, - "TableName": "orders_lineitem_part_partsupp", + "TableName": "orders_lineitem_part_partsupp_supplier_nation", "Inputs": [ { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "L:0,R:0,R:1,R:2,R:3,R:4,L:2", - "JoinVars": { - "o_orderkey": 1 - }, - "TableName": "orders_lineitem_part", + "OperatorType": "Aggregate", + "Variant": "Ordered", + "Aggregates": "sum(0) AS sum_profit", + "GroupBy": "(1|3), (2|4)", + "ResultColumns": 4, "Inputs": [ - { - "OperatorType": "Route", - "Variant": "Scatter", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select profit.o_year, profit.o_orderkey, weight_string(profit.o_year) from (select extract(year from o_orderdate) as o_year, o_orderkey as o_orderkey from orders where 1 != 1) as profit where 1 != 1", - "Query": "select profit.o_year, profit.o_orderkey, weight_string(profit.o_year) from (select extract(year from o_orderdate) as o_year, o_orderkey as o_orderkey from orders) as profit", - "Table": "orders" - }, { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0,L:1,L:2,L:3,L:4", + "JoinColumnIndexes": "R:0,L:0,L:4,L:6,L:7", "JoinVars": { - "l_partkey": 4 + "l_discount": 2, + "l_extendedprice": 1, + "l_partkey": 5, + "l_quantity": 3, + "l_suppkey": 4 }, - "TableName": "lineitem_part", + "TableName": "orders_lineitem_part_partsupp", "Inputs": [ + { + "OperatorType": "Sort", + "Variant": "Memory", + "OrderBy": "(0|6) ASC, (4|7) ASC", + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2,R:3,R:4,L:2,R:5", + "JoinVars": { + "o_orderkey": 1 + }, + "TableName": "orders_lineitem_part", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select profit.o_year, profit.o_orderkey, weight_string(profit.o_year) from (select extract(year from o_orderdate) as o_year, o_orderkey as o_orderkey from orders where 1 != 1) as profit where 1 != 1", + "Query": "select profit.o_year, profit.o_orderkey, weight_string(profit.o_year) from (select extract(year from o_orderdate) as o_year, o_orderkey as o_orderkey from orders) as profit", + "Table": "orders" + }, + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,L:1,L:2,L:3,L:4,L:5", + "JoinVars": { + "l_partkey": 4 + }, + "TableName": "lineitem_part", + "Inputs": [ + { + "OperatorType": "VindexLookup", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "Values": [ + ":o_orderkey" + ], + "Vindex": "lineitem_map", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "IN", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select l_orderkey, l_linenumber from lineitem_map where 1 != 1", + "Query": "select l_orderkey, l_linenumber from lineitem_map where l_orderkey in ::__vals", + "Table": "lineitem_map", + "Values": [ + "::l_orderkey" + ], + "Vindex": "md5" + }, + { + "OperatorType": "Route", + "Variant": "ByDestination", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey, weight_string(profit.l_suppkey) from (select l_extendedprice, l_discount, l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where 1 != 1) as profit where 1 != 1", + "Query": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey, weight_string(profit.l_suppkey) from (select l_extendedprice, l_discount, l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where l_orderkey = :o_orderkey) as profit", + "Table": "lineitem" + } + ] + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select 1 from part where 1 != 1", + "Query": "select 1 from part where p_name like '%green%' and p_partkey = :l_partkey", + "Table": "part", + "Values": [ + ":l_partkey" + ], + "Vindex": "hash" + } + ] + } + ] + } + ] + }, { "OperatorType": "VindexLookup", "Variant": "EqualUnique", @@ -1043,9 +1230,9 @@ "Sharded": true }, "Values": [ - ":o_orderkey" + ":l_partkey" ], - "Vindex": "lineitem_map", + "Vindex": "partsupp_map", "Inputs": [ { "OperatorType": "Route", @@ -1054,11 +1241,11 @@ "Name": "main", "Sharded": true }, - "FieldQuery": "select l_orderkey, l_linenumber from lineitem_map where 1 != 1", - "Query": "select l_orderkey, l_linenumber from lineitem_map where l_orderkey in ::__vals", - "Table": "lineitem_map", + "FieldQuery": "select ps_partkey, ps_suppkey from partsupp_map where 1 != 1", + "Query": "select ps_partkey, ps_suppkey from partsupp_map where ps_partkey in ::__vals", + "Table": "partsupp_map", "Values": [ - "::l_orderkey" + "::ps_partkey" ], "Vindex": "md5" }, @@ -1069,11 +1256,47 @@ "Name": "main", "Sharded": true }, - "FieldQuery": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey from (select l_extendedprice, l_discount, l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where 1 != 1) as profit where 1 != 1", - "Query": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey from (select l_extendedprice, l_discount, l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where l_orderkey = :o_orderkey) as profit", - "Table": "lineitem" + "FieldQuery": "select profit.amount from (select :l_extendedprice * (1 - :l_discount) - ps_supplycost * :l_quantity as amount from partsupp where 1 != 1) as profit where 1 != 1", + "Query": "select profit.amount from (select :l_extendedprice * (1 - :l_discount) - ps_supplycost * :l_quantity as amount from partsupp where ps_partkey = :l_partkey and ps_suppkey = :l_suppkey) as profit", + "Table": "partsupp" } ] + } + ] + } + ] + }, + { + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)", + ":2 as nation", + ":3 as weight_string(nation)" + ], + "Inputs": [ + { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2", + "JoinVars": { + "s_nationkey": 1 + }, + "TableName": "supplier_nation", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), profit.s_nationkey from (select s_nationkey as s_nationkey from supplier where 1 != 1) as profit where 1 != 1 group by profit.s_nationkey", + "Query": "select count(*), profit.s_nationkey from (select s_nationkey as s_nationkey from supplier where s_suppkey = :l_suppkey) as profit group by profit.s_nationkey", + "Table": "supplier", + "Values": [ + ":l_suppkey" + ], + "Vindex": "hash" }, { "OperatorType": "Route", @@ -1082,98 +1305,17 @@ "Name": "main", "Sharded": true }, - "FieldQuery": "select 1 from part where 1 != 1", - "Query": "select 1 from part where p_name like '%green%' and p_partkey = :l_partkey", - "Table": "part", + "FieldQuery": "select count(*), nation, weight_string(nation) from (select n_name as nation from nation where 1 != 1) as profit where 1 != 1 group by nation, weight_string(nation)", + "Query": "select count(*), nation, weight_string(nation) from (select n_name as nation from nation where n_nationkey = :s_nationkey) as profit group by nation, weight_string(nation)", + "Table": "nation", "Values": [ - ":l_partkey" + ":s_nationkey" ], "Vindex": "hash" } ] } ] - }, - { - "OperatorType": "VindexLookup", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "Values": [ - ":l_partkey" - ], - "Vindex": "partsupp_map", - "Inputs": [ - { - "OperatorType": "Route", - "Variant": "IN", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select ps_partkey, ps_suppkey from partsupp_map where 1 != 1", - "Query": "select ps_partkey, ps_suppkey from partsupp_map where ps_partkey in ::__vals", - "Table": "partsupp_map", - "Values": [ - "::ps_partkey" - ], - "Vindex": "md5" - }, - { - "OperatorType": "Route", - "Variant": "ByDestination", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select profit.amount from (select :l_extendedprice * (1 - :l_discount) - ps_supplycost * :l_quantity as amount from partsupp where 1 != 1) as profit where 1 != 1", - "Query": "select profit.amount from (select :l_extendedprice * (1 - :l_discount) - ps_supplycost * :l_quantity as amount from partsupp where ps_partkey = :l_partkey and ps_suppkey = :l_suppkey) as profit", - "Table": "partsupp" - } - ] - } - ] - }, - { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,R:1", - "JoinVars": { - "s_nationkey": 0 - }, - "TableName": "supplier_nation", - "Inputs": [ - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select profit.s_nationkey from (select s_nationkey as s_nationkey from supplier where 1 != 1) as profit where 1 != 1", - "Query": "select profit.s_nationkey from (select s_nationkey as s_nationkey from supplier where s_suppkey = :l_suppkey) as profit", - "Table": "supplier", - "Values": [ - ":l_suppkey" - ], - "Vindex": "hash" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select profit.nation, weight_string(profit.nation) from (select n_name as nation from nation where 1 != 1) as profit where 1 != 1", - "Query": "select profit.nation, weight_string(profit.nation) from (select n_name as nation from nation where n_nationkey = :s_nationkey) as profit", - "Table": "nation", - "Values": [ - ":s_nationkey" - ], - "Vindex": "hash" } ] } @@ -1645,67 +1787,78 @@ "ResultColumns": 3, "Inputs": [ { - "OperatorType": "Sort", - "Variant": "Memory", - "OrderBy": "(0|3) ASC", + "OperatorType": "Projection", + "Expressions": [ + ":3 as l_shipmode", + "sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) * count(*) as high_line_count", + "sum(case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end) * count(*) as low_line_count", + ":4 as weight_string(l_shipmode)" + ], "Inputs": [ { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,L:0,L:1,R:1", - "JoinVars": { - "o_orderkey": 2 - }, - "TableName": "orders_lineitem", + "OperatorType": "Sort", + "Variant": "Memory", + "OrderBy": "(3|4) ASC", "Inputs": [ { - "OperatorType": "Route", - "Variant": "Scatter", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end, case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end, o_orderkey from orders where 1 != 1", - "Query": "select case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end, case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end, o_orderkey from orders", - "Table": "orders" - }, - { - "OperatorType": "VindexLookup", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,L:1,R:1,R:2", + "JoinVars": { + "o_orderkey": 2 }, - "Values": [ - ":o_orderkey" - ], - "Vindex": "lineitem_map", + "TableName": "orders_lineitem", "Inputs": [ { "OperatorType": "Route", - "Variant": "IN", + "Variant": "Scatter", "Keyspace": { "Name": "main", "Sharded": true }, - "FieldQuery": "select l_orderkey, l_linenumber from lineitem_map where 1 != 1", - "Query": "select l_orderkey, l_linenumber from lineitem_map where l_orderkey in ::__vals", - "Table": "lineitem_map", - "Values": [ - "::l_orderkey" - ], - "Vindex": "md5" + "FieldQuery": "select sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end) as low_line_count, o_orderkey from orders where 1 != 1 group by o_orderkey", + "Query": "select sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end) as low_line_count, o_orderkey from orders group by o_orderkey", + "Table": "orders" }, { - "OperatorType": "Route", - "Variant": "ByDestination", + "OperatorType": "VindexLookup", + "Variant": "EqualUnique", "Keyspace": { "Name": "main", "Sharded": true }, - "FieldQuery": "select l_shipmode, weight_string(l_shipmode) from lineitem where 1 != 1", - "Query": "select l_shipmode, weight_string(l_shipmode) from lineitem where l_shipmode in ('MAIL', 'SHIP') and l_commitdate < l_receiptdate and l_shipdate < l_commitdate and l_receiptdate >= date('1994-01-01') and l_receiptdate < date('1994-01-01') + interval '1' year and l_orderkey = :o_orderkey", - "Table": "lineitem" + "Values": [ + ":o_orderkey" + ], + "Vindex": "lineitem_map", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "IN", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select l_orderkey, l_linenumber from lineitem_map where 1 != 1", + "Query": "select l_orderkey, l_linenumber from lineitem_map where l_orderkey in ::__vals", + "Table": "lineitem_map", + "Values": [ + "::l_orderkey" + ], + "Vindex": "md5" + }, + { + "OperatorType": "Route", + "Variant": "ByDestination", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), l_shipmode, weight_string(l_shipmode) from lineitem where 1 != 1 group by l_shipmode, weight_string(l_shipmode)", + "Query": "select count(*), l_shipmode, weight_string(l_shipmode) from lineitem where l_shipmode in ('MAIL', 'SHIP') and l_commitdate < l_receiptdate and l_shipdate < l_commitdate and l_receiptdate >= date('1994-01-01') and l_receiptdate < date('1994-01-01') + interval '1' year and l_orderkey = :o_orderkey group by l_shipmode, weight_string(l_shipmode)", + "Table": "lineitem" + } + ] } ] } @@ -2078,25 +2231,34 @@ }, { "InputName": "Outer", - "OperatorType": "Filter", - "Predicate": ":__sq_has_values and o_orderkey in ::__sq1", + "OperatorType": "Projection", + "Expressions": [ + ":2 as c_name", + ":3 as c_custkey", + ":4 as o_orderkey", + ":5 as o_orderdate", + ":6 as o_totalprice", + "sum(l_quantity) * count(*) as sum(l_quantity)", + ":7 as weight_string(o_totalprice)", + ":8 as weight_string(o_orderdate)", + ":9 as weight_string(c_name)", + ":10 as weight_string(c_custkey)", + ":11 as weight_string(o_orderkey)" + ], "Inputs": [ { - "OperatorType": "Aggregate", - "Variant": "Ordered", - "Aggregates": "sum(5) AS sum(l_quantity)", - "GroupBy": "(4|6), (3|7), (0|8), (1|9), (2|10)", - "ResultColumns": 11, + "OperatorType": "Filter", + "Predicate": ":__sq_has_values and o_orderkey in ::__sq1", "Inputs": [ { "OperatorType": "Sort", "Variant": "Memory", - "OrderBy": "(4|6) DESC, (3|7) ASC, (0|8) ASC, (1|9) ASC, (2|10) ASC", + "OrderBy": "(6|7) DESC, (5|8) ASC, (2|9) ASC, (3|10) ASC, (4|11) ASC", "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "R:0,R:1,R:2,R:3,R:4,L:0,R:5,R:6,R:7,R:8,R:9", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2,R:3,R:4,R:5,R:6,R:7,R:8,R:9,R:10", "JoinVars": { "l_orderkey": 1 }, @@ -2109,48 +2271,66 @@ "Name": "main", "Sharded": true }, - "FieldQuery": "select l_quantity, l_orderkey from lineitem where 1 != 1", - "Query": "select l_quantity, l_orderkey from lineitem", + "FieldQuery": "select sum(l_quantity), l_orderkey from lineitem where 1 != 1 group by l_orderkey", + "Query": "select sum(l_quantity), l_orderkey from lineitem group by l_orderkey", "Table": "lineitem" }, { - "OperatorType": "Join", - "Variant": "Join", - "JoinColumnIndexes": "R:0,R:1,L:0,L:1,L:2,L:3,L:4,R:2,R:3,L:5", - "JoinVars": { - "o_custkey": 6 - }, - "TableName": "orders_customer", + "OperatorType": "Projection", + "Expressions": [ + "count(*) * count(*) as count(*)", + ":2 as c_name", + ":3 as c_custkey", + ":4 as o_orderkey", + ":5 as o_orderdate", + ":6 as o_totalprice", + ":7 as weight_string(o_totalprice)", + ":8 as weight_string(o_orderdate)", + ":9 as weight_string(c_name)", + ":10 as weight_string(c_custkey)", + ":11 as weight_string(o_orderkey)" + ], "Inputs": [ { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true - }, - "FieldQuery": "select o_orderkey, o_orderdate, o_totalprice, weight_string(o_totalprice), weight_string(o_orderdate), weight_string(o_orderkey), o_custkey from orders where 1 != 1", - "Query": "select o_orderkey, o_orderdate, o_totalprice, weight_string(o_totalprice), weight_string(o_orderdate), weight_string(o_orderkey), o_custkey from orders where o_orderkey = :l_orderkey", - "Table": "orders", - "Values": [ - ":l_orderkey" - ], - "Vindex": "hash" - }, - { - "OperatorType": "Route", - "Variant": "EqualUnique", - "Keyspace": { - "Name": "main", - "Sharded": true + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0,R:1,R:2,L:1,L:2,L:3,L:5,L:6,R:3,R:4,L:7", + "JoinVars": { + "o_custkey": 4 }, - "FieldQuery": "select c_name, c_custkey, weight_string(c_name), weight_string(c_custkey) from customer where 1 != 1", - "Query": "select c_name, c_custkey, weight_string(c_name), weight_string(c_custkey) from customer where c_custkey = :o_custkey", - "Table": "customer", - "Values": [ - ":o_custkey" - ], - "Vindex": "hash" + "TableName": "orders_customer", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), o_orderkey, o_orderdate, o_totalprice, o_custkey, weight_string(o_totalprice), weight_string(o_orderdate), weight_string(o_orderkey) from orders where 1 != 1 group by o_orderkey, o_orderdate, o_totalprice, o_custkey, weight_string(o_totalprice), weight_string(o_orderdate), weight_string(o_orderkey)", + "Query": "select count(*), o_orderkey, o_orderdate, o_totalprice, o_custkey, weight_string(o_totalprice), weight_string(o_orderdate), weight_string(o_orderkey) from orders where o_orderkey = :l_orderkey group by o_orderkey, o_orderdate, o_totalprice, o_custkey, weight_string(o_totalprice), weight_string(o_orderdate), weight_string(o_orderkey)", + "Table": "orders", + "Values": [ + ":l_orderkey" + ], + "Vindex": "hash" + }, + { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "main", + "Sharded": true + }, + "FieldQuery": "select count(*), c_name, c_custkey, weight_string(c_name), weight_string(c_custkey) from customer where 1 != 1 group by c_name, c_custkey, weight_string(c_name), weight_string(c_custkey)", + "Query": "select count(*), c_name, c_custkey, weight_string(c_name), weight_string(c_custkey) from customer where c_custkey = :o_custkey group by c_name, c_custkey, weight_string(c_name), weight_string(c_custkey)", + "Table": "customer", + "Values": [ + ":o_custkey" + ], + "Vindex": "hash" + } + ] } ] } From cb2d0df62f8e590b2eb5c2df56d350e5d6bcf28b Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Thu, 4 Jul 2024 21:31:35 +0530 Subject: [PATCH 15/55] Fail on prepare of reserved connection (#16316) Signed-off-by: Harshit Gangal --- .../{tx_executor.go => dt_executor.go} | 165 ++++++++++-------- ...x_executor_test.go => dt_executor_test.go} | 28 ++- go/vt/vttablet/tabletserver/tabletserver.go | 54 +----- go/vt/vttablet/tabletserver/twopcz.go | 2 +- 4 files changed, 121 insertions(+), 128 deletions(-) rename go/vt/vttablet/tabletserver/{tx_executor.go => dt_executor.go} (57%) rename go/vt/vttablet/tabletserver/{tx_executor_test.go => dt_executor_test.go} (95%) diff --git a/go/vt/vttablet/tabletserver/tx_executor.go b/go/vt/vttablet/tabletserver/dt_executor.go similarity index 57% rename from go/vt/vttablet/tabletserver/tx_executor.go rename to go/vt/vttablet/tabletserver/dt_executor.go index 93d18a200f9..baaa8b43a4e 100644 --- a/go/vt/vttablet/tabletserver/tx_executor.go +++ b/go/vt/vttablet/tabletserver/dt_executor.go @@ -31,27 +31,34 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) -// TxExecutor is used for executing a transactional request. -// TODO: merge this with tx_engine -type TxExecutor struct { - // TODO(sougou): Parameterize this. +// DTExecutor is used for executing a distributed transactional request. +type DTExecutor struct { ctx context.Context logStats *tabletenv.LogStats te *TxEngine } +// NewDTExecutor creates a new distributed transaction executor. +func NewDTExecutor(ctx context.Context, te *TxEngine, logStats *tabletenv.LogStats) *DTExecutor { + return &DTExecutor{ + ctx: ctx, + te: te, + logStats: logStats, + } +} + // Prepare performs a prepare on a connection including the redo log work. // If there is any failure, an error is returned. No cleanup is performed. // A subsequent call to RollbackPrepared, which is required by the 2PC // protocol, will perform all the cleanup. -func (txe *TxExecutor) Prepare(transactionID int64, dtid string) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) Prepare(transactionID int64, dtid string) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("PREPARE", time.Now()) - txe.logStats.TransactionID = transactionID + defer dte.te.env.Stats().QueryTimings.Record("PREPARE", time.Now()) + dte.logStats.TransactionID = transactionID - conn, err := txe.te.txPool.GetAndLock(transactionID, "for prepare") + conn, err := dte.te.txPool.GetAndLock(transactionID, "for prepare") if err != nil { return err } @@ -62,14 +69,20 @@ func (txe *TxExecutor) Prepare(transactionID int64, dtid string) error { return nil } - err = txe.te.preparedPool.Put(conn, dtid) + // If the connection is tainted, we cannot prepare it. As there could be temporary tables involved. + if conn.IsTainted() { + conn.Release(tx.TxRollback) + return vterrors.VT12001("cannot prepare the transaction on a reserved connection") + } + + err = dte.te.preparedPool.Put(conn, dtid) if err != nil { - txe.te.txPool.RollbackAndRelease(txe.ctx, conn) + dte.te.txPool.RollbackAndRelease(dte.ctx, conn) return vterrors.Errorf(vtrpcpb.Code_RESOURCE_EXHAUSTED, "prepare failed for transaction %d: %v", transactionID, err) } - return txe.inTransaction(func(localConn *StatefulConnection) error { - return txe.te.twoPC.SaveRedo(txe.ctx, localConn, dtid, conn.TxProperties().Queries) + return dte.inTransaction(func(localConn *StatefulConnection) error { + return dte.te.twoPC.SaveRedo(dte.ctx, localConn, dtid, conn.TxProperties().Queries) }) } @@ -77,12 +90,12 @@ func (txe *TxExecutor) Prepare(transactionID int64, dtid string) error { // CommitPrepared commits a prepared transaction. If the operation // fails, an error counter is incremented and the transaction is // marked as failed in the redo log. -func (txe *TxExecutor) CommitPrepared(dtid string) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) CommitPrepared(dtid string) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("COMMIT_PREPARED", time.Now()) - conn, err := txe.te.preparedPool.FetchForCommit(dtid) + defer dte.te.env.Stats().QueryTimings.Record("COMMIT_PREPARED", time.Now()) + conn, err := dte.te.preparedPool.FetchForCommit(dtid) if err != nil { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "cannot commit dtid %s, state: %v", dtid, err) } @@ -91,19 +104,19 @@ func (txe *TxExecutor) CommitPrepared(dtid string) error { } // We have to use a context that will never give up, // even if the original context expires. - ctx := trace.CopySpan(context.Background(), txe.ctx) - defer txe.te.txPool.RollbackAndRelease(ctx, conn) - err = txe.te.twoPC.DeleteRedo(ctx, conn, dtid) + ctx := trace.CopySpan(context.Background(), dte.ctx) + defer dte.te.txPool.RollbackAndRelease(ctx, conn) + err = dte.te.twoPC.DeleteRedo(ctx, conn, dtid) if err != nil { - txe.markFailed(ctx, dtid) + dte.markFailed(ctx, dtid) return err } - _, err = txe.te.txPool.Commit(ctx, conn) + _, err = dte.te.txPool.Commit(ctx, conn) if err != nil { - txe.markFailed(ctx, dtid) + dte.markFailed(ctx, dtid) return err } - txe.te.preparedPool.Forget(dtid) + dte.te.preparedPool.Forget(dtid) return nil } @@ -113,23 +126,23 @@ func (txe *TxExecutor) CommitPrepared(dtid string) error { // state of the transaction in the redo log as failed. If the // state change does not succeed, it just logs the event. // The function uses the passed in context that has no timeout -// instead of TxExecutor's context. -func (txe *TxExecutor) markFailed(ctx context.Context, dtid string) { - txe.te.env.Stats().InternalErrors.Add("TwopcCommit", 1) - txe.te.preparedPool.SetFailed(dtid) - conn, _, _, err := txe.te.txPool.Begin(ctx, &querypb.ExecuteOptions{}, false, 0, nil, nil) +// instead of DTExecutor's context. +func (dte *DTExecutor) markFailed(ctx context.Context, dtid string) { + dte.te.env.Stats().InternalErrors.Add("TwopcCommit", 1) + dte.te.preparedPool.SetFailed(dtid) + conn, _, _, err := dte.te.txPool.Begin(ctx, &querypb.ExecuteOptions{}, false, 0, nil, nil) if err != nil { log.Errorf("markFailed: Begin failed for dtid %s: %v", dtid, err) return } - defer txe.te.txPool.RollbackAndRelease(ctx, conn) + defer dte.te.txPool.RollbackAndRelease(ctx, conn) - if err = txe.te.twoPC.UpdateRedo(ctx, conn, dtid, RedoStateFailed); err != nil { + if err = dte.te.twoPC.UpdateRedo(ctx, conn, dtid, RedoStateFailed); err != nil { log.Errorf("markFailed: UpdateRedo failed for dtid %s: %v", dtid, err) return } - if _, err = txe.te.txPool.Commit(ctx, conn); err != nil { + if _, err = dte.te.txPool.Commit(ctx, conn); err != nil { log.Errorf("markFailed: Commit failed for dtid %s: %v", dtid, err) } } @@ -152,126 +165,126 @@ func (txe *TxExecutor) markFailed(ctx context.Context, dtid string) { // If so, it must be set to 0, and the function will not attempt that // step. If the original transaction is still alive, the transaction // killer will be the one to eventually roll it back. -func (txe *TxExecutor) RollbackPrepared(dtid string, originalID int64) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) RollbackPrepared(dtid string, originalID int64) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("ROLLBACK_PREPARED", time.Now()) + defer dte.te.env.Stats().QueryTimings.Record("ROLLBACK_PREPARED", time.Now()) defer func() { - if preparedConn := txe.te.preparedPool.FetchForRollback(dtid); preparedConn != nil { - txe.te.txPool.RollbackAndRelease(txe.ctx, preparedConn) + if preparedConn := dte.te.preparedPool.FetchForRollback(dtid); preparedConn != nil { + dte.te.txPool.RollbackAndRelease(dte.ctx, preparedConn) } if originalID != 0 { - txe.te.Rollback(txe.ctx, originalID) + dte.te.Rollback(dte.ctx, originalID) } }() - return txe.inTransaction(func(conn *StatefulConnection) error { - return txe.te.twoPC.DeleteRedo(txe.ctx, conn, dtid) + return dte.inTransaction(func(conn *StatefulConnection) error { + return dte.te.twoPC.DeleteRedo(dte.ctx, conn, dtid) }) } // CreateTransaction creates the metadata for a 2PC transaction. -func (txe *TxExecutor) CreateTransaction(dtid string, participants []*querypb.Target) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) CreateTransaction(dtid string, participants []*querypb.Target) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("CREATE_TRANSACTION", time.Now()) - return txe.inTransaction(func(conn *StatefulConnection) error { - return txe.te.twoPC.CreateTransaction(txe.ctx, conn, dtid, participants) + defer dte.te.env.Stats().QueryTimings.Record("CREATE_TRANSACTION", time.Now()) + return dte.inTransaction(func(conn *StatefulConnection) error { + return dte.te.twoPC.CreateTransaction(dte.ctx, conn, dtid, participants) }) } // StartCommit atomically commits the transaction along with the // decision to commit the associated 2pc transaction. -func (txe *TxExecutor) StartCommit(transactionID int64, dtid string) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) StartCommit(transactionID int64, dtid string) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("START_COMMIT", time.Now()) - txe.logStats.TransactionID = transactionID + defer dte.te.env.Stats().QueryTimings.Record("START_COMMIT", time.Now()) + dte.logStats.TransactionID = transactionID - conn, err := txe.te.txPool.GetAndLock(transactionID, "for 2pc commit") + conn, err := dte.te.txPool.GetAndLock(transactionID, "for 2pc commit") if err != nil { return err } - defer txe.te.txPool.RollbackAndRelease(txe.ctx, conn) + defer dte.te.txPool.RollbackAndRelease(dte.ctx, conn) - err = txe.te.twoPC.Transition(txe.ctx, conn, dtid, querypb.TransactionState_COMMIT) + err = dte.te.twoPC.Transition(dte.ctx, conn, dtid, querypb.TransactionState_COMMIT) if err != nil { return err } - _, err = txe.te.txPool.Commit(txe.ctx, conn) + _, err = dte.te.txPool.Commit(dte.ctx, conn) return err } // SetRollback transitions the 2pc transaction to the Rollback state. // If a transaction id is provided, that transaction is also rolled back. -func (txe *TxExecutor) SetRollback(dtid string, transactionID int64) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) SetRollback(dtid string, transactionID int64) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("SET_ROLLBACK", time.Now()) - txe.logStats.TransactionID = transactionID + defer dte.te.env.Stats().QueryTimings.Record("SET_ROLLBACK", time.Now()) + dte.logStats.TransactionID = transactionID if transactionID != 0 { - txe.te.Rollback(txe.ctx, transactionID) + dte.te.Rollback(dte.ctx, transactionID) } - return txe.inTransaction(func(conn *StatefulConnection) error { - return txe.te.twoPC.Transition(txe.ctx, conn, dtid, querypb.TransactionState_ROLLBACK) + return dte.inTransaction(func(conn *StatefulConnection) error { + return dte.te.twoPC.Transition(dte.ctx, conn, dtid, querypb.TransactionState_ROLLBACK) }) } // ConcludeTransaction deletes the 2pc transaction metadata // essentially resolving it. -func (txe *TxExecutor) ConcludeTransaction(dtid string) error { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) ConcludeTransaction(dtid string) error { + if !dte.te.twopcEnabled { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - defer txe.te.env.Stats().QueryTimings.Record("RESOLVE", time.Now()) + defer dte.te.env.Stats().QueryTimings.Record("RESOLVE", time.Now()) - return txe.inTransaction(func(conn *StatefulConnection) error { - return txe.te.twoPC.DeleteTransaction(txe.ctx, conn, dtid) + return dte.inTransaction(func(conn *StatefulConnection) error { + return dte.te.twoPC.DeleteTransaction(dte.ctx, conn, dtid) }) } // ReadTransaction returns the metadata for the specified dtid. -func (txe *TxExecutor) ReadTransaction(dtid string) (*querypb.TransactionMetadata, error) { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) ReadTransaction(dtid string) (*querypb.TransactionMetadata, error) { + if !dte.te.twopcEnabled { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - return txe.te.twoPC.ReadTransaction(txe.ctx, dtid) + return dte.te.twoPC.ReadTransaction(dte.ctx, dtid) } // ReadTwopcInflight returns info about all in-flight 2pc transactions. -func (txe *TxExecutor) ReadTwopcInflight() (distributed []*tx.DistributedTx, prepared, failed []*tx.PreparedTx, err error) { - if !txe.te.twopcEnabled { +func (dte *DTExecutor) ReadTwopcInflight() (distributed []*tx.DistributedTx, prepared, failed []*tx.PreparedTx, err error) { + if !dte.te.twopcEnabled { return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "2pc is not enabled") } - prepared, failed, err = txe.te.twoPC.ReadAllRedo(txe.ctx) + prepared, failed, err = dte.te.twoPC.ReadAllRedo(dte.ctx) if err != nil { return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "Could not read redo: %v", err) } - distributed, err = txe.te.twoPC.ReadAllTransactions(txe.ctx) + distributed, err = dte.te.twoPC.ReadAllTransactions(dte.ctx) if err != nil { return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "Could not read redo: %v", err) } return distributed, prepared, failed, nil } -func (txe *TxExecutor) inTransaction(f func(*StatefulConnection) error) error { - conn, _, _, err := txe.te.txPool.Begin(txe.ctx, &querypb.ExecuteOptions{}, false, 0, nil, nil) +func (dte *DTExecutor) inTransaction(f func(*StatefulConnection) error) error { + conn, _, _, err := dte.te.txPool.Begin(dte.ctx, &querypb.ExecuteOptions{}, false, 0, nil, nil) if err != nil { return err } - defer txe.te.txPool.RollbackAndRelease(txe.ctx, conn) + defer dte.te.txPool.RollbackAndRelease(dte.ctx, conn) err = f(conn) if err != nil { return err } - _, err = txe.te.txPool.Commit(txe.ctx, conn) + _, err = dte.te.txPool.Commit(dte.ctx, conn) if err != nil { return err } diff --git a/go/vt/vttablet/tabletserver/tx_executor_test.go b/go/vt/vttablet/tabletserver/dt_executor_test.go similarity index 95% rename from go/vt/vttablet/tabletserver/tx_executor_test.go rename to go/vt/vttablet/tabletserver/dt_executor_test.go index c3949240147..6637cc83841 100644 --- a/go/vt/vttablet/tabletserver/tx_executor_test.go +++ b/go/vt/vttablet/tabletserver/dt_executor_test.go @@ -71,6 +71,22 @@ func TestTxExecutorPrepare(t *testing.T) { require.NoError(t, err) } +// TestTxExecutorPrepareResevedConn tests the case where a reserved connection is used for prepare. +func TestDTExecutorPrepareResevedConn(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + txe, tsv, db := newTestTxExecutor(t, ctx) + defer db.Close() + defer tsv.StopService() + txid := newTxForPrep(ctx, tsv) + + // Reserve a connection + txe.te.Reserve(ctx, nil, txid, nil) + + err := txe.Prepare(txid, "aa") + require.ErrorContains(t, err, "VT12001: unsupported: cannot prepare the transaction on a reserved connection") +} + func TestTxExecutorPrepareNotInTx(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -533,7 +549,7 @@ func TestNoTwopc(t *testing.T) { } } -func newTestTxExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, tsv *TabletServer, db *fakesqldb.DB) { +func newTestTxExecutor(t *testing.T, ctx context.Context) (txe *DTExecutor, tsv *TabletServer, db *fakesqldb.DB) { db = setUpQueryExecutorTest(t) logStats := tabletenv.NewLogStats(ctx, "TestTxExecutor") tsv = newTestTabletServer(ctx, smallTxPool, db) @@ -542,7 +558,7 @@ func newTestTxExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, tsv db.AddQuery("delete from _vt.redo_state where dtid = 'aa'", &sqltypes.Result{}) db.AddQuery("delete from _vt.redo_statement where dtid = 'aa'", &sqltypes.Result{}) db.AddQuery("update test_table set `name` = 2 where pk = 1 limit 10001", &sqltypes.Result{}) - return &TxExecutor{ + return &DTExecutor{ ctx: ctx, logStats: logStats, te: tsv.te, @@ -550,7 +566,7 @@ func newTestTxExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, tsv } // newShortAgeExecutor is same as newTestTxExecutor, but shorter transaction abandon age. -func newShortAgeExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, tsv *TabletServer, db *fakesqldb.DB) { +func newShortAgeExecutor(t *testing.T, ctx context.Context) (txe *DTExecutor, tsv *TabletServer, db *fakesqldb.DB) { db = setUpQueryExecutorTest(t) logStats := tabletenv.NewLogStats(ctx, "TestTxExecutor") tsv = newTestTabletServer(ctx, smallTxPool|shortTwopcAge, db) @@ -559,7 +575,7 @@ func newShortAgeExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, ts db.AddQuery("delete from _vt.redo_state where dtid = 'aa'", &sqltypes.Result{}) db.AddQuery("delete from _vt.redo_statement where dtid = 'aa'", &sqltypes.Result{}) db.AddQuery("update test_table set `name` = 2 where pk = 1 limit 10001", &sqltypes.Result{}) - return &TxExecutor{ + return &DTExecutor{ ctx: ctx, logStats: logStats, te: tsv.te, @@ -567,11 +583,11 @@ func newShortAgeExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, ts } // newNoTwopcExecutor is same as newTestTxExecutor, but 2pc disabled. -func newNoTwopcExecutor(t *testing.T, ctx context.Context) (txe *TxExecutor, tsv *TabletServer, db *fakesqldb.DB) { +func newNoTwopcExecutor(t *testing.T, ctx context.Context) (txe *DTExecutor, tsv *TabletServer, db *fakesqldb.DB) { db = setUpQueryExecutorTest(t) logStats := tabletenv.NewLogStats(ctx, "TestTxExecutor") tsv = newTestTabletServer(ctx, noTwopc, db) - return &TxExecutor{ + return &DTExecutor{ ctx: ctx, logStats: logStats, te: tsv.te, diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index eb140454c2a..7a3d7cc5c06 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -645,11 +645,7 @@ func (tsv *TabletServer) Prepare(ctx context.Context, target *querypb.Target, tr "Prepare", "prepare", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.Prepare(transactionID, dtid) }, ) @@ -662,11 +658,7 @@ func (tsv *TabletServer) CommitPrepared(ctx context.Context, target *querypb.Tar "CommitPrepared", "commit_prepared", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.CommitPrepared(dtid) }, ) @@ -679,11 +671,7 @@ func (tsv *TabletServer) RollbackPrepared(ctx context.Context, target *querypb.T "RollbackPrepared", "rollback_prepared", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.RollbackPrepared(dtid, originalID) }, ) @@ -696,11 +684,7 @@ func (tsv *TabletServer) CreateTransaction(ctx context.Context, target *querypb. "CreateTransaction", "create_transaction", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.CreateTransaction(dtid, participants) }, ) @@ -714,11 +698,7 @@ func (tsv *TabletServer) StartCommit(ctx context.Context, target *querypb.Target "StartCommit", "start_commit", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.StartCommit(transactionID, dtid) }, ) @@ -732,11 +712,7 @@ func (tsv *TabletServer) SetRollback(ctx context.Context, target *querypb.Target "SetRollback", "set_rollback", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.SetRollback(dtid, transactionID) }, ) @@ -750,11 +726,7 @@ func (tsv *TabletServer) ConcludeTransaction(ctx context.Context, target *queryp "ConcludeTransaction", "conclude_transaction", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) return txe.ConcludeTransaction(dtid) }, ) @@ -767,11 +739,7 @@ func (tsv *TabletServer) ReadTransaction(ctx context.Context, target *querypb.Ta "ReadTransaction", "read_transaction", nil, target, nil, true, /* allowOnShutdown */ func(ctx context.Context, logStats *tabletenv.LogStats) error { - txe := &TxExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, logStats) metadata, err = txe.ReadTransaction(dtid) return err }, @@ -1778,11 +1746,7 @@ func (tsv *TabletServer) registerQueryListHandlers(queryLists []*QueryList) { func (tsv *TabletServer) registerTwopczHandler() { tsv.exporter.HandleFunc("/twopcz", func(w http.ResponseWriter, r *http.Request) { ctx := tabletenv.LocalContext() - txe := &TxExecutor{ - ctx: ctx, - logStats: tabletenv.NewLogStats(ctx, "twopcz"), - te: tsv.te, - } + txe := NewDTExecutor(ctx, tsv.te, tabletenv.NewLogStats(ctx, "twopcz")) twopczHandler(txe, w, r) }) } diff --git a/go/vt/vttablet/tabletserver/twopcz.go b/go/vt/vttablet/tabletserver/twopcz.go index e9547c311bd..51ed457c679 100644 --- a/go/vt/vttablet/tabletserver/twopcz.go +++ b/go/vt/vttablet/tabletserver/twopcz.go @@ -130,7 +130,7 @@ var ( `)) ) -func twopczHandler(txe *TxExecutor, w http.ResponseWriter, r *http.Request) { +func twopczHandler(txe *DTExecutor, w http.ResponseWriter, r *http.Request) { if err := acl.CheckAccessHTTP(r, acl.DEBUGGING); err != nil { acl.SendError(w, err) return From d303601040ebb8e01197410b774d525e11e46e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Thu, 4 Jul 2024 23:43:16 +0200 Subject: [PATCH 16/55] Improve typing during query planning (#16310) Signed-off-by: Andres Taylor --- .../planbuilder/operators/aggregator.go | 4 +- .../vtgate/planbuilder/operators/distinct.go | 2 +- .../vtgate/planbuilder/operators/ordering.go | 2 +- .../planbuilder/operators/queryprojection.go | 2 +- go/vt/vtgate/planbuilder/operators/route.go | 2 +- .../plancontext/planning_context.go | 109 ++++++- .../plancontext/planning_context_test.go | 270 +++++++++++++++++- .../planbuilder/testdata/aggr_cases.json | 26 +- .../planbuilder/testdata/from_cases.json | 56 ++++ .../testdata/postprocess_cases.json | 8 +- .../planbuilder/testdata/union_cases.json | 58 ++-- .../testdata/unsupported_cases.json | 5 - go/vt/vtgate/semantics/semantic_state.go | 19 -- 13 files changed, 476 insertions(+), 87 deletions(-) diff --git a/go/vt/vtgate/planbuilder/operators/aggregator.go b/go/vt/vtgate/planbuilder/operators/aggregator.go index 9db119bcaad..fd9fca30110 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregator.go +++ b/go/vt/vtgate/planbuilder/operators/aggregator.go @@ -379,7 +379,7 @@ func (a *Aggregator) planOffsets(ctx *plancontext.PlanningContext) Operator { a.Grouping[idx].ColOffset = offset gb.ColOffset = offset } - if gb.WSOffset != -1 || !ctx.SemTable.NeedsWeightString(gb.Inner) { + if gb.WSOffset != -1 || !ctx.NeedsWeightString(gb.Inner) { continue } @@ -516,7 +516,7 @@ func (a *Aggregator) pushRemainingGroupingColumnsAndWeightStrings(ctx *planconte a.Grouping[idx].ColOffset = offset } - if gb.WSOffset != -1 || !ctx.SemTable.NeedsWeightString(gb.Inner) { + if gb.WSOffset != -1 || !ctx.NeedsWeightString(gb.Inner) { continue } diff --git a/go/vt/vtgate/planbuilder/operators/distinct.go b/go/vt/vtgate/planbuilder/operators/distinct.go index 7807b94d491..4fd53725e10 100644 --- a/go/vt/vtgate/planbuilder/operators/distinct.go +++ b/go/vt/vtgate/planbuilder/operators/distinct.go @@ -50,7 +50,7 @@ func (d *Distinct) planOffsets(ctx *plancontext.PlanningContext) Operator { for idx, col := range columns { e := col.Expr var wsCol *int - if ctx.SemTable.NeedsWeightString(e) { + if ctx.NeedsWeightString(e) { offset := d.Source.AddWSColumn(ctx, idx, false) wsCol = &offset } diff --git a/go/vt/vtgate/planbuilder/operators/ordering.go b/go/vt/vtgate/planbuilder/operators/ordering.go index 5414b34fc40..94c4f3dd846 100644 --- a/go/vt/vtgate/planbuilder/operators/ordering.go +++ b/go/vt/vtgate/planbuilder/operators/ordering.go @@ -86,7 +86,7 @@ func (o *Ordering) planOffsets(ctx *plancontext.PlanningContext) Operator { offset := o.Source.AddColumn(ctx, true, false, aeWrap(order.SimplifiedExpr)) o.Offset = append(o.Offset, offset) - if !ctx.SemTable.NeedsWeightString(order.SimplifiedExpr) { + if !ctx.NeedsWeightString(order.SimplifiedExpr) { o.WOffset = append(o.WOffset, -1) continue } diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index 548fc5aaa0b..8ad8a6efe1e 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -89,7 +89,7 @@ type ( ) func (aggr Aggr) NeedsWeightString(ctx *plancontext.PlanningContext) bool { - return aggr.OpCode.NeedsComparableValues() && ctx.SemTable.NeedsWeightString(aggr.Func.GetArg()) + return aggr.OpCode.NeedsComparableValues() && ctx.NeedsWeightString(aggr.Func.GetArg()) } func (aggr Aggr) GetTypeCollation(ctx *plancontext.PlanningContext) evalengine.Type { diff --git a/go/vt/vtgate/planbuilder/operators/route.go b/go/vt/vtgate/planbuilder/operators/route.go index cc049d22753..62d6aad6a97 100644 --- a/go/vt/vtgate/planbuilder/operators/route.go +++ b/go/vt/vtgate/planbuilder/operators/route.go @@ -805,7 +805,7 @@ func (r *Route) planOffsets(ctx *plancontext.PlanningContext) Operator { WOffset: -1, Direction: order.Inner.Direction, } - if ctx.SemTable.NeedsWeightString(order.SimplifiedExpr) { + if ctx.NeedsWeightString(order.SimplifiedExpr) { ws := weightStringFor(order.SimplifiedExpr) offset := r.AddColumn(ctx, true, false, aeWrap(ws)) o.WOffset = offset diff --git a/go/vt/vtgate/planbuilder/plancontext/planning_context.go b/go/vt/vtgate/planbuilder/plancontext/planning_context.go index 7db192ab7f8..58be17febab 100644 --- a/go/vt/vtgate/planbuilder/plancontext/planning_context.go +++ b/go/vt/vtgate/planbuilder/plancontext/planning_context.go @@ -23,6 +23,7 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/semantics" ) @@ -214,7 +215,12 @@ func (ctx *PlanningContext) RewriteDerivedTableExpression(expr sqlparser.Expr, t func (ctx *PlanningContext) TypeForExpr(e sqlparser.Expr) (evalengine.Type, bool) { t, found := ctx.SemTable.TypeForExpr(e) if !found { - return t, found + typ := ctx.calculateTypeFor(e) + if typ.Valid() { + ctx.SemTable.ExprTypes[e] = typ + return typ, true + } + return evalengine.NewUnknownType(), false } deps := ctx.SemTable.RecursiveDeps(e) // If the expression is from an outer table, it should be nullable @@ -226,6 +232,89 @@ func (ctx *PlanningContext) TypeForExpr(e sqlparser.Expr) (evalengine.Type, bool return t, true } +func (ctx *PlanningContext) calculateTypeFor(e sqlparser.Expr) evalengine.Type { + cfg := &evalengine.Config{ + ResolveType: func(expr sqlparser.Expr) (evalengine.Type, bool) { + col, isCol := expr.(*sqlparser.ColName) + if !isCol { + return evalengine.NewUnknownType(), false + } + return ctx.SemTable.TypeForExpr(col) + }, + Collation: ctx.SemTable.Collation, + Environment: ctx.VSchema.Environment(), + ResolveColumn: func(name *sqlparser.ColName) (int, error) { + // We don't need to resolve the column for type calculation + return 0, nil + }, + } + env := evalengine.EmptyExpressionEnv(ctx.VSchema.Environment()) + + // We need to rewrite the aggregate functions to their corresponding types + // The evaluation engine compiler doesn't handle them, so we replace them with Arguments before + // asking the compiler for the type + + // TODO: put this back in when we can calculate the aggregation types correctly + // expr, unknown := ctx.replaceAggrWithArg(e, cfg, env) + // if unknown { + // return evalengine.NewUnknownType() + // } + + translatedExpr, err := evalengine.Translate(e, cfg) + if err != nil { + return evalengine.NewUnknownType() + } + + typ, err := env.TypeOf(translatedExpr) + if err != nil { + return evalengine.NewUnknownType() + } + return typ +} + +// replaceAggrWithArg replaces aggregate functions with Arguments in the given expression. +// this is to prepare for sending the expression to the evalengine compiler to figure out the type +func (ctx *PlanningContext) replaceAggrWithArg(e sqlparser.Expr, cfg *evalengine.Config, env *evalengine.ExpressionEnv) (expr sqlparser.Expr, unknown bool) { + expr = sqlparser.CopyOnRewrite(e, nil, func(cursor *sqlparser.CopyOnWriteCursor) { + agg, ok := cursor.Node().(sqlparser.AggrFunc) + if !ok { + return + } + code, ok := opcode.SupportedAggregates[agg.AggrName()] + if !ok { + // We don't know the type of this aggregate function + // The type calculation will be set to unknown + unknown = true + cursor.StopTreeWalk() + return + } + var inputType evalengine.Type + if arg := agg.GetArg(); arg != nil { + translatedExpr, err := evalengine.Translate(arg, cfg) + if err != nil { + unknown = true + cursor.StopTreeWalk() + return + } + + inputType, err = env.TypeOf(translatedExpr) + if err != nil { + unknown = true + cursor.StopTreeWalk() + return + } + } + typ := code.ResolveType(inputType, ctx.VSchema.Environment().CollationEnv()) + cursor.Replace(&sqlparser.Argument{ + Name: "arg", + Type: typ.Type(), + Size: typ.Size(), + Scale: typ.Scale(), + }) + }, nil).(sqlparser.Expr) + return expr, unknown +} + // SQLTypeForExpr returns the sql type of the given expression, with nullable set if the expression is from an outer table. func (ctx *PlanningContext) SQLTypeForExpr(e sqlparser.Expr) sqltypes.Type { t, found := ctx.TypeForExpr(e) @@ -235,6 +324,24 @@ func (ctx *PlanningContext) SQLTypeForExpr(e sqlparser.Expr) sqltypes.Type { return t.Type() } +func (ctx *PlanningContext) NeedsWeightString(e sqlparser.Expr) bool { + switch e := e.(type) { + case *sqlparser.WeightStringFuncExpr, *sqlparser.Literal: + return false + default: + typ, found := ctx.TypeForExpr(e) + if !found { + return true + } + + if !sqltypes.IsText(typ.Type()) { + return false + } + + return !ctx.VSchema.Environment().CollationEnv().IsSupported(typ.Collation()) + } +} + func (ctx *PlanningContext) IsAggr(e sqlparser.SQLNode) bool { switch node := e.(type) { case sqlparser.AggrFunc: diff --git a/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go b/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go index b47286abdb2..3ab58cba724 100644 --- a/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go +++ b/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go @@ -17,6 +17,8 @@ limitations under the License. package plancontext import ( + "context" + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -24,12 +26,81 @@ import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/key" + querypb "vitess.io/vitess/go/vt/proto/query" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vschemapb "vitess.io/vitess/go/vt/proto/vschema" + vtgatepb "vitess.io/vitess/go/vt/proto/vtgate" + "vitess.io/vitess/go/vt/vtenv" + "vitess.io/vitess/go/vt/vtgate/engine" "vitess.io/vitess/go/vt/vtgate/evalengine" + "vitess.io/vitess/go/vt/vtgate/vindexes" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/semantics" ) +func TestTyping(t *testing.T) { + // this test checks that PlanningContext can take an expression with only columns typed and + // return the type of the full expression + // col1 is a bigint, and col2 is a varchar + expr, err := sqlparser.NewTestParser().ParseExpr("sum(length(col1)) + avg(acos(col2))") + require.NoError(t, err) + semTable := semantics.EmptySemTable() + var sum, avg, col1, col2, length, acos sqlparser.Expr + + // here we walk the expression tree and fetch the two aggregate functions, and set the types for the columns + _ = sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { + switch node := node.(type) { + case *sqlparser.ColName: + switch node.Name.String() { + case "col1": + semTable.ExprTypes[node] = evalengine.NewType(sqltypes.Int64, collations.Unknown) + col1 = node + case "col2": + semTable.ExprTypes[node] = evalengine.NewType(sqltypes.VarChar, collations.Unknown) + col2 = node + } + case *sqlparser.FuncExpr: + switch node.Name.Lowered() { + case "length": + length = node + case "acos": + acos = node + } + + case *sqlparser.Sum: + sum = node + case *sqlparser.Avg: + avg = node + } + + return true, nil + }, expr) + + ctx := createPlanContext(semTable) + + expectations := map[sqlparser.Expr]sqltypes.Type{ + // TODO: re-enable these tests once we can calculate aggregation types + // sum: sqltypes.Decimal, + // avg: sqltypes.Float64, + // expr: sqltypes.Float64, + col1: sqltypes.Int64, + col2: sqltypes.VarChar, + length: sqltypes.Int64, + acos: sqltypes.Float64, + } + fmt.Println(sum, avg, expr, acos, col1, col2) + + for expr, expected := range expectations { + t.Run(sqlparser.String(expr), func(t *testing.T) { + typ, found := ctx.TypeForExpr(expr) + require.True(t, found) + require.Equal(t, expected, typ.Type()) + }) + } +} + func TestOuterTableNullability(t *testing.T) { // Tests that columns from outer tables are nullable, // even though the semantic state says that they are not nullable. @@ -96,13 +167,202 @@ func prepareContextAndFindColumns(t *testing.T, query string) (ctx *PlanningCont return false, nil }, nil, expr) - ctx = &PlanningContext{ - SemTable: semTable, + ctx = createPlanContext(semTable) + ctx.Statement = stmt + ctx.OuterTables = t2 + + return +} + +func createPlanContext(st *semantics.SemTable) *PlanningContext { + return &PlanningContext{ + SemTable: st, joinPredicates: map[sqlparser.Expr][]sqlparser.Expr{}, skipPredicates: map[sqlparser.Expr]any{}, ReservedArguments: map[sqlparser.Expr]string{}, - Statement: stmt, - OuterTables: t2, // t2 is the outer table. + VSchema: &vschema{}, } - return } + +type vschema struct{} + +func (v *vschema) FindTable(tablename sqlparser.TableName) (*vindexes.Table, string, topodatapb.TabletType, key.Destination, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) FindView(name sqlparser.TableName) sqlparser.SelectStatement { + // TODO implement me + panic("implement me") +} + +func (v *vschema) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) DefaultKeyspace() (*vindexes.Keyspace, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) TargetString() string { + // TODO implement me + panic("implement me") +} + +func (v *vschema) Destination() key.Destination { + // TODO implement me + panic("implement me") +} + +func (v *vschema) TabletType() topodatapb.TabletType { + // TODO implement me + panic("implement me") +} + +func (v *vschema) TargetDestination(qualifier string) (key.Destination, *vindexes.Keyspace, topodatapb.TabletType, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) AnyKeyspace() (*vindexes.Keyspace, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) FirstSortedKeyspace() (*vindexes.Keyspace, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) SysVarSetEnabled() bool { + // TODO implement me + panic("implement me") +} + +func (v *vschema) KeyspaceExists(keyspace string) bool { + // TODO implement me + panic("implement me") +} + +func (v *vschema) AllKeyspace() ([]*vindexes.Keyspace, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) FindKeyspace(keyspace string) (*vindexes.Keyspace, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetSemTable() *semantics.SemTable { + // TODO implement me + panic("implement me") +} + +func (v *vschema) Planner() PlannerVersion { + // TODO implement me + panic("implement me") +} + +func (v *vschema) SetPlannerVersion(pv PlannerVersion) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) ConnCollation() collations.ID { + // TODO implement me + panic("implement me") +} + +func (v *vschema) Environment() *vtenv.Environment { + return vtenv.NewTestEnv() +} + +func (v *vschema) ErrorIfShardedF(keyspace *vindexes.Keyspace, warn, errFmt string, params ...any) error { + // TODO implement me + panic("implement me") +} + +func (v *vschema) WarnUnshardedOnly(format string, params ...any) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) PlannerWarning(message string) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) ForeignKeyMode(keyspace string) (vschemapb.Keyspace_ForeignKeyMode, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) KeyspaceError(keyspace string) error { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetForeignKeyChecksState() *bool { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetVSchema() *vindexes.VSchema { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetSrvVschema() *vschemapb.SrvVSchema { + // TODO implement me + panic("implement me") +} + +func (v *vschema) FindRoutedShard(keyspace, shard string) (string, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) IsShardRoutingEnabled() bool { + // TODO implement me + panic("implement me") +} + +func (v *vschema) IsViewsEnabled() bool { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetUDV(name string) *querypb.BindVariable { + // TODO implement me + panic("implement me") +} + +func (v *vschema) PlanPrepareStatement(ctx context.Context, query string) (*engine.Plan, sqlparser.Statement, error) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) ClearPrepareData(stmtName string) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetPrepareData(stmtName string) *vtgatepb.PrepareData { + // TODO implement me + panic("implement me") +} + +func (v *vschema) StorePrepareData(name string, pd *vtgatepb.PrepareData) { + // TODO implement me + panic("implement me") +} + +func (v *vschema) GetAggregateUDFs() []string { + // TODO implement me + panic("implement me") +} + +var _ VSchema = (*vschema)(nil) diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index d51e2868f6c..b124e8f2b50 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -1675,8 +1675,7 @@ "OperatorType": "Aggregate", "Variant": "Ordered", "Aggregates": "sum_count_star(1) AS count(*)", - "GroupBy": "(0|2)", - "ResultColumns": 2, + "GroupBy": "0 COLLATE latin1_swedish_ci", "Inputs": [ { "OperatorType": "Route", @@ -1685,9 +1684,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select lower(col1) as v, count(*), weight_string(lower(col1)) from authoritative where 1 != 1 group by lower(col1), weight_string(lower(col1))", - "OrderBy": "(0|2) ASC", - "Query": "select lower(col1) as v, count(*), weight_string(lower(col1)) from authoritative group by lower(col1), weight_string(lower(col1)) order by lower(col1) asc", + "FieldQuery": "select lower(col1) as v, count(*) from authoritative where 1 != 1 group by lower(col1)", + "OrderBy": "0 ASC COLLATE latin1_swedish_ci", + "Query": "select lower(col1) as v, count(*) from authoritative group by lower(col1) order by lower(col1) asc", "Table": "authoritative" } ] @@ -1707,8 +1706,7 @@ "OperatorType": "Aggregate", "Variant": "Ordered", "Aggregates": "sum_count_star(1) AS count(*)", - "GroupBy": "(0|2)", - "ResultColumns": 2, + "GroupBy": "0", "Inputs": [ { "OperatorType": "Route", @@ -1717,9 +1715,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select char_length(col1) as a, count(*), weight_string(char_length(col1)) from authoritative where 1 != 1 group by char_length(col1), weight_string(char_length(col1))", - "OrderBy": "(0|2) ASC", - "Query": "select char_length(col1) as a, count(*), weight_string(char_length(col1)) from authoritative group by char_length(col1), weight_string(char_length(col1)) order by char_length(authoritative.col1) asc", + "FieldQuery": "select char_length(col1) as a, count(*) from authoritative where 1 != 1 group by char_length(col1)", + "OrderBy": "0 ASC", + "Query": "select char_length(col1) as a, count(*) from authoritative group by char_length(col1) order by char_length(authoritative.col1) asc", "Table": "authoritative" } ] @@ -4085,13 +4083,13 @@ "Instructions": { "OperatorType": "Sort", "Variant": "Memory", - "OrderBy": "(2|3) ASC", + "OrderBy": "2 ASC", "ResultColumns": 2, "Inputs": [ { "OperatorType": "Aggregate", "Variant": "Ordered", - "Aggregates": "sum_count_star(1) AS count(*), any_value(2) AS col + 1, any_value(3)", + "Aggregates": "sum_count_star(1) AS count(*), any_value(2) AS col + 1", "GroupBy": "0", "Inputs": [ { @@ -4101,9 +4099,9 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select col, count(*), col + 1, weight_string(col + 1) from `user` where 1 != 1 group by col", + "FieldQuery": "select col, count(*), col + 1 from `user` where 1 != 1 group by col", "OrderBy": "0 ASC", - "Query": "select col, count(*), col + 1, weight_string(col + 1) from `user` group by col order by col asc", + "Query": "select col, count(*), col + 1 from `user` group by col order by col asc", "Table": "`user`" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/from_cases.json b/go/vt/vtgate/planbuilder/testdata/from_cases.json index 6db17511a2a..0e540e88b27 100644 --- a/go/vt/vtgate/planbuilder/testdata/from_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/from_cases.json @@ -2841,6 +2841,62 @@ ] } }, + { + "comment": "Hash join has to be used since we have LIMIT on both sides", + "query": "select id from (select id from user limit 10) u join (select user_id from user_extra limit 10) ue on u.id = ue.user_id", + "plan": { + "QueryType": "SELECT", + "Original": "select id from (select id from user limit 10) u join (select user_id from user_extra limit 10) ue on u.id = ue.user_id", + "Instructions": { + "OperatorType": "Join", + "Variant": "HashJoin", + "ComparisonType": "-1", + "JoinColumnIndexes": "-1", + "Predicate": "u.id = ue.user_id", + "TableName": "`user`_user_extra", + "Inputs": [ + { + "OperatorType": "Limit", + "Count": "10", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select u.id from (select id from `user` where 1 != 1) as u where 1 != 1", + "Query": "select u.id from (select id from `user`) as u limit 10", + "Table": "`user`" + } + ] + }, + { + "OperatorType": "Limit", + "Count": "10", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select ue.user_id from (select user_id from user_extra where 1 != 1) as ue where 1 != 1", + "Query": "select ue.user_id from (select user_id from user_extra) as ue limit 10", + "Table": "user_extra" + } + ] + } + ] + }, + "TablesUsed": [ + "user.user", + "user.user_extra" + ] + } + }, { "comment": "alias on column from derived table. TODO: to support alias in SimpleProjection engine primitive.", "query": "select a as k from (select count(*) as a from user) t", diff --git a/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json b/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json index 8e2fd1e31cf..74e5229016a 100644 --- a/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json @@ -2030,13 +2030,13 @@ "Instructions": { "OperatorType": "Sort", "Variant": "Memory", - "OrderBy": "(1|2) ASC", + "OrderBy": "1 ASC", "ResultColumns": 1, "Inputs": [ { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0,R:0,R:1", + "JoinColumnIndexes": "L:0,R:0", "JoinVars": { "user_col": 1 }, @@ -2060,8 +2060,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select coalesce(:user_col /* INT16 */, user_extra.col), weight_string(coalesce(:user_col /* INT16 */, user_extra.col)) from user_extra where 1 != 1", - "Query": "select coalesce(:user_col /* INT16 */, user_extra.col), weight_string(coalesce(:user_col /* INT16 */, user_extra.col)) from user_extra", + "FieldQuery": "select coalesce(:user_col /* INT16 */, user_extra.col) from user_extra where 1 != 1", + "Query": "select coalesce(:user_col /* INT16 */, user_extra.col) from user_extra", "Table": "user_extra" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/union_cases.json b/go/vt/vtgate/planbuilder/testdata/union_cases.json index 49458f8c608..7feabb0a698 100644 --- a/go/vt/vtgate/planbuilder/testdata/union_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/union_cases.json @@ -376,9 +376,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -387,8 +386,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as id, weight_string(dt.c0) from (select id from `user` where 1 != 1 union select id from music where 1 != 1 union select 1 from dual where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as id, weight_string(dt.c0) from (select id from `user` union select id from music union select 1 from dual) as dt(c0)", + "FieldQuery": "select id from `user` where 1 != 1 union select id from music where 1 != 1 union select 1 from dual where 1 != 1", + "Query": "select id from `user` union select id from music union select 1 from dual", "Table": "`user`, dual, music" } ] @@ -526,9 +525,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -537,8 +535,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as `1`, weight_string(dt.c0) from (select 1 from dual where 1 != 1 union select null from dual where 1 != 1 union select 1.0 from dual where 1 != 1 union select '1' from dual where 1 != 1 union select 2 from dual where 1 != 1 union select 2.0 from `user` where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as `1`, weight_string(dt.c0) from (select 1 from dual union select null from dual union select 1.0 from dual union select '1' from dual union select 2 from dual union select 2.0 from `user`) as dt(c0)", + "FieldQuery": "select 1 from dual where 1 != 1 union select null from dual where 1 != 1 union select 1.0 from dual where 1 != 1 union select '1' from dual where 1 != 1 union select 2 from dual where 1 != 1 union select 2.0 from `user` where 1 != 1", + "Query": "select 1 from dual union select null from dual union select 1.0 from dual union select '1' from dual union select 2 from dual union select 2.0 from `user`", "Table": "`user`, dual" } ] @@ -840,9 +838,8 @@ { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -851,8 +848,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as id, weight_string(dt.c0) from (select id from `user` where 1 != 1 union select 3 from dual where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as id, weight_string(dt.c0) from (select id from `user` union select 3 from dual limit :__upper_limit) as dt(c0)", + "FieldQuery": "select id from `user` where 1 != 1 union select 3 from dual where 1 != 1", + "Query": "select id from `user` union select 3 from dual limit :__upper_limit", "Table": "`user`, dual" } ] @@ -1092,7 +1089,7 @@ { "OperatorType": "Distinct", "Collations": [ - "(0:1)", + "0", "1" ], "Inputs": [ @@ -1663,9 +1660,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -1674,8 +1670,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as col1, weight_string(dt.c0) from (select col1 from `user` where 1 != 1 union select 3 from `user` where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as col1, weight_string(dt.c0) from (select col1 from `user` union select 3 from `user`) as dt(c0)", + "FieldQuery": "select col1 from `user` where 1 != 1 union select 3 from `user` where 1 != 1", + "Query": "select col1 from `user` union select 3 from `user`", "Table": "`user`" } ] @@ -1694,9 +1690,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -1705,8 +1700,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as `3`, weight_string(dt.c0) from (select 3 from `user` where 1 != 1 union select col1 from `user` where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as `3`, weight_string(dt.c0) from (select 3 from `user` union select col1 from `user`) as dt(c0)", + "FieldQuery": "select 3 from `user` where 1 != 1 union select col1 from `user` where 1 != 1", + "Query": "select 3 from `user` union select col1 from `user`", "Table": "`user`" } ] @@ -1725,9 +1720,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0: binary" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -1736,8 +1730,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as `3`, weight_string(dt.c0) from (select 3 from `user` where 1 != 1 union select now() from `user` where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as `3`, weight_string(dt.c0) from (select 3 from `user` union select now() from `user`) as dt(c0)", + "FieldQuery": "select 3 from `user` where 1 != 1 union select now() from `user` where 1 != 1", + "Query": "select 3 from `user` union select now() from `user`", "Table": "`user`" } ] @@ -1756,9 +1750,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0: binary" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -1767,8 +1760,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as `now()`, weight_string(dt.c0) from (select now() from `user` where 1 != 1 union select 3 from `user` where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as `now()`, weight_string(dt.c0) from (select now() from `user` union select 3 from `user`) as dt(c0)", + "FieldQuery": "select now() from `user` where 1 != 1 union select 3 from `user` where 1 != 1", + "Query": "select now() from `user` union select 3 from `user`", "Table": "`user`" } ] @@ -1787,9 +1780,8 @@ "Instructions": { "OperatorType": "Distinct", "Collations": [ - "(0:1)" + "0" ], - "ResultColumns": 1, "Inputs": [ { "OperatorType": "Route", @@ -1798,8 +1790,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select dt.c0 as `now()`, weight_string(dt.c0) from (select now() from `user` where 1 != 1 union select id from `user` where 1 != 1) as dt(c0) where 1 != 1", - "Query": "select dt.c0 as `now()`, weight_string(dt.c0) from (select now() from `user` union select id from `user`) as dt(c0)", + "FieldQuery": "select now() from `user` where 1 != 1 union select id from `user` where 1 != 1", + "Query": "select now() from `user` union select id from `user`", "Table": "`user`" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json index 38119ba936c..6f3148e602b 100644 --- a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json @@ -279,11 +279,6 @@ "query": "select 1 from user u where u.col = 6 or exists (select 1 from user_extra ue where ue.col = u.col and u.col = ue.col2)", "plan": "VT12001: unsupported: unmergable subquery can not be inside complex expression" }, - { - "comment": "this query needs better type information to be able to use the hash join", - "query": "select id from (select id from user limit 10) u join (select user_id from user_extra limit 10) ue on u.id = ue.user_id", - "plan": "VT12001: unsupported: missing type information for [u.id, ue.user_id]" - }, { "comment": "multi-shard union", "query": "select 1 from music union (select id from user union all select name from unsharded)", diff --git a/go/vt/vtgate/semantics/semantic_state.go b/go/vt/vtgate/semantics/semantic_state.go index 0544764b04f..ac2fd9c1604 100644 --- a/go/vt/vtgate/semantics/semantic_state.go +++ b/go/vt/vtgate/semantics/semantic_state.go @@ -674,25 +674,6 @@ func (st *SemTable) TypeForExpr(e sqlparser.Expr) (evalengine.Type, bool) { return evalengine.NewUnknownType(), false } -// NeedsWeightString returns true if the given expression needs weight_string to do safe comparisons -func (st *SemTable) NeedsWeightString(e sqlparser.Expr) bool { - switch e := e.(type) { - case *sqlparser.WeightStringFuncExpr, *sqlparser.Literal: - return false - default: - typ, found := st.ExprTypes[e] - if !found { - return true - } - - if !sqltypes.IsText(typ.Type()) { - return false - } - - return !st.collEnv.IsSupported(typ.Collation()) - } -} - func (st *SemTable) DefaultCollation() collations.ID { return st.Collation } From ed482bea59f15c54cbeab34980f1f6354cce0716 Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Sun, 7 Jul 2024 21:03:55 -0400 Subject: [PATCH 17/55] Fix the install dependencies script in Docker (#16340) Signed-off-by: Florent Poinsard --- docker/utils/install_dependencies.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/utils/install_dependencies.sh b/docker/utils/install_dependencies.sh index 380afc7ad4e..b686c2418bf 100755 --- a/docker/utils/install_dependencies.sh +++ b/docker/utils/install_dependencies.sh @@ -66,7 +66,6 @@ BASE_PACKAGES=( zstd ) -percona-release enable-only tools apt-get update apt-get install -y --no-install-recommends "${BASE_PACKAGES[@]}" From 5a3bef56758f096a2554a3fcabe599636304ee8a Mon Sep 17 00:00:00 2001 From: Kirtan Manoj Chandak <92196705+kirtanchandak@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:26:49 +0530 Subject: [PATCH 18/55] Remove docker_local from Makefile (#16335) Signed-off-by: kirtanchandak --- Makefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Makefile b/Makefile index 2956f47ed4a..f0b9038a769 100644 --- a/Makefile +++ b/Makefile @@ -331,12 +331,6 @@ docker_lite_all: docker_lite $(DOCKER_LITE_TARGETS) docker_lite: ${call build_docker_image,docker/lite/Dockerfile,vitess/lite} -docker_local: - ${call build_docker_image,docker/local/Dockerfile,vitess/local} - -docker_run_local: - ./docker/local/run.sh - docker_mini: ${call build_docker_image,docker/mini/Dockerfile,vitess/mini} From d9475d82162267ebeaa4dd36380f2862a0c98e04 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Sun, 7 Jul 2024 22:50:31 -0700 Subject: [PATCH 19/55] go/mysql: performance optimizations in protocol encoding (#16341) Signed-off-by: Matt Robenolt --- go/mysql/encoding.go | 111 +++++++++++++++-------------- go/mysql/encoding_test.go | 142 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 197 insertions(+), 56 deletions(-) diff --git a/go/mysql/encoding.go b/go/mysql/encoding.go index c79580acb39..6b33ffabfc2 100644 --- a/go/mysql/encoding.go +++ b/go/mysql/encoding.go @@ -47,31 +47,37 @@ func lenEncIntSize(i uint64) int { } func writeLenEncInt(data []byte, pos int, i uint64) int { + // reslice at pos to avoid doing arithmetic below + data = data[pos:] + switch { case i < 251: - data[pos] = byte(i) + data[0] = byte(i) return pos + 1 case i < 1<<16: - data[pos] = 0xfc - data[pos+1] = byte(i) - data[pos+2] = byte(i >> 8) + _ = data[2] // early bounds check + data[0] = 0xfc + data[1] = byte(i) + data[2] = byte(i >> 8) return pos + 3 case i < 1<<24: - data[pos] = 0xfd - data[pos+1] = byte(i) - data[pos+2] = byte(i >> 8) - data[pos+3] = byte(i >> 16) + _ = data[3] // early bounds check + data[0] = 0xfd + data[1] = byte(i) + data[2] = byte(i >> 8) + data[3] = byte(i >> 16) return pos + 4 default: - data[pos] = 0xfe - data[pos+1] = byte(i) - data[pos+2] = byte(i >> 8) - data[pos+3] = byte(i >> 16) - data[pos+4] = byte(i >> 24) - data[pos+5] = byte(i >> 32) - data[pos+6] = byte(i >> 40) - data[pos+7] = byte(i >> 48) - data[pos+8] = byte(i >> 56) + _ = data[8] // early bounds check + data[0] = 0xfe + data[1] = byte(i) + data[2] = byte(i >> 8) + data[3] = byte(i >> 16) + data[4] = byte(i >> 24) + data[5] = byte(i >> 32) + data[6] = byte(i >> 40) + data[7] = byte(i >> 48) + data[8] = byte(i >> 56) return pos + 9 } } @@ -101,28 +107,17 @@ func writeByte(data []byte, pos int, value byte) int { } func writeUint16(data []byte, pos int, value uint16) int { - data[pos] = byte(value) - data[pos+1] = byte(value >> 8) + binary.LittleEndian.PutUint16(data[pos:], value) return pos + 2 } func writeUint32(data []byte, pos int, value uint32) int { - data[pos] = byte(value) - data[pos+1] = byte(value >> 8) - data[pos+2] = byte(value >> 16) - data[pos+3] = byte(value >> 24) + binary.LittleEndian.PutUint32(data[pos:], value) return pos + 4 } func writeUint64(data []byte, pos int, value uint64) int { - data[pos] = byte(value) - data[pos+1] = byte(value >> 8) - data[pos+2] = byte(value >> 16) - data[pos+3] = byte(value >> 24) - data[pos+4] = byte(value >> 32) - data[pos+5] = byte(value >> 40) - data[pos+6] = byte(value >> 48) - data[pos+7] = byte(value >> 56) + binary.LittleEndian.PutUint64(data[pos:], value) return pos + 8 } @@ -137,10 +132,16 @@ func writeLenEncString(data []byte, pos int, value string) int { } func writeZeroes(data []byte, pos int, len int) int { - for i := 0; i < len; i++ { - data[pos+i] = 0 + // XXX: This implementation is optimized to leverage + // the go compiler's memclr pattern, see: https://github.com/golang/go/issues/5373 + end := pos + len + data = data[pos:end] + + for i := range data { + data[i] = 0 } - return pos + len + + return end } // @@ -228,6 +229,7 @@ func readFixedLenUint64(data []byte) (uint64, bool) { case 3: // 2 bytes return uint64(binary.LittleEndian.Uint16(data[1:])), true case 4: // 3 bytes + _ = data[3] // early bounds check return uint64(data[1]) | uint64(data[2])<<8 | uint64(data[3])<<16, true @@ -242,37 +244,42 @@ func readLenEncInt(data []byte, pos int) (uint64, int, bool) { if pos >= len(data) { return 0, 0, false } - switch data[pos] { + + // reslice to avoid arithmetic below + data = data[pos:] + + switch data[0] { case 0xfc: // Encoded in the next 2 bytes. - if pos+2 >= len(data) { + if 2 >= len(data) { return 0, 0, false } - return uint64(data[pos+1]) | - uint64(data[pos+2])<<8, pos + 3, true + return uint64(data[1]) | + uint64(data[2])<<8, pos + 3, true case 0xfd: // Encoded in the next 3 bytes. - if pos+3 >= len(data) { + if 3 >= len(data) { return 0, 0, false } - return uint64(data[pos+1]) | - uint64(data[pos+2])<<8 | - uint64(data[pos+3])<<16, pos + 4, true + return uint64(data[1]) | + uint64(data[2])<<8 | + uint64(data[3])<<16, pos + 4, true case 0xfe: // Encoded in the next 8 bytes. - if pos+8 >= len(data) { + if 8 >= len(data) { return 0, 0, false } - return uint64(data[pos+1]) | - uint64(data[pos+2])<<8 | - uint64(data[pos+3])<<16 | - uint64(data[pos+4])<<24 | - uint64(data[pos+5])<<32 | - uint64(data[pos+6])<<40 | - uint64(data[pos+7])<<48 | - uint64(data[pos+8])<<56, pos + 9, true + return uint64(data[1]) | + uint64(data[2])<<8 | + uint64(data[3])<<16 | + uint64(data[4])<<24 | + uint64(data[5])<<32 | + uint64(data[6])<<40 | + uint64(data[7])<<48 | + uint64(data[8])<<56, pos + 9, true + default: + return uint64(data[0]), pos + 1, true } - return uint64(data[pos]), pos + 1, true } func readLenEncString(data []byte, pos int) (string, int, bool) { diff --git a/go/mysql/encoding_test.go b/go/mysql/encoding_test.go index c0081a6455b..41f6c416993 100644 --- a/go/mysql/encoding_test.go +++ b/go/mysql/encoding_test.go @@ -96,7 +96,6 @@ func TestEncUint16(t *testing.T) { _, _, ok = readUint16(data, 9) assert.False(t, ok, "readUint16 returned ok=true for shorter value") - } func TestEncBytes(t *testing.T) { @@ -122,7 +121,6 @@ func TestEncBytes(t *testing.T) { _, _, ok = readBytes(data, 9, 2) assert.False(t, ok, "readBytes returned ok=true for shorter value") - } func TestEncUint32(t *testing.T) { @@ -145,7 +143,6 @@ func TestEncUint32(t *testing.T) { _, _, ok = readUint32(data, 7) assert.False(t, ok, "readUint32 returned ok=true for shorter value") - } func TestEncUint64(t *testing.T) { @@ -169,7 +166,6 @@ func TestEncUint64(t *testing.T) { _, _, ok = readUint64(data, 7) assert.False(t, ok, "readUint64 returned ok=true for shorter value") - } func TestEncString(t *testing.T) { @@ -317,3 +313,141 @@ func TestEncString(t *testing.T) { } } } + +func TestWriteZeroes(t *testing.T) { + buf := make([]byte, 32) + resetBuf := func() { + t.Helper() + for i := range len(buf) { + buf[i] = 'f' + } + } + + allMatch := func(b []byte, c byte) bool { + for i := range b { + if b[i] != c { + return false + } + } + return true + } + + t.Run("0-offset", func(t *testing.T) { + for _, size := range []int{4, 10, 23, 24, 25, 26, 27} { + resetBuf() + pos := writeZeroes(buf, 0, size) + assert.Equal(t, size, pos, "expected to advance pos to %d, got %d", size, pos) + assert.True(t, allMatch(buf[:pos], 0), "buffer should be zeroes, %v", buf[:pos]) + assert.True(t, allMatch(buf[pos:], 'f'), "buffer should be dirty, %v", buf[pos:]) + } + }) + + t.Run("3-offset", func(t *testing.T) { + offset := 3 + for _, size := range []int{4, 10, 23, 24, 25, 26, 27} { + resetBuf() + pos := writeZeroes(buf, offset, size) + assert.Equal(t, offset+size, pos, "expected to advance pos to %d, got %d", offset+size, pos) + assert.True(t, allMatch(buf[:offset], 'f'), "buffer should be dirty, %v", buf[offset:pos]) + assert.True(t, allMatch(buf[offset:pos], 0), "buffer should be zeroes, %v", buf[:pos]) + assert.True(t, allMatch(buf[pos:], 'f'), "buffer should be dirty, %v", buf[pos:]) + } + }) +} + +func BenchmarkEncWriteInt(b *testing.B) { + buf := make([]byte, 16) + + b.Run("16-bit", func(b *testing.B) { + value := uint16(0x0100) + for range b.N { + _ = writeUint16(buf, 0, value) + } + }) + + b.Run("16-bit-lenencoded", func(b *testing.B) { + value := uint64(0x0100) + for range b.N { + _ = writeLenEncInt(buf, 0, value) + } + }) + + b.Run("24-bit-lenencoded", func(b *testing.B) { + value := uint64(0xabcdef) + for range b.N { + _ = writeLenEncInt(buf, 0, value) + } + }) + + b.Run("32-bit", func(b *testing.B) { + value := uint32(0xabcdef) + for range b.N { + _ = writeUint32(buf, 0, value) + } + }) + + b.Run("64-bit", func(b *testing.B) { + value := uint64(0xa0a1a2a3a4a5a6a7) + for range b.N { + _ = writeUint64(buf, 0, value) + } + }) + + b.Run("64-bit-lenencoded", func(b *testing.B) { + value := uint64(0xa0a1a2a3a4a5a6a7) + for range b.N { + _ = writeLenEncInt(buf, 0, value) + } + }) +} + +func BenchmarkEncWriteZeroes(b *testing.B) { + buf := make([]byte, 128) + + b.Run("4-bytes", func(b *testing.B) { + for range b.N { + _ = writeZeroes(buf, 16, 4) + } + }) + + b.Run("10-bytes", func(b *testing.B) { + for range b.N { + _ = writeZeroes(buf, 16, 10) + } + }) + + b.Run("23-bytes", func(b *testing.B) { + for range b.N { + _ = writeZeroes(buf, 16, 23) + } + }) + + b.Run("55-bytes", func(b *testing.B) { + for range b.N { + _ = writeZeroes(buf, 16, 55) + } + }) +} + +func BenchmarkEncReadInt(b *testing.B) { + b.Run("16-bit", func(b *testing.B) { + data := []byte{0xfc, 0xfb, 0x00} + for range b.N { + _, _, _ = readLenEncInt(data, 0) + } + }) + + b.Run("24-bit", func(b *testing.B) { + data := []byte{0xfd, 0x00, 0x00, 0x01} + for range b.N { + _, _, _ = readLenEncInt(data, 0) + } + }) + + b.Run("64-bit", func(b *testing.B) { + data := []byte{0xfe, 0xa7, 0xa6, 0xa5, 0xa4, 0xa3, 0xa2, 0xa1, 0xa0} + for range b.N { + _, _, _ = readLenEncInt(data, 0) + } + }) +} From 0db357753fc010bf257cdefc76cbadd8e7749df5 Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Mon, 8 Jul 2024 11:33:16 +0530 Subject: [PATCH 20/55] Cleanup: Health Stream removed db pool usage (#16336) Signed-off-by: Harshit Gangal --- .../streamtimeout/healthstream_test.go | 99 ----------------- .../endtoend/streamtimeout/main_test.go | 102 ------------------ .../vttablet/tabletserver/health_streamer.go | 36 +------ .../tabletserver/health_streamer_test.go | 39 ++----- .../tabletserver/state_manager_test.go | 42 ++++---- .../vttablet/tabletserver/tabletenv/config.go | 60 ++++------- go/vt/vttablet/tabletserver/tabletserver.go | 2 +- 7 files changed, 52 insertions(+), 328 deletions(-) delete mode 100644 go/vt/vttablet/endtoend/streamtimeout/healthstream_test.go delete mode 100644 go/vt/vttablet/endtoend/streamtimeout/main_test.go diff --git a/go/vt/vttablet/endtoend/streamtimeout/healthstream_test.go b/go/vt/vttablet/endtoend/streamtimeout/healthstream_test.go deleted file mode 100644 index 9890efd427d..00000000000 --- a/go/vt/vttablet/endtoend/streamtimeout/healthstream_test.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2023 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 streamtimeout - -import ( - "context" - "slices" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "vitess.io/vitess/go/mysql" - querypb "vitess.io/vitess/go/vt/proto/query" - "vitess.io/vitess/go/vt/vttablet/endtoend/framework" -) - -// TestSchemaChangeTimedout ensures that the timeout functionality is working properly -// to prevent queries from hanging up and causing a mutex to be locked forever. -func TestSchemaChangeTimedout(t *testing.T) { - const TableName = "vitess_healthstream" - - client := framework.NewClient() - reloadEstimatedTime := 2 * time.Second - - err := cluster.SimulateMySQLHang() - require.NoError(t, err) - - defer cluster.StopSimulateMySQLHang() - - ch := make(chan []string, 100) - go func(ch chan []string) { - client.StreamHealth(func(response *querypb.StreamHealthResponse) error { - if response.RealtimeStats.TableSchemaChanged != nil { - ch <- response.RealtimeStats.TableSchemaChanged - } - return nil - }) - }(ch) - - // get a clean connection that skips toxyproxy to be able to change the schema in the underlying DB - cleanParams := cluster.MySQLCleanConnParams() - cleanConn, err := mysql.Connect(context.Background(), &cleanParams) - require.NoError(t, err) - defer cleanConn.Close() - - // change the schema to trigger the health_streamer to send a notification at a later time. - _, err = cleanConn.ExecuteFetch("create table "+TableName+"(id bigint primary key)", -1, false) - require.NoError(t, err) - - select { - case <-ch: // get the schema notification - t.Fatalf("received an schema change event from the HealthStreamer (is toxyproxy working?)") - case <-time.After(reloadEstimatedTime): - // Good, continue - } - - // We will wait for the health_streamer to attempt sending a notification. - // It's important to keep in mind that the total wait time after the simulation should be shorter than the reload timeout. - // This is because the query timeout triggers the *DBConn.Kill() method, which in turn holds the mutex lock on the health_streamer. - // Although not indefinitely, this can result in longer wait times. - // It's worth noting that the behavior of *DBConn.Kill() is outside the scope of this test. - reloadInterval := config.SignalSchemaChangeReloadInterval - time.Sleep(reloadInterval) - - // pause simulating the mysql stall to allow the health_streamer to resume. - err = cluster.PauseSimulateMySQLHang() - require.NoError(t, err) - - // wait for the health_streamer to complete retrying the notification. - reloadTimeout := config.SchemaChangeReloadTimeout - retryEstimatedTime := reloadTimeout + reloadInterval + reloadEstimatedTime - timeout := time.After(retryEstimatedTime) - for { - select { - case res := <-ch: // get the schema notification - if slices.Contains(res, TableName) { - return - } - case <-timeout: - t.Errorf("timed out even after the mysql hang was no longer simulated") - return - } - } -} diff --git a/go/vt/vttablet/endtoend/streamtimeout/main_test.go b/go/vt/vttablet/endtoend/streamtimeout/main_test.go deleted file mode 100644 index 0b2f37a987c..00000000000 --- a/go/vt/vttablet/endtoend/streamtimeout/main_test.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2023 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. -*/ - -/* -All tests in this package come with toxiproxy in front of the MySQL server -*/ -package streamtimeout - -import ( - "context" - "flag" - "fmt" - "os" - "testing" - "time" - - "vitess.io/vitess/go/vt/vttablet/endtoend/framework" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" - "vitess.io/vitess/go/vt/vttest" - - vttestpb "vitess.io/vitess/go/vt/proto/vttest" -) - -var ( - cluster vttest.LocalCluster - config *tabletenv.TabletConfig -) - -func TestMain(m *testing.M) { - flag.Parse() // Do not remove this comment, import into google3 depends on it - tabletenv.Init() - - exitCode := func() int { - // Launch MySQL. - // We need a Keyspace in the topology, so the DbName is set. - // We need a Shard too, so the database 'vttest' is created. - cfg := vttest.Config{ - Topology: &vttestpb.VTTestTopology{ - Keyspaces: []*vttestpb.Keyspace{ - { - Name: "vttest", - Shards: []*vttestpb.Shard{ - { - Name: "0", - DbNameOverride: "vttest", - }, - }, - }, - }, - }, - OnlyMySQL: true, - Charset: "utf8mb4_general_ci", - } - - env, err := vttest.NewLocalTestEnv(0) - if err != nil { - fmt.Fprintf(os.Stderr, "%v", err) - return 1 - } - env.EnableToxiproxy = true - cluster = vttest.LocalCluster{ - Config: cfg, - Env: env, - } - if err := cluster.Setup(); err != nil { - fmt.Fprintf(os.Stderr, "could not launch mysql: %v\n", err) - return 1 - } - defer cluster.TearDown() - - connParams := cluster.MySQLConnParams() - connAppDebugParams := cluster.MySQLAppDebugConnParams() - config = tabletenv.NewDefaultConfig() - config.SchemaReloadInterval = (2 * time.Second) + (100 * time.Millisecond) - config.SchemaChangeReloadTimeout = 10 * time.Second - config.SignalWhenSchemaChange = true - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - err = framework.StartCustomServer(ctx, connParams, connAppDebugParams, cluster.DbName(), config) - if err != nil { - fmt.Fprintf(os.Stderr, "%v", err) - return 1 - } - defer framework.StopServer() - return m.Run() - }() - os.Exit(exitCode) -} diff --git a/go/vt/vttablet/tabletserver/health_streamer.go b/go/vt/vttablet/tabletserver/health_streamer.go index c13d11df69e..269e3daefd6 100644 --- a/go/vt/vttablet/tabletserver/health_streamer.go +++ b/go/vt/vttablet/tabletserver/health_streamer.go @@ -29,7 +29,6 @@ import ( vtschema "vitess.io/vitess/go/vt/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/schema" - "vitess.io/vitess/go/vt/dbconfigs" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/history" @@ -39,7 +38,6 @@ import ( vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication" - "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) @@ -79,23 +77,12 @@ type healthStreamer struct { se *schema.Engine history *history.History - dbConfig dbconfigs.Connector - conns *connpool.Pool signalWhenSchemaChange bool - reloadTimeout time.Duration viewsEnabled bool } func newHealthStreamer(env tabletenv.Env, alias *topodatapb.TabletAlias, engine *schema.Engine) *healthStreamer { - var pool *connpool.Pool - if env.Config().SignalWhenSchemaChange { - // We need one connection for the reloader. - pool = connpool.NewPool(env, "", tabletenv.ConnPoolConfig{ - Size: 1, - IdleTimeout: env.Config().OltpReadPool.IdleTimeout, - }) - } hs := &healthStreamer{ stats: env.Stats(), degradedThreshold: env.Config().Healthcheck.DegradedThreshold, @@ -110,9 +97,7 @@ func newHealthStreamer(env tabletenv.Env, alias *topodatapb.TabletAlias, engine }, history: history.New(5), - conns: pool, signalWhenSchemaChange: env.Config().SignalWhenSchemaChange, - reloadTimeout: env.Config().SchemaChangeReloadTimeout, viewsEnabled: env.Config().EnableViews, se: engine, } @@ -120,9 +105,8 @@ func newHealthStreamer(env tabletenv.Env, alias *topodatapb.TabletAlias, engine return hs } -func (hs *healthStreamer) InitDBConfig(target *querypb.Target, cp dbconfigs.Connector) { +func (hs *healthStreamer) InitDBConfig(target *querypb.Target) { hs.state.Target = target.CloneVT() - hs.dbConfig = cp } func (hs *healthStreamer) Open() { @@ -133,10 +117,6 @@ func (hs *healthStreamer) Open() { return } hs.ctx, hs.cancel = context.WithCancel(context.Background()) - if hs.conns != nil { - // if we don't have a live conns object, it means we are not configured to signal when the schema changes - hs.conns.Open(hs.dbConfig, hs.dbConfig, hs.dbConfig) - } } func (hs *healthStreamer) Close() { @@ -148,10 +128,6 @@ func (hs *healthStreamer) Close() { hs.cancel() hs.cancel = nil } - if hs.conns != nil { - hs.conns.Close() - hs.conns = nil - } } func (hs *healthStreamer) Stream(ctx context.Context, callback func(*querypb.StreamHealthResponse) error) error { @@ -338,16 +314,6 @@ func (hs *healthStreamer) reload(created, altered, dropped []*schema.Table, udfs return nil } - // add a timeout to prevent unbounded waits - ctx, cancel := context.WithTimeout(hs.ctx, hs.reloadTimeout) - defer cancel() - - conn, err := hs.conns.Get(ctx, nil) - if err != nil { - return err - } - defer conn.Recycle() - // We create lists to store the tables that have schema changes. var tables []string var views []string diff --git a/go/vt/vttablet/tabletserver/health_streamer_test.go b/go/vt/vttablet/tabletserver/health_streamer_test.go index a97f64c77c6..95517880339 100644 --- a/go/vt/vttablet/tabletserver/health_streamer_test.go +++ b/go/vt/vttablet/tabletserver/health_streamer_test.go @@ -32,7 +32,6 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/fakesqldb" "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/vt/dbconfigs" querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/vtenv" @@ -41,9 +40,7 @@ import ( ) func TestHealthStreamerClosed(t *testing.T) { - db := fakesqldb.New(t) - defer db.Close() - cfg := newConfig(db) + cfg := newConfig(nil) env := tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "ReplTrackerTest") alias := &topodatapb.TabletAlias{ Cell: "cell", @@ -59,18 +56,16 @@ func TestHealthStreamerClosed(t *testing.T) { func newConfig(db *fakesqldb.DB) *tabletenv.TabletConfig { cfg := tabletenv.NewDefaultConfig() - cfg.DB = newDBConfigs(db) + if db != nil { + cfg.DB = newDBConfigs(db) + } return cfg } // TestNotServingPrimaryNoWrite makes sure that the health-streamer doesn't write anything to the database when // the state is not serving primary. func TestNotServingPrimaryNoWrite(t *testing.T) { - db := fakesqldb.New(t) - defer db.Close() - cfg := newConfig(db) - cfg.SignalWhenSchemaChange = true - + cfg := newConfig(nil) env := tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TestNotServingPrimary") alias := &topodatapb.TabletAlias{ Cell: "cell", @@ -79,11 +74,8 @@ func TestNotServingPrimaryNoWrite(t *testing.T) { // Create a new health streamer and set it to a serving primary state hs := newHealthStreamer(env, alias, &schema.Engine{}) hs.isServingPrimary = true - hs.InitDBConfig(&querypb.Target{TabletType: topodatapb.TabletType_PRIMARY}, cfg.DB.DbaWithDB()) hs.Open() defer hs.Close() - target := &querypb.Target{} - hs.InitDBConfig(target, dbconfigs.New(db.ConnParams())) // Let's say the tablet goes to a non-serving primary state. hs.MakePrimary(false) @@ -93,13 +85,10 @@ func TestNotServingPrimaryNoWrite(t *testing.T) { t1 := schema.NewTable("t1", schema.NoType) err := hs.reload([]*schema.Table{t1}, nil, nil, false) require.NoError(t, err) - require.NoError(t, db.LastError()) } func TestHealthStreamerBroadcast(t *testing.T) { - db := fakesqldb.New(t) - defer db.Close() - cfg := newConfig(db) + cfg := newConfig(nil) cfg.SignalWhenSchemaChange = false env := tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "ReplTrackerTest") @@ -109,11 +98,8 @@ func TestHealthStreamerBroadcast(t *testing.T) { } blpFunc = testBlpFunc hs := newHealthStreamer(env, alias, &schema.Engine{}) - hs.InitDBConfig(&querypb.Target{TabletType: topodatapb.TabletType_PRIMARY}, cfg.DB.DbaWithDB()) hs.Open() defer hs.Close() - target := &querypb.Target{} - hs.InitDBConfig(target, dbconfigs.New(db.ConnParams())) ch, cancel := testStream(hs) defer cancel() @@ -226,9 +212,6 @@ func TestReloadSchema(t *testing.T) { se := schema.NewEngine(env) hs := newHealthStreamer(env, alias, se) - target := &querypb.Target{TabletType: topodatapb.TabletType_PRIMARY} - configs := cfg.DB - db.AddQueryPattern("SELECT UNIX_TIMESTAMP()"+".*", sqltypes.MakeTestResult( sqltypes.MakeTestFields( "UNIX_TIMESTAMP(now())", @@ -282,8 +265,7 @@ func TestReloadSchema(t *testing.T) { "users|id", )) - hs.InitDBConfig(target, configs.DbaWithDB()) - se.InitDBConfig(configs.DbaWithDB()) + se.InitDBConfig(cfg.DB.DbaWithDB()) hs.Open() defer hs.Close() err := se.Open() @@ -350,7 +332,6 @@ func TestReloadView(t *testing.T) { db := fakesqldb.New(t) defer db.Close() cfg := newConfig(db) - cfg.SignalWhenSchemaChange = true cfg.SchemaReloadInterval = 100 * time.Millisecond cfg.EnableViews = true @@ -359,9 +340,6 @@ func TestReloadView(t *testing.T) { se := schema.NewEngine(env) hs := newHealthStreamer(env, alias, se) - target := &querypb.Target{TabletType: topodatapb.TabletType_PRIMARY} - configs := cfg.DB - db.AddQueryPattern("SELECT UNIX_TIMESTAMP()"+".*", sqltypes.MakeTestResult( sqltypes.MakeTestFields( "UNIX_TIMESTAMP(now())", @@ -411,8 +389,7 @@ func TestReloadView(t *testing.T) { // adding query pattern for udfs db.AddQueryPattern("SELECT name.*", &sqltypes.Result{}) - hs.InitDBConfig(target, configs.DbaWithDB()) - se.InitDBConfig(configs.DbaWithDB()) + se.InitDBConfig(cfg.DB.DbaWithDB()) hs.Open() defer hs.Close() err := se.Open() diff --git a/go/vt/vttablet/tabletserver/state_manager_test.go b/go/vt/vttablet/tabletserver/state_manager_test.go index f6345b9b29c..02896eeefe0 100644 --- a/go/vt/vttablet/tabletserver/state_manager_test.go +++ b/go/vt/vttablet/tabletserver/state_manager_test.go @@ -31,8 +31,6 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtenv" - "vitess.io/vitess/go/mysql/fakesqldb" - "vitess.io/vitess/go/vt/dbconfigs" "vitess.io/vitess/go/vt/log" querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -69,7 +67,7 @@ func TestStateManagerStateByName(t *testing.T) { } func TestStateManagerServePrimary(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() sm.EnterLameduck() err := sm.SetServingType(topodatapb.TabletType_PRIMARY, testNow, StateServing, "") @@ -100,7 +98,7 @@ func TestStateManagerServePrimary(t *testing.T) { } func TestStateManagerServeNonPrimary(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_REPLICA, testNow, StateServing, "") require.NoError(t, err) @@ -125,7 +123,7 @@ func TestStateManagerServeNonPrimary(t *testing.T) { } func TestStateManagerUnservePrimary(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_PRIMARY, testNow, StateNotServing, "") require.NoError(t, err) @@ -150,7 +148,7 @@ func TestStateManagerUnservePrimary(t *testing.T) { } func TestStateManagerUnserveNonPrimary(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_RDONLY, testNow, StateNotServing, "") require.NoError(t, err) @@ -177,7 +175,7 @@ func TestStateManagerUnserveNonPrimary(t *testing.T) { } func TestStateManagerClose(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_RDONLY, testNow, StateNotConnected, "") require.NoError(t, err) @@ -201,7 +199,7 @@ func TestStateManagerClose(t *testing.T) { } func TestStateManagerStopService(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_REPLICA, testNow, StateServing, "") require.NoError(t, err) @@ -215,7 +213,7 @@ func TestStateManagerStopService(t *testing.T) { } func TestStateManagerGracePeriod(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() sm.transitionGracePeriod = 10 * time.Millisecond @@ -269,7 +267,7 @@ func (te *testWatcher) Close() { func TestStateManagerSetServingTypeRace(t *testing.T) { // We don't call StopService because that in turn // will call Close again on testWatcher. - sm := newTestStateManager(t) + sm := newTestStateManager() te := &testWatcher{ t: t, sm: sm, @@ -288,7 +286,7 @@ func TestStateManagerSetServingTypeRace(t *testing.T) { func TestStateManagerSetServingTypeNoChange(t *testing.T) { log.Infof("starting") - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_REPLICA, testNow, StateServing, "") require.NoError(t, err) @@ -319,7 +317,7 @@ func TestStateManagerTransitionFailRetry(t *testing.T) { defer func(saved time.Duration) { transitionRetryInterval = saved }(transitionRetryInterval) transitionRetryInterval = 10 * time.Millisecond - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() sm.se.(*testSchemaEngine).failMySQL = true @@ -351,7 +349,7 @@ func TestStateManagerTransitionFailRetry(t *testing.T) { } func TestStateManagerNotConnectedType(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() sm.EnterLameduck() err := sm.SetServingType(topodatapb.TabletType_RESTORE, testNow, StateNotServing, "") @@ -404,7 +402,7 @@ func (k *killableConn) SQLParser() *sqlparser.Parser { } func TestStateManagerShutdownGracePeriod(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() sm.te = &delayedTxEngine{} @@ -459,7 +457,7 @@ func TestStateManagerCheckMySQL(t *testing.T) { defer func(saved time.Duration) { transitionRetryInterval = saved }(transitionRetryInterval) transitionRetryInterval = 10 * time.Millisecond - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() err := sm.SetServingType(topodatapb.TabletType_PRIMARY, testNow, StateServing, "") @@ -527,7 +525,7 @@ func TestStateManagerCheckMySQL(t *testing.T) { func TestStateManagerValidations(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - sm := newTestStateManager(t) + sm := newTestStateManager() target := &querypb.Target{TabletType: topodatapb.TabletType_PRIMARY} sm.target = target.CloneVT() err := sm.StartRequest(ctx, target, false) @@ -590,7 +588,7 @@ func TestStateManagerValidations(t *testing.T) { func TestStateManagerWaitForRequests(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() target := &querypb.Target{TabletType: topodatapb.TabletType_PRIMARY} sm.target = target @@ -630,7 +628,7 @@ func TestStateManagerWaitForRequests(t *testing.T) { } func TestStateManagerNotify(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() blpFunc = testBlpFunc @@ -669,7 +667,7 @@ func TestStateManagerNotify(t *testing.T) { } func TestRefreshReplHealthLocked(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() defer sm.StopService() rt := sm.rt.(*testReplTracker) @@ -705,7 +703,7 @@ func TestRefreshReplHealthLocked(t *testing.T) { // TestPanicInWait tests that we don't panic when we wait for requests if more StartRequest calls come up after we start waiting. func TestPanicInWait(t *testing.T) { - sm := newTestStateManager(t) + sm := newTestStateManager() sm.wantState = StateServing sm.state = StateServing sm.replHealthy = true @@ -732,7 +730,7 @@ func verifySubcomponent(t *testing.T, order int64, component any, state testStat assert.Equal(t, state, tos.State()) } -func newTestStateManager(t *testing.T) *stateManager { +func newTestStateManager() *stateManager { order.Store(0) cfg := tabletenv.NewDefaultConfig() parser := sqlparser.NewTestParser() @@ -757,7 +755,7 @@ func newTestStateManager(t *testing.T) *stateManager { rw: newRequestsWaiter(), } sm.Init(env, &querypb.Target{}) - sm.hs.InitDBConfig(&querypb.Target{}, dbconfigs.New(fakesqldb.New(t).ConnParams())) + sm.hs.InitDBConfig(&querypb.Target{}) log.Infof("returning sm: %p", sm) return sm } diff --git a/go/vt/vttablet/tabletserver/tabletenv/config.go b/go/vt/vttablet/tabletserver/tabletenv/config.go index f2cf7e638cf..89f827fa1f3 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config.go @@ -201,7 +201,7 @@ func registerTabletEnvFlags(fs *pflag.FlagSet) { fs.BoolVar(¤tConfig.EnableOnlineDDL, "queryserver_enable_online_ddl", true, "Enable online DDL.") fs.BoolVar(¤tConfig.SanitizeLogMessages, "sanitize_log_messages", false, "Remove potentially sensitive information in tablet INFO, WARNING, and ERROR log messages such as query parameters.") _ = fs.Bool("queryserver-enable-settings-pool", true, "Enable pooling of connections with modified system settings") - fs.MarkDeprecated("queryserver-enable-settings-pool", "New pool implementation does it internally and at the api level this has been enabled since v17") + _ = fs.MarkDeprecated("queryserver-enable-settings-pool", "New pool implementation does it internally and at the api level this has been enabled since v17") fs.Int64Var(¤tConfig.RowStreamer.MaxInnoDBTrxHistLen, "vreplication_copy_phase_max_innodb_history_list_length", 1000000, "The maximum InnoDB transaction history that can exist on a vstreamer (source) before starting another round of copying rows. This helps to limit the impact on the source tablet.") fs.Int64Var(¤tConfig.RowStreamer.MaxMySQLReplLagSecs, "vreplication_copy_phase_max_mysql_replication_lag", 43200, "The maximum MySQL replication lag (in seconds) that can exist on a vstreamer (source) before starting another round of copying rows. This helps to limit the impact on the source tablet.") @@ -312,24 +312,23 @@ type TabletConfig struct { ReplicationTracker ReplicationTrackerConfig `json:"replicationTracker,omitempty"` // Consolidator can be enable, disable, or notOnPrimary. Default is enable. - Consolidator string `json:"consolidator,omitempty"` - PassthroughDML bool `json:"passthroughDML,omitempty"` - StreamBufferSize int `json:"streamBufferSize,omitempty"` - ConsolidatorStreamTotalSize int64 `json:"consolidatorStreamTotalSize,omitempty"` - ConsolidatorStreamQuerySize int64 `json:"consolidatorStreamQuerySize,omitempty"` - QueryCacheMemory int64 `json:"queryCacheMemory,omitempty"` - QueryCacheDoorkeeper bool `json:"queryCacheDoorkeeper,omitempty"` - SchemaReloadInterval time.Duration `json:"schemaReloadIntervalSeconds,omitempty"` - SignalSchemaChangeReloadInterval time.Duration `json:"signalSchemaChangeReloadIntervalSeconds,omitempty"` - SchemaChangeReloadTimeout time.Duration `json:"schemaChangeReloadTimeout,omitempty"` - WatchReplication bool `json:"watchReplication,omitempty"` - TrackSchemaVersions bool `json:"trackSchemaVersions,omitempty"` - SchemaVersionMaxAgeSeconds int64 `json:"schemaVersionMaxAgeSeconds,omitempty"` - TerseErrors bool `json:"terseErrors,omitempty"` - TruncateErrorLen int `json:"truncateErrorLen,omitempty"` - AnnotateQueries bool `json:"annotateQueries,omitempty"` - MessagePostponeParallelism int `json:"messagePostponeParallelism,omitempty"` - SignalWhenSchemaChange bool `json:"signalWhenSchemaChange,omitempty"` + Consolidator string `json:"consolidator,omitempty"` + PassthroughDML bool `json:"passthroughDML,omitempty"` + StreamBufferSize int `json:"streamBufferSize,omitempty"` + ConsolidatorStreamTotalSize int64 `json:"consolidatorStreamTotalSize,omitempty"` + ConsolidatorStreamQuerySize int64 `json:"consolidatorStreamQuerySize,omitempty"` + QueryCacheMemory int64 `json:"queryCacheMemory,omitempty"` + QueryCacheDoorkeeper bool `json:"queryCacheDoorkeeper,omitempty"` + SchemaReloadInterval time.Duration `json:"schemaReloadIntervalSeconds,omitempty"` + SchemaChangeReloadTimeout time.Duration `json:"schemaChangeReloadTimeout,omitempty"` + WatchReplication bool `json:"watchReplication,omitempty"` + TrackSchemaVersions bool `json:"trackSchemaVersions,omitempty"` + SchemaVersionMaxAgeSeconds int64 `json:"schemaVersionMaxAgeSeconds,omitempty"` + TerseErrors bool `json:"terseErrors,omitempty"` + TruncateErrorLen int `json:"truncateErrorLen,omitempty"` + AnnotateQueries bool `json:"annotateQueries,omitempty"` + MessagePostponeParallelism int `json:"messagePostponeParallelism,omitempty"` + SignalWhenSchemaChange bool `json:"signalWhenSchemaChange,omitempty"` ExternalConnections map[string]*dbconfigs.DBConfigs `json:"externalConnections,omitempty"` @@ -368,9 +367,8 @@ func (cfg *TabletConfig) MarshalJSON() ([]byte, error) { tmp := struct { TCProxy - SchemaReloadInterval string `json:"schemaReloadIntervalSeconds,omitempty"` - SignalSchemaChangeReloadInterval string `json:"signalSchemaChangeReloadIntervalSeconds,omitempty"` - SchemaChangeReloadTimeout string `json:"schemaChangeReloadTimeout,omitempty"` + SchemaReloadInterval string `json:"schemaReloadIntervalSeconds,omitempty"` + SchemaChangeReloadTimeout string `json:"schemaChangeReloadTimeout,omitempty"` }{ TCProxy: TCProxy(*cfg), } @@ -379,10 +377,6 @@ func (cfg *TabletConfig) MarshalJSON() ([]byte, error) { tmp.SchemaReloadInterval = d.String() } - if d := cfg.SignalSchemaChangeReloadInterval; d != 0 { - tmp.SignalSchemaChangeReloadInterval = d.String() - } - if d := cfg.SchemaChangeReloadTimeout; d != 0 { tmp.SchemaChangeReloadTimeout = d.String() } @@ -395,9 +389,8 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) { var tmp struct { TCProxy - SchemaReloadInterval string `json:"schemaReloadIntervalSeconds,omitempty"` - SignalSchemaChangeReloadInterval string `json:"signalSchemaChangeReloadIntervalSeconds,omitempty"` - SchemaChangeReloadTimeout string `json:"schemaChangeReloadTimeout,omitempty"` + SchemaReloadInterval string `json:"schemaReloadIntervalSeconds,omitempty"` + SchemaChangeReloadTimeout string `json:"schemaChangeReloadTimeout,omitempty"` } tmp.TCProxy = TCProxy(*cfg) @@ -417,15 +410,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) { cfg.SchemaReloadInterval = 0 } - if tmp.SignalSchemaChangeReloadInterval != "" { - cfg.SignalSchemaChangeReloadInterval, err = time.ParseDuration(tmp.SignalSchemaChangeReloadInterval) - if err != nil { - return err - } - } else { - cfg.SignalSchemaChangeReloadInterval = 0 - } - if tmp.SchemaChangeReloadTimeout != "" { cfg.SchemaChangeReloadTimeout, err = time.ParseDuration(tmp.SchemaChangeReloadTimeout) if err != nil { diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 7a3d7cc5c06..2238195c97d 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -271,7 +271,7 @@ func (tsv *TabletServer) InitDBConfig(target *querypb.Target, dbcfgs *dbconfigs. tsv.rt.InitDBConfig(target, mysqld) tsv.txThrottler.InitDBConfig(target) tsv.vstreamer.InitDBConfig(target.Keyspace, target.Shard) - tsv.hs.InitDBConfig(target, tsv.config.DB.DbaWithDB()) + tsv.hs.InitDBConfig(target) tsv.onlineDDLExecutor.InitDBConfig(target.Keyspace, target.Shard, dbcfgs.DBName) tsv.lagThrottler.InitDBConfig(target.Keyspace, target.Shard) tsv.tableGC.InitDBConfig(target.Keyspace, target.Shard, dbcfgs.DBName) From 6d95d7c3ece72651f01357e30804a54b43b715ca Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:53:08 -0400 Subject: [PATCH 21/55] Remove the `bootstrap` dependency on the Docker images we ship (#16339) Signed-off-by: Florent Poinsard Signed-off-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Co-authored-by: Deepthi Sigireddi --- ...ild_images.yml => build_docker_images.yml} | 111 +++++++++++++++--- .../workflows/docker_build_vttestserver.yml | 65 ---------- Makefile | 2 +- docker/lite/Dockerfile | 25 ++-- docker/lite/Dockerfile.percona80 | 24 ++-- docker/local/Dockerfile | 45 ------- docker/local/install_local_dependencies.sh | 25 ---- docker/local/run.sh | 3 - docker/vttestserver/Dockerfile.mysql80 | 22 ++-- go/tools/go-upgrade/go-upgrade.go | 6 +- 10 files changed, 133 insertions(+), 195 deletions(-) rename .github/workflows/{docker_build_images.yml => build_docker_images.yml} (63%) delete mode 100644 .github/workflows/docker_build_vttestserver.yml delete mode 100644 docker/local/Dockerfile delete mode 100755 docker/local/install_local_dependencies.sh delete mode 100755 docker/local/run.sh diff --git a/.github/workflows/docker_build_images.yml b/.github/workflows/build_docker_images.yml similarity index 63% rename from .github/workflows/docker_build_images.yml rename to .github/workflows/build_docker_images.yml index a923b7f57c3..0daada540b8 100644 --- a/.github/workflows/docker_build_images.yml +++ b/.github/workflows/build_docker_images.yml @@ -1,22 +1,101 @@ -name: Docker Build Images +name: Build Docker Images on: + pull_request: push: branches: - main tags: - - 'v[2-9][0-9]*.*' # run only on tags greater or equal to v20.0.0 where this new way of building docker image was changed + - '*' concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Docker Build Images (v20+)') + group: format('{0}-{1}', ${{ github.ref }}, 'Build Docker Images') cancel-in-progress: true permissions: read-all jobs: + push: + name: Set push variable + runs-on: ubuntu-20.04 + if: github.repository == 'vitessio/vitess' + outputs: + push: ${{ steps.push.outputs.push }} + + steps: + - name: Set push variable + id: push + run: | + push='false' + if [[ "${{github.event.pull_request}}" == "" ]]; then + push='true' + fi + echo Push='${push}' + echo "push=${push}" >> $GITHUB_OUTPUT + + build_and_push_vttestserver: + name: Build and push vttestserver + runs-on: gh-hosted-runners-16cores-1 + if: github.repository == 'vitessio/vitess' && needs.push.result == 'success' + needs: + - push + + strategy: + fail-fast: true + matrix: + branch: [ mysql80 ] + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Login to Docker Hub + if: needs.push.outputs.push == 'true' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set Dockerfile path + run: | + echo "DOCKERFILE=./docker/vttestserver/Dockerfile.${{ matrix.branch }}" >> $GITHUB_ENV + + - name: Build and push on main + if: startsWith(github.ref, 'refs/tags/') == false + uses: docker/build-push-action@v5 + with: + context: . + file: ${{ env.DOCKERFILE }} + push: ${{ needs.push.outputs.push }} + tags: vitess/vttestserver:${{ matrix.branch }} + + ###### + # All code below only applies to new tags + ###### + - name: Get the Git tag + if: startsWith(github.ref, 'refs/tags/') + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: Set Docker tag name + if: startsWith(github.ref, 'refs/tags/') + run: | + echo "DOCKER_TAG=vitess/vttestserver:${TAG_NAME}-${{ matrix.branch }}" >> $GITHUB_ENV + + - name: Build and push on tags + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v5 + with: + context: . + file: ${{ env.DOCKERFILE }} + push: true + tags: ${{ env.DOCKER_TAG }} + + build_and_push_lite: - name: Build and push vitess/lite Docker images + name: Build and push lite runs-on: gh-hosted-runners-16cores-1 - if: github.repository == 'vitessio/vitess' + if: github.repository == 'vitessio/vitess' && needs.push.result == 'success' + needs: + - push strategy: fail-fast: true @@ -28,6 +107,7 @@ jobs: uses: actions/checkout@v4 - name: Login to Docker Hub + if: needs.push.outputs.push == 'true' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -42,12 +122,12 @@ jobs: fi - name: Build and push on main - if: github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') == false uses: docker/build-push-action@v5 with: context: . file: ${{ env.DOCKERFILE }} - push: true + push: ${{ needs.push.outputs.push }} tags: vitess/lite:${{ matrix.branch }} ###### @@ -76,10 +156,12 @@ jobs: tags: ${{ env.DOCKER_TAG }} build_and_push_components: - name: Build and push vitess components Docker images - needs: build_and_push_lite + name: Build and push runs-on: gh-hosted-runners-16cores-1 - if: github.repository == 'vitessio/vitess' + if: github.repository == 'vitessio/vitess' && needs.push.result == 'success' && needs.build_and_push_lite.result == 'success' + needs: + - push + - build_and_push_lite strategy: fail-fast: true @@ -92,6 +174,7 @@ jobs: uses: actions/checkout@v4 - name: Login to Docker Hub + if: needs.push.outputs.push == 'true' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -102,22 +185,22 @@ jobs: echo "DOCKER_CTX=./docker/binaries/${{ matrix.component }}" >> $GITHUB_ENV - name: Build and push on main latest tag - if: github.ref == 'refs/heads/main' && matrix.debian == 'bookworm' + if: startsWith(github.ref, 'refs/tags/') == false && matrix.debian == 'bookworm' uses: docker/build-push-action@v5 with: context: ${{ env.DOCKER_CTX }} - push: true + push: ${{ needs.push.outputs.push }} tags: vitess/${{ matrix.component }}:latest build-args: | VT_BASE_VER=latest DEBIAN_VER=${{ matrix.debian }}-slim - name: Build and push on main debian specific tag - if: github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') == false uses: docker/build-push-action@v5 with: context: ${{ env.DOCKER_CTX }} - push: true + push: ${{ needs.push.outputs.push }} tags: vitess/${{ matrix.component }}:latest-${{ matrix.debian }} build-args: | VT_BASE_VER=latest diff --git a/.github/workflows/docker_build_vttestserver.yml b/.github/workflows/docker_build_vttestserver.yml deleted file mode 100644 index 1d157eef921..00000000000 --- a/.github/workflows/docker_build_vttestserver.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Docker Build vttestserver -on: - push: - branches: - - main - tags: - - '*' - -concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Docker Build vttestserver') - cancel-in-progress: true - -permissions: read-all - -jobs: - build_and_push: - name: Build and push vitess/vttestserver Docker images - runs-on: gh-hosted-runners-16cores-1 - if: github.repository == 'vitessio/vitess' - - strategy: - fail-fast: true - matrix: - branch: [ mysql80 ] - - steps: - - name: Check out code - uses: actions/checkout@v4 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set Dockerfile path - run: | - echo "DOCKERFILE=./docker/vttestserver/Dockerfile.${{ matrix.branch }}" >> $GITHUB_ENV - - - name: Build and push on main - if: github.ref == 'refs/heads/main' - uses: docker/build-push-action@v5 - with: - context: . - file: ${{ env.DOCKERFILE }} - push: true - tags: vitess/vttestserver:${{ matrix.branch }} - - - name: Get the Git tag - if: startsWith(github.ref, 'refs/tags/') - run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - - - name: Set Docker tag name - if: startsWith(github.ref, 'refs/tags/') - run: | - echo "DOCKER_TAG=vitess/vttestserver:${TAG_NAME}-${{ matrix.branch }}" >> $GITHUB_ENV - - - name: Build and push on tags - if: startsWith(github.ref, 'refs/tags/') - uses: docker/build-push-action@v5 - with: - context: . - file: ${{ env.DOCKERFILE }} - push: true - tags: ${{ env.DOCKER_TAG }} diff --git a/Makefile b/Makefile index f0b9038a769..e46f5d1ca5a 100644 --- a/Makefile +++ b/Makefile @@ -334,7 +334,7 @@ docker_lite: docker_mini: ${call build_docker_image,docker/mini/Dockerfile,vitess/mini} -DOCKER_VTTESTSERVER_SUFFIX = mysql57 mysql80 +DOCKER_VTTESTSERVER_SUFFIX = mysql80 DOCKER_VTTESTSERVER_TARGETS = $(addprefix docker_vttestserver_,$(DOCKER_VTTESTSERVER_SUFFIX)) $(DOCKER_VTTESTSERVER_TARGETS): docker_vttestserver_%: ${call build_docker_image,docker/vttestserver/Dockerfile.$*,vitess/vttestserver:$*} diff --git a/docker/lite/Dockerfile b/docker/lite/Dockerfile index fd01f7d9ef6..7c0b22aed3c 100644 --- a/docker/lite/Dockerfile +++ b/docker/lite/Dockerfile @@ -12,29 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=34 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" - -FROM "${image}" AS builder +FROM --platform=linux/amd64 golang:1.22.5-bullseye AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess +WORKDIR /vt/src/vitess.io/vitess -# Build and install Vitess in a temporary output directory. +# Create vitess user +RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN mkdir -p /vt/vtdataroot /home/vitess +RUN chown -R vitess:vitess /vt /home/vitess USER vitess +# Re-copy sources from working tree. +COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess + RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM debian:bullseye-slim +FROM --platform=linux/amd64 debian:bullseye-slim # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh @@ -45,7 +42,7 @@ RUN groupadd -r vitess && useradd -r -g vitess vitess RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt # Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess +ENV VTROOT /vt ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index 1e27f45e692..cded55438ec 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -12,28 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=34 -ARG image="vitess/bootstrap:${bootstrap_version}-percona80" - -FROM "${image}" AS builder +FROM --platform=linux/amd64 golang:1.22.5-bullseye AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +WORKDIR /vt/src/vitess.io/vitess + +# Create vitess user +RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN mkdir -p /vt/vtdataroot /home/vitess +RUN chown -R vitess:vitess /vt /home/vitess +USER vitess + # Re-copy sources from working tree. COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess -# Build and install Vitess in a temporary output directory. -USER vitess RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM debian:bullseye-slim +FROM --platform=linux/amd64 debian:bullseye-slim # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh @@ -44,7 +42,7 @@ RUN groupadd -r vitess && useradd -r -g vitess vitess RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt # Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess +ENV VTROOT /vt ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile deleted file mode 100644 index 5e9d4aed326..00000000000 --- a/docker/local/Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -ARG bootstrap_version=34 -ARG image="vitess/bootstrap:${bootstrap_version}-common" - -FROM "${image}" - -RUN apt-get update -RUN apt-get install -y sudo curl vim jq - -# Install dependencies -COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh mysql80 - -COPY docker/local/install_local_dependencies.sh /vt/dist/install_local_dependencies.sh -RUN /vt/dist/install_local_dependencies.sh -RUN echo "source /vt/common/env.sh" >> /etc/bash.bashrc - -# Allows some docker builds to disable CGO -ARG CGO_ENABLED=0 - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess - -WORKDIR /vt/src/vitess.io/vitess -RUN make install PREFIX=/vt/install - -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH -ENV PATH="/var/opt/etcd:${PATH}" - -RUN mkdir /vt/local -COPY examples/local /vt/local - -# Copy the vtadmin web app to the correct location and npm install -COPY --chown=vitess:vitess web /web -RUN npm install /web/vtadmin -RUN /web/vtadmin/build.sh - -RUN mkdir /vt/common -COPY examples/common /vt/common - -CMD cd /vt/local && ./101_initial_cluster.sh && /bin/bash diff --git a/docker/local/install_local_dependencies.sh b/docker/local/install_local_dependencies.sh deleted file mode 100755 index 07fd302e283..00000000000 --- a/docker/local/install_local_dependencies.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# This is a script that gets run as part of the Dockerfile build -# to install dependencies for the vitess/mini image. -# -# Usage: install_local_dependencies.sh - -set -euo pipefail - -# Install etcd -ETCD_VER=v3.4.9 -DOWNLOAD_URL=https://storage.googleapis.com/etcd - -curl -k -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -mkdir -p /var/opt/etcd -sudo tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /var/opt/etcd --strip-components=1 -rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz - -mkdir -p /var/run/etcd && chown -R vitess:vitess /var/run/etcd - -# Clean up files we won't need in the final image. -rm -rf /var/lib/apt/lists/* - -# Install npm and node dependencies for vtadmin -curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs diff --git a/docker/local/run.sh b/docker/local/run.sh deleted file mode 100755 index 16b07fc426c..00000000000 --- a/docker/local/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker run -d -p 14200:14200 -p 14201:14201 -p 15000:15000 -p 15001:15001 -p 15991:15991 -p 15999:15999 -p 16000:16000 --rm -it vitess/local diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index d6b0a200fa7..2e79d389c7d 100644 --- a/docker/vttestserver/Dockerfile.mysql80 +++ b/docker/vttestserver/Dockerfile.mysql80 @@ -12,28 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=34 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" - -FROM "${image}" AS builder +FROM --platform=linux/amd64 golang:1.22.5-bullseye AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +WORKDIR /vt/src/vitess.io/vitess + +# Create vitess user +RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN mkdir -p /vt/vtdataroot /home/vitess +RUN chown -R vitess:vitess /vt /home/vitess +USER vitess + # Re-copy sources from working tree. COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess -# Build and install Vitess in a temporary output directory. -USER vitess RUN make install-testing PREFIX=/vt/install # Start over and build the final image. -FROM debian:bullseye-slim +FROM --platform=linux/amd64 debian:bullseye-slim # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh diff --git a/go/tools/go-upgrade/go-upgrade.go b/go/tools/go-upgrade/go-upgrade.go index ee42040e5c0..34543120202 100644 --- a/go/tools/go-upgrade/go-upgrade.go +++ b/go/tools/go-upgrade/go-upgrade.go @@ -393,6 +393,9 @@ func replaceGoVersionInCodebase(old, new *version.Version, workflowUpdate bool) "./test/templates", "./build.env", "./docker/bootstrap/Dockerfile.common", + "./docker/lite/Dockerfile", + "./docker/lite/Dockerfile.percona80", + "./docker/vttestserver/Dockerfile.mysql80", } if workflowUpdate { explore = append(explore, "./.github/workflows") @@ -435,9 +438,6 @@ func updateBootstrapVersionInCodebase(old, new string, newGoVersion *version.Ver return nil } files, err := getListOfFilesInPaths([]string{ - "./docker/lite", - "./docker/local", - "./docker/vttestserver", "./Makefile", "./test/templates", }) From 079ef28b792c0f46521701374d239cffdf6022f0 Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Mon, 8 Jul 2024 16:48:46 -0400 Subject: [PATCH 22/55] Add release notes for the new connection drain (+ use dashes instead of underscore) (#16334) Signed-off-by: Florent Poinsard --- changelog/21.0/21.0.0/summary.md | 13 ++++++++++++- go/flags/endtoend/vtcombo.txt | 2 +- go/flags/endtoend/vtgate.txt | 2 +- .../endtoend/vtgate/connectiondrain/main_test.go | 2 +- go/vt/vtgate/plugin_mysql_server.go | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/changelog/21.0/21.0.0/summary.md b/changelog/21.0/21.0.0/summary.md index 49c8b41d45f..97c995898f9 100644 --- a/changelog/21.0/21.0.0/summary.md +++ b/changelog/21.0/21.0.0/summary.md @@ -7,8 +7,8 @@ - **[Deprecations and Deletions](#deprecations-and-deletions)** - [Deletion of deprecated metrics](#metric-deletion) - [VTTablet Flags](#vttablet-flags) - - **[Breaking changes](#breaking-changes)** - **[Traffic Mirroring](#traffic-mirroring)** + - **[New VTGate Shutdown Behavior](#new-vtgate-shutdown-behavior)** ## Major Changes @@ -50,3 +50,14 @@ $ vtctldclient --server :15999 MoveTables --target-keyspace customer --workflow ``` Mirror rules can be inspected with `GetMirrorRules`. + +### New VTGate Shutdown Behavior + +We added a new option to affect the VTGate shutdown process in v21 by using a connection drain timeout rather than the older activity drain timeout. +The goal of this new behavior, connection draining option, is to disallow new connections when VTGate is shutting down, +but continue allowing existing connections to finish their work until they manually disconnect or until the `--onterm_timeout` timeout is reached, +without getting a `Server shutdown in progress` error. + +This new behavior can be enabled by specifying the new `--mysql-server-drain-onterm` flag to VTGate. + +See more information about this change by [reading its RFC](https://github.com/vitessio/vitess/issues/15971). \ No newline at end of file diff --git a/go/flags/endtoend/vtcombo.txt b/go/flags/endtoend/vtcombo.txt index b404d28f875..743bbf5b7bb 100644 --- a/go/flags/endtoend/vtcombo.txt +++ b/go/flags/endtoend/vtcombo.txt @@ -223,6 +223,7 @@ Flags: --mycnf_slow_log_path string mysql slow query log path --mycnf_socket_file string mysql socket file --mycnf_tmp_dir string mysql tmp directory + --mysql-server-drain-onterm If set, the server waits for --onterm_timeout for already connected clients to complete their in flight work --mysql-server-keepalive-period duration TCP period between keep-alives --mysql-server-pool-conn-read-buffers If set, the server will pool incoming connection read buffers --mysql-shutdown-timeout duration timeout to use when MySQL is being shut down. (default 5m0s) @@ -231,7 +232,6 @@ Flags: --mysql_default_workload string Default session workload (OLTP, OLAP, DBA) (default "OLTP") --mysql_port int mysql port (default 3306) --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_drain_onterm If set, the server waits for --onterm_timeout for connected clients to drain --mysql_server_flush_delay duration Delay after which buffered response will be flushed to the client. (default 100ms) --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 diff --git a/go/flags/endtoend/vtgate.txt b/go/flags/endtoend/vtgate.txt index 68899cecd56..6d68e09d09b 100644 --- a/go/flags/endtoend/vtgate.txt +++ b/go/flags/endtoend/vtgate.txt @@ -119,6 +119,7 @@ Flags: --max_payload_size int The threshold for query payloads in bytes. A payload greater than this threshold will result in a failure to handle the query. --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) --min_number_serving_vttablets int The minimum number of vttablets for each replicating tablet_type (e.g. replica, rdonly) that will be continue to be used even with replication lag above discovery_low_replication_lag, but still below discovery_high_replication_lag_minimum_serving. (default 2) + --mysql-server-drain-onterm If set, the server waits for --onterm_timeout for already connected clients to complete their in flight work --mysql-server-keepalive-period duration TCP period between keep-alives --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. @@ -141,7 +142,6 @@ Flags: --mysql_ldap_auth_config_string string JSON representation of LDAP server config. --mysql_ldap_auth_method string client-side authentication method to use. Supported values: mysql_clear_password, dialog. (default "mysql_clear_password") --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_drain_onterm If set, the server waits for --onterm_timeout for connected clients to drain --mysql_server_flush_delay duration Delay after which buffered response will be flushed to the client. (default 100ms) --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 diff --git a/go/test/endtoend/vtgate/connectiondrain/main_test.go b/go/test/endtoend/vtgate/connectiondrain/main_test.go index 32807b22bde..6dae9b72be9 100644 --- a/go/test/endtoend/vtgate/connectiondrain/main_test.go +++ b/go/test/endtoend/vtgate/connectiondrain/main_test.go @@ -61,7 +61,7 @@ func setupCluster(t *testing.T) (*cluster.LocalProcessCluster, mysql.ConnParams) require.NoError(t, err) // Start vtgate - clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--mysql_server_drain_onterm", "--onterm_timeout", "30s") + clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--mysql-server-drain-onterm", "--onterm_timeout", "30s") err = clusterInstance.StartVtgate() require.NoError(t, err) diff --git a/go/vt/vtgate/plugin_mysql_server.go b/go/vt/vtgate/plugin_mysql_server.go index 55954013862..4004ae24566 100644 --- a/go/vt/vtgate/plugin_mysql_server.go +++ b/go/vt/vtgate/plugin_mysql_server.go @@ -103,7 +103,7 @@ func registerPluginFlags(fs *pflag.FlagSet) { fs.DurationVar(&mysqlKeepAlivePeriod, "mysql-server-keepalive-period", mysqlKeepAlivePeriod, "TCP period between keep-alives") fs.DurationVar(&mysqlServerFlushDelay, "mysql_server_flush_delay", mysqlServerFlushDelay, "Delay after which buffered response will be flushed to the client.") fs.StringVar(&mysqlDefaultWorkloadName, "mysql_default_workload", mysqlDefaultWorkloadName, "Default session workload (OLTP, OLAP, DBA)") - fs.BoolVar(&mysqlDrainOnTerm, "mysql_server_drain_onterm", mysqlDrainOnTerm, "If set, the server waits for --onterm_timeout for connected clients to drain") + fs.BoolVar(&mysqlDrainOnTerm, "mysql-server-drain-onterm", mysqlDrainOnTerm, "If set, the server waits for --onterm_timeout for already connected clients to complete their in flight work") } // vtgateHandler implements the Listener interface. From ff3425f77af5870190f75a6acc3f55a03f874f2a Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:44:16 +0530 Subject: [PATCH 23/55] Remove unused parameters in reparent code and add CheckLockShard calls (#16312) Signed-off-by: Manan Gupta --- .../reparentutil/emergency_reparenter.go | 10 ++++++--- .../vtctl/reparentutil/planned_reparenter.go | 21 ++++++++++--------- .../planned_reparenter_flaky_test.go | 19 ++--------------- go/vt/vtctl/reparentutil/util.go | 4 ++++ 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/go/vt/vtctl/reparentutil/emergency_reparenter.go b/go/vt/vtctl/reparentutil/emergency_reparenter.go index 60e423c502c..e65f1891872 100644 --- a/go/vt/vtctl/reparentutil/emergency_reparenter.go +++ b/go/vt/vtctl/reparentutil/emergency_reparenter.go @@ -202,7 +202,7 @@ func (erp *EmergencyReparenter) reparentShardLocked(ctx context.Context, ev *eve // check that we still have the shard lock. If we don't then we can terminate at this point if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { - return vterrors.Wrapf(err, "lost topology lock, aborting: %v", err) + return vterrors.Wrap(err, lostTopologyLockMsg) } // find the valid candidates for becoming the primary @@ -255,8 +255,8 @@ func (erp *EmergencyReparenter) reparentShardLocked(ctx context.Context, ev *eve erp.logger.Infof("intermediate source is ideal candidate- %v", isIdeal) // Check (again) we still have the topology lock. - if err = topo.CheckShardLocked(ctx, keyspace, shard); err != nil { - return vterrors.Wrapf(err, "lost topology lock, aborting: %v", err) + if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { + return vterrors.Wrap(err, lostTopologyLockMsg) } // initialize the newPrimary with the intermediate source, override this value if it is not the ideal candidate @@ -287,6 +287,10 @@ func (erp *EmergencyReparenter) reparentShardLocked(ctx context.Context, ev *eve } newPrimary = betterCandidate } + + if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { + return vterrors.Wrap(err, lostTopologyLockMsg) + } } // The new primary which will be promoted will always belong to the validCandidateTablets list because - diff --git a/go/vt/vtctl/reparentutil/planned_reparenter.go b/go/vt/vtctl/reparentutil/planned_reparenter.go index c311a5c836c..49741f44574 100644 --- a/go/vt/vtctl/reparentutil/planned_reparenter.go +++ b/go/vt/vtctl/reparentutil/planned_reparenter.go @@ -157,8 +157,6 @@ func (pr *PlannedReparenter) getLockAction(opts PlannedReparentOptions) string { func (pr *PlannedReparenter) preflightChecks( ctx context.Context, ev *events.Reparent, - keyspace string, - shard string, tabletMap map[string]*topo.TabletInfo, opts *PlannedReparentOptions, // we take a pointer here to set NewPrimaryAlias ) (isNoop bool, err error) { @@ -220,7 +218,6 @@ func (pr *PlannedReparenter) performGracefulPromotion( shard string, currentPrimary *topo.TabletInfo, primaryElect *topodatapb.Tablet, - tabletMap map[string]*topo.TabletInfo, opts PlannedReparentOptions, ) error { primaryElectAliasStr := topoproto.TabletAliasString(primaryElect.Alias) @@ -260,7 +257,7 @@ func (pr *PlannedReparenter) performGracefulPromotion( // Verify we still have the topology lock before doing the demotion. if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { - return vterrors.Wrap(err, "lost topology lock; aborting") + return vterrors.Wrap(err, lostTopologyLockMsg) } // Next up, demote the current primary and get its replication position. @@ -375,7 +372,6 @@ func (pr *PlannedReparenter) performPotentialPromotion( shard string, primaryElect *topodatapb.Tablet, tabletMap map[string]*topo.TabletInfo, - opts PlannedReparentOptions, ) error { primaryElectAliasStr := topoproto.TabletAliasString(primaryElect.Alias) @@ -490,7 +486,7 @@ func (pr *PlannedReparenter) performPotentialPromotion( // Check that we still have the topology lock. if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { - return vterrors.Wrap(err, "lost topology lock; aborting") + return vterrors.Wrap(err, lostTopologyLockMsg) } return nil } @@ -533,12 +529,17 @@ func (pr *PlannedReparenter) reparentShardLocked( } // Check invariants that PlannedReparentShard depends on. - if isNoop, err := pr.preflightChecks(ctx, ev, keyspace, shard, tabletMap, &opts); err != nil { + if isNoop, err := pr.preflightChecks(ctx, ev, tabletMap, &opts); err != nil { return err } else if isNoop { return nil } + // Before we run any RPCs that change the cluster configuration, we should ensure we still hold the topology lock. + if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { + return vterrors.Wrap(err, lostTopologyLockMsg) + } + currentPrimary := FindCurrentPrimary(tabletMap, pr.logger) reparentJournalPos := "" // promoteReplicaRequired is a boolean that is used to store whether we need to call @@ -594,7 +595,7 @@ func (pr *PlannedReparenter) reparentShardLocked( case currentPrimary == nil && ev.ShardInfo.PrimaryTermStartTime != nil: // Case (2): no clear current primary. Try to find a safe promotion // candidate, and promote to it. - err = pr.performPotentialPromotion(ctx, keyspace, shard, ev.NewPrimary, tabletMap, opts) + err = pr.performPotentialPromotion(ctx, keyspace, shard, ev.NewPrimary, tabletMap) // We need to call `PromoteReplica` when we reparent the tablets. promoteReplicaRequired = true case topoproto.TabletAliasEqual(currentPrimary.Alias, opts.NewPrimaryAlias): @@ -604,7 +605,7 @@ func (pr *PlannedReparenter) reparentShardLocked( default: // Case (4): desired primary and current primary differ. Do a graceful // demotion-then-promotion. - err = pr.performGracefulPromotion(ctx, ev, keyspace, shard, currentPrimary, ev.NewPrimary, tabletMap, opts) + err = pr.performGracefulPromotion(ctx, ev, keyspace, shard, currentPrimary, ev.NewPrimary, opts) // We need to call `PromoteReplica` when we reparent the tablets. promoteReplicaRequired = true } @@ -614,7 +615,7 @@ func (pr *PlannedReparenter) reparentShardLocked( } if err := topo.CheckShardLocked(ctx, keyspace, shard); err != nil { - return vterrors.Wrap(err, "lost topology lock, aborting") + return vterrors.Wrap(err, lostTopologyLockMsg) } if err := pr.reparentTablets(ctx, ev, reparentJournalPos, promoteReplicaRequired, tabletMap, opts); err != nil { diff --git a/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go b/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go index 25e4c86f7c5..779390179b9 100644 --- a/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go +++ b/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go @@ -1081,7 +1081,7 @@ func TestPlannedReparenter_preflightChecks(t *testing.T) { require.NoError(t, err) tt.opts.durability = durability } - isNoop, err := pr.preflightChecks(ctx, tt.ev, tt.keyspace, tt.shard, tt.tabletMap, tt.opts) + isNoop, err := pr.preflightChecks(ctx, tt.ev, tt.tabletMap, tt.opts) if tt.shouldErr { assert.Error(t, err) assert.Equal(t, tt.expectedIsNoop, isNoop, "preflightChecks returned wrong isNoop signal") @@ -1109,7 +1109,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { shard string currentPrimary *topo.TabletInfo primaryElect *topodatapb.Tablet - tabletMap map[string]*topo.TabletInfo opts PlannedReparentOptions expectedEvent *events.Reparent @@ -1171,7 +1170,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: false, }, @@ -1204,7 +1202,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, }, @@ -1240,7 +1237,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, }, @@ -1279,7 +1275,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{ WaitReplicasTimeout: time.Millisecond * 10, }, @@ -1318,7 +1313,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, }, @@ -1362,7 +1356,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, }, @@ -1418,7 +1411,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, }, @@ -1477,7 +1469,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{ WaitReplicasTimeout: time.Millisecond * 10, }, @@ -1535,7 +1526,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, }, @@ -1594,7 +1584,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, extraAssertions: func(t *testing.T, err error) { @@ -1656,7 +1645,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { Uid: 200, }, }, - tabletMap: map[string]*topo.TabletInfo{}, opts: PlannedReparentOptions{}, shouldErr: true, extraAssertions: func(t *testing.T, err error) { @@ -1713,7 +1701,6 @@ func TestPlannedReparenter_performGracefulPromotion(t *testing.T) { tt.shard, tt.currentPrimary, tt.primaryElect, - tt.tabletMap, tt.opts, ) @@ -2395,9 +2382,7 @@ func TestPlannedReparenter_performPotentialPromotion(t *testing.T) { ctx = _ctx } - durability, err := GetDurabilityPolicy("none") - require.NoError(t, err) - err = pr.performPotentialPromotion(ctx, tt.keyspace, tt.shard, tt.primaryElect, tt.tabletMap, PlannedReparentOptions{durability: durability}) + err := pr.performPotentialPromotion(ctx, tt.keyspace, tt.shard, tt.primaryElect, tt.tabletMap) if tt.shouldErr { assert.Error(t, err) diff --git a/go/vt/vtctl/reparentutil/util.go b/go/vt/vtctl/reparentutil/util.go index 5962ff9fa24..f35ea2695b8 100644 --- a/go/vt/vtctl/reparentutil/util.go +++ b/go/vt/vtctl/reparentutil/util.go @@ -49,6 +49,10 @@ var ( successResult = "success" ) +const ( + lostTopologyLockMsg = "lost topology lock, aborting" +) + // ElectNewPrimary finds a tablet that should become a primary after reparent. // The criteria for the new primary-elect are (preferably) to be in the same // cell as the current primary, and to be different from avoidPrimaryAlias. The From 0a7b9734e3ab04b67109e270b5bef9a31ebef7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Tue, 9 Jul 2024 16:11:11 +0200 Subject: [PATCH 24/55] feat: remove ORDER BY from inside derived table (#16354) Signed-off-by: Andres Taylor --- .../planbuilder/testdata/from_cases.json | 41 ++++++++++++++++ go/vt/vtgate/semantics/early_rewriter.go | 14 ++++++ go/vt/vtgate/semantics/early_rewriter_test.go | 48 +++++++++++++++++++ 3 files changed, 103 insertions(+) diff --git a/go/vt/vtgate/planbuilder/testdata/from_cases.json b/go/vt/vtgate/planbuilder/testdata/from_cases.json index 0e540e88b27..cbdfcd835b5 100644 --- a/go/vt/vtgate/planbuilder/testdata/from_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/from_cases.json @@ -1742,6 +1742,47 @@ ] } }, + { + "comment": "Unneeded ORDER BY inside derived table removed", + "query": "select * from (select id from user order by foo) dt1, (select id from user order by baz) dt2", + "plan": { + "QueryType": "SELECT", + "Original": "select * from (select id from user order by foo) dt1, (select id from user order by baz) dt2", + "Instructions": { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "L:0,R:0", + "TableName": "`user`_`user`", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select dt1.id from (select id from `user` where 1 != 1) as dt1 where 1 != 1", + "Query": "select dt1.id from (select id from `user`) as dt1", + "Table": "`user`" + }, + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select dt2.id from (select id from `user` where 1 != 1) as dt2 where 1 != 1", + "Query": "select dt2.id from (select id from `user`) as dt2", + "Table": "`user`" + } + ] + }, + "TablesUsed": [ + "user.user" + ] + } + }, { "comment": "join of information_schema with normal table", "query": "select unsharded.foo from information_schema.CHARACTER_SETS join unsharded", diff --git a/go/vt/vtgate/semantics/early_rewriter.go b/go/vt/vtgate/semantics/early_rewriter.go index 568e1900d44..611c91e512c 100644 --- a/go/vt/vtgate/semantics/early_rewriter.go +++ b/go/vt/vtgate/semantics/early_rewriter.go @@ -62,6 +62,20 @@ func (r *earlyRewriter) down(cursor *sqlparser.Cursor) error { return r.handleAliasedTable(node) case *sqlparser.Delete: return handleDelete(node) + case *sqlparser.DerivedTable: + return r.handleDerivedTable(node) + } + return nil +} + +func (r *earlyRewriter) handleDerivedTable(dt *sqlparser.DerivedTable) error { + sel, ok := dt.Select.(*sqlparser.Select) + if !ok { + return nil + } + if len(sel.OrderBy) > 0 && sel.Limit == nil { + // inside derived tables, we can safely remove ORDER BY clauses if there is no LIMIT clause + sel.OrderBy = nil } return nil } diff --git a/go/vt/vtgate/semantics/early_rewriter_test.go b/go/vt/vtgate/semantics/early_rewriter_test.go index 81d3ed8c450..16b3756189f 100644 --- a/go/vt/vtgate/semantics/early_rewriter_test.go +++ b/go/vt/vtgate/semantics/early_rewriter_test.go @@ -854,6 +854,54 @@ func TestRewriteNot(t *testing.T) { } } +func TestOrderByDerivedTable(t *testing.T) { + ks := &vindexes.Keyspace{ + Name: "main", + Sharded: true, + } + schemaInfo := &FakeSI{ + Tables: map[string]*vindexes.Table{ + "t1": { + Keyspace: ks, + Name: sqlparser.NewIdentifierCS("t1"), + Columns: []vindexes.Column{{ + Name: sqlparser.NewIdentifierCI("a"), + Type: sqltypes.VarChar, + }, { + Name: sqlparser.NewIdentifierCI("b"), + Type: sqltypes.VarChar, + }, { + Name: sqlparser.NewIdentifierCI("c"), + Type: sqltypes.VarChar, + }}, + ColumnListAuthoritative: true, + }, + }, + } + cDB := "db" + tcases := []struct { + sql string + expected string + }{{ + sql: "select a, b, c from (select a, b, c from t1 order by b, a, c) as dt", + expected: "select a, b, c from (select a, b, c from t1) as dt", + }, { + sql: "select a, b, c from (select a, b, c from t1 order by b, a, c limit 5) as dt", + expected: "select a, b, c from (select a, b, c from t1 order by t1.b asc, t1.a asc, t1.c asc limit 5) as dt", + }} + for _, tcase := range tcases { + t.Run(tcase.sql, func(t *testing.T) { + ast, err := sqlparser.NewTestParser().Parse(tcase.sql) + require.NoError(t, err) + selectStatement, isSelectStatement := ast.(*sqlparser.Select) + require.True(t, isSelectStatement, "analyzer expects a select statement") + _, err = AnalyzeStrict(selectStatement, cDB, schemaInfo) + require.NoError(t, err) + assert.Equal(t, tcase.expected, sqlparser.String(selectStatement)) + }) + } +} + // TestConstantFolding tests that the rewriter is able to do various constant foldings properly. func TestConstantFolding(t *testing.T) { ks := &vindexes.Keyspace{ From eb29999a3f4730b2ebe2e0abe1d1996ce2d861d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Tue, 9 Jul 2024 16:42:53 +0200 Subject: [PATCH 25/55] planner: Handle ORDER BY inside derived tables (#16353) Signed-off-by: Manan Gupta Signed-off-by: Andres Taylor Co-authored-by: Manan Gupta --- .../aggregation/aggregation.test | 16 ++- .../planbuilder/operators/aggregator.go | 8 -- .../operators/horizon_expanding.go | 11 +- .../planbuilder/operators/projection.go | 9 -- .../planbuilder/operators/queryprojection.go | 17 +++ go/vt/vtgate/planbuilder/operators/route.go | 100 ++++++++---------- .../planbuilder/testdata/aggr_cases.json | 43 ++++++++ 7 files changed, 129 insertions(+), 75 deletions(-) diff --git a/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test b/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test index 8861b9672b8..3f89d867ff8 100644 --- a/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test +++ b/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test @@ -9,7 +9,7 @@ CREATE TABLE `t1` CREATE TABLE `t2` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, `t1_id` int unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE InnoDB, @@ -38,7 +38,10 @@ values (1, 1), insert into t3 (id, name) values (1, 'A'), - (2, 'B'); + (2, 'B'), + (3, 'B'), + (4, 'B'), + (5, 'B'); -- wait_authoritative t1 -- wait_authoritative t2 @@ -47,4 +50,11 @@ select group_concat(t3.name SEPARATOR ', ') as "Group Name" from t1 join t2 on t1.id = t2.t1_id left join t3 on t1.id = t3.id -group by t1.id; \ No newline at end of file +group by t1.id; + +select COUNT(*) +from (select 1 as one + FROM `t3` + WHERE `t3`.`name` = 'B' + ORDER BY id DESC LIMIT 25 + OFFSET 0) subquery_for_count; \ No newline at end of file diff --git a/go/vt/vtgate/planbuilder/operators/aggregator.go b/go/vt/vtgate/planbuilder/operators/aggregator.go index fd9fca30110..36cb0b1a771 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregator.go +++ b/go/vt/vtgate/planbuilder/operators/aggregator.go @@ -115,14 +115,6 @@ func (a *Aggregator) addColumnWithoutPushing(ctx *plancontext.PlanningContext, e return offset } -func (a *Aggregator) addColumnsWithoutPushing(ctx *plancontext.PlanningContext, reuse bool, groupby []bool, exprs []*sqlparser.AliasedExpr) (offsets []int) { - for i, ae := range exprs { - offset := a.addColumnWithoutPushing(ctx, ae, groupby[i]) - offsets = append(offsets, offset) - } - return -} - func (a *Aggregator) isDerived() bool { return a.DT != nil } diff --git a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go index 3f7700eed9d..3b934752a00 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go +++ b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go @@ -75,9 +75,18 @@ func expandUnionHorizon(ctx *plancontext.PlanningContext, horizon *Horizon, unio } func expandSelectHorizon(ctx *plancontext.PlanningContext, horizon *Horizon, sel *sqlparser.Select) (Operator, *ApplyResult) { - op := createProjectionFromSelect(ctx, horizon) qp := horizon.getQP(ctx) var extracted []string + + if horizon.IsDerived() { + // if we are dealing with a derived table, we need to make sure that the ordering columns + // are available outside the derived table + for _, order := range horizon.Query.GetOrderBy() { + qp.addColumn(ctx, order.Expr) + } + } + + op := createProjectionFromSelect(ctx, horizon) if qp.HasAggr { extracted = append(extracted, "Aggregation") } else { diff --git a/go/vt/vtgate/planbuilder/operators/projection.go b/go/vt/vtgate/planbuilder/operators/projection.go index 527991cba26..d8ede63b612 100644 --- a/go/vt/vtgate/planbuilder/operators/projection.go +++ b/go/vt/vtgate/planbuilder/operators/projection.go @@ -308,15 +308,6 @@ func (p *Projection) addColumnWithoutPushing(ctx *plancontext.PlanningContext, e return p.addColumn(ctx, true, false, expr, false) } -func (p *Projection) addColumnsWithoutPushing(ctx *plancontext.PlanningContext, reuse bool, _ []bool, exprs []*sqlparser.AliasedExpr) []int { - offsets := make([]int, len(exprs)) - for idx, expr := range exprs { - offset := p.addColumn(ctx, reuse, false, expr, false) - offsets[idx] = offset - } - return offsets -} - func (p *Projection) AddWSColumn(ctx *plancontext.PlanningContext, offset int, underRoute bool) int { cols, aliased := p.Columns.(AliasedProjections) if !aliased { diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index 8ad8a6efe1e..c747870f5d2 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -664,6 +664,23 @@ func (qp *QueryProjection) useGroupingOverDistinct(ctx *plancontext.PlanningCont return true } +// addColumn adds a column to the QueryProjection if it is not already present +func (qp *QueryProjection) addColumn(ctx *plancontext.PlanningContext, expr sqlparser.Expr) { + for _, selectExpr := range qp.SelectExprs { + getExpr, err := selectExpr.GetExpr() + if err != nil { + continue + } + if ctx.SemTable.EqualsExprWithDeps(getExpr, expr) { + return + } + } + qp.SelectExprs = append(qp.SelectExprs, SelectExpr{ + Col: aeWrap(expr), + Aggr: ctx.ContainsAggr(expr), + }) +} + func checkForInvalidGroupingExpressions(ctx *plancontext.PlanningContext, expr sqlparser.Expr) { _ = sqlparser.Walk(func(node sqlparser.SQLNode) (bool, error) { if ctx.IsAggr(node) { diff --git a/go/vt/vtgate/planbuilder/operators/route.go b/go/vt/vtgate/planbuilder/operators/route.go index 62d6aad6a97..1c91077c2e4 100644 --- a/go/vt/vtgate/planbuilder/operators/route.go +++ b/go/vt/vtgate/planbuilder/operators/route.go @@ -587,96 +587,87 @@ func (r *Route) AddColumn(ctx *plancontext.PlanningContext, reuse bool, gb bool, // if at least one column is not already present, we check if we can easily find a projection // or aggregation in our source that we can add to - derived, op, ok, offsets := addMultipleColumnsToInput(ctx, r.Source, reuse, []bool{gb}, []*sqlparser.AliasedExpr{expr}) - r.Source = op - if ok { - return offsets[0] + derived, op, offset := addColumnToInput(ctx, r.Source, expr, reuse, gb) + if op != nil { + r.Source = op + } + if offset >= 0 { + return offset } // If no-one could be found, we probably don't have one yet, so we add one here src := createProjection(ctx, r.Source, derived) r.Source = src - offsets = src.addColumnsWithoutPushing(ctx, reuse, []bool{gb}, []*sqlparser.AliasedExpr{expr}) - return offsets[0] + return src.addColumnWithoutPushing(ctx, expr, gb) } type selectExpressions interface { Operator addColumnWithoutPushing(ctx *plancontext.PlanningContext, expr *sqlparser.AliasedExpr, addToGroupBy bool) int - addColumnsWithoutPushing(ctx *plancontext.PlanningContext, reuse bool, addToGroupBy []bool, exprs []*sqlparser.AliasedExpr) []int derivedName() string } // addColumnToInput adds columns to an operator without pushing them down -func addMultipleColumnsToInput( +func addColumnToInput( ctx *plancontext.PlanningContext, operator Operator, - reuse bool, - addToGroupBy []bool, - exprs []*sqlparser.AliasedExpr, -) (derivedName string, // if we found a derived table, this will contain its name + expr *sqlparser.AliasedExpr, + reuse, addToGroupBy bool, +) ( + derivedName string, // if we found a derived table, this will contain its name projection Operator, // if an operator needed to be built, it will be returned here - found bool, // whether a matching op was found or not - offsets []int, // the offsets the expressions received + offset int, // the offset of the expression, -1 if not found ) { + var src Operator + var updateSrc func(Operator) switch op := operator.(type) { - case *SubQuery: - derivedName, src, added, offset := addMultipleColumnsToInput(ctx, op.Outer, reuse, addToGroupBy, exprs) - if added { - op.Outer = src - } - return derivedName, op, added, offset + // Pass through operators - we can just add the columns to their source + case *SubQuery: + src, updateSrc = op.Outer, func(newSrc Operator) { op.Outer = newSrc } case *Distinct: - derivedName, src, added, offset := addMultipleColumnsToInput(ctx, op.Source, reuse, addToGroupBy, exprs) - if added { - op.Source = src - } - return derivedName, op, added, offset - + src, updateSrc = op.Source, func(newSrc Operator) { op.Source = newSrc } case *Limit: - derivedName, src, added, offset := addMultipleColumnsToInput(ctx, op.Source, reuse, addToGroupBy, exprs) - if added { - op.Source = src - } - return derivedName, op, added, offset - + src, updateSrc = op.Source, func(newSrc Operator) { op.Source = newSrc } case *Ordering: - derivedName, src, added, offset := addMultipleColumnsToInput(ctx, op.Source, reuse, addToGroupBy, exprs) - if added { - op.Source = src - } - return derivedName, op, added, offset - + src, updateSrc = op.Source, func(newSrc Operator) { op.Source = newSrc } case *LockAndComment: - derivedName, src, added, offset := addMultipleColumnsToInput(ctx, op.Source, reuse, addToGroupBy, exprs) - if added { - op.Source = src + src, updateSrc = op.Source, func(newSrc Operator) { op.Source = newSrc } + + // Union needs special handling, we can't really add new columns to all inputs + case *Union: + proj := wrapInDerivedProjection(ctx, op) + dtName, newOp, offset := addColumnToInput(ctx, proj, expr, reuse, addToGroupBy) + if newOp == nil { + newOp = proj } - return derivedName, op, added, offset + return dtName, newOp, offset + // Horizon is another one of these - we can't really add new columns to it case *Horizon: - // if the horizon has an alias, then it is a derived table, - // we have to add a new projection and can't build on this one - return op.Alias, op, false, nil + return op.Alias, nil, -1 case selectExpressions: name := op.derivedName() if name != "" { // if the only thing we can push to is a derived table, // we have to add a new projection and can't build on this one - return name, op, false, nil + return name, nil, -1 } - offset := op.addColumnsWithoutPushing(ctx, reuse, addToGroupBy, exprs) - return "", op, true, offset + offset := op.addColumnWithoutPushing(ctx, expr, addToGroupBy) + return "", nil, offset - case *Union: - proj := addDerivedProj(ctx, op) - return addMultipleColumnsToInput(ctx, proj, reuse, addToGroupBy, exprs) default: - return "", op, false, nil + return "", nil, -1 + } + + // Handle the case where we have a pass-through operator + derivedName, src, offset = addColumnToInput(ctx, src, expr, reuse, addToGroupBy) + if src != nil { + updateSrc(src) } + return derivedName, nil, offset } func (r *Route) AddWSColumn(ctx *plancontext.PlanningContext, offset int, _ bool) int { @@ -691,7 +682,7 @@ func (r *Route) AddWSColumn(ctx *plancontext.PlanningContext, offset int, _ bool ok, foundOffset := addWSColumnToInput(ctx, r.Source, offset) if !ok { - src := addDerivedProj(ctx, r.Source) + src := wrapInDerivedProjection(ctx, r.Source) r.Source = src return src.AddWSColumn(ctx, offset, true) } @@ -714,7 +705,8 @@ func addWSColumnToInput(ctx *plancontext.PlanningContext, source Operator, offse return false, -1 } -func addDerivedProj( +// wrapInDerivedProjection wraps the input in a derived table projection named "dt" +func wrapInDerivedProjection( ctx *plancontext.PlanningContext, op Operator, ) (projection *Projection) { diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index b124e8f2b50..a2155ee0700 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -7144,6 +7144,49 @@ ] } }, + { + "comment": "Aggregation over a ORDER BY/LIMIT inside a derived table", + "query": "SELECT COUNT(*) FROM (SELECT 1 AS one FROM `user` WHERE `user`.`is_not_deleted` = true ORDER BY id DESC LIMIT 25 OFFSET 0) subquery_for_count", + "plan": { + "QueryType": "SELECT", + "Original": "SELECT COUNT(*) FROM (SELECT 1 AS one FROM `user` WHERE `user`.`is_not_deleted` = true ORDER BY id DESC LIMIT 25 OFFSET 0) subquery_for_count", + "Instructions": { + "OperatorType": "Aggregate", + "Variant": "Scalar", + "Aggregates": "count_star(0) AS count(*)", + "Inputs": [ + { + "OperatorType": "SimpleProjection", + "Columns": "2", + "Inputs": [ + { + "OperatorType": "Limit", + "Count": "25", + "Offset": "0", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select subquery_for_count.one, subquery_for_count.id, 1, weight_string(subquery_for_count.id) from (select 1 as one, id from `user` where 1 != 1) as subquery_for_count where 1 != 1", + "OrderBy": "(1|3) DESC", + "Query": "select subquery_for_count.one, subquery_for_count.id, 1, weight_string(subquery_for_count.id) from (select 1 as one, id from `user` where `user`.is_not_deleted = true) as subquery_for_count order by id desc limit 25", + "Table": "`user`" + } + ] + } + ] + } + ] + }, + "TablesUsed": [ + "user.user" + ] + } + }, { "comment": "should be able to push down aggregation", "query": "select sum(user.type) from user join user_extra on user.team_id = user_extra.id group by user_extra.id order by user_extra.id", From 16b05c151a4d32758830d97353d7fe80d8ffa5c7 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Tue, 9 Jul 2024 22:00:49 -0400 Subject: [PATCH 26/55] VReplication: use new topo named locks and TTL override for workflow coordination (#16260) Signed-off-by: Matt Lord --- .../vreplication/common/switchtraffic.go | 3 + .../command/vreplication/common/utils.go | 3 +- .../command/vreplication/vdiff/vdiff.go | 3 +- go/test/endtoend/topotest/etcd2/main_test.go | 69 +++++++ .../vreplication/vreplication_test_env.go | 4 +- go/vt/topo/conn.go | 16 ++ go/vt/topo/consultopo/lock.go | 40 +++- go/vt/topo/consultopo/server.go | 2 +- go/vt/topo/etcd2topo/election.go | 2 +- go/vt/topo/etcd2topo/lock.go | 31 ++- go/vt/topo/faketopo/faketopo.go | 15 ++ go/vt/topo/keyspace_lock.go | 4 +- go/vt/topo/keyspace_lock_test.go | 35 +++- go/vt/topo/locks.go | 100 +++++++++- go/vt/topo/memorytopo/lock.go | 33 ++- go/vt/topo/named_lock.go | 58 ++++++ go/vt/topo/named_lock_test.go | 88 ++++++++ go/vt/topo/routing_rules_lock.go | 4 +- go/vt/topo/server.go | 1 + go/vt/topo/shard_lock.go | 6 +- go/vt/topo/stats_conn.go | 37 +++- go/vt/topo/stats_conn_test.go | 50 +++-- go/vt/topo/zk2topo/lock.go | 12 ++ go/vt/vtctl/workflow/server.go | 188 ++++++++++++++---- go/vt/vtctl/workflow/server_test.go | 8 +- go/vt/vtctl/workflow/switcher.go | 6 +- go/vt/vtctl/workflow/switcher_dry_run.go | 3 +- go/vt/vtctl/workflow/switcher_interface.go | 4 +- go/vt/vtctl/workflow/traffic_switcher.go | 2 - .../tabletmanager/vdiff/table_differ.go | 9 +- 30 files changed, 724 insertions(+), 112 deletions(-) create mode 100644 go/vt/topo/named_lock.go create mode 100644 go/vt/topo/named_lock_test.go diff --git a/go/cmd/vtctldclient/command/vreplication/common/switchtraffic.go b/go/cmd/vtctldclient/command/vreplication/common/switchtraffic.go index 4004afc0ac0..3429c10303c 100644 --- a/go/cmd/vtctldclient/command/vreplication/common/switchtraffic.go +++ b/go/cmd/vtctldclient/command/vreplication/common/switchtraffic.go @@ -48,6 +48,9 @@ func GetSwitchTrafficCommand(opts *SubCommandsOpts) *cobra.Command { topodatapb.TabletType_RDONLY, } } + if SwitchTrafficOptions.Timeout.Seconds() < 1 { + return fmt.Errorf("timeout value must be at least 1 second") + } return nil }, RunE: commandSwitchTraffic, diff --git a/go/cmd/vtctldclient/command/vreplication/common/utils.go b/go/cmd/vtctldclient/command/vreplication/common/utils.go index cb408add490..da774647c38 100644 --- a/go/cmd/vtctldclient/command/vreplication/common/utils.go +++ b/go/cmd/vtctldclient/command/vreplication/common/utils.go @@ -47,7 +47,6 @@ var ( } onDDLDefault = binlogdatapb.OnDDLAction_IGNORE.String() MaxReplicationLagDefault = 30 * time.Second - TimeoutDefault = 30 * time.Second BaseOptions = struct { Workflow string @@ -245,7 +244,7 @@ var SwitchTrafficOptions = struct { func AddCommonSwitchTrafficFlags(cmd *cobra.Command, initializeTargetSequences bool) { cmd.Flags().StringSliceVarP(&SwitchTrafficOptions.Cells, "cells", "c", nil, "Cells and/or CellAliases to switch traffic in.") cmd.Flags().Var((*topoproto.TabletTypeListFlag)(&SwitchTrafficOptions.TabletTypes), "tablet-types", "Tablet types to switch traffic for.") - cmd.Flags().DurationVar(&SwitchTrafficOptions.Timeout, "timeout", TimeoutDefault, "Specifies the maximum time to wait, in seconds, for VReplication to catch up on primary tablets. The traffic switch will be cancelled on timeout.") + cmd.Flags().DurationVar(&SwitchTrafficOptions.Timeout, "timeout", workflow.DefaultTimeout, "Specifies the maximum time to wait, in seconds, for VReplication to catch up on primary tablets. The traffic switch will be cancelled on timeout.") cmd.Flags().DurationVar(&SwitchTrafficOptions.MaxReplicationLagAllowed, "max-replication-lag-allowed", MaxReplicationLagDefault, "Allow traffic to be switched only if VReplication lag is below this.") cmd.Flags().BoolVar(&SwitchTrafficOptions.EnableReverseReplication, "enable-reverse-replication", true, "Setup replication going back to the original source keyspace to support rolling back the traffic cutover.") cmd.Flags().BoolVar(&SwitchTrafficOptions.DryRun, "dry-run", false, "Print the actions that would be taken and report any known errors that would have occurred.") diff --git a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go index dfca3386491..9355049e39b 100644 --- a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go +++ b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go @@ -35,6 +35,7 @@ import ( "vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common" "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/vtctl/workflow" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tabletmanager/vdiff" @@ -874,7 +875,7 @@ func registerCommands(root *cobra.Command) { create.Flags().StringSliceVar(&createOptions.TargetCells, "target-cells", nil, "The target cell(s) to compare with; default is any available cell.") create.Flags().Var((*topoprotopb.TabletTypeListFlag)(&createOptions.TabletTypes), "tablet-types", "Tablet types to use on the source and target.") create.Flags().BoolVar(&common.CreateOptions.TabletTypesInPreferenceOrder, "tablet-types-in-preference-order", true, "When performing source tablet selection, look for candidates in the type order as they are listed in the tablet-types flag.") - create.Flags().DurationVar(&createOptions.FilteredReplicationWaitTime, "filtered-replication-wait-time", 30*time.Second, "Specifies the maximum time to wait, in seconds, for replication to catch up when syncing tablet streams.") + create.Flags().DurationVar(&createOptions.FilteredReplicationWaitTime, "filtered-replication-wait-time", workflow.DefaultTimeout, "Specifies the maximum time to wait, in seconds, for replication to catch up when syncing tablet streams.") create.Flags().Int64Var(&createOptions.Limit, "limit", math.MaxInt64, "Max rows to stop comparing after.") create.Flags().BoolVar(&createOptions.DebugQuery, "debug-query", false, "Adds a mysql query to the report that can be used for further debugging.") create.Flags().Int64Var(&createOptions.MaxReportSampleRows, "max-report-sample-rows", 10, "Maximum number of row differences to report (0 for all differences). NOTE: when increasing this value it is highly recommended to also specify --only-pks") diff --git a/go/test/endtoend/topotest/etcd2/main_test.go b/go/test/endtoend/topotest/etcd2/main_test.go index 747f2721cdc..67b0dbbc8f7 100644 --- a/go/test/endtoend/topotest/etcd2/main_test.go +++ b/go/test/endtoend/topotest/etcd2/main_test.go @@ -19,6 +19,7 @@ package ectd2 import ( "context" "flag" + "fmt" "os" "testing" "time" @@ -201,6 +202,74 @@ func TestKeyspaceLocking(t *testing.T) { topoutils.WaitForBoolValue(t, &secondThreadLockAcquired, true) } +// TestLockingWithTTL tests that locking with the TTL override works as intended. +func TestLockingWithTTL(t *testing.T) { + // Create the topo server connection. + ts, err := topo.OpenServer(*clusterInstance.TopoFlavorString(), clusterInstance.VtctlProcess.TopoGlobalAddress, clusterInstance.VtctlProcess.TopoGlobalRoot) + require.NoError(t, err) + + ctx := context.Background() + + // Acquire a keyspace lock with a short custom TTL. + ttl := 1 * time.Second + ctx, unlock, err := ts.LockKeyspace(ctx, KeyspaceName, "TestLockingWithTTL", topo.WithTTL(ttl)) + require.NoError(t, err) + defer unlock(&err) + + // Check that CheckKeyspaceLocked DOES return an error after waiting more than + // the specified TTL as we should have lost our lock. + time.Sleep(ttl * 2) + err = topo.CheckKeyspaceLocked(ctx, KeyspaceName) + require.Error(t, err) +} + +// TestNamedLocking tests that named locking works as intended. +func TestNamedLocking(t *testing.T) { + // Create topo server connection. + ts, err := topo.OpenServer(*clusterInstance.TopoFlavorString(), clusterInstance.VtctlProcess.TopoGlobalAddress, clusterInstance.VtctlProcess.TopoGlobalRoot) + require.NoError(t, err) + + ctx := context.Background() + lockName := "TestNamedLocking" + action := "Testing" + + // Acquire a named lock. + ctx, unlock, err := ts.LockName(ctx, lockName, action) + require.NoError(t, err) + + // Check that we can't reacquire it from the same context. + _, _, err = ts.LockName(ctx, lockName, action) + require.ErrorContains(t, err, fmt.Sprintf("lock for named %s is already held", lockName)) + + // Check that CheckNameLocked doesn't return an error as we should still be + // holding the lock. + err = topo.CheckNameLocked(ctx, lockName) + require.NoError(t, err) + + // We'll now try to acquire the lock from a different goroutine. + secondCallerAcquired := false + go func() { + _, unlock, err := ts.LockName(context.Background(), lockName, action) + defer unlock(&err) + require.NoError(t, err) + secondCallerAcquired = true + }() + + // Wait for some time and ensure that the second attempt at acquiring the lock + // is blocked. + time.Sleep(100 * time.Millisecond) + require.False(t, secondCallerAcquired) + + // Unlock the name. + unlock(&err) + // Check that we no longer have the named lock. + err = topo.CheckNameLocked(ctx, lockName) + require.ErrorContains(t, err, fmt.Sprintf("named %s is not locked (no lockInfo in map)", lockName)) + + // Wait to see that the second goroutine WAS now able to acquire the named lock. + topoutils.WaitForBoolValue(t, &secondCallerAcquired, true) +} + func execMulti(t *testing.T, conn *mysql.Conn, query string) []*sqltypes.Result { t.Helper() var res []*sqltypes.Result diff --git a/go/test/endtoend/vreplication/vreplication_test_env.go b/go/test/endtoend/vreplication/vreplication_test_env.go index 238242f0e65..c62d871380d 100644 --- a/go/test/endtoend/vreplication/vreplication_test_env.go +++ b/go/test/endtoend/vreplication/vreplication_test_env.go @@ -17,9 +17,9 @@ limitations under the License. package vreplication var dryRunResultsSwitchWritesCustomerShard = []string{ - "Mirroring 0.00 percent of traffic from keyspace product to keyspace customer for tablet types [PRIMARY]", "Lock keyspace product", "Lock keyspace customer", + "Mirroring 0.00 percent of traffic from keyspace product to keyspace customer for tablet types [PRIMARY]", "/Stop writes on keyspace product for tables [Lead,Lead-1,blüb_tbl,customer,db_order_test,geom_tbl,json_tbl,loadtest,reftable,vdiff_order]: [keyspace:product;shard:0;position:", "Wait for vreplication on stopped streams to catchup for up to 30s", "Create reverse vreplication workflow p2c_reverse", @@ -36,8 +36,8 @@ var dryRunResultsSwitchWritesCustomerShard = []string{ } var dryRunResultsReadCustomerShard = []string{ - "Mirroring 0.00 percent of traffic from keyspace product to keyspace customer for tablet types [RDONLY,REPLICA]", "Lock keyspace product", + "Mirroring 0.00 percent of traffic from keyspace product to keyspace customer for tablet types [RDONLY,REPLICA]", "Switch reads for tables [Lead,Lead-1,blüb_tbl,customer,db_order_test,geom_tbl,json_tbl,loadtest,reftable,vdiff_order] to keyspace customer for tablet types [RDONLY,REPLICA]", "Routing rules for tables [Lead,Lead-1,blüb_tbl,customer,db_order_test,geom_tbl,json_tbl,loadtest,reftable,vdiff_order] will be updated", "Serving VSchema will be rebuilt for the customer keyspace", diff --git a/go/vt/topo/conn.go b/go/vt/topo/conn.go index 348fc569ecf..b00bdc67207 100644 --- a/go/vt/topo/conn.go +++ b/go/vt/topo/conn.go @@ -19,6 +19,7 @@ package topo import ( "context" "sort" + "time" ) // Conn defines the interface that must be implemented by topology @@ -120,6 +121,21 @@ type Conn interface { // Returns ErrInterrupted if ctx is canceled. Lock(ctx context.Context, dirPath, contents string) (LockDescriptor, error) + // LockWithTTL is similar to `Lock` but the difference is that it allows + // you to override the global default TTL that is configured for the + // implementation (--topo_etcd_lease_ttl and --topo_consul_lock_session_ttl). + // Note: this is no different than `Lock` for ZooKeeper as it does not + // support lock TTLs and they exist until released or the session ends. + LockWithTTL(ctx context.Context, dirPath, contents string, ttl time.Duration) (LockDescriptor, error) + + // LockName is similar to `Lock` but the difference is that it does not require + // the path to exist and have children in order to lock it. This is because with + // named locks you are NOT locking an actual topo entity such as a Keyspace record. + // Because this lock is not blocking any Vitess operations OTHER than another + // caller that is trying to get the same named lock, there is a static 24 hour + // TTL on them to ensure that they are eventually cleaned up. + LockName(ctx context.Context, dirPath, contents string) (LockDescriptor, error) + // TryLock takes lock on the given directory with a fail-fast approach. // It is similar to `Lock` but the difference is it attempts to acquire the lock // if it is likely to succeed. If there is already a lock on given path, then unlike `Lock` diff --git a/go/vt/topo/consultopo/lock.go b/go/vt/topo/consultopo/lock.go index ae47b91cc6c..49554474677 100644 --- a/go/vt/topo/consultopo/lock.go +++ b/go/vt/topo/consultopo/lock.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "path" + "time" "github.com/hashicorp/consul/api" @@ -49,7 +50,27 @@ func (s *Server) Lock(ctx context.Context, dirPath, contents string) (topo.LockD return nil, convertError(err, dirPath) } - return s.lock(ctx, dirPath, contents) + return s.lock(ctx, dirPath, contents, s.lockTTL) +} + +// LockWithTTL is part of the topo.Conn interface. +func (s *Server) LockWithTTL(ctx context.Context, dirPath, contents string, ttl time.Duration) (topo.LockDescriptor, error) { + // We list the directory first to make sure it exists. + if _, err := s.ListDir(ctx, dirPath, false /*full*/); err != nil { + // We need to return the right error codes, like + // topo.ErrNoNode and topo.ErrInterrupted, and the + // easiest way to do this is to return convertError(err). + // It may lose some of the context, if this is an issue, + // maybe logging the error would work here. + return nil, convertError(err, dirPath) + } + + return s.lock(ctx, dirPath, contents, ttl.String()) +} + +// LockName is part of the topo.Conn interface. +func (s *Server) LockName(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { + return s.lock(ctx, dirPath, contents, topo.NamedLockTTL.String()) } // TryLock is part of the topo.Conn interface. @@ -74,11 +95,11 @@ func (s *Server) TryLock(ctx context.Context, dirPath, contents string) (topo.Lo } // everything is good let's acquire the lock. - return s.lock(ctx, dirPath, contents) + return s.lock(ctx, dirPath, contents, s.lockTTL) } // Lock is part of the topo.Conn interface. -func (s *Server) lock(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { +func (s *Server) lock(ctx context.Context, dirPath, contents, ttl string) (topo.LockDescriptor, error) { lockPath := path.Join(s.root, dirPath, locksFilename) lockOpts := &api.LockOptions{ @@ -90,12 +111,19 @@ func (s *Server) lock(ctx context.Context, dirPath, contents string) (topo.LockD }, } lockOpts.SessionOpts.Checks = s.lockChecks - if s.lockDelay > 0 { - lockOpts.SessionOpts.LockDelay = s.lockDelay - } if s.lockTTL != "" { + // Override the API default with the global default from + // --topo_consul_lock_session_ttl. lockOpts.SessionOpts.TTL = s.lockTTL } + if ttl != "" { + // Override the global default with the one provided by the + // caller. + lockOpts.SessionOpts.TTL = ttl + } + if s.lockDelay > 0 { + lockOpts.SessionOpts.LockDelay = s.lockDelay + } // Build the lock structure. l, err := s.client.LockOpts(lockOpts) if err != nil { diff --git a/go/vt/topo/consultopo/server.go b/go/vt/topo/consultopo/server.go index a7a5446c274..ab61a40b1e8 100644 --- a/go/vt/topo/consultopo/server.go +++ b/go/vt/topo/consultopo/server.go @@ -111,7 +111,7 @@ type Server struct { locks map[string]*lockInstance lockChecks []string - lockTTL string + lockTTL string // This is the default used for all non-named locks lockDelay time.Duration } diff --git a/go/vt/topo/etcd2topo/election.go b/go/vt/topo/etcd2topo/election.go index 276d9e60355..94768b50470 100644 --- a/go/vt/topo/etcd2topo/election.go +++ b/go/vt/topo/etcd2topo/election.go @@ -91,7 +91,7 @@ func (mp *etcdLeaderParticipation) WaitForLeadership() (context.Context, error) // Try to get the primaryship, by getting a lock. var err error - ld, err = mp.s.lock(lockCtx, electionPath, mp.id) + ld, err = mp.s.lock(lockCtx, electionPath, mp.id, leaseTTL) if err != nil { // It can be that we were interrupted. return nil, err diff --git a/go/vt/topo/etcd2topo/lock.go b/go/vt/topo/etcd2topo/lock.go index 89095156471..7fb761611cd 100644 --- a/go/vt/topo/etcd2topo/lock.go +++ b/go/vt/topo/etcd2topo/lock.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "path" + "time" "github.com/spf13/pflag" @@ -34,7 +35,7 @@ import ( ) var ( - leaseTTL = 30 + leaseTTL = 30 // This is the default used for all non-named locks ) func init() { @@ -153,7 +154,7 @@ func (s *Server) TryLock(ctx context.Context, dirPath, contents string) (topo.Lo } // everything is good let's acquire the lock. - return s.lock(ctx, dirPath, contents) + return s.lock(ctx, dirPath, contents, leaseTTL) } // Lock is part of the topo.Conn interface. @@ -168,15 +169,35 @@ func (s *Server) Lock(ctx context.Context, dirPath, contents string) (topo.LockD return nil, convertError(err, dirPath) } - return s.lock(ctx, dirPath, contents) + return s.lock(ctx, dirPath, contents, leaseTTL) +} + +// LockWithTTL is part of the topo.Conn interface. +func (s *Server) LockWithTTL(ctx context.Context, dirPath, contents string, ttl time.Duration) (topo.LockDescriptor, error) { + // We list the directory first to make sure it exists. + if _, err := s.ListDir(ctx, dirPath, false /*full*/); err != nil { + // We need to return the right error codes, like + // topo.ErrNoNode and topo.ErrInterrupted, and the + // easiest way to do this is to return convertError(err). + // It may lose some of the context, if this is an issue, + // maybe logging the error would work here. + return nil, convertError(err, dirPath) + } + + return s.lock(ctx, dirPath, contents, int(ttl.Seconds())) +} + +// LockName is part of the topo.Conn interface. +func (s *Server) LockName(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { + return s.lock(ctx, dirPath, contents, int(topo.NamedLockTTL.Seconds())) } // lock is used by both Lock() and primary election. -func (s *Server) lock(ctx context.Context, nodePath, contents string) (topo.LockDescriptor, error) { +func (s *Server) lock(ctx context.Context, nodePath, contents string, ttl int) (topo.LockDescriptor, error) { 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(ttl)) if err != nil { return nil, convertError(err, nodePath) } diff --git a/go/vt/topo/faketopo/faketopo.go b/go/vt/topo/faketopo/faketopo.go index 52a2a41c5df..0c88b95e3da 100644 --- a/go/vt/topo/faketopo/faketopo.go +++ b/go/vt/topo/faketopo/faketopo.go @@ -20,6 +20,7 @@ import ( "context" "strings" "sync" + "time" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/topo" @@ -291,6 +292,20 @@ func (f *FakeConn) Lock(ctx context.Context, dirPath, contents string) (topo.Loc return &fakeLockDescriptor{}, nil } +// LockWithTTL implements the Conn interface. +func (f *FakeConn) LockWithTTL(ctx context.Context, dirPath, contents string, _ time.Duration) (topo.LockDescriptor, error) { + f.mu.Lock() + defer f.mu.Unlock() + return &fakeLockDescriptor{}, nil +} + +// LockName implements the Conn interface. +func (f *FakeConn) LockName(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { + f.mu.Lock() + defer f.mu.Unlock() + return &fakeLockDescriptor{}, nil +} + // TryLock is part of the topo.Conn interface. Its implementation is same as Lock func (f *FakeConn) TryLock(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { return f.Lock(ctx, dirPath, contents) diff --git a/go/vt/topo/keyspace_lock.go b/go/vt/topo/keyspace_lock.go index 7df1b2ee64f..fe9da9a5f8b 100644 --- a/go/vt/topo/keyspace_lock.go +++ b/go/vt/topo/keyspace_lock.go @@ -43,10 +43,10 @@ func (s *keyspaceLock) Path() string { // - a context with a locksInfo structure for future reference. // - an unlock method // - an error if anything failed. -func (ts *Server) LockKeyspace(ctx context.Context, keyspace, action string) (context.Context, func(*error), error) { +func (ts *Server) LockKeyspace(ctx context.Context, keyspace, action string, opts ...LockOption) (context.Context, func(*error), error) { return ts.internalLock(ctx, &keyspaceLock{ keyspace: keyspace, - }, action, true) + }, action, opts...) } // CheckKeyspaceLocked can be called on a context to make sure we have the lock diff --git a/go/vt/topo/keyspace_lock_test.go b/go/vt/topo/keyspace_lock_test.go index 6d0a34de554..35fd804db9a 100644 --- a/go/vt/topo/keyspace_lock_test.go +++ b/go/vt/topo/keyspace_lock_test.go @@ -19,12 +19,14 @@ package topo_test import ( "context" "testing" + "time" "github.com/stretchr/testify/require" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/memorytopo" + + topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) // TestTopoKeyspaceLock tests keyspace lock operations. @@ -82,3 +84,34 @@ func TestTopoKeyspaceLock(t *testing.T) { require.NoError(t, err) defer unlock(&err) } + +// TestTopoKeyspaceLockWithTTL tests keyspace lock with a custom TTL. +func TestTopoKeyspaceLockWithTTL(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + ts, tsf := memorytopo.NewServerAndFactory(ctx, "zone1") + defer ts.Close() + + currentTopoLockTimeout := topo.LockTimeout + topo.LockTimeout = testLockTimeout + defer func() { + topo.LockTimeout = currentTopoLockTimeout + }() + + ks1 := "ks1" + ttl := time.Second + err := ts.CreateKeyspace(ctx, ks1, &topodatapb.Keyspace{}) + require.NoError(t, err) + + ctx, unlock, err := ts.LockKeyspace(ctx, ks1, ks1, topo.WithTTL(ttl)) + require.NoError(t, err) + defer unlock(&err) + + err = topo.CheckKeyspaceLocked(ctx, ks1) + require.NoError(t, err) + + // Confirm the new stats. + stats := tsf.GetCallStats() + require.NotNil(t, stats) + require.Equal(t, int64(1), stats.Counts()["LockWithTTL"]) +} diff --git a/go/vt/topo/locks.go b/go/vt/topo/locks.go index 16caaf49dfb..f46e5f06e4b 100644 --- a/go/vt/topo/locks.go +++ b/go/vt/topo/locks.go @@ -46,6 +46,11 @@ var ( RemoteOperationTimeout = 15 * time.Second ) +// How long named locks are kept in the topo server. +// This ensures that orphaned named locks are not kept around forever. +// This should never happen, but it provides a final safety net. +const NamedLockTTL = 24 * time.Hour + // Lock describes a long-running lock on a keyspace or a shard. // It needs to be public as we JSON-serialize it. type Lock struct { @@ -54,6 +59,7 @@ type Lock struct { HostName string UserName string Time string + Options lockOptions // Status is the current status of the Lock. Status string @@ -120,6 +126,28 @@ type locksKeyType int var locksKey locksKeyType +// Support different lock types. +type LockType int + +const ( + // Blocking is the default lock type when no other valid type + // is specified. + Blocking LockType = iota + NonBlocking // Uses TryLock + Named // Uses LockName +) + +func (lt LockType) String() string { + switch lt { + case NonBlocking: + return "non blocking" + case Named: + return "named" + default: + return "blocking" + } +} + // iTopoLock is the interface for knowing the resource that is being locked. // It allows for better controlling nuances for different lock types and log messages. type iTopoLock interface { @@ -129,8 +157,11 @@ type iTopoLock interface { } // perform the topo lock operation -func (l *Lock) lock(ctx context.Context, ts *Server, lt iTopoLock, isBlocking bool) (LockDescriptor, error) { - log.Infof("Locking %v %v for action %v", lt.Type(), lt.ResourceName(), l.Action) +func (l *Lock) lock(ctx context.Context, ts *Server, lt iTopoLock, opts ...LockOption) (LockDescriptor, error) { + for _, o := range opts { + o.apply(&l.Options) + } + log.Infof("Locking %s %s for action %s with options: %+v", lt.Type(), lt.ResourceName(), l.Action, l.Options) ctx, cancel := context.WithTimeout(ctx, LockTimeout) defer cancel() @@ -143,10 +174,18 @@ func (l *Lock) lock(ctx context.Context, ts *Server, lt iTopoLock, isBlocking bo if err != nil { return nil, err } - if isBlocking { + + switch l.Options.lockType { + case NonBlocking: + return ts.globalCell.TryLock(ctx, lt.Path(), j) + case Named: + return ts.globalCell.LockName(ctx, lt.Path(), j) + default: + if l.Options.ttl != 0 { + return ts.globalCell.LockWithTTL(ctx, lt.Path(), j, l.Options.ttl) + } return ts.globalCell.Lock(ctx, lt.Path(), j) } - return ts.globalCell.TryLock(ctx, lt.Path(), j) } // unlock unlocks a previously locked key. @@ -174,7 +213,7 @@ func (l *Lock) unlock(ctx context.Context, lt iTopoLock, lockDescriptor LockDesc return lockDescriptor.Unlock(ctx) } -func (ts *Server) internalLock(ctx context.Context, lt iTopoLock, action string, isBlocking bool) (context.Context, func(*error), error) { +func (ts *Server) internalLock(ctx context.Context, lt iTopoLock, action string, opts ...LockOption) (context.Context, func(*error), error) { i, ok := ctx.Value(locksKey).(*locksInfo) if !ok { i = &locksInfo{ @@ -191,7 +230,7 @@ func (ts *Server) internalLock(ctx context.Context, lt iTopoLock, action string, // lock it l := newLock(action) - lockDescriptor, err := l.lock(ctx, ts, lt, isBlocking) + lockDescriptor, err := l.lock(ctx, ts, lt, opts...) if err != nil { return nil, nil, err } @@ -246,3 +285,52 @@ func checkLocked(ctx context.Context, lt iTopoLock) error { // Check the lock server implementation still holds the lock. return li.lockDescriptor.Check(ctx) } + +// lockOptions configure a Lock call. lockOptions are set by the LockOption +// values passed to the lock functions. +type lockOptions struct { + lockType LockType + ttl time.Duration +} + +// LockOption configures how we perform the locking operation. +type LockOption interface { + apply(*lockOptions) +} + +// funcLockOption wraps a function that modifies lockOptions into an +// implementation of the LockOption interface. +type funcLockOption struct { + f func(*lockOptions) +} + +func (flo *funcLockOption) apply(lo *lockOptions) { + flo.f(lo) +} + +func newFuncLockOption(f func(*lockOptions)) *funcLockOption { + return &funcLockOption{ + f: f, + } +} + +// WithTTL allows you to specify how long the underlying topo server +// implementation should hold the lock before releasing it — even if the caller +// has not explicitly released it. This provides a way to override the global +// ttl values that are set via --topo_consul_lock_session_ttl and +// --topo_etcd_lease_ttl. +// Note: This option is ignored by the ZooKeeper implementation as it does not +// support TTLs. +func WithTTL(ttl time.Duration) LockOption { + return newFuncLockOption(func(o *lockOptions) { + o.ttl = ttl + }) +} + +// WithType determines the type of lock we take. The options are defined +// by the LockType type. +func WithType(lt LockType) LockOption { + return newFuncLockOption(func(o *lockOptions) { + o.lockType = lt + }) +} diff --git a/go/vt/topo/memorytopo/lock.go b/go/vt/topo/memorytopo/lock.go index d0943c7058d..0dafcf250ed 100644 --- a/go/vt/topo/memorytopo/lock.go +++ b/go/vt/topo/memorytopo/lock.go @@ -19,6 +19,7 @@ package memorytopo import ( "context" "fmt" + "time" "vitess.io/vitess/go/vt/topo" ) @@ -65,11 +66,32 @@ func (c *Conn) Lock(ctx context.Context, dirPath, contents string) (topo.LockDes return nil, err } - return c.lock(ctx, dirPath, contents) + return c.lock(ctx, dirPath, contents, false) +} + +// LockWithTTL is part of the topo.Conn interface. It behaves the same as Lock +// as TTLs are not supported in memorytopo. +func (c *Conn) LockWithTTL(ctx context.Context, dirPath, contents string, _ time.Duration) (topo.LockDescriptor, error) { + c.factory.callstats.Add([]string{"LockWithTTL"}, 1) + + c.factory.mu.Lock() + err := c.factory.getOperationError(Lock, dirPath) + c.factory.mu.Unlock() + if err != nil { + return nil, err + } + + return c.lock(ctx, dirPath, contents, false) +} + +// LockName is part of the topo.Conn interface. +func (c *Conn) LockName(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { + c.factory.callstats.Add([]string{"LockName"}, 1) + return c.lock(ctx, dirPath, contents, true) } // Lock is part of the topo.Conn interface. -func (c *Conn) lock(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { +func (c *Conn) lock(ctx context.Context, dirPath, contents string, named bool) (topo.LockDescriptor, error) { for { if err := c.dial(ctx); err != nil { return nil, err @@ -82,7 +104,12 @@ func (c *Conn) lock(ctx context.Context, dirPath, contents string) (topo.LockDes return nil, c.factory.err } - n := c.factory.nodeByPath(c.cell, dirPath) + var n *node + if named { + n = c.factory.getOrCreatePath(c.cell, dirPath) + } else { + n = c.factory.nodeByPath(c.cell, dirPath) + } if n == nil { c.factory.mu.Unlock() return nil, topo.NewError(topo.NoNode, dirPath) diff --git a/go/vt/topo/named_lock.go b/go/vt/topo/named_lock.go new file mode 100644 index 00000000000..533317f8d9d --- /dev/null +++ b/go/vt/topo/named_lock.go @@ -0,0 +1,58 @@ +/* +Copyright 2024 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 topo + +import ( + "context" + "path" +) + +type namedLock struct { + name string +} + +var _ iTopoLock = (*namedLock)(nil) + +func (s *namedLock) Type() string { + return "named" +} + +func (s *namedLock) ResourceName() string { + return s.name +} + +func (s *namedLock) Path() string { + return path.Join(NamedLocksPath, s.name) +} + +// LockName will lock the opaque identifier, and return: +// - a context with a locksInfo structure for future reference. +// - an unlock method +// - an error if anything failed. +func (ts *Server) LockName(ctx context.Context, name, action string) (context.Context, func(*error), error) { + return ts.internalLock(ctx, &namedLock{ + name: name, + }, action, WithType(Named)) +} + +// CheckNameLocked can be called on a context to make sure we have the lock +// for a given opaque identifier. +func CheckNameLocked(ctx context.Context, name string) error { + return checkLocked(ctx, &namedLock{ + name: name, + }) +} diff --git a/go/vt/topo/named_lock_test.go b/go/vt/topo/named_lock_test.go new file mode 100644 index 00000000000..a2bb82c73e9 --- /dev/null +++ b/go/vt/topo/named_lock_test.go @@ -0,0 +1,88 @@ +/* +Copyright 2024 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 topo_test + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/vt/topo" + "vitess.io/vitess/go/vt/topo/memorytopo" +) + +// TestTopoNamedLock tests named lock operations. +func TestTopoNamedLock(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + ts, tsf := memorytopo.NewServerAndFactory(ctx, "zone1") + defer ts.Close() + + currentTopoLockTimeout := topo.LockTimeout + topo.LockTimeout = testLockTimeout + defer func() { + topo.LockTimeout = currentTopoLockTimeout + }() + + lockName := "testy" + action := "testing" + lockNameCalls := int64(0) + + ctx, unlock, err := ts.LockName(ctx, lockName, action) + require.NoError(t, err) + lockNameCalls++ + + // Locking the same name again, without unlocking, should return an error. + // This does not attempt the lock within the topo server implementation + // as we first check the context and see that the lock is held, thus the + // lockNameCalls should not be increased. + _, _, err = ts.LockName(ctx, lockName, action) + require.ErrorContains(t, err, fmt.Sprintf("%s is already held", lockName)) + + // Check that we have the named lock. + err = topo.CheckNameLocked(ctx, lockName) + require.NoError(t, err) + + // Confirm that we can acquire a different named lock. + lockName2 := "testy2" + ctx, unlock2, err := ts.LockName(ctx, lockName2, action) + require.NoError(t, err) + defer unlock2(&err) + lockNameCalls++ + + // Unlock the first name. + unlock(&err) + + // Confirm that we no longer have the first named lock. + err = topo.CheckNameLocked(ctx, lockName) + require.ErrorContains(t, err, fmt.Sprintf("%s is not locked", lockName)) + err = topo.CheckNameLocked(ctx, lockName2) + require.NoError(t, err) + + // Confirm that the first named lock can be re-acquired after unlocking. + _, unlock, err = ts.LockName(ctx, lockName, action) + require.NoError(t, err) + defer unlock(&err) + lockNameCalls++ + + // Confirm the stats. + stats := tsf.GetCallStats() + require.NotNil(t, stats) + require.Equal(t, lockNameCalls, stats.Counts()["LockName"]) +} diff --git a/go/vt/topo/routing_rules_lock.go b/go/vt/topo/routing_rules_lock.go index c45ddb738c9..682eff30dc5 100644 --- a/go/vt/topo/routing_rules_lock.go +++ b/go/vt/topo/routing_rules_lock.go @@ -37,8 +37,8 @@ func (s *routingRules) Path() string { } // LockRoutingRules acquires a lock for routing rules. -func (ts *Server) LockRoutingRules(ctx context.Context, action string) (context.Context, func(*error), error) { - return ts.internalLock(ctx, &routingRules{}, action, true) +func (ts *Server) LockRoutingRules(ctx context.Context, action string, opts ...LockOption) (context.Context, func(*error), error) { + return ts.internalLock(ctx, &routingRules{}, action, opts...) } // CheckRoutingRulesLocked checks if a lock for routing rules is still possessed. diff --git a/go/vt/topo/server.go b/go/vt/topo/server.go index f2a3e8774e7..23b7be6cfa1 100644 --- a/go/vt/topo/server.go +++ b/go/vt/topo/server.go @@ -95,6 +95,7 @@ const ( ExternalClusterVitess = "vitess" RoutingRulesPath = "routing_rules" KeyspaceRoutingRulesPath = "keyspace" + NamedLocksPath = "internal/named_locks" ) // Factory is a factory interface to create Conn objects. diff --git a/go/vt/topo/shard_lock.go b/go/vt/topo/shard_lock.go index 72d0b1c8ca4..23326dcd23f 100644 --- a/go/vt/topo/shard_lock.go +++ b/go/vt/topo/shard_lock.go @@ -59,11 +59,11 @@ func (s *shardLock) Path() string { // // * operations that we don't want to conflict with re-parenting: // - DeleteTablet when it's the shard's current primary -func (ts *Server) LockShard(ctx context.Context, keyspace, shard, action string) (context.Context, func(*error), error) { +func (ts *Server) LockShard(ctx context.Context, keyspace, shard, action string, opts ...LockOption) (context.Context, func(*error), error) { return ts.internalLock(ctx, &shardLock{ keyspace: keyspace, shard: shard, - }, action, true) + }, action, opts...) } // TryLockShard will lock the shard, and return: @@ -85,7 +85,7 @@ func (ts *Server) TryLockShard(ctx context.Context, keyspace, shard, action stri return ts.internalLock(ctx, &shardLock{ keyspace: keyspace, shard: shard, - }, action, false) + }, action, WithType(NonBlocking)) } // CheckShardLocked can be called on a context to make sure we have the lock diff --git a/go/vt/topo/stats_conn.go b/go/vt/topo/stats_conn.go index 34c45d793ac..39bc8c9bc43 100644 --- a/go/vt/topo/stats_conn.go +++ b/go/vt/topo/stats_conn.go @@ -159,17 +159,33 @@ func (st *StatsConn) Delete(ctx context.Context, filePath string, version Versio // Lock is part of the Conn interface func (st *StatsConn) Lock(ctx context.Context, dirPath, contents string) (LockDescriptor, error) { - return st.internalLock(ctx, dirPath, contents, true) + return st.internalLock(ctx, dirPath, contents, Blocking, 0) +} + +// LockWithTTL is part of the Conn interface +func (st *StatsConn) LockWithTTL(ctx context.Context, dirPath, contents string, ttl time.Duration) (LockDescriptor, error) { + return st.internalLock(ctx, dirPath, contents, Blocking, ttl) +} + +// LockName is part of the Conn interface +func (st *StatsConn) LockName(ctx context.Context, dirPath, contents string) (LockDescriptor, error) { + return st.internalLock(ctx, dirPath, contents, Named, 0) } // TryLock is part of the topo.Conn interface. Its implementation is same as Lock func (st *StatsConn) TryLock(ctx context.Context, dirPath, contents string) (LockDescriptor, error) { - return st.internalLock(ctx, dirPath, contents, false) + return st.internalLock(ctx, dirPath, contents, NonBlocking, 0) } // TryLock is part of the topo.Conn interface. Its implementation is same as Lock -func (st *StatsConn) internalLock(ctx context.Context, dirPath, contents string, isBlocking bool) (LockDescriptor, error) { - statsKey := []string{"Lock", st.cell} +func (st *StatsConn) internalLock(ctx context.Context, dirPath, contents string, lockType LockType, ttl time.Duration) (LockDescriptor, error) { + statsKey := []string{"Lock", st.cell} // Also used for NonBlocking / TryLock + switch { + case lockType == Named: + statsKey[0] = "LockName" + case ttl != 0: + statsKey[0] = "LockWithTTL" + } if st.readOnly { return nil, vterrors.Errorf(vtrpc.Code_READ_ONLY, readOnlyErrorStrFormat, statsKey[0], dirPath) } @@ -177,10 +193,17 @@ func (st *StatsConn) internalLock(ctx context.Context, dirPath, contents string, defer topoStatsConnTimings.Record(statsKey, startTime) var res LockDescriptor var err error - if isBlocking { - res, err = st.conn.Lock(ctx, dirPath, contents) - } else { + switch lockType { + case NonBlocking: res, err = st.conn.TryLock(ctx, dirPath, contents) + case Named: + res, err = st.conn.LockName(ctx, dirPath, contents) + default: + if ttl != 0 { + res, err = st.conn.LockWithTTL(ctx, dirPath, contents, ttl) + } else { + res, err = st.conn.Lock(ctx, dirPath, contents) + } } if err != nil { topoStatsConnErrors.Add(statsKey, int64(1)) diff --git a/go/vt/topo/stats_conn_test.go b/go/vt/topo/stats_conn_test.go index 78f9cc6eb72..605487697cc 100644 --- a/go/vt/topo/stats_conn_test.go +++ b/go/vt/topo/stats_conn_test.go @@ -20,6 +20,9 @@ import ( "context" "fmt" "testing" + "time" + + "github.com/stretchr/testify/require" "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" @@ -108,7 +111,28 @@ func (st *fakeConn) Lock(ctx context.Context, dirPath, contents string) (lock Lo } if dirPath == "error" { return lock, fmt.Errorf("dummy error") + } + return lock, err +} +// LockWithTTL is part of the Conn interface. +func (st *fakeConn) LockWithTTL(ctx context.Context, dirPath, contents string, _ time.Duration) (lock LockDescriptor, err error) { + if st.readOnly { + return nil, vterrors.Errorf(vtrpc.Code_READ_ONLY, "topo server connection is read-only") + } + if dirPath == "error" { + return lock, fmt.Errorf("dummy error") + } + return lock, err +} + +// LockName is part of the Conn interface. +func (st *fakeConn) LockName(ctx context.Context, dirPath, contents string) (lock LockDescriptor, err error) { + if st.readOnly { + return nil, vterrors.Errorf(vtrpc.Code_READ_ONLY, "topo server connection is read-only") + } + if dirPath == "error" { + return lock, fmt.Errorf("dummy error") } return lock, err } @@ -121,7 +145,6 @@ func (st *fakeConn) TryLock(ctx context.Context, dirPath, contents string) (lock } if dirPath == "error" { return lock, fmt.Errorf("dummy error") - } return lock, err } @@ -140,7 +163,6 @@ func (st *fakeConn) WatchRecursive(ctx context.Context, path string) (current [] func (st *fakeConn) NewLeaderParticipation(name, id string) (mp LeaderParticipation, err error) { if name == "error" { return mp, fmt.Errorf("dummy error") - } return mp, err } @@ -302,23 +324,25 @@ func TestStatsConnTopoLock(t *testing.T) { statsConn.Lock(ctx, "", "") timingCounts := topoStatsConnTimings.Counts()["Lock.global"] - if got, want := timingCounts, int64(1); got != want { - t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) - } + require.Equal(t, timingCounts, int64(1)) - // error is zero before getting an error + statsConn.LockWithTTL(ctx, "", "", time.Second) + timingCounts = topoStatsConnTimings.Counts()["LockWithTTL.global"] + require.Equal(t, timingCounts, int64(1)) + + statsConn.LockName(ctx, "", "") + timingCounts = topoStatsConnTimings.Counts()["LockName.global"] + require.Equal(t, timingCounts, int64(1)) + + // Error is zero before getting an error. errorCount := topoStatsConnErrors.Counts()["Lock.global"] - if got, want := errorCount, int64(0); got != want { - t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) - } + require.Equal(t, errorCount, int64(0)) statsConn.Lock(ctx, "error", "") - // error stats gets emitted + // Error stats gets emitted. errorCount = topoStatsConnErrors.Counts()["Lock.global"] - if got, want := errorCount, int64(1); got != want { - t.Errorf("stats were not properly recorded: got = %d, want = %d", got, want) - } + require.Equal(t, errorCount, int64(1)) } // TestStatsConnTopoWatch emits stats on Watch diff --git a/go/vt/topo/zk2topo/lock.go b/go/vt/topo/zk2topo/lock.go index 5baf1f7f33f..fdd9fbd0137 100644 --- a/go/vt/topo/zk2topo/lock.go +++ b/go/vt/topo/zk2topo/lock.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "path" + "time" "github.com/z-division/go-zookeeper/zk" @@ -42,6 +43,17 @@ func (zs *Server) Lock(ctx context.Context, dirPath, contents string) (topo.Lock return zs.lock(ctx, dirPath, contents) } +// LockWithTTL is part of the topo.Conn interface. It behaves the same as Lock +// as TTLs are not supported in Zookeeper. +func (zs *Server) LockWithTTL(ctx context.Context, dirPath, contents string, _ time.Duration) (topo.LockDescriptor, error) { + return zs.lock(ctx, dirPath, contents) +} + +// LockName is part of the topo.Conn interface. +func (zs *Server) LockName(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { + return zs.lock(ctx, dirPath, contents) +} + // TryLock is part of the topo.Conn interface. func (zs *Server) TryLock(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error) { // We list all the entries under dirPath diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index 86a3a6c6ead..5b6c3f05343 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -81,6 +81,8 @@ const ( rdonlyTabletSuffix = "@rdonly" // Globally routable tables don't have a keyspace prefix. globalTableQualifier = "" + // Default duration used for lag, timeout, etc. + DefaultTimeout = 30 * time.Second ) var tabletTypeSuffixes = []string{primaryTabletSuffix, replicaTabletSuffix, rdonlyTabletSuffix} @@ -130,9 +132,6 @@ const ( lockTablesCycles = 2 // Time to wait between LOCK TABLES cycles on the sources during SwitchWrites. lockTablesCycleDelay = time.Duration(100 * time.Millisecond) - - // Default duration used for lag, timeout, etc. - defaultDuration = 30 * time.Second ) var ( @@ -1458,13 +1457,21 @@ func (s *Server) moveTablesCreate(ctx context.Context, req *vtctldatapb.MoveTabl return nil, err } sw := &switcher{s: s, ts: ts} - lockCtx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "MoveTablesCreate") + + // When creating the workflow, locking the workflow and its target keyspace is sufficient. + lockName := fmt.Sprintf("%s/%s", ts.TargetKeyspaceName(), ts.WorkflowName()) + ctx, workflowUnlock, lockErr := s.ts.LockName(ctx, lockName, "MoveTablesCreate") + if lockErr != nil { + ts.Logger().Errorf("Locking the workflow %s failed: %v", lockName, lockErr) + return nil, lockErr + } + defer workflowUnlock(&err) + ctx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "MoveTablesCreate") if lockErr != nil { ts.Logger().Errorf("Locking target keyspace %s failed: %v", ts.TargetKeyspaceName(), lockErr) return nil, lockErr } defer targetUnlock(&err) - ctx = lockCtx // If we get an error after this point, where the vreplication streams/records // have been created, then we clean up the workflow's artifacts. @@ -2534,7 +2541,7 @@ func (s *Server) optimizeCopyStateTable(tablet *topodatapb.Tablet) { s.sem.Release(1) } }() - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute) + ctx, cancel := context.WithTimeout(context.Background(), DefaultTimeout) defer cancel() sqlOptimizeTable := "optimize table _vt.copy_state" if _, err := s.tmc.ExecuteFetchAsAllPrivs(ctx, tablet, &tabletmanagerdatapb.ExecuteFetchAsAllPrivsRequest{ @@ -2570,24 +2577,30 @@ func (s *Server) DropTargets(ctx context.Context, ts *trafficSwitcher, keepData, } else { sw = &switcher{s: s, ts: ts} } - var tctx context.Context - tctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "DropTargets") + + // Lock the workflow along with its source and target keyspaces. + lockName := fmt.Sprintf("%s/%s", ts.TargetKeyspaceName(), ts.WorkflowName()) + ctx, workflowUnlock, lockErr := s.ts.LockName(ctx, lockName, "DropTargets") + if lockErr != nil { + ts.Logger().Errorf("Locking the workflow %s failed: %v", lockName, lockErr) + } + defer workflowUnlock(&err) + ctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "DropTargets") if lockErr != nil { ts.Logger().Errorf("Source LockKeyspace failed: %v", lockErr) return nil, lockErr } defer sourceUnlock(&err) - ctx = tctx - if ts.TargetKeyspaceName() != ts.SourceKeyspaceName() { - tctx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "DropTargets") + lockCtx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "DropTargets") if lockErr != nil { ts.Logger().Errorf("Target LockKeyspace failed: %v", lockErr) return nil, lockErr } defer targetUnlock(&err) - ctx = tctx + ctx = lockCtx } + if !keepData { switch ts.MigrationType() { case binlogdatapb.MigrationType_TABLES: @@ -2762,23 +2775,30 @@ func (s *Server) dropSources(ctx context.Context, ts *trafficSwitcher, removalTy } else { sw = &switcher{ts: ts, s: s} } - var tctx context.Context - tctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "DropSources") + + // Lock the workflow and its source and target keyspaces. + lockName := fmt.Sprintf("%s/%s", ts.TargetKeyspaceName(), ts.WorkflowName()) + ctx, workflowUnlock, lockErr := s.ts.LockName(ctx, lockName, "DropSources") + if lockErr != nil { + ts.Logger().Errorf("Locking the workflow %s failed: %v", lockName, lockErr) + } + defer workflowUnlock(&err) + ctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "DropSources") if lockErr != nil { ts.Logger().Errorf("Source LockKeyspace failed: %v", lockErr) return nil, lockErr } defer sourceUnlock(&err) - ctx = tctx if ts.TargetKeyspaceName() != ts.SourceKeyspaceName() { - tctx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "DropSources") + lockCtx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "DropSources") if lockErr != nil { ts.Logger().Errorf("Target LockKeyspace failed: %v", lockErr) return nil, lockErr } defer targetUnlock(&err) - ctx = tctx + ctx = lockCtx } + if !force { if err := sw.validateWorkflowHasCompleted(ctx); err != nil { ts.Logger().Errorf("Workflow has not completed, cannot DropSources: %v", err) @@ -2996,14 +3016,21 @@ func (s *Server) finalizeMigrateWorkflow(ctx context.Context, ts *trafficSwitche } else { sw = &switcher{s: s, ts: ts} } - var tctx context.Context - tctx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "completeMigrateWorkflow") + + // Lock the workflow and its target keyspace. + lockName := fmt.Sprintf("%s/%s", ts.TargetKeyspaceName(), ts.WorkflowName()) + ctx, workflowUnlock, lockErr := s.ts.LockName(ctx, lockName, "completeMigrateWorkflow") + if lockErr != nil { + ts.Logger().Errorf("Locking the workflow %s failed: %v", lockName, lockErr) + } + defer workflowUnlock(&err) + ctx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "completeMigrateWorkflow") if lockErr != nil { ts.Logger().Errorf("Target LockKeyspace failed: %v", lockErr) return nil, lockErr } defer targetUnlock(&err) - ctx = tctx + if err := sw.dropTargetVReplicationStreams(ctx); err != nil { return nil, err } @@ -3031,13 +3058,19 @@ func (s *Server) WorkflowSwitchTraffic(ctx context.Context, req *vtctldatapb.Wor rdDryRunResults, wrDryRunResults *[]string hasReplica, hasRdonly, hasPrimary bool ) - timeout, set, err := protoutil.DurationFromProto(req.Timeout) + timeout, set, err := protoutil.DurationFromProto(req.GetTimeout()) if err != nil { err = vterrors.Wrapf(err, "unable to parse Timeout into a valid duration") return nil, err } if !set { - timeout = defaultDuration + timeout = DefaultTimeout + } + // We enforce the 1 second minimum as some things that use it, such as Etcd, only takes + // a seconds value so you'd get unexpected behavior if you e.g. set the timeout to + // 500ms as Etcd would get a value of 0 or a never-ending TTL. + if timeout.Seconds() < 1 { + return nil, vterrors.Wrap(err, "Timeout must be at least 1 second") } ts, startState, err := s.getWorkflowState(ctx, req.Keyspace, req.Workflow) if err != nil { @@ -3054,7 +3087,7 @@ func (s *Server) WorkflowSwitchTraffic(ctx context.Context, req *vtctldatapb.Wor return nil, err } if !set { - maxReplicationLagAllowed = defaultDuration + maxReplicationLagAllowed = DefaultTimeout } direction := TrafficSwitchDirection(req.Direction) if direction == DirectionBackward { @@ -3237,18 +3270,37 @@ func (s *Server) switchReads(ctx context.Context, req *vtctldatapb.WorkflowSwitc return handleError("workflow validation failed", err) } - // Remove mirror rules for the specified tablet types. - if err := sw.mirrorTableTraffic(ctx, roTabletTypes, 0); err != nil { - return handleError(fmt.Sprintf("failed to remove mirror rules from source keyspace %s to target keyspace %s, workflow %s, for read-only tablet types", - ts.SourceKeyspaceName(), ts.TargetKeyspaceName(), ts.WorkflowName()), err) + // For switching reads, locking the source keyspace is sufficient. + // We need to hold the keyspace locks longer than the command timeout. + ksLockTTL, set, err := protoutil.DurationFromProto(req.GetTimeout()) + if err != nil { + return nil, vterrors.Wrapf(err, "unable to parse Timeout into a valid duration") + } + if !set { + ksLockTTL = DefaultTimeout } // For reads, locking the source keyspace is sufficient. - ctx, unlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "SwitchReads") + ctx, unlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "SwitchReads", topo.WithTTL(ksLockTTL)) if lockErr != nil { return handleError(fmt.Sprintf("failed to lock the %s keyspace", ts.SourceKeyspaceName()), lockErr) } defer unlock(&err) + confirmKeyspaceLocksHeld := func() error { + if req.DryRun { // We don't actually take locks + return nil + } + if err := topo.CheckKeyspaceLocked(ctx, ts.SourceKeyspaceName()); err != nil { + return vterrors.Wrapf(err, "%s keyspace lock was lost", ts.SourceKeyspaceName()) + } + return nil + } + + // Remove mirror rules for the specified tablet types. + if err := sw.mirrorTableTraffic(ctx, roTabletTypes, 0); err != nil { + return handleError(fmt.Sprintf("failed to remove mirror rules from source keyspace %s to target keyspace %s, workflow %s, for read-only tablet types", + ts.SourceKeyspaceName(), ts.TargetKeyspaceName(), ts.WorkflowName()), err) + } if ts.MigrationType() == binlogdatapb.MigrationType_TABLES { switch { @@ -3268,11 +3320,18 @@ func (s *Server) switchReads(ctx context.Context, req *vtctldatapb.WorkflowSwitc } return sw.logs(), nil } + + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } ts.Logger().Infof("About to switchShardReads: cells: %s, tablet types: %s, direction: %d", cellsStr, roTypesToSwitchStr, direction) if err := sw.switchShardReads(ctx, req.Cells, roTabletTypes, direction); err != nil { return handleError("failed to switch read traffic for the shards", err) } + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } ts.Logger().Infof("switchShardReads Completed: cells: %s, tablet types: %s, direction: %d", cellsStr, roTypesToSwitchStr, direction) if err := s.ts.ValidateSrvKeyspace(ctx, ts.targetKeyspace, cellsStr); err != nil { err2 := vterrors.Wrapf(err, "after switching shard reads, found SrvKeyspace for %s is corrupt in cell %s", @@ -3283,7 +3342,7 @@ func (s *Server) switchReads(ctx context.Context, req *vtctldatapb.WorkflowSwitc } // switchWrites is a generic way of migrating write traffic for a workflow. -func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwitchTrafficRequest, ts *trafficSwitcher, timeout time.Duration, +func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwitchTrafficRequest, ts *trafficSwitcher, waitTimeout time.Duration, cancel bool, ) (journalID int64, dryRunResults *[]string, err error) { var sw iswitcher @@ -3315,27 +3374,53 @@ func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwit } } - // Remove mirror rules for the primary tablet type. - if err := sw.mirrorTableTraffic(ctx, []topodata.TabletType{topodatapb.TabletType_PRIMARY}, 0); err != nil { - return handleError(fmt.Sprintf("failed to remove mirror rules from source keyspace %s to target keyspace %s, workflow %s, for primary tablet type", - ts.SourceKeyspaceName(), ts.TargetKeyspaceName(), ts.WorkflowName()), err) + // Lock the workflow and its source and target keyspaces. + lockName := fmt.Sprintf("%s/%s", ts.TargetKeyspaceName(), ts.WorkflowName()) + ctx, workflowUnlock, lockErr := s.ts.LockName(ctx, lockName, "SwitchWrites") + if lockErr != nil { + return handleError(fmt.Sprintf("failed to lock the %s workflow", lockName), lockErr) } + defer workflowUnlock(&err) + + // We need to hold the keyspace locks longer than waitTimeout*X -- where X + // is the number of sub-steps where the waitTimeout value is used: stopping + // existing streams, waiting for replication to catch up, and initializing + // the target sequences -- to be sure the lock is not lost. + ksLockTTL := waitTimeout * 3 // Need to lock both source and target keyspaces. - tctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "SwitchWrites") + ctx, sourceUnlock, lockErr := sw.lockKeyspace(ctx, ts.SourceKeyspaceName(), "SwitchWrites", topo.WithTTL(ksLockTTL)) if lockErr != nil { return handleError(fmt.Sprintf("failed to lock the %s keyspace", ts.SourceKeyspaceName()), lockErr) } - ctx = tctx defer sourceUnlock(&err) + if ts.TargetKeyspaceName() != ts.SourceKeyspaceName() { - tctx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "SwitchWrites") + lockCtx, targetUnlock, lockErr := sw.lockKeyspace(ctx, ts.TargetKeyspaceName(), "SwitchWrites", topo.WithTTL(ksLockTTL)) if lockErr != nil { return handleError(fmt.Sprintf("failed to lock the %s keyspace", ts.TargetKeyspaceName()), lockErr) } - ctx = tctx + ctx = lockCtx defer targetUnlock(&err) } + confirmKeyspaceLocksHeld := func() error { + if req.DryRun { // We don't actually take locks + return nil + } + if err := topo.CheckKeyspaceLocked(ctx, ts.SourceKeyspaceName()); err != nil { + return vterrors.Wrapf(err, "%s keyspace lock was lost", ts.SourceKeyspaceName()) + } + if err := topo.CheckKeyspaceLocked(ctx, ts.TargetKeyspaceName()); err != nil { + return vterrors.Wrapf(err, "%s keyspace lock was lost", ts.TargetKeyspaceName()) + } + return nil + } + + // Remove mirror rules for the primary tablet type. + if err := sw.mirrorTableTraffic(ctx, []topodata.TabletType{topodatapb.TabletType_PRIMARY}, 0); err != nil { + return handleError(fmt.Sprintf("failed to remove mirror rules from source keyspace %s to target keyspace %s, workflow %s, for primary tablet type", + ts.SourceKeyspaceName(), ts.TargetKeyspaceName(), ts.WorkflowName()), err) + } // Find out if the target is using any sequence tables for auto_increment // value generation. If so, then we'll need to ensure that they are @@ -3386,7 +3471,7 @@ func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwit // materializations then we have to wait for them to catchup before switching traffic for the // Reshard workflow. We use the the same timeout value here that is used for VReplication catchup // with the inter-keyspace workflows. - stopCtx, stopCancel := context.WithTimeout(ctx, timeout) + stopCtx, stopCancel := context.WithTimeout(ctx, waitTimeout) defer stopCancel() sourceWorkflows, err = sw.stopStreams(stopCtx, sm) if err != nil { @@ -3414,37 +3499,51 @@ func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwit } } + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } ts.Logger().Infof("Waiting for streams to catchup") - if err := sw.waitForCatchup(ctx, timeout); err != nil { + if err := sw.waitForCatchup(ctx, waitTimeout); err != nil { sw.cancelMigration(ctx, sm) return handleError("failed to sync up replication between the source and target", err) } + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } ts.Logger().Infof("Migrating streams") if err := sw.migrateStreams(ctx, sm); err != nil { sw.cancelMigration(ctx, sm) return handleError("failed to migrate the workflow streams", err) } + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } ts.Logger().Infof("Resetting sequences") if err := sw.resetSequences(ctx); err != nil { sw.cancelMigration(ctx, sm) return handleError("failed to reset the sequences", err) } + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } ts.Logger().Infof("Creating reverse streams") if err := sw.createReverseVReplication(ctx); err != nil { sw.cancelMigration(ctx, sm) return handleError("failed to create the reverse vreplication streams", err) } + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } // Initialize any target sequences, if there are any, before allowing new writes. if req.InitializeTargetSequences && len(sequenceMetadata) > 0 { ts.Logger().Infof("Initializing target sequences") // Writes are blocked so we can safely initialize the sequence tables but - // we also want to use a shorter timeout than the parent context. - // We use at most half of the overall timeout. - initSeqCtx, cancel := context.WithTimeout(ctx, timeout/2) + // we also want to use a shorter timeout than the the default. + initSeqCtx, cancel := context.WithTimeout(ctx, waitTimeout/2) defer cancel() if err := sw.initializeTargetSequences(initSeqCtx, sequenceMetadata); err != nil { sw.cancelMigration(ctx, sm) @@ -3464,6 +3563,9 @@ func (s *Server) switchWrites(ctx context.Context, req *vtctldatapb.WorkflowSwit // This is the point of no return. Once a journal is created, // traffic can be redirected to target shards. + if err := confirmKeyspaceLocksHeld(); err != nil { + return handleError("locks were lost", err) + } if err := sw.createJournals(ctx, sourceWorkflows); err != nil { return handleError("failed to create the journal", err) } @@ -3645,7 +3747,7 @@ func (s *Server) applySQLShard(ctx context.Context, tabletInfo *topo.TabletInfo, if err != nil { return vterrors.Errorf(vtrpcpb.Code_INTERNAL, "fillStringTemplate failed: %v", err) } - ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + ctx, cancel := context.WithTimeout(ctx, DefaultTimeout) defer cancel() // Need to make sure that replication is enabled since we're only applying // the statement on primaries. diff --git a/go/vt/vtctl/workflow/server_test.go b/go/vt/vtctl/workflow/server_test.go index f2b9f6b2496..c67d45bb9e6 100644 --- a/go/vt/vtctl/workflow/server_test.go +++ b/go/vt/vtctl/workflow/server_test.go @@ -689,14 +689,14 @@ func TestMoveTablesTrafficSwitchingDryRun(t *testing.T) { DryRun: true, }, want: []string{ - fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [REPLICA,RDONLY]", sourceKeyspaceName, targetKeyspaceName), fmt.Sprintf("Lock keyspace %s", sourceKeyspaceName), + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [REPLICA,RDONLY]", sourceKeyspaceName, targetKeyspaceName), fmt.Sprintf("Switch reads for tables [%s] to keyspace %s for tablet types [REPLICA,RDONLY]", tablesStr, targetKeyspaceName), fmt.Sprintf("Routing rules for tables [%s] will be updated", tablesStr), fmt.Sprintf("Unlock keyspace %s", sourceKeyspaceName), - fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [PRIMARY]", sourceKeyspaceName, targetKeyspaceName), fmt.Sprintf("Lock keyspace %s", sourceKeyspaceName), fmt.Sprintf("Lock keyspace %s", targetKeyspaceName), + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [PRIMARY]", sourceKeyspaceName, targetKeyspaceName), fmt.Sprintf("Stop writes on keyspace %s for tables [%s]: [keyspace:%s;shard:-80;position:%s,keyspace:%s;shard:80-;position:%s]", sourceKeyspaceName, tablesStr, sourceKeyspaceName, position, sourceKeyspaceName, position), "Wait for vreplication on stopped streams to catchup for up to 30s", @@ -730,14 +730,14 @@ func TestMoveTablesTrafficSwitchingDryRun(t *testing.T) { DryRun: true, }, want: []string{ - fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [REPLICA,RDONLY]", targetKeyspaceName, sourceKeyspaceName), fmt.Sprintf("Lock keyspace %s", targetKeyspaceName), + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [REPLICA,RDONLY]", targetKeyspaceName, sourceKeyspaceName), fmt.Sprintf("Switch reads for tables [%s] to keyspace %s for tablet types [REPLICA,RDONLY]", tablesStr, targetKeyspaceName), fmt.Sprintf("Routing rules for tables [%s] will be updated", tablesStr), fmt.Sprintf("Unlock keyspace %s", targetKeyspaceName), - fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [PRIMARY]", targetKeyspaceName, sourceKeyspaceName), fmt.Sprintf("Lock keyspace %s", targetKeyspaceName), fmt.Sprintf("Lock keyspace %s", sourceKeyspaceName), + fmt.Sprintf("Mirroring 0.00 percent of traffic from keyspace %s to keyspace %s for tablet types [PRIMARY]", targetKeyspaceName, sourceKeyspaceName), fmt.Sprintf("Stop writes on keyspace %s for tables [%s]: [keyspace:%s;shard:-80;position:%s,keyspace:%s;shard:80-;position:%s]", targetKeyspaceName, tablesStr, targetKeyspaceName, position, targetKeyspaceName, position), "Wait for vreplication on stopped streams to catchup for up to 30s", diff --git a/go/vt/vtctl/workflow/switcher.go b/go/vt/vtctl/workflow/switcher.go index 3fbd1c507e2..789822b5be9 100644 --- a/go/vt/vtctl/workflow/switcher.go +++ b/go/vt/vtctl/workflow/switcher.go @@ -20,6 +20,8 @@ import ( "context" "time" + "vitess.io/vitess/go/vt/topo" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -126,8 +128,8 @@ func (r *switcher) cancelMigration(ctx context.Context, sm *StreamMigrator) { r.ts.cancelMigration(ctx, sm) } -func (r *switcher) lockKeyspace(ctx context.Context, keyspace, action string) (context.Context, func(*error), error) { - return r.s.ts.LockKeyspace(ctx, keyspace, action) +func (r *switcher) lockKeyspace(ctx context.Context, keyspace, action string, opts ...topo.LockOption) (context.Context, func(*error), error) { + return r.s.ts.LockKeyspace(ctx, keyspace, action, opts...) } func (r *switcher) freezeTargetVReplication(ctx context.Context) error { diff --git a/go/vt/vtctl/workflow/switcher_dry_run.go b/go/vt/vtctl/workflow/switcher_dry_run.go index 55c843b07cb..29c40f85a69 100644 --- a/go/vt/vtctl/workflow/switcher_dry_run.go +++ b/go/vt/vtctl/workflow/switcher_dry_run.go @@ -27,6 +27,7 @@ import ( "golang.org/x/exp/maps" "vitess.io/vitess/go/mysql/replication" + "vitess.io/vitess/go/vt/topo" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -304,7 +305,7 @@ func (dr *switcherDryRun) cancelMigration(ctx context.Context, sm *StreamMigrato dr.drLog.Log("Cancel migration as requested") } -func (dr *switcherDryRun) lockKeyspace(ctx context.Context, keyspace, _ string) (context.Context, func(*error), error) { +func (dr *switcherDryRun) lockKeyspace(ctx context.Context, keyspace, _ string, _ ...topo.LockOption) (context.Context, func(*error), error) { dr.drLog.Logf("Lock keyspace %s", keyspace) return ctx, func(e *error) { dr.drLog.Logf("Unlock keyspace %s", keyspace) diff --git a/go/vt/vtctl/workflow/switcher_interface.go b/go/vt/vtctl/workflow/switcher_interface.go index 9dea0af30a1..560b7a695fd 100644 --- a/go/vt/vtctl/workflow/switcher_interface.go +++ b/go/vt/vtctl/workflow/switcher_interface.go @@ -20,11 +20,13 @@ import ( "context" "time" + "vitess.io/vitess/go/vt/topo" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) type iswitcher interface { - lockKeyspace(ctx context.Context, keyspace, action string) (context.Context, func(*error), error) + lockKeyspace(ctx context.Context, keyspace, action string, opts ...topo.LockOption) (context.Context, func(*error), error) cancelMigration(ctx context.Context, sm *StreamMigrator) stopStreams(ctx context.Context, sm *StreamMigrator) ([]string, error) stopSourceWrites(ctx context.Context) error diff --git a/go/vt/vtctl/workflow/traffic_switcher.go b/go/vt/vtctl/workflow/traffic_switcher.go index 35930bc3e97..c9d9952ef8f 100644 --- a/go/vt/vtctl/workflow/traffic_switcher.go +++ b/go/vt/vtctl/workflow/traffic_switcher.go @@ -1747,8 +1747,6 @@ func (ts *trafficSwitcher) IsMultiTenantMigration() bool { } func (ts *trafficSwitcher) mirrorTableTraffic(ctx context.Context, types []topodatapb.TabletType, percent float32) error { - log.Infof("mirrorTableTraffic") - mrs, err := topotools.GetMirrorRules(ctx, ts.TopoServer()) if err != nil { return err diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go index a98a3ce90f9..f91a82b9d2c 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go @@ -115,10 +115,11 @@ func (td *tableDiffer) initialize(ctx context.Context) error { defer dbClient.Close() targetKeyspace := td.wd.ct.vde.thisTablet.Keyspace - log.Infof("Locking target keyspace %s", targetKeyspace) - ctx, unlock, lockErr := td.wd.ct.ts.LockKeyspace(ctx, targetKeyspace, "vdiff") + lockName := fmt.Sprintf("%s/%s", targetKeyspace, td.wd.ct.workflow) + log.Infof("Locking workflow %s", lockName) + ctx, unlock, lockErr := td.wd.ct.ts.LockName(ctx, lockName, "vdiff") if lockErr != nil { - log.Errorf("LockKeyspace failed: %v", lockErr) + log.Errorf("Locking workfkow %s failed: %v", lockName, lockErr) return lockErr } @@ -126,7 +127,7 @@ func (td *tableDiffer) initialize(ctx context.Context) error { defer func() { unlock(&err) if err != nil { - log.Errorf("UnlockKeyspace %s failed: %v", targetKeyspace, err) + log.Errorf("Unlocking workflow %s failed: %v", lockName, err) } }() From bc32d848360c27d9a27021766ba5a74bd17dd024 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Wed, 10 Jul 2024 09:06:06 -0700 Subject: [PATCH 27/55] go/mysql: improve GTID encoding for OK packet (#16361) Signed-off-by: Matt Robenolt --- go/mysql/conn.go | 54 ++++++++------------------------------- go/mysql/encoding.go | 51 ++++++++++++++++++++++++++++++++++++ go/mysql/encoding_test.go | 30 +++++++++++++++++++++- 3 files changed, 90 insertions(+), 45 deletions(-) diff --git a/go/mysql/conn.go b/go/mysql/conn.go index 925dfbfa8e4..d61549c92ef 100644 --- a/go/mysql/conn.go +++ b/go/mysql/conn.go @@ -787,15 +787,15 @@ func (c *Conn) writeOKPacketWithHeader(packetOk *PacketOK, headerType byte) erro // assuming CapabilityClientProtocol41 length += 4 // status_flags + warnings + hasSessionTrack := c.Capabilities&CapabilityClientSessionTrack == CapabilityClientSessionTrack + hasGtidData := hasSessionTrack && packetOk.statusFlags&ServerSessionStateChanged == ServerSessionStateChanged + var gtidData []byte - if c.Capabilities&CapabilityClientSessionTrack == CapabilityClientSessionTrack { + + if hasSessionTrack { length += lenEncStringSize(packetOk.info) // info - if packetOk.statusFlags&ServerSessionStateChanged == ServerSessionStateChanged { - gtidData = getLenEncString([]byte(packetOk.sessionStateData)) - gtidData = append([]byte{0x00}, gtidData...) - gtidData = getLenEncString(gtidData) - gtidData = append([]byte{0x03}, gtidData...) - gtidData = append(getLenEncInt(uint64(len(gtidData))), gtidData...) + if hasGtidData { + gtidData = encGtidData(packetOk.sessionStateData) length += len(gtidData) } } else { @@ -809,10 +809,10 @@ func (c *Conn) writeOKPacketWithHeader(packetOk *PacketOK, headerType byte) erro data.writeLenEncInt(packetOk.lastInsertID) data.writeUint16(packetOk.statusFlags) data.writeUint16(packetOk.warnings) - if c.Capabilities&CapabilityClientSessionTrack == CapabilityClientSessionTrack { + if hasSessionTrack { data.writeLenEncString(packetOk.info) - if packetOk.statusFlags&ServerSessionStateChanged == ServerSessionStateChanged { - data.writeEOFString(string(gtidData)) + if hasGtidData { + data.writeEOFBytes(gtidData) } } else { data.writeEOFString(packetOk.info) @@ -820,39 +820,6 @@ func (c *Conn) writeOKPacketWithHeader(packetOk *PacketOK, headerType byte) erro return c.writeEphemeralPacket() } -func getLenEncString(value []byte) []byte { - data := getLenEncInt(uint64(len(value))) - return append(data, value...) -} - -func getLenEncInt(i uint64) []byte { - var data []byte - switch { - case i < 251: - data = append(data, byte(i)) - case i < 1<<16: - data = append(data, 0xfc) - data = append(data, byte(i)) - data = append(data, byte(i>>8)) - case i < 1<<24: - data = append(data, 0xfd) - data = append(data, byte(i)) - data = append(data, byte(i>>8)) - data = append(data, byte(i>>16)) - default: - data = append(data, 0xfe) - data = append(data, byte(i)) - data = append(data, byte(i>>8)) - data = append(data, byte(i>>16)) - data = append(data, byte(i>>24)) - data = append(data, byte(i>>32)) - data = append(data, byte(i>>40)) - data = append(data, byte(i>>48)) - data = append(data, byte(i>>56)) - } - return data -} - func (c *Conn) WriteErrorAndLog(format string, args ...interface{}) bool { return c.writeErrorAndLog(sqlerror.ERUnknownComError, sqlerror.SSNetError, format, args...) } @@ -1290,7 +1257,6 @@ func (c *Conn) handleComPrepare(handler Handler, data []byte) (kontinue bool) { c.PrepareData[c.StatementID] = prepare fld, err := handler.ComPrepare(c, queries[0], bindVars) - if err != nil { return c.writeErrorPacketFromErrorAndLog(err) } diff --git a/go/mysql/encoding.go b/go/mysql/encoding.go index 6b33ffabfc2..b9d015e8948 100644 --- a/go/mysql/encoding.go +++ b/go/mysql/encoding.go @@ -332,6 +332,53 @@ func readLenEncStringAsBytesCopy(data []byte, pos int) ([]byte, int, bool) { return result, pos + s, true } +// > encGtidData("xxx") +// +// [07 03 05 00 03 78 78 78] +// | | | | | |------| +// | | | | | ^-------- "xxx" +// | | | | ^------------ length of rest of bytes, 3 +// | | | ^--------------- fixed 0x00 +// | | ^------------------ length of rest of bytes, 5 +// | ^--------------------- fixed 0x03 (SESSION_TRACK_GTIDS) +// ^------------------------ length of rest of bytes, 7 +// +// This is ultimately lenencoded strings of length encoded strings, or: +// > lenenc(0x03 + lenenc(0x00 + lenenc(data))) +func encGtidData(data string) []byte { + const SessionTrackGtids = 0x03 + + // calculate total size up front to do 1 allocation + // encoded layout is: + // lenenc(0x03 + lenenc(0x00 + lenenc(data))) + dataSize := uint64(len(data)) + dataLenEncSize := uint64(lenEncIntSize(dataSize)) + + wrapSize := uint64(dataSize + dataLenEncSize + 1) + wrapLenEncSize := uint64(lenEncIntSize(wrapSize)) + + totalSize := uint64(wrapSize + wrapLenEncSize + 1) + totalLenEncSize := uint64(lenEncIntSize(totalSize)) + + gtidData := make([]byte, int(totalSize+totalLenEncSize)) + + pos := 0 + pos = writeLenEncInt(gtidData, pos, totalSize) + + gtidData[pos] = SessionTrackGtids + pos++ + + pos = writeLenEncInt(gtidData, pos, wrapSize) + + gtidData[pos] = 0x00 + pos++ + + pos = writeLenEncInt(gtidData, pos, dataSize) + writeEOFString(gtidData, pos, data) + + return gtidData +} + type coder struct { data []byte pos int @@ -397,3 +444,7 @@ func (d *coder) writeLenEncString(value string) { func (d *coder) writeEOFString(value string) { d.pos += copy(d.data[d.pos:], value) } + +func (d *coder) writeEOFBytes(value []byte) { + d.pos += copy(d.data[d.pos:], value) +} diff --git a/go/mysql/encoding_test.go b/go/mysql/encoding_test.go index 41f6c416993..c2b7013e2cb 100644 --- a/go/mysql/encoding_test.go +++ b/go/mysql/encoding_test.go @@ -18,6 +18,7 @@ package mysql import ( "bytes" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -72,7 +73,6 @@ func TestEncLenInt(t *testing.T) { // Check failed decoding. _, _, ok = readLenEncInt(test.encoded[:len(test.encoded)-1], 0) assert.False(t, ok, "readLenEncInt returned ok=true for shorter value %x", test.value) - } } @@ -355,6 +355,27 @@ func TestWriteZeroes(t *testing.T) { }) } +func TestEncGtidData(t *testing.T) { + tests := []struct { + data string + header []byte + }{ + {"", []byte{0x04, 0x03, 0x02, 0x00, 0x00}}, + {"xxx", []byte{0x07, 0x03, 0x05, 0x00, 0x03}}, + {strings.Repeat("x", 256), []byte{ + /* 264 */ 0xfc, 0x08, 0x01, + /* constant */ 0x03, + /* 260 */ 0xfc, 0x04, 0x01, + /* constant */ 0x00, + /* 256 */ 0xfc, 0x00, 0x01, + }}, + } + for _, test := range tests { + got := encGtidData(test.data) + assert.Equal(t, append(test.header, test.data...), got) + } +} + func BenchmarkEncWriteInt(b *testing.B) { buf := make([]byte, 16) @@ -451,3 +472,10 @@ func BenchmarkEncReadInt(b *testing.B) { } }) } + +func BenchmarkEncGtidData(b *testing.B) { + b.ReportAllocs() + for range b.N { + _ = encGtidData("xxx") + } +} From d4e6a97812162f4b7c51dbb773869f3ca7fb1a42 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Wed, 10 Jul 2024 09:15:03 -0700 Subject: [PATCH 28/55] go/mysql: use clear builtin for zerofill (#16348) Signed-off-by: Matt Robenolt --- go/mysql/encoding.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/go/mysql/encoding.go b/go/mysql/encoding.go index b9d015e8948..20e09f32fe8 100644 --- a/go/mysql/encoding.go +++ b/go/mysql/encoding.go @@ -132,15 +132,8 @@ func writeLenEncString(data []byte, pos int, value string) int { } func writeZeroes(data []byte, pos int, len int) int { - // XXX: This implementation is optimized to leverage - // the go compiler's memclr pattern, see: https://github.com/golang/go/issues/5373 end := pos + len - data = data[pos:end] - - for i := range data { - data[i] = 0 - } - + clear(data[pos:end]) return end } From 979c1e64d0680420dfd7bf20413a7bf752d9310d Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Wed, 10 Jul 2024 12:19:58 -0400 Subject: [PATCH 29/55] VReplication: Handle large binlog compressed transactions more efficiently (#16328) Signed-off-by: Matt Lord --- go/mysql/binlog_event.go | 9 +- go/mysql/binlog_event_common.go | 2 - go/mysql/binlog_event_compression.go | 283 ++++++++++++------ go/mysql/binlog_event_filepos.go | 4 +- go/mysql/binlog_event_mysql56_test.go | 138 ++++++--- go/mysql/large_compressed_trx_payload.bin | Bin 0 -> 16090 bytes .../tabletserver/vstreamer/vstreamer.go | 12 +- 7 files changed, 309 insertions(+), 139 deletions(-) create mode 100644 go/mysql/large_compressed_trx_payload.bin diff --git a/go/mysql/binlog_event.go b/go/mysql/binlog_event.go index 3acf99c2408..84f92c3809d 100644 --- a/go/mysql/binlog_event.go +++ b/go/mysql/binlog_event.go @@ -124,9 +124,12 @@ type BinlogEvent interface { // IsWriteRows(), IsUpdateRows(), or IsDeleteRows() returns // true. Rows(BinlogFormat, *TableMap) (Rows, error) - // TransactionPayload returns a list of BinlogEvents contained - // within the compressed transaction. - TransactionPayload(BinlogFormat) ([]BinlogEvent, error) + // TransactionPayload returns a TransactionPayload type which provides + // a GetNextEvent() method to iterate over the events contained within + // the uncompressed payload. You must call Close() when you are done + // with the TransactionPayload to ensure that the underlying resources + // used are cleaned up. + TransactionPayload(BinlogFormat) (*TransactionPayload, error) // NextLogFile returns the name of the next binary log file & pos. // This is only valid if IsRotate() returns true NextLogFile(BinlogFormat) (string, uint64, error) diff --git a/go/mysql/binlog_event_common.go b/go/mysql/binlog_event_common.go index f95ed847e0a..c95873614f0 100644 --- a/go/mysql/binlog_event_common.go +++ b/go/mysql/binlog_event_common.go @@ -55,8 +55,6 @@ const ( BinlogFixedHeaderLen = 19 // The offset from 0 where the type is stored as 1 byte. BinlogEventTypeOffset = 4 - // Offset from 0 where the 4 byte length is stored. - BinlogEventLenOffset = 9 // Byte length of the checksum suffix when the CRC32 algorithm is used. BinlogCRC32ChecksumLen = 4 ) diff --git a/go/mysql/binlog_event_compression.go b/go/mysql/binlog_event_compression.go index 325bfeb4827..378698bc64b 100644 --- a/go/mysql/binlog_event_compression.go +++ b/go/mysql/binlog_event_compression.go @@ -19,13 +19,16 @@ package mysql import ( "bytes" "encoding/binary" - "fmt" "io" + "sync" "github.com/klauspost/compress/zstd" - vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/stats" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vterrors" + + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" ) // This file contains code related to handling compression related @@ -41,35 +44,78 @@ const ( payloadUncompressedSizeField ) -// Compression algorithms that are supported (only zstd today -// in MySQL 8.0): -// https://dev.mysql.com/doc/refman/8.0/en/binary-log-transaction-compression.html const ( + // Compression algorithms that are supported (only zstd today + // in MySQL 8.0): + // https://dev.mysql.com/doc/refman/8.0/en/binary-log-transaction-compression.html TransactionPayloadCompressionZstd = 0 TransactionPayloadCompressionNone = 255 + + // Bytes used to store the internal event length as a uint32 at + // the end of the binlog event header. + eventLenBytes = 4 + // Offset from 0 where the eventLenBytes are stored. + binlogEventLenOffset = 9 + // Length of the binlog event header for internal events within + // the transaction payload. + headerLen = binlogEventLenOffset + eventLenBytes + + // At what size should we switch from the in-memory buffer + // decoding to streaming mode which is much slower, but does + // not require everything be done in memory. + zstdInMemoryDecompressorMaxSize = 128 << (10 * 2) // 128MiB ) -var TransactionPayloadCompressionTypes = map[uint64]string{ - TransactionPayloadCompressionZstd: "ZSTD", - TransactionPayloadCompressionNone: "NONE", -} +var ( + TransactionPayloadCompressionTypes = map[uint64]string{ + TransactionPayloadCompressionZstd: "ZSTD", + TransactionPayloadCompressionNone: "NONE", + } -// Create a reader that caches decompressors. This is used for -// smaller events that we want to handle entirely using in-memory -// buffers. -var zstdDecoder, _ = zstd.NewReader(nil, zstd.WithDecoderConcurrency(0)) + // Metrics. + compressedTrxPayloadsInMem = stats.NewCounter("CompressedTransactionPayloadsInMemory", "The number of compressed binlog transaction payloads that were processed in memory") + compressedTrxPayloadsUsingStream = stats.NewCounter("CompressedTransactionPayloadsViaStream", "The number of compressed binlog transaction payloads that were processed using a stream") + + // A concurrent stateless decoder that caches decompressors. This is + // used for smaller payloads that we want to handle entirely using + // in-memory buffers via DecodeAll. + statelessDecoder *zstd.Decoder + + // A pool of stateful decoders for larger payloads that we want to + // stream. The number of large (> zstdInMemoryDecompressorMaxSize) + // payloads should typically be relatively low, but there may be times + // where there are many of them -- and users like vstreamer may have + // N concurrent streams per tablet which could lead to a lot of + // allocations and GC overhead so this pool allows us to handle + // concurrent cases better while still scaling to 0 when there's no + // usage. + statefulDecoderPool sync.Pool +) -// At what size should we switch from the in-memory buffer -// decoding to streaming mode -- which is slower, but does not -// require everything be done in memory. -const zstdInMemoryDecompressorMaxSize = 128 << (10 * 2) // 128MiB +func init() { + var err error + statelessDecoder, err = zstd.NewReader(nil, zstd.WithDecoderConcurrency(0)) + if err != nil { // Should only happen e.g. due to ENOMEM + log.Errorf("Error creating stateless decoder: %v", err) + } + statefulDecoderPool = sync.Pool{ + New: func() any { + d, err := zstd.NewReader(nil, zstd.WithDecoderMaxMemory(zstdInMemoryDecompressorMaxSize)) + if err != nil { // Should only happen e.g. due to ENOMEM + log.Errorf("Error creating stateful decoder: %v", err) + } + return d + }, + } +} type TransactionPayload struct { - Size uint64 - CompressionType uint64 - UncompressedSize uint64 - Payload []byte - Events []BinlogEvent + size uint64 + compressionType uint64 + uncompressedSize uint64 + payload []byte + reader io.Reader + iterator func() (BinlogEvent, error) } // IsTransactionPayload returns true if a compressed transaction @@ -78,8 +124,12 @@ func (ev binlogEvent) IsTransactionPayload() bool { return ev.Type() == eTransactionPayloadEvent } -// TransactionPayload returns the BinlogEvents contained within -// the compressed transaction. +// TransactionPayload processes the payload and provides a GetNextEvent() +// method which should be used in a loop to read BinlogEvents one by one +// that were within the compressed transaction. That function will return +// io.EOF when there are no more events left in the payload. You must +// call Close() when you are done with the TransactionPayload to ensure +// that the underlying reader and related resources are cleaned up. // The following event types are compressed as part of the // transaction payload: // @@ -129,16 +179,18 @@ func (ev binlogEvent) IsTransactionPayload() bool { // We need to extract the compressed transaction payload from the GTID // event, decompress it with zstd, and then process the internal events // (e.g. Query and Row events) that make up the transaction. -func (ev binlogEvent) TransactionPayload(format BinlogFormat) ([]BinlogEvent, error) { +func (ev binlogEvent) TransactionPayload(format BinlogFormat) (*TransactionPayload, error) { tp := &TransactionPayload{} - if err := tp.Decode(ev.Bytes()[format.HeaderLength:]); err != nil { - return nil, vterrors.Wrapf(err, "error decoding transaction payload event") + if err := tp.process(ev.Bytes()[format.HeaderLength:]); err != nil { + return nil, vterrors.Wrap(err, "error decoding transaction payload event") } - return tp.Events, nil + return tp, nil } -// Decode decodes and decompresses the payload. -func (tp *TransactionPayload) Decode(data []byte) error { +// process reads and decompresses the payload, setting up the iterator +// that can then be used in GetNextEvent() to read the binlog events +// from the uncompressed payload one at a time. +func (tp *TransactionPayload) process(data []byte) error { if err := tp.read(data); err != nil { return err } @@ -147,7 +199,8 @@ func (tp *TransactionPayload) Decode(data []byte) error { // read unmarshalls the transaction payload event into the // TransactionPayload struct. The compressed payload itself will still -// need to be decoded -- meaning decompressing it and extracting the +// need to be decoded -- meaning decompressing it and setting up the +// iterator that can then be used by GetNextEvent() to extract the // internal events. func (tp *TransactionPayload) read(data []byte) error { pos := uint64(0) @@ -160,7 +213,7 @@ func (tp *TransactionPayload) read(data []byte) error { pos++ if fieldType == payloadHeaderEndMark { - tp.Payload = data[pos:] + tp.payload = data[pos:] return nil // we're done } @@ -172,17 +225,17 @@ func (tp *TransactionPayload) read(data []byte) error { switch fieldType { case payloadSizeField: - tp.Size, ok = readFixedLenUint64(data[pos : pos+fieldLen]) + tp.size, ok = readFixedLenUint64(data[pos : pos+fieldLen]) if !ok { return vterrors.New(vtrpcpb.Code_INTERNAL, "error reading payload size") } case payloadCompressionTypeField: - tp.CompressionType, ok = readFixedLenUint64(data[pos : pos+fieldLen]) + tp.compressionType, ok = readFixedLenUint64(data[pos : pos+fieldLen]) if !ok { return vterrors.New(vtrpcpb.Code_INTERNAL, "error reading compression type") } case payloadUncompressedSizeField: - tp.UncompressedSize, ok = readFixedLenUint64(data[pos : pos+fieldLen]) + tp.uncompressedSize, ok = readFixedLenUint64(data[pos : pos+fieldLen]) if !ok { return vterrors.New(vtrpcpb.Code_INTERNAL, "error reading uncompressed payload size") } @@ -192,78 +245,126 @@ func (tp *TransactionPayload) read(data []byte) error { } } -// decode decompresses the payload and extracts the internal binlog -// events. +// decode decompresses the payload and assigns the iterator to a +// function that can then be used to retrieve the events from the +// uncompressed transaction one at a time. func (tp *TransactionPayload) decode() error { - if tp.CompressionType != TransactionPayloadCompressionZstd { - return vterrors.New(vtrpcpb.Code_INTERNAL, - fmt.Sprintf("TransactionPayload has unsupported compression type of %d", tp.CompressionType)) + if tp.compressionType != TransactionPayloadCompressionZstd { + return vterrors.Errorf(vtrpcpb.Code_INTERNAL, + "TransactionPayload has unsupported compression type of %d", tp.compressionType) } - decompressedPayload, err := tp.decompress() - decompressedPayloadLen := uint64(len(decompressedPayload)) - if err != nil { - return vterrors.Wrapf(err, "error decompressing transaction payload") + err := tp.decompress() + if err != nil || tp.reader == nil { + return vterrors.Wrap(err, "error decompressing transaction payload") } - pos := uint64(0) - - for { - eventLenPosEnd := pos + BinlogEventLenOffset + 4 - if eventLenPosEnd > decompressedPayloadLen { // No more events in the payload - break + header := make([]byte, headerLen) + tp.iterator = func() (ble BinlogEvent, err error) { + bytesRead, err := io.ReadFull(tp.reader, header) + if err != nil { + if err == io.EOF { + return nil, io.EOF + } + return nil, vterrors.Wrap(err, "error reading event header from uncompressed transaction payload") } - eventLen := uint64(binary.LittleEndian.Uint32(decompressedPayload[pos+BinlogEventLenOffset : eventLenPosEnd])) - if pos+eventLen > decompressedPayloadLen { - return vterrors.New(vtrpcpb.Code_INTERNAL, - fmt.Sprintf("[BUG] event length of %d at pos %d in decompressed transaction payload is beyond the expected payload length of %d", - eventLen, pos, decompressedPayloadLen)) + if bytesRead != headerLen { + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "[BUG] expected header length of %d but only read %d bytes", + headerLen, bytesRead) } - eventData := decompressedPayload[pos : pos+eventLen] - ble := NewMysql56BinlogEvent(eventData) - tp.Events = append(tp.Events, ble) - - pos += eventLen + eventLen := int64(binary.LittleEndian.Uint32(header[binlogEventLenOffset:headerLen])) + eventData := make([]byte, eventLen) + copy(eventData, header) // The event includes the header + bytesRead, err = io.ReadFull(tp.reader, eventData[headerLen:]) + if err != nil && err != io.EOF { + return nil, vterrors.Wrap(err, "error reading binlog event data from uncompressed transaction payload") + } + if int64(bytesRead+headerLen) != eventLen { + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "[BUG] expected binlog event length of %d but only read %d bytes", + eventLen, bytesRead) + } + return NewMysql56BinlogEvent(eventData), nil } - return nil } -// Decompress the payload. -func (tp *TransactionPayload) decompress() ([]byte, error) { - if len(tp.Payload) == 0 { - return []byte{}, vterrors.New(vtrpcpb.Code_INVALID_ARGUMENT, "cannot decompress empty payload") +// decompress decompresses the payload. If the payload is larger than +// zstdInMemoryDecompressorMaxSize then we stream the decompression via +// the package's pool of zstd.Decoders, otherwise we use in-memory +// buffers with the package's concurrent statelessDecoder. +// In either case, we setup the reader that can be used within the +// iterator to read the events one at a time from the decompressed +// payload in GetNextEvent(). +func (tp *TransactionPayload) decompress() error { + if len(tp.payload) == 0 { + return vterrors.New(vtrpcpb.Code_INVALID_ARGUMENT, "cannot decompress empty compressed transaction payload") } - var ( - decompressedBytes []byte - err error - ) - - // Switch to slower but less memory intensive stream mode for larger payloads. - if tp.UncompressedSize > zstdInMemoryDecompressorMaxSize { - in := bytes.NewReader(tp.Payload) - streamDecoder, err := zstd.NewReader(in) - if err != nil { - return nil, err - } - defer streamDecoder.Close() - out := io.Writer(&bytes.Buffer{}) - _, err = io.Copy(out, streamDecoder) - if err != nil { - return nil, err + + // Switch to slower but less memory intensive stream mode for + // larger payloads. + if tp.uncompressedSize > zstdInMemoryDecompressorMaxSize { + in := bytes.NewReader(tp.payload) + streamDecoder := statefulDecoderPool.Get().(*zstd.Decoder) + if streamDecoder == nil { + return vterrors.New(vtrpcpb.Code_INTERNAL, "failed to create stateful stream decoder") } - decompressedBytes = out.(*bytes.Buffer).Bytes() - } else { // Process smaller payloads using in-memory buffers. - decompressedBytes, err = zstdDecoder.DecodeAll(tp.Payload, nil) - if err != nil { - return nil, err + if err := streamDecoder.Reset(in); err != nil { + return vterrors.Wrap(err, "error resetting stateful stream decoder") } + compressedTrxPayloadsUsingStream.Add(1) + tp.reader = streamDecoder + return nil } - if uint64(len(decompressedBytes)) != tp.UncompressedSize { - return []byte{}, vterrors.New(vtrpcpb.Code_INVALID_ARGUMENT, - fmt.Sprintf("decompressed size %d does not match expected size %d", len(decompressedBytes), tp.UncompressedSize)) + // Process smaller payloads using only in-memory buffers. + if statelessDecoder == nil { // Should never happen + return vterrors.New(vtrpcpb.Code_INTERNAL, "failed to create stateless decoder") + } + decompressedBytes := make([]byte, 0, tp.uncompressedSize) // Perform a single pre-allocation + decompressedBytes, err := statelessDecoder.DecodeAll(tp.payload, decompressedBytes[:0]) + if err != nil { + return err } + if uint64(len(decompressedBytes)) != tp.uncompressedSize { + return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, + "uncompressed transaction payload size %d does not match expected size %d", len(decompressedBytes), tp.uncompressedSize) + } + compressedTrxPayloadsInMem.Add(1) + tp.reader = bytes.NewReader(decompressedBytes) + return nil +} - return decompressedBytes, nil +// Close should be called in a defer where the TransactionPayload is +// used to ensure that the underlying reader and related resources +// used are cleaned up. +func (tp *TransactionPayload) Close() { + switch reader := tp.reader.(type) { + case *zstd.Decoder: + if err := reader.Reset(nil); err == nil || err == io.EOF { + readersPool.Put(reader) + } + default: + reader = nil + } + tp.iterator = nil } + +// GetNextEvent returns the next binlog event that was contained within +// the compressed transaction payload. It will return io.EOF when there +// are no more events left in the payload. +func (tp *TransactionPayload) GetNextEvent() (BinlogEvent, error) { + if tp == nil || tp.iterator == nil { + return nil, vterrors.New(vtrpcpb.Code_INVALID_ARGUMENT, "TransactionPayload has been closed") + } + return tp.iterator() +} + +// Events returns an iterator over the internal binlog events that +// were contained within the compressed transaction payload/event. +// It returns a single-use iterator. +// TODO(mattlord): implement this when main is on go 1.23. See: +// - https://tip.golang.org/wiki/RangefuncExperiment +// - https://github.com/golang/go/blob/release-branch.go1.23/src/iter/iter.go +//func (tp *TransactionPayload) Events() iter.Seq[BinlogEvent] { +// return tp.iterator +//} diff --git a/go/mysql/binlog_event_filepos.go b/go/mysql/binlog_event_filepos.go index 4edc4bb91ff..8a2976da80d 100644 --- a/go/mysql/binlog_event_filepos.go +++ b/go/mysql/binlog_event_filepos.go @@ -247,8 +247,8 @@ func (ev filePosFakeEvent) Rows(BinlogFormat, *TableMap) (Rows, error) { return Rows{}, nil } -func (ev filePosFakeEvent) TransactionPayload(BinlogFormat) ([]BinlogEvent, error) { - return []BinlogEvent{}, nil +func (ev filePosFakeEvent) TransactionPayload(BinlogFormat) (*TransactionPayload, error) { + return &TransactionPayload{}, nil } func (ev filePosFakeEvent) NextLogFile(BinlogFormat) (string, uint64, error) { diff --git a/go/mysql/binlog_event_mysql56_test.go b/go/mysql/binlog_event_mysql56_test.go index e5fa3545278..f173e27e4af 100644 --- a/go/mysql/binlog_event_mysql56_test.go +++ b/go/mysql/binlog_event_mysql56_test.go @@ -17,8 +17,11 @@ limitations under the License. package mysql import ( + _ "embed" "fmt" + "io" "reflect" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -29,15 +32,16 @@ import ( // Sample event data for MySQL 5.6. var ( - mysql56FormatEvent = NewMysql56BinlogEvent([]byte{0x78, 0x4e, 0x49, 0x55, 0xf, 0x64, 0x0, 0x0, 0x0, 0x74, 0x0, 0x0, 0x0, 0x78, 0x0, 0x0, 0x0, 0x1, 0x0, 0x4, 0x0, 0x35, 0x2e, 0x36, 0x2e, 0x32, 0x34, 0x2d, 0x6c, 0x6f, 0x67, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x78, 0x4e, 0x49, 0x55, 0x13, 0x38, 0xd, 0x0, 0x8, 0x0, 0x12, 0x0, 0x4, 0x4, 0x4, 0x4, 0x12, 0x0, 0x0, 0x5c, 0x0, 0x4, 0x1a, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x2, 0x0, 0x0, 0x0, 0xa, 0xa, 0xa, 0x19, 0x19, 0x0, 0x1, 0x18, 0x4a, 0xf, 0xca}) - mysql56GTIDEvent = NewMysql56BinlogEvent([]byte{0xff, 0x4e, 0x49, 0x55, 0x21, 0x64, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0xf5, 0x2, 0x0, 0x0, 0x0, 0x0, 0x1, 0x43, 0x91, 0x92, 0xbd, 0xf3, 0x7c, 0x11, 0xe4, 0xbb, 0xeb, 0x2, 0x42, 0xac, 0x11, 0x3, 0x5a, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x48, 0x45, 0x82, 0x27}) - // This is the result of: begin; insert into customer values (1, "mlord@planetscale.com"), (2, "sup@planetscale.com"); commit; - mysql56TransactionPayloadEvent = NewMysql56BinlogEvent([]byte{0xc7, 0xe1, 0x4b, 0x64, 0x28, 0x5b, 0xd2, 0xc7, 0x19, 0xdb, 0x00, 0x00, 0x00, 0x3a, 0x50, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0x03, 0xfc, 0xfe, 0x00, 0x01, 0x01, 0xb8, 0x00, 0x28, 0xb5, 0x2f, 0xfd, 0x00, 0x58, 0x64, 0x05, 0x00, 0xf2, 0x49, 0x23, 0x2a, 0xa0, 0x27, 0x69, 0x0c, 0xff, 0xe8, 0x06, 0xeb, 0xfe, 0xc3, 0xab, 0x8a, 0x7b, 0xc0, 0x36, 0x42, 0x5c, 0x6f, 0x1b, 0x2f, 0xfb, 0x6e, 0xc4, 0x9a, 0xe6, 0x6e, 0x6b, 0xda, 0x08, 0xf1, 0x37, 0x7e, 0xff, 0xb8, 0x6c, 0xbc, 0x27, 0x3c, 0xb7, 0x4f, 0xee, 0x14, 0xff, 0xaf, 0x09, 0x06, 0x69, 0xe3, 0x12, 0x68, 0x4a, 0x6e, 0xc3, 0xe1, 0x28, 0xaf, 0x3f, 0xc8, 0x14, 0x1c, 0xc3, 0x60, 0xce, 0xe3, 0x1e, 0x18, 0x4c, 0x63, 0xa1, 0x35, 0x90, 0x79, 0x04, 0xe8, 0xa9, 0xeb, 0x4a, 0x1b, 0xd7, 0x41, 0x53, 0x72, 0x17, 0xa4, 0x23, 0xa4, 0x47, 0x68, 0x00, 0xa2, 0x37, 0xee, 0xc1, 0xc7, 0x71, 0x30, 0x24, 0x19, 0xfd, 0x78, 0x49, 0x1b, 0x97, 0xd2, 0x94, 0xdc, 0x85, 0xa2, 0x21, 0xc1, 0xb0, 0x63, 0x8d, 0x7b, 0x0f, 0x32, 0x87, 0x07, 0xe2, 0x39, 0xf0, 0x7c, 0x3e, 0x01, 0xfe, 0x13, 0x8f, 0x11, 0xd0, 0x05, 0x9f, 0xbc, 0x18, 0x59, 0x91, 0x36, 0x2e, 0x6d, 0x4a, 0x6e, 0x0b, 0x00, 0x5e, 0x28, 0x10, 0xc0, 0x02, 0x50, 0x77, 0xe0, 0x64, 0x30, 0x02, 0x9e, 0x09, 0x54, 0xec, 0x80, 0x6d, 0x07, 0xa4, 0xc1, 0x7d, 0x60, 0xe4, 0x01, 0x78, 0x01, 0x01, 0x00, 0x00}) + mysql56FormatEvent = NewMysql56BinlogEvent([]byte{0x78, 0x4e, 0x49, 0x55, 0xf, 0x64, 0x0, 0x0, 0x0, 0x74, 0x0, 0x0, 0x0, 0x78, 0x0, 0x0, 0x0, 0x1, 0x0, 0x4, 0x0, 0x35, 0x2e, 0x36, 0x2e, 0x32, 0x34, 0x2d, 0x6c, 0x6f, 0x67, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x78, 0x4e, 0x49, 0x55, 0x13, 0x38, 0xd, 0x0, 0x8, 0x0, 0x12, 0x0, 0x4, 0x4, 0x4, 0x4, 0x12, 0x0, 0x0, 0x5c, 0x0, 0x4, 0x1a, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x2, 0x0, 0x0, 0x0, 0xa, 0xa, 0xa, 0x19, 0x19, 0x0, 0x1, 0x18, 0x4a, 0xf, 0xca}) + mysql56GTIDEvent = NewMysql56BinlogEvent([]byte{0xff, 0x4e, 0x49, 0x55, 0x21, 0x64, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0xf5, 0x2, 0x0, 0x0, 0x0, 0x0, 0x1, 0x43, 0x91, 0x92, 0xbd, 0xf3, 0x7c, 0x11, 0xe4, 0xbb, 0xeb, 0x2, 0x42, 0xac, 0x11, 0x3, 0x5a, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x48, 0x45, 0x82, 0x27}) mysql56QueryEvent = NewMysql56BinlogEvent([]byte{0xff, 0x4e, 0x49, 0x55, 0x2, 0x64, 0x0, 0x0, 0x0, 0x77, 0x0, 0x0, 0x0, 0xdb, 0x3, 0x0, 0x0, 0x0, 0x0, 0x3d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x3, 0x73, 0x74, 0x64, 0x4, 0x8, 0x0, 0x8, 0x0, 0x21, 0x0, 0xc, 0x1, 0x74, 0x65, 0x73, 0x74, 0x0, 0x74, 0x65, 0x73, 0x74, 0x0, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x28, 0x6d, 0x73, 0x67, 0x29, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x28, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x29, 0x92, 0x12, 0x79, 0xc3}) mysql56SemiSyncNoAckQueryEvent = NewMysql56BinlogEvent([]byte{0xef, 0x00, 0xff, 0x4e, 0x49, 0x55, 0x2, 0x64, 0x0, 0x0, 0x0, 0x77, 0x0, 0x0, 0x0, 0xdb, 0x3, 0x0, 0x0, 0x0, 0x0, 0x3d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x3, 0x73, 0x74, 0x64, 0x4, 0x8, 0x0, 0x8, 0x0, 0x21, 0x0, 0xc, 0x1, 0x74, 0x65, 0x73, 0x74, 0x0, 0x74, 0x65, 0x73, 0x74, 0x0, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x28, 0x6d, 0x73, 0x67, 0x29, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x28, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x29, 0x92, 0x12, 0x79, 0xc3}) mysql56SemiSyncAckQueryEvent = NewMysql56BinlogEvent([]byte{0xef, 0x01, 0xff, 0x4e, 0x49, 0x55, 0x2, 0x64, 0x0, 0x0, 0x0, 0x77, 0x0, 0x0, 0x0, 0xdb, 0x3, 0x0, 0x0, 0x0, 0x0, 0x3d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x3, 0x73, 0x74, 0x64, 0x4, 0x8, 0x0, 0x8, 0x0, 0x21, 0x0, 0xc, 0x1, 0x74, 0x65, 0x73, 0x74, 0x0, 0x74, 0x65, 0x73, 0x74, 0x0, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x28, 0x6d, 0x73, 0x67, 0x29, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x28, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x29, 0x92, 0x12, 0x79, 0xc3}) ) +//go:embed large_compressed_trx_payload.bin +var mysql56CompressedLargeTrxPayload []byte + func TestMysql56IsGTID(t *testing.T) { if got, want := mysql56FormatEvent.IsGTID(), false; got != want { t.Errorf("%#v.IsGTID() = %#v, want %#v", mysql56FormatEvent, got, want) @@ -94,46 +98,102 @@ func TestMysql56GTID(t *testing.T) { func TestMysql56DecodeTransactionPayload(t *testing.T) { format := NewMySQL56BinlogFormat() tableMap := &TableMap{} - require.True(t, mysql56TransactionPayloadEvent.IsTransactionPayload()) - - // The generated event is the result of the following SQL being executed in vtgate - // against the commerce keyspace: - // begin; insert into customer values (1, "mlord@planetscale.com"), (2, "sup@planetscale.com"); commit; - // All of these below internal events are encoded in the compressed transaction - // payload event. - want := []string{ - "BEGIN", // Query event - "vt_commerce.customer", // TableMap event - "[1 mlord@planetscale.com]", // WriteRows event - "[2 sup@planetscale.com]", // WriteRows event - "COMMIT", // XID event + + testCases := []struct { + name string + event BinlogEvent + want []string + inMemory bool + }{ + { + name: "Small event done in memory", + event: NewMysql56BinlogEvent([]byte{0xc7, 0xe1, 0x4b, 0x64, 0x28, 0x5b, 0xd2, 0xc7, 0x19, 0xdb, 0x00, 0x00, 0x00, 0x3a, 0x50, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0x03, 0xfc, 0xfe, 0x00, 0x01, 0x01, 0xb8, 0x00, 0x28, 0xb5, 0x2f, 0xfd, 0x00, 0x58, 0x64, 0x05, 0x00, 0xf2, 0x49, 0x23, 0x2a, 0xa0, 0x27, 0x69, 0x0c, 0xff, 0xe8, 0x06, 0xeb, 0xfe, 0xc3, 0xab, 0x8a, 0x7b, 0xc0, 0x36, 0x42, 0x5c, 0x6f, 0x1b, 0x2f, 0xfb, 0x6e, 0xc4, 0x9a, 0xe6, 0x6e, 0x6b, 0xda, 0x08, 0xf1, 0x37, 0x7e, 0xff, 0xb8, 0x6c, 0xbc, 0x27, 0x3c, 0xb7, 0x4f, 0xee, 0x14, 0xff, 0xaf, 0x09, 0x06, 0x69, 0xe3, 0x12, 0x68, 0x4a, 0x6e, 0xc3, 0xe1, 0x28, 0xaf, 0x3f, 0xc8, 0x14, 0x1c, 0xc3, 0x60, 0xce, 0xe3, 0x1e, 0x18, 0x4c, 0x63, 0xa1, 0x35, 0x90, 0x79, 0x04, 0xe8, 0xa9, 0xeb, 0x4a, 0x1b, 0xd7, 0x41, 0x53, 0x72, 0x17, 0xa4, 0x23, 0xa4, 0x47, 0x68, 0x00, 0xa2, 0x37, 0xee, 0xc1, 0xc7, 0x71, 0x30, 0x24, 0x19, 0xfd, 0x78, 0x49, 0x1b, 0x97, 0xd2, 0x94, 0xdc, 0x85, 0xa2, 0x21, 0xc1, 0xb0, 0x63, 0x8d, 0x7b, 0x0f, 0x32, 0x87, 0x07, 0xe2, 0x39, 0xf0, 0x7c, 0x3e, 0x01, 0xfe, 0x13, 0x8f, 0x11, 0xd0, 0x05, 0x9f, 0xbc, 0x18, 0x59, 0x91, 0x36, 0x2e, 0x6d, 0x4a, 0x6e, 0x0b, 0x00, 0x5e, 0x28, 0x10, 0xc0, 0x02, 0x50, 0x77, 0xe0, 0x64, 0x30, 0x02, 0x9e, 0x09, 0x54, 0xec, 0x80, 0x6d, 0x07, 0xa4, 0xc1, 0x7d, 0x60, 0xe4, 0x01, 0x78, 0x01, 0x01, 0x00, 0x00}), + // The generated event is the result of the following SQL being executed in vtgate + // against the commerce keyspace: + // begin; insert into customer values (1, "mlord@planetscale.com"), (2, "sup@planetscale.com"); commit; + // All of these below internal events are encoded in the compressed transaction + // payload event. + want: []string{ + "BEGIN", // Query event + "vt_commerce.customer", // TableMap event + "[1 mlord@planetscale.com]", // WriteRows event + "[2 sup@planetscale.com]", // WriteRows event + "COMMIT", // XID event + }, + inMemory: true, + }, + { + name: "Large event using streaming", + event: NewMysql56BinlogEvent(mysql56CompressedLargeTrxPayload), + // The generated event is the result of the following SQL being executed against the + // commerce keyspace after having added a LONGTEXT column to the customer + // table (this generates an uncompressed transaction that is over 128MiB): + // insert into customer values (1, "mlord@planetscale.com", repeat("test", 43280000)); + // All of these below internal events are encoded in the compressed transaction + // payload event. + want: []string{ + "BEGIN", // Query event + "vt_commerce.customer", // TableMap event + "[1 mlord@planetscale.com testtesttesttesttesttesttesttest", // WriteRows event + "COMMIT", // XID event + }, + inMemory: false, + }, } - internalEvents, err := mysql56TransactionPayloadEvent.TransactionPayload(format) - require.NoError(t, err) - eventStrs := []string{} - for _, ev := range internalEvents { - switch { - case ev.IsTableMap(): - tableMap, err = ev.TableMap(format) - require.NoError(t, err) - eventStrs = append(eventStrs, fmt.Sprintf("%s.%s", tableMap.Database, tableMap.Name)) - case ev.IsQuery(): - query, err := ev.Query(format) - require.NoError(t, err) - eventStrs = append(eventStrs, query.SQL) - case ev.IsWriteRows(): - rows, err := ev.Rows(format, tableMap) - require.NoError(t, err) - for i := range rows.Rows { - rowStr, err := rows.StringValuesForTests(tableMap, i) + + for _, tc := range testCases { + memDecodingCnt := compressedTrxPayloadsInMem.Get() + streamDecodingCnt := compressedTrxPayloadsUsingStream.Get() + + require.True(t, tc.event.IsTransactionPayload()) + tp, err := tc.event.TransactionPayload(format) + require.NoError(t, err) + defer tp.Close() + eventStrs := []string{} + for { + ev, err := tp.GetNextEvent() + if err != nil { + if err == io.EOF { + break + } + require.Fail(t, fmt.Sprintf("unexpected error: %v", err)) + } + switch { + case ev.IsTableMap(): + tableMap, err = ev.TableMap(format) require.NoError(t, err) - eventStrs = append(eventStrs, fmt.Sprintf("%v", rowStr)) + eventStrs = append(eventStrs, fmt.Sprintf("%s.%s", tableMap.Database, tableMap.Name)) + case ev.IsQuery(): + query, err := ev.Query(format) + require.NoError(t, err) + eventStrs = append(eventStrs, query.SQL) + case ev.IsWriteRows(): + rows, err := ev.Rows(format, tableMap) + require.NoError(t, err) + for i := range rows.Rows { + rowStr, err := rows.StringValuesForTests(tableMap, i) + require.NoError(t, err) + eventStrs = append(eventStrs, fmt.Sprintf("%v", rowStr)) + } + case ev.IsXID(): + eventStrs = append(eventStrs, "COMMIT") + } + } + if tc.inMemory { + require.Equal(t, memDecodingCnt+1, compressedTrxPayloadsInMem.Get()) + require.Equal(t, tc.want, eventStrs) + } else { + require.Equal(t, streamDecodingCnt+1, compressedTrxPayloadsUsingStream.Get()) + require.Len(t, eventStrs, len(tc.want)) + totalSize := 0 + for i, want := range tc.want { + eventStr := eventStrs[i] + totalSize += len(eventStr) + require.True(t, strings.HasPrefix(eventStr, want)) } - case ev.IsXID(): - eventStrs = append(eventStrs, "COMMIT") + require.Greater(t, totalSize, zstdInMemoryDecompressorMaxSize) } } - require.Equal(t, want, eventStrs) } func TestMysql56ParsePosition(t *testing.T) { diff --git a/go/mysql/large_compressed_trx_payload.bin b/go/mysql/large_compressed_trx_payload.bin new file mode 100644 index 0000000000000000000000000000000000000000..8d5d10a0d5090491e0ef1e211422931bec89c23b GIT binary patch literal 16090 zcmeI(&nts*90%~v^E~@$Vh7sHWm)u;pAjQkieiOQ+i-c3gB+%w+M{TZSfa#9;-D=K zLdm40WI2cfIVdGj3QY=&gL<~dp8vpg_5Pkd-|y-B>HWIC8DVaaKffRMKe&jj3zR-A zL!2@7vD%%b-WX2acM*S3nVjrZ-$Gg{$|^1s-8WWyQb`4sz!K#jnfOqh*Z(ctFLy=C zuS@H6{AkSFZrr;Rohz*5+G@J(KAP4$oblkSJv7zow(2K#hg-%fbiM*#Ro}H>F}4LQ z4QoTD$&JoqK0YsAB!n+^r@Es*8XmD(Z7;8zmUSt|^JEi`h1|KT8QGav_^vsT&lbff zx1C*6V!AUD|NHo?cf7?|=F=M<(EAY6CIdAGjDLwg3PC literal 0 HcmV?d00001 diff --git a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go index bf41111bbc8..3413c53d811 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go +++ b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go @@ -642,15 +642,23 @@ func (vs *vstreamer) parseEvent(ev mysql.BinlogEvent) ([]*binlogdatapb.VEvent, e return nil, fmt.Errorf("compressed transaction payload events are not supported with database flavor %s", vs.vse.env.Config().DB.Flavor) } - tpevents, err := ev.TransactionPayload(vs.format) + tp, err := ev.TransactionPayload(vs.format) if err != nil { return nil, err } + defer tp.Close() // Events inside the payload don't have their own checksum. ogca := vs.format.ChecksumAlgorithm defer func() { vs.format.ChecksumAlgorithm = ogca }() vs.format.ChecksumAlgorithm = mysql.BinlogChecksumAlgOff - for _, tpevent := range tpevents { + for { + tpevent, err := tp.GetNextEvent() + if err != nil { + if err == io.EOF { + break + } + return nil, err + } tpvevents, err := vs.parseEvent(tpevent) if err != nil { return nil, vterrors.Wrap(err, "failed to parse transaction payload's internal event") From c08381a5bb9db47c2cc4dcd1e6def0f472a500a5 Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Wed, 10 Jul 2024 20:07:16 -0400 Subject: [PATCH 30/55] Fix echo command in build docker images workflow (#16350) Signed-off-by: Florent Poinsard --- .github/workflows/build_docker_images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_docker_images.yml b/.github/workflows/build_docker_images.yml index 0daada540b8..da1e7c63887 100644 --- a/.github/workflows/build_docker_images.yml +++ b/.github/workflows/build_docker_images.yml @@ -29,7 +29,7 @@ jobs: if [[ "${{github.event.pull_request}}" == "" ]]; then push='true' fi - echo Push='${push}' + echo Push ${push} echo "push=${push}" >> $GITHUB_OUTPUT build_and_push_vttestserver: From b8497b0943bc3f02d514da458e814a0ddf23e417 Mon Sep 17 00:00:00 2001 From: Rohit Nayak <57520317+rohit-nayak-ps@users.noreply.github.com> Date: Thu, 11 Jul 2024 07:41:09 +0200 Subject: [PATCH 31/55] VTAdmin: Show throttled status in workflows (#16308) Signed-off-by: Rohit Nayak --- .../src/components/pips/Pip.module.scss | 4 ++ web/vtadmin/src/components/pips/Pip.tsx | 2 +- .../src/components/pips/StreamStatePip.tsx | 1 + .../src/components/routes/Workflows.tsx | 46 +++++++++++++++++-- .../routes/workflow/Workflow.module.scss | 8 ++++ .../components/routes/workflow/Workflow.tsx | 25 ++++++---- .../routes/workflow/WorkflowStreams.tsx | 23 +++++++--- 7 files changed, 89 insertions(+), 20 deletions(-) diff --git a/web/vtadmin/src/components/pips/Pip.module.scss b/web/vtadmin/src/components/pips/Pip.module.scss index ece8042179f..341ed6ad314 100644 --- a/web/vtadmin/src/components/pips/Pip.module.scss +++ b/web/vtadmin/src/components/pips/Pip.module.scss @@ -35,4 +35,8 @@ &.danger { background: var(--colorError50); } + + &.throttled { + background: var(--grey900); + } } diff --git a/web/vtadmin/src/components/pips/Pip.tsx b/web/vtadmin/src/components/pips/Pip.tsx index 197249967aa..13d0e71fb3f 100644 --- a/web/vtadmin/src/components/pips/Pip.tsx +++ b/web/vtadmin/src/components/pips/Pip.tsx @@ -22,7 +22,7 @@ interface Props { state?: PipState; } -export type PipState = 'primary' | 'success' | 'warning' | 'danger' | null | undefined; +export type PipState = 'primary' | 'success' | 'warning' | 'danger' | 'throttled' | null | undefined; export const Pip = ({ className, state }: Props) => { return
; diff --git a/web/vtadmin/src/components/pips/StreamStatePip.tsx b/web/vtadmin/src/components/pips/StreamStatePip.tsx index e68d358b654..be0a7f9157b 100644 --- a/web/vtadmin/src/components/pips/StreamStatePip.tsx +++ b/web/vtadmin/src/components/pips/StreamStatePip.tsx @@ -25,6 +25,7 @@ const STREAM_STATES: { [key: string]: PipState } = { Error: 'danger', Running: 'success', Stopped: null, + Throttled: 'throttled', }; export const StreamStatePip = ({ state }: Props) => { diff --git a/web/vtadmin/src/components/routes/Workflows.tsx b/web/vtadmin/src/components/routes/Workflows.tsx index b9a85a8e3e4..32ddfcfb825 100644 --- a/web/vtadmin/src/components/routes/Workflows.tsx +++ b/web/vtadmin/src/components/routes/Workflows.tsx @@ -36,6 +36,8 @@ import { KeyspaceLink } from '../links/KeyspaceLink'; import { QueryLoadingPlaceholder } from '../placeholders/QueryLoadingPlaceholder'; import { UseQueryResult } from 'react-query'; +export const ThrottleThresholdSeconds = 60; + export const Workflows = () => { useDocumentTitle('Workflows'); const workflowsQuery = useWorkflows(); @@ -67,7 +69,6 @@ export const Workflows = () => { row.clusterID && row.keyspace && row.name ? `/workflow/${row.clusterID}/${row.keyspace}/${row.name}` : null; - return ( @@ -112,13 +113,52 @@ export const Workflows = () => { {/* TODO(doeg): add a protobuf enum for this (https://github.com/vitessio/vitess/projects/12#card-60190340) */} {['Error', 'Copying', 'Running', 'Stopped'].map((streamState) => { if (streamState in row.streams) { + var numThrottled = 0; + var throttledApp: string | undefined = ''; const streamCount = row.streams[streamState].length; + var streamDescription: string; + switch (streamState) { + case 'Error': + streamDescription = 'failed'; + break; + case 'Running': + case 'Copying': + const streams = row.streams[streamState]; + if (streams !== undefined && streams !== null) { + for (const stream of streams) { + if ( + stream?.throttler_status?.time_throttled !== null && + stream?.throttler_status?.time_throttled !== undefined && + // If the stream has been throttled recently, treat it as throttled. + Number(stream?.throttler_status?.time_throttled?.seconds) > + Date.now() / 1000 - ThrottleThresholdSeconds + ) { + numThrottled++; + // In case of multiple streams, show the first throttled app and time. + // The detail page will show each stream separately. + if (numThrottled === 1) { + throttledApp = + stream?.throttler_status?.component_throttled?.toString(); + } + } + } + } + streamDescription = streamState.toLocaleLowerCase(); + if (numThrottled > 0) { + streamState = 'Throttled'; + } + break; + default: + streamDescription = streamState.toLocaleLowerCase(); + } const tooltip = [ streamCount, - streamState === 'Error' ? 'failed' : streamState.toLocaleLowerCase(), + streamDescription, streamCount === 1 ? 'stream' : 'streams', + numThrottled > 0 + ? '(' + numThrottled + ' throttled in ' + throttledApp + ')' + : '', ].join(' '); - return ( diff --git a/web/vtadmin/src/components/routes/workflow/Workflow.module.scss b/web/vtadmin/src/components/routes/workflow/Workflow.module.scss index 65691d00e4c..0aa70d66828 100644 --- a/web/vtadmin/src/components/routes/workflow/Workflow.module.scss +++ b/web/vtadmin/src/components/routes/workflow/Workflow.module.scss @@ -32,3 +32,11 @@ content: none; } } + +.headingMetaContainer div { + width: '100%'; + display: 'flex'; + justify-content: 'space-between'; + padding-top: '0px'; + padding-bottom: '0px'; +} diff --git a/web/vtadmin/src/components/routes/workflow/Workflow.tsx b/web/vtadmin/src/components/routes/workflow/Workflow.tsx index 5abbcb25e83..a81901786d8 100644 --- a/web/vtadmin/src/components/routes/workflow/Workflow.tsx +++ b/web/vtadmin/src/components/routes/workflow/Workflow.tsx @@ -53,16 +53,21 @@ export const Workflow = () => { {name} -
- - Cluster: {clusterID} - - - Target keyspace:{' '} - - {keyspace} - - + diff --git a/web/vtadmin/src/components/routes/workflow/WorkflowStreams.tsx b/web/vtadmin/src/components/routes/workflow/WorkflowStreams.tsx index 6c9bcae2dfa..2d86e1141a6 100644 --- a/web/vtadmin/src/components/routes/workflow/WorkflowStreams.tsx +++ b/web/vtadmin/src/components/routes/workflow/WorkflowStreams.tsx @@ -14,14 +14,14 @@ * limitations under the License. */ -import { orderBy, groupBy } from 'lodash-es'; +import { groupBy, orderBy } from 'lodash-es'; import React, { useMemo } from 'react'; import { Link } from 'react-router-dom'; import { useWorkflow } from '../../../hooks/api'; import { formatAlias } from '../../../util/tablets'; -import { formatDateTime } from '../../../util/time'; -import { getStreams, formatStreamKey, getStreamSource, getStreamTarget } from '../../../util/workflows'; +import { formatDateTime, formatRelativeTime } from '../../../util/time'; +import { formatStreamKey, getStreams, getStreamSource, getStreamTarget } from '../../../util/workflows'; import { DataCell } from '../../dataTable/DataCell'; import { DataTable } from '../../dataTable/DataTable'; import { TabletLink } from '../../links/TabletLink'; @@ -29,6 +29,7 @@ import { StreamStatePip } from '../../pips/StreamStatePip'; import { WorkflowStreamsLagChart } from '../../charts/WorkflowStreamsLagChart'; import { ShardLink } from '../../links/ShardLink'; import { env } from '../../../util/env'; +import { ThrottleThresholdSeconds } from '../Workflows'; interface Props { clusterID: string; @@ -61,17 +62,25 @@ export const WorkflowStreams = ({ clusterID, keyspace, name }: Props) => { const source = getStreamSource(row); const target = getStreamTarget(row, keyspace); - + var isThrottled = + Number(row?.throttler_status?.time_throttled?.seconds) > Date.now() / 1000 - ThrottleThresholdSeconds; + const rowState = isThrottled ? 'Throttled' : row.state; return ( - {' '} + {' '} {row.key}
Updated {formatDateTime(row.time_updated?.seconds)}
+ {isThrottled ? ( +
+ Throttled: + in {row.throttler_status?.component_throttled} +
+ ) : null}
{source ? ( @@ -114,7 +123,9 @@ export const WorkflowStreams = ({ clusterID, keyspace, name }: Props) => { )} -

Streams

+

+ Streams +

{/* TODO(doeg): add a protobuf enum for this (https://github.com/vitessio/vitess/projects/12#card-60190340) */} {['Error', 'Copying', 'Running', 'Stopped'].map((streamState) => { if (!Array.isArray(streamsByState[streamState])) { From cd0c2b594b2d5178a9c8ac081eaee7d1b7eef28a Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 11 Jul 2024 08:47:41 +0300 Subject: [PATCH 32/55] Tablet throttler: multi-metric support (#15988) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- .../upgrade_downgrade_test_onlineddl_flow.yml | 3 + changelog/21.0/21.0.0/summary.md | 22 +- go/cmd/vtctldclient/command/onlineddl.go | 3 +- go/cmd/vtctldclient/command/throttler.go | 113 +- go/flags/endtoend/vtctldclient.txt | 2 + .../endtoend/cluster/vtctldclient_process.go | 4 +- .../onlineddl/flow/onlineddl_flow_test.go | 30 +- .../onlineddl/revert/onlineddl_revert_test.go | 21 +- .../scheduler/onlineddl_scheduler_test.go | 41 +- .../onlineddl/vrepl/onlineddl_vrepl_test.go | 6 +- .../onlineddl_vrepl_mini_stress_test.go | 2 +- .../onlineddl_vrepl_stress_suite_test.go | 2 +- .../vrepl_suite/onlineddl_vrepl_suite_test.go | 2 +- go/test/endtoend/onlineddl/vtgate_util.go | 8 +- .../vrepl/schemadiff_vrepl_suite_test.go | 3 +- .../throttler_topo/throttler_test.go | 357 +- go/test/endtoend/throttler/util.go | 212 +- go/test/endtoend/vreplication/cluster_test.go | 18 +- .../resharding_workflows_v2_test.go | 7 +- go/test/utils/noleak.go | 1 + go/timer/suspendable_ticker.go | 29 +- go/vt/proto/vtctldata/vtctldata.pb.go | 4921 ++-- go/vt/proto/vtctldata/vtctldata_vtproto.pb.go | 2826 +-- go/vt/schemamanager/tablet_executor.go | 12 +- go/vt/vtcombo/tablet_map.go | 4 + go/vt/vtctl/grpcvtctldserver/server.go | 119 +- go/vt/vtctl/vtctl.go | 2 +- go/vt/vtgate/vcursor_impl.go | 11 +- go/vt/vttablet/faketmclient/fake_client.go | 4 + go/vt/vttablet/grpctmclient/client.go | 18 + go/vt/vttablet/grpctmclient/client_test.go | 12 +- go/vt/vttablet/grpctmserver/server.go | 7 + go/vt/vttablet/tabletmanager/rpc_agent.go | 1 + go/vt/vttablet/tabletmanager/rpc_throttler.go | 96 +- .../tabletmanager/vdiff/framework_test.go | 4 + .../tabletmanager/vreplication/engine.go | 3 +- go/vt/vttablet/tabletserver/controller.go | 1 + go/vt/vttablet/tabletserver/gc/tablegc.go | 3 +- go/vt/vttablet/tabletserver/tabletserver.go | 27 +- .../tabletserver/throttle/base/recent_app.go | 12 +- .../throttle/base/throttle_metric.go | 201 +- .../throttle/base/throttle_metric_test.go | 232 + go/vt/vttablet/tabletserver/throttle/check.go | 161 +- .../tabletserver/throttle/check_result.go | 26 +- .../vttablet/tabletserver/throttle/client.go | 67 +- .../tabletserver/throttle/config/config.go | 12 +- .../throttle/config/mysql_config.go | 24 +- .../throttle/config/store_config.go | 53 - go/vt/vttablet/tabletserver/throttle/mysql.go | 11 +- .../throttle/mysql/mysql_inventory.go | 30 +- .../throttle/mysql/mysql_inventory_test.go | 49 + .../throttle/mysql/mysql_throttle_metric.go | 77 +- .../tabletserver/throttle/mysql/probe.go | 2 - .../tabletserver/throttle/mysql_test.go | 157 +- .../tabletserver/throttle/throttler.go | 814 +- .../tabletserver/throttle/throttler_test.go | 1631 +- .../tabletserver/throttle/throttlerapp/app.go | 16 +- .../throttle/throttlerapp/app_test.go | 18 + .../vttablet/tabletserver/vstreamer/engine.go | 3 +- go/vt/vttablet/tabletservermock/controller.go | 5 + go/vt/vttablet/tmclient/rpc_client_api.go | 1 + go/vt/vttablet/tmrpctest/test_tm_rpc.go | 9 + proto/vtctldata.proto | 92 +- web/vtadmin/src/proto/vtadmin.d.ts | 662 +- web/vtadmin/src/proto/vtadmin.js | 19361 +++++++--------- 65 files changed, 14944 insertions(+), 17739 deletions(-) create mode 100644 go/vt/vttablet/tabletserver/throttle/base/throttle_metric_test.go delete mode 100644 go/vt/vttablet/tabletserver/throttle/config/store_config.go create mode 100644 go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go diff --git a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml index a5361817739..c280365b6d3 100644 --- a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml +++ b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml @@ -140,6 +140,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | + echo "building last release: $(git rev-parse HEAD)" source build.env make build mkdir -p /tmp/vitess-build-last/ @@ -162,6 +163,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | + echo "building next release: $(git rev-parse HEAD)" source build.env NOVTADMINBUILD=1 make build mkdir -p /tmp/vitess-build-next/ @@ -182,6 +184,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | + echo "building this SHA: $(git rev-parse HEAD)" source build.env make build mkdir -p /tmp/vitess-build-current/ diff --git a/changelog/21.0/21.0.0/summary.md b/changelog/21.0/21.0.0/summary.md index 97c995898f9..b1ae99eb3cf 100644 --- a/changelog/21.0/21.0.0/summary.md +++ b/changelog/21.0/21.0.0/summary.md @@ -9,6 +9,7 @@ - [VTTablet Flags](#vttablet-flags) - **[Traffic Mirroring](#traffic-mirroring)** - **[New VTGate Shutdown Behavior](#new-vtgate-shutdown-behavior)** + - **[Tablet Throttler: Multi-Metric support](#tablet-throttler)** ## Major Changes @@ -60,4 +61,23 @@ without getting a `Server shutdown in progress` error. This new behavior can be enabled by specifying the new `--mysql-server-drain-onterm` flag to VTGate. -See more information about this change by [reading its RFC](https://github.com/vitessio/vitess/issues/15971). \ No newline at end of file +See more information about this change by [reading its RFC](https://github.com/vitessio/vitess/issues/15971). + +### Tablet Throttler: Multi-Metric support + +Up till `v20`, the tablet throttler would only monitor and use a single metric. That would be replication lag, by default, or could be the result of a custom query. `v21` introduces a major redesign where the throttler monitors and uses multiple metrics at the same time, including the above two. + +Backwards compatible with `v20`, the default behavior in `v21` is to monitor all metrics, but only use `lag` (if the cutsom query is undefined) or the `cutsom` metric (if the custom query is defined). A `v20` `PRIMARY` is compatible with a `v21` `REPLICA`, and a `v21` `PRIMARY` is compatible with a `v20` `REPLICA`. + +However, with `v21` it is possible to assign any combination of metrics (one or more) for a given app. The throttler would then accept or reject the app's requests based on the health of _all_ assigned metrics. `v21` comes with a preset list metrics, expected to be expanded: + +- `lag`: replication lag based on heartbeat injection. +- `threads_running`: concurrent active threads on the MySQL server. +- `loadavg`: per core load average measured on the tablet instance/pod. +- `custom`: the result of a custom query executed on the MySQL server. + +Each metric has a factory threshold which can be overridden by the `UpdateThrottlerConfig` command. + +The throttler also supports the catch-all `"all"` app name, and it is thus possible to assign metrics to _all_ apps. Explicit app to metric assignments will override the catch-all configuration. + +Metrics are assigned a default _scope_, which could be `self` (isolated to the tablet) or `shard` (max, aka _worst_ value among shard tablets). It is further possible to require a different scope for each metric. diff --git a/go/cmd/vtctldclient/command/onlineddl.go b/go/cmd/vtctldclient/command/onlineddl.go index 6193de9b2af..0ee64317bd6 100644 --- a/go/cmd/vtctldclient/command/onlineddl.go +++ b/go/cmd/vtctldclient/command/onlineddl.go @@ -33,6 +33,7 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" + "vitess.io/vitess/go/vt/proto/vttime" ) const ( @@ -307,7 +308,7 @@ func throttleCommandHelper(cmd *cobra.Command, throttleType bool) error { rule.ExpiresAt = protoutil.TimeToProto(time.Now().Add(throttle.DefaultAppThrottleDuration)) } else { rule.Ratio = 0 - rule.ExpiresAt = protoutil.TimeToProto(time.Now()) + rule.ExpiresAt = &vttime.Time{} // zero } if strings.ToLower(uuid) == AllMigrationsIndicator { diff --git a/go/cmd/vtctldclient/command/throttler.go b/go/cmd/vtctldclient/command/throttler.go index 9783f76720d..7a4f6c92653 100644 --- a/go/cmd/vtctldclient/command/throttler.go +++ b/go/cmd/vtctldclient/command/throttler.go @@ -27,7 +27,11 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" + "vitess.io/vitess/go/vt/proto/vttime" + "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" ) var ( @@ -37,8 +41,26 @@ var ( Short: "Update the tablet throttler configuration for all tablets in the given keyspace (across all cells)", DisableFlagsInUseLine: true, Args: cobra.ExactArgs(1), + PreRunE: validateUpdateThrottlerConfig, RunE: commandUpdateThrottlerConfig, } + CheckThrottler = &cobra.Command{ + Use: "CheckThrottler [--app-name ] ", + Short: "Issue a throttler check on the given tablet.", + Example: "CheckThrottler --app-name online-ddl zone1-0000000101", + DisableFlagsInUseLine: true, + Args: cobra.ExactArgs(1), + RunE: commandCheckThrottler, + } + + GetThrottlerStatus = &cobra.Command{ + Use: "GetThrottlerStatus ", + Short: "Get the throttler status for the given tablet.", + Example: "GetThrottlerStatus zone1-0000000101", + DisableFlagsInUseLine: true, + Args: cobra.ExactArgs(1), + RunE: commandGetThrottlerStatus, + } ) var ( @@ -46,16 +68,26 @@ var ( throttledAppRule topodatapb.ThrottledAppRule unthrottledAppRule topodatapb.ThrottledAppRule throttledAppDuration time.Duration + + checkThrottlerOptions vtctldatapb.CheckThrottlerRequest + requestHeartbeats bool ) +func validateUpdateThrottlerConfig(cmd *cobra.Command, args []string) error { + if updateThrottlerConfigOptions.MetricName != "" && !cmd.Flags().Changed("threshold") { + return fmt.Errorf("--metric-name flag requires --threshold flag. Set threshold to 0 to disable the metric threshold configuration") + } + if cmd.Flags().Changed("app-name") && updateThrottlerConfigOptions.AppName == "" { + return fmt.Errorf("--app-name must not be empty") + } + + return nil +} + func commandUpdateThrottlerConfig(cmd *cobra.Command, args []string) error { keyspace := cmd.Flags().Arg(0) cli.FinishedParsing(cmd) - if throttledAppRule.Name != "" && unthrottledAppRule.Name != "" { - return fmt.Errorf("throttle-app and unthrottle-app are mutually exclusive") - } - updateThrottlerConfigOptions.CustomQuerySet = cmd.Flags().Changed("custom-query") updateThrottlerConfigOptions.Keyspace = keyspace @@ -63,7 +95,7 @@ func commandUpdateThrottlerConfig(cmd *cobra.Command, args []string) error { throttledAppRule.ExpiresAt = protoutil.TimeToProto(time.Now().Add(throttledAppDuration)) updateThrottlerConfigOptions.ThrottledApp = &throttledAppRule } else if unthrottledAppRule.Name != "" { - unthrottledAppRule.ExpiresAt = protoutil.TimeToProto(time.Now()) + unthrottledAppRule.ExpiresAt = &vttime.Time{} // zero updateThrottlerConfigOptions.ThrottledApp = &unthrottledAppRule } @@ -74,9 +106,67 @@ func commandUpdateThrottlerConfig(cmd *cobra.Command, args []string) error { return nil } +func commandCheckThrottler(cmd *cobra.Command, args []string) error { + alias, err := topoproto.ParseTabletAlias(cmd.Flags().Arg(0)) + if err != nil { + return err + } + + cli.FinishedParsing(cmd) + if _, err := base.ScopeFromString(checkThrottlerOptions.Scope); err != nil { + return err + } + resp, err := client.CheckThrottler(commandCtx, &vtctldatapb.CheckThrottlerRequest{ + TabletAlias: alias, + AppName: checkThrottlerOptions.AppName, + Scope: checkThrottlerOptions.Scope, + SkipRequestHeartbeats: !requestHeartbeats, + OkIfNotExists: checkThrottlerOptions.OkIfNotExists, + }) + if err != nil { + return err + } + + data, err := cli.MarshalJSON(resp) + if err != nil { + return err + } + + fmt.Printf("%s\n", data) + + return nil +} + +func commandGetThrottlerStatus(cmd *cobra.Command, args []string) error { + alias, err := topoproto.ParseTabletAlias(cmd.Flags().Arg(0)) + if err != nil { + return err + } + + cli.FinishedParsing(cmd) + + resp, err := client.GetThrottlerStatus(commandCtx, &vtctldatapb.GetThrottlerStatusRequest{ + TabletAlias: alias, + }) + if err != nil { + return err + } + + data, err := cli.MarshalJSON(resp) + if err != nil { + return err + } + + fmt.Printf("%s\n", data) + + return nil +} + func init() { + // UpdateThrottlerConfig UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.Enable, "enable", false, "Enable the throttler") UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.Disable, "disable", false, "Disable the throttler") + UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.MetricName, "metric-name", "", "name of the metric for which we apply a new threshold (requires --threshold). If empty, the default (either 'lag' or 'custom') metric is used.") UpdateThrottlerConfig.Flags().Float64Var(&updateThrottlerConfigOptions.Threshold, "threshold", 0, "threshold for the either default check (replication lag seconds) or custom check") UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.CustomQuery, "custom-query", "", "custom throttler check query") UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.CheckAsCheckSelf, "check-as-check-self", false, "/throttler/check requests behave as is /throttler/check-self was called") @@ -87,6 +177,19 @@ func init() { UpdateThrottlerConfig.Flags().Float64Var(&throttledAppRule.Ratio, "throttle-app-ratio", throttle.DefaultThrottleRatio, "ratio to throttle app (app specififed in --throttled-app)") UpdateThrottlerConfig.Flags().DurationVar(&throttledAppDuration, "throttle-app-duration", throttle.DefaultAppThrottleDuration, "duration after which throttled app rule expires (app specififed in --throttled-app)") UpdateThrottlerConfig.Flags().BoolVar(&throttledAppRule.Exempt, "throttle-app-exempt", throttledAppRule.Exempt, "exempt this app from being at all throttled. WARNING: use with extreme care, as this is likely to push metrics beyond the throttler's threshold, and starve other apps") + UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.AppName, "app-name", "", "app name for which to assign metrics (requires --app-metrics)") + UpdateThrottlerConfig.Flags().StringSliceVar(&updateThrottlerConfigOptions.AppCheckedMetrics, "app-metrics", nil, "metrics to be used when checking the throttler for the app (requires --app-name). Empty to restore to default metrics") + UpdateThrottlerConfig.MarkFlagsMutuallyExclusive("unthrottle-app", "throttle-app") + UpdateThrottlerConfig.MarkFlagsRequiredTogether("app-name", "app-metrics") Root.AddCommand(UpdateThrottlerConfig) + // Check Throttler + CheckThrottler.Flags().StringVar(&checkThrottlerOptions.AppName, "app-name", throttlerapp.VitessName.String(), "app name to check") + CheckThrottler.Flags().StringVar(&checkThrottlerOptions.Scope, "scope", base.UndefinedScope.String(), "check scope ('shard', 'self' or leave empty for per-metric defaults)") + CheckThrottler.Flags().BoolVar(&requestHeartbeats, "request-heartbeats", false, "request heartbeat lease") + CheckThrottler.Flags().BoolVar(&checkThrottlerOptions.OkIfNotExists, "ok-if-not-exists", false, "return OK even if metric does not exist") + Root.AddCommand(CheckThrottler) + + // GetThrottlerStatus + Root.AddCommand(GetThrottlerStatus) } diff --git a/go/flags/endtoend/vtctldclient.txt b/go/flags/endtoend/vtctldclient.txt index 45dcae2704a..01db05f602d 100644 --- a/go/flags/endtoend/vtctldclient.txt +++ b/go/flags/endtoend/vtctldclient.txt @@ -19,6 +19,7 @@ Available Commands: Backup Uses the BackupStorage service on the given tablet to create and store a new backup. BackupShard Finds the most up-to-date REPLICA, RDONLY, or SPARE tablet in the given shard and uses the BackupStorage service on that tablet to create and store a new backup. ChangeTabletType Changes the db type for the specified tablet, if possible. + CheckThrottler Issue a throttler check on the given tablet. CreateKeyspace Creates the specified keyspace in the topology. CreateShard Creates the specified shard in the topology. DeleteCellInfo Deletes the CellInfo for the provided cell. @@ -56,6 +57,7 @@ Available Commands: GetTablet Outputs a JSON structure that contains information about the tablet. GetTabletVersion Print the version of a tablet from its debug vars. GetTablets Looks up tablets according to filter criteria. + GetThrottlerStatus Get the throttler status for the given tablet. GetTopologyPath Gets the value associated with the particular path (key) in the topology server. GetVSchema Prints a JSON representation of a keyspace's topo record. GetWorkflows Gets all vreplication workflows (Reshard, MoveTables, etc) in the given keyspace. diff --git a/go/test/endtoend/cluster/vtctldclient_process.go b/go/test/endtoend/cluster/vtctldclient_process.go index 5373f351f86..55f04e021c9 100644 --- a/go/test/endtoend/cluster/vtctldclient_process.go +++ b/go/test/endtoend/cluster/vtctldclient_process.go @@ -66,13 +66,13 @@ func (vtctldclient *VtctldClientProcess) ExecuteCommandWithOutput(args ...string pArgs = append(pArgs, "--test.coverprofile="+getCoveragePath("vtctldclient-"+args[0]+".out"), "--test.v") } pArgs = append(pArgs, args...) - for i := 1; i <= retries; i++ { + for i := range retries { tmpProcess := exec.Command( vtctldclient.Binary, filterDoubleDashArgs(pArgs, vtctldclient.VtctldClientMajorVersion)..., ) msg := binlogplayer.LimitString(strings.Join(tmpProcess.Args, " "), 256) // limit log line length - log.Infof("Executing vtctldclient with command: %v (attempt %d of %d)", msg, i, retries) + log.Infof("Executing vtctldclient with command: %v (attempt %d of %d)", msg, i+1, retries) resultByte, err = tmpProcess.CombinedOutput() resultStr = string(resultByte) if err == nil || !shouldRetry(resultStr) { diff --git a/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go b/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go index eee244ea6ed..58e985296b5 100644 --- a/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go +++ b/go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go @@ -222,7 +222,7 @@ func TestSchemaChange(t *testing.T) { shards = clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) t.Run("flow", func(t *testing.T) { t.Run("create schema", func(t *testing.T) { @@ -283,24 +283,18 @@ func TestSchemaChange(t *testing.T) { onlineddl.CheckMigrationStatus(t, &vtParams, shards, uuid, schema.OnlineDDLStatusRunning) }) t.Run("throttle online-ddl", func(t *testing.T) { + onlineddl.CheckThrottledApps(t, &vtParams, throttlerapp.OnlineDDLName, false) onlineddl.ThrottleAllMigrations(t, &vtParams) onlineddl.CheckThrottledApps(t, &vtParams, throttlerapp.OnlineDDLName, true) - - for _, tab := range tablets { - body, err := throttleApp(tab.VttabletProcess, throttlerapp.OnlineDDLName) - assert.NoError(t, err) - assert.Contains(t, body, throttlerapp.OnlineDDLName) - } waitForThrottleCheckStatus(t, throttlerapp.OnlineDDLName, primaryTablet, http.StatusExpectationFailed) }) t.Run("unthrottle online-ddl", func(t *testing.T) { onlineddl.UnthrottleAllMigrations(t, &vtParams) - onlineddl.CheckThrottledApps(t, &vtParams, throttlerapp.OnlineDDLName, false) - - for _, tab := range tablets { - body, err := unthrottleApp(tab.VttabletProcess, throttlerapp.OnlineDDLName) + if !onlineddl.CheckThrottledApps(t, &vtParams, throttlerapp.OnlineDDLName, false) { + status, err := throttler.GetThrottlerStatus(&clusterInstance.VtctldClientProcess, primaryTablet) assert.NoError(t, err) - assert.Contains(t, body, throttlerapp.OnlineDDLName) + + t.Logf("Throttler status: %+v", status) } waitForThrottleCheckStatus(t, throttlerapp.OnlineDDLName, primaryTablet, http.StatusOK) }) @@ -341,7 +335,7 @@ func TestSchemaChange(t *testing.T) { t.Run("optimistic wait for migration completion", func(t *testing.T) { status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusComplete) isComplete = (status == schema.OnlineDDLStatusComplete) - fmt.Printf("# Migration status (for debug purposes): <%s>\n", status) + t.Logf("# Migration status (for debug purposes): <%s>", status) }) if !isComplete { t.Run("force complete cut-over", func(t *testing.T) { @@ -350,7 +344,7 @@ func TestSchemaChange(t *testing.T) { t.Run("another optimistic wait for migration completion", func(t *testing.T) { status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusComplete) isComplete = (status == schema.OnlineDDLStatusComplete) - fmt.Printf("# Migration status (for debug purposes): <%s>\n", status) + t.Logf("# Migration status (for debug purposes): <%s>", status) }) } if !isComplete { @@ -364,7 +358,7 @@ func TestSchemaChange(t *testing.T) { } t.Run("wait for migration completion", func(t *testing.T) { status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusComplete) - fmt.Printf("# Migration status (for debug purposes): <%s>\n", status) + t.Logf("# Migration status (for debug purposes): <%s>", status) onlineddl.CheckMigrationStatus(t, &vtParams, shards, uuid, schema.OnlineDDLStatusComplete) }) t.Run("validate table schema", func(t *testing.T) { @@ -394,15 +388,15 @@ func testOnlineDDLStatement(t *testing.T, alterStatement string, ddlStrategy str uuid = row.AsString("uuid", "") uuid = strings.TrimSpace(uuid) require.NotEmpty(t, uuid) - fmt.Println("# Generated UUID (for debug purposes):") - fmt.Printf("<%s>\n", uuid) + t.Logf("# Generated UUID (for debug purposes):") + t.Logf("<%s>", uuid) strategySetting, err := schema.ParseDDLStrategy(ddlStrategy) assert.NoError(t, err) if !strategySetting.Strategy.IsDirect() && !skipWait && uuid != "" { status := onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, migrationWaitTimeout, schema.OnlineDDLStatusComplete, schema.OnlineDDLStatusFailed) - fmt.Printf("# Migration status (for debug purposes): <%s>\n", status) + t.Logf("# Migration status (for debug purposes): <%s>", status) } if expectHint != "" { diff --git a/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go b/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go index 0efed92f440..3a963c85ce2 100644 --- a/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go +++ b/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go @@ -21,6 +21,7 @@ import ( "flag" "fmt" "math/rand/v2" + "net/http" "os" "path" "strings" @@ -33,6 +34,7 @@ import ( "vitess.io/vitess/go/mysql/capabilities" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/schema" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/onlineddl" @@ -85,6 +87,7 @@ deletesAttempts=%d, deletesFailures=%d, deletesNoops=%d, deletes=%d, var ( clusterInstance *cluster.LocalProcessCluster + primaryTablet *cluster.Vttablet shards []cluster.Shard vtParams mysql.ConnParams mysqlVersion string @@ -188,7 +191,7 @@ func TestMain(m *testing.M) { Host: clusterInstance.Hostname, Port: clusterInstance.VtgateMySQLPort, } - + primaryTablet = clusterInstance.Keyspaces[0].Shards[0].PrimaryTablet() return m.Run(), nil }() if err != nil { @@ -205,7 +208,8 @@ func TestSchemaChange(t *testing.T) { shards = clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) + throttler.WaitForCheckThrottlerResult(t, clusterInstance, primaryTablet, throttlerapp.TestingName, nil, http.StatusOK, time.Minute) t.Run("revertible", testRevertible) t.Run("revert", testRevert) @@ -410,7 +414,16 @@ func testRevertible(t *testing.T) { // This is the migration we will test, and see whether it is revertible or not (and why not). toStatement := fmt.Sprintf(createTableWrapper, testcase.toSchema) uuid = testOnlineDDLStatement(t, toStatement, ddlStrategy, "vtgate", tableName, "") - onlineddl.CheckMigrationStatus(t, &vtParams, shards, uuid, schema.OnlineDDLStatusComplete) + if !onlineddl.CheckMigrationStatus(t, &vtParams, shards, uuid, schema.OnlineDDLStatusComplete) { + resp, err := throttler.CheckThrottler(clusterInstance, primaryTablet, throttlerapp.TestingName, nil) + assert.NoError(t, err) + fmt.Println("Throttler check response: ", resp) + + output, err := throttler.GetThrottlerStatusRaw(&clusterInstance.VtctldClientProcess, primaryTablet) + assert.NoError(t, err) + fmt.Println("Throttler status response: ", output) + } + checkTable(t, tableName, true) }) t.Run("check migration", func(t *testing.T) { @@ -557,7 +570,7 @@ func testRevert(t *testing.T) { onlineddl.VtgateExecQuery(t, &vtParams, populatePartitionedTableStatement, "") } - mysqlVersion = onlineddl.GetMySQLVersion(t, clusterInstance.Keyspaces[0].Shards[0].PrimaryTablet()) + mysqlVersion = onlineddl.GetMySQLVersion(t, primaryTablet) require.NotEmpty(t, mysqlVersion) capableOf := mysql.ServerVersionCapableOf(mysqlVersion) diff --git a/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go b/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go index 5b88b1f8678..c059f68b8b7 100644 --- a/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go +++ b/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go @@ -71,6 +71,7 @@ type testRevertMigrationParams struct { var ( clusterInstance *cluster.LocalProcessCluster + primaryTablet *cluster.Vttablet shards []cluster.Shard vtParams mysql.ConnParams @@ -208,20 +209,32 @@ func waitForMessage(t *testing.T, uuid string, messageSubstring string) { ticker := time.NewTicker(time.Second) defer ticker.Stop() + + var lastMessage string for { rs := onlineddl.ReadMigrations(t, &vtParams, uuid) require.NotNil(t, rs) for _, row := range rs.Named().Rows { - message := row.AsString("message", "") - if strings.Contains(message, messageSubstring) { + lastMessage = row.AsString("message", "") + if strings.Contains(lastMessage, messageSubstring) { return } } select { case <-ticker.C: case <-ctx.Done(): + { + resp, err := throttler.CheckThrottler(clusterInstance, primaryTablet, throttlerapp.TestingName, nil) + assert.NoError(t, err) + fmt.Println("Throttler check response: ", resp) + + output, err := throttler.GetThrottlerStatusRaw(&clusterInstance.VtctldClientProcess, primaryTablet) + assert.NoError(t, err) + fmt.Println("Throttler status response: ", output) + } + require.Failf(t, "timeout waiting for message", "expected: %s. Last seen: %s", messageSubstring, lastMessage) + return } - require.NoError(t, ctx.Err()) } } @@ -278,6 +291,7 @@ func TestMain(m *testing.M) { Host: clusterInstance.Hostname, Port: clusterInstance.VtgateMySQLPort, } + primaryTablet = clusterInstance.Keyspaces[0].Shards[0].PrimaryTablet() return m.Run(), nil }() @@ -292,7 +306,7 @@ func TestMain(m *testing.M) { func TestSchemaChange(t *testing.T) { - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) t.Run("scheduler", testScheduler) t.Run("singleton", testSingleton) @@ -334,7 +348,7 @@ func testScheduler(t *testing.T) { } } - mysqlVersion := onlineddl.GetMySQLVersion(t, clusterInstance.Keyspaces[0].Shards[0].PrimaryTablet()) + mysqlVersion := onlineddl.GetMySQLVersion(t, primaryTablet) require.NotEmpty(t, mysqlVersion) capableOf := mysql.ServerVersionCapableOf(mysqlVersion) @@ -563,7 +577,7 @@ func testScheduler(t *testing.T) { require.NoError(t, err) if forceCutoverCapable { t.Run("force_cutover", func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), extendedWaitTime*2) + ctx, cancel := context.WithTimeout(context.Background(), extendedWaitTime*5) defer cancel() t.Run("populate t1_test", func(t *testing.T) { @@ -588,6 +602,20 @@ func testScheduler(t *testing.T) { t.Run("locking table rows", func(t *testing.T) { go runInTransaction(t, ctx, shards[0].Vttablets[0], "select * from t1_test for update", commitTransactionChan, transactionErrorChan) }) + t.Run("injecting heartbeats asynchronously", func(t *testing.T) { + go func() { + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + for { + throttler.CheckThrottler(clusterInstance, primaryTablet, throttlerapp.OnlineDDLName, nil) + select { + case <-ticker.C: + case <-ctx.Done(): + return + } + } + }() + }) t.Run("check no force_cutover", func(t *testing.T) { rs := onlineddl.ReadMigrations(t, &vtParams, t1uuid) require.NotNil(t, rs) @@ -1463,6 +1491,7 @@ DROP TABLE IF EXISTS stress_test checkTable(t, tableName, true) }) t.Run("revert CREATE TABLE", func(t *testing.T) { + require.NotEmpty(t, uuids) // The table existed, so it will now be dropped (renamed) uuid := testRevertMigration(t, createRevertParams(uuids[len(uuids)-1], onlineSingletonDDLStrategy, "vtgate", "", "", false)) uuids = append(uuids, uuid) diff --git a/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go b/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go index f9f203c7cd9..83fe6bea988 100644 --- a/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go +++ b/go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go @@ -38,6 +38,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) var ( @@ -246,7 +247,8 @@ func TestSchemaChange(t *testing.T) { } }) t.Run("updating throttler config", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, true, false, customThreshold, noCustomQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true, Threshold: customThreshold} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) require.NoError(t, err) }) @@ -257,7 +259,7 @@ func TestSchemaChange(t *testing.T) { t.Run(shard.Name, func(t *testing.T) { for _, tablet := range shard.Vttablets { t.Run(tablet.Alias, func(t *testing.T) { - throttler.WaitForThrottlerStatusEnabled(t, tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: customThreshold}, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: customThreshold}, throttlerEnabledTimeout) }) } }) diff --git a/go/test/endtoend/onlineddl/vrepl_stress/onlineddl_vrepl_mini_stress_test.go b/go/test/endtoend/onlineddl/vrepl_stress/onlineddl_vrepl_mini_stress_test.go index 770f7f3ee93..93d66ad7ccb 100644 --- a/go/test/endtoend/onlineddl/vrepl_stress/onlineddl_vrepl_mini_stress_test.go +++ b/go/test/endtoend/onlineddl/vrepl_stress/onlineddl_vrepl_mini_stress_test.go @@ -237,7 +237,7 @@ func TestSchemaChange(t *testing.T) { shards = clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) t.Run("create schema", func(t *testing.T) { assert.Equal(t, 1, len(clusterInstance.Keyspaces[0].Shards)) diff --git a/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go b/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go index a3fa676d40b..8d631e0e935 100644 --- a/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go +++ b/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go @@ -487,7 +487,7 @@ func TestSchemaChange(t *testing.T) { shards = clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) for _, testcase := range testCases { require.NotEmpty(t, testcase.name) diff --git a/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go b/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go index d31f92695f1..57397ec64dd 100644 --- a/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go +++ b/go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go @@ -137,7 +137,7 @@ func TestSchemaChange(t *testing.T) { shards := clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) fkOnlineDDLPossible := false t.Run("check 'rename_table_preserve_foreign_key' variable", func(t *testing.T) { diff --git a/go/test/endtoend/onlineddl/vtgate_util.go b/go/test/endtoend/onlineddl/vtgate_util.go index f2272fcd73e..2cbdbebc2f3 100644 --- a/go/test/endtoend/onlineddl/vtgate_util.go +++ b/go/test/endtoend/onlineddl/vtgate_util.go @@ -341,7 +341,7 @@ func UnthrottleAllMigrations(t *testing.T, vtParams *mysql.ConnParams) { } // CheckThrottledApps checks for existence or non-existence of an app in the throttled apps list -func CheckThrottledApps(t *testing.T, vtParams *mysql.ConnParams, throttlerApp throttlerapp.Name, expectFind bool) { +func CheckThrottledApps(t *testing.T, vtParams *mysql.ConnParams, throttlerApp throttlerapp.Name, expectFind bool) bool { ctx, cancel := context.WithTimeout(context.Background(), ThrottledAppsTimeout) defer cancel() @@ -361,13 +361,13 @@ func CheckThrottledApps(t *testing.T, vtParams *mysql.ConnParams, throttlerApp t } if appFound == expectFind { // we're all good - return + return true } select { case <-ctx.Done(): - assert.Failf(t, "CheckThrottledApps timed out waiting for %v to be in throttled status '%v'", throttlerApp.String(), expectFind) - return + assert.Fail(t, "CheckThrottledApps timed out", "waiting for '%v' to be in throttled status '%v'", throttlerApp.String(), expectFind) + return false case <-ticker.C: } } diff --git a/go/test/endtoend/schemadiff/vrepl/schemadiff_vrepl_suite_test.go b/go/test/endtoend/schemadiff/vrepl/schemadiff_vrepl_suite_test.go index 79cb4a0174e..496956f2838 100644 --- a/go/test/endtoend/schemadiff/vrepl/schemadiff_vrepl_suite_test.go +++ b/go/test/endtoend/schemadiff/vrepl/schemadiff_vrepl_suite_test.go @@ -25,7 +25,6 @@ import ( "regexp" "strings" "testing" - "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -138,7 +137,7 @@ func TestSchemaChange(t *testing.T) { shards := clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) - throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance, time.Second) + throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) files, err := os.ReadDir(testDataPath) require.NoError(t, err) diff --git a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go index c8251846fe6..89649f2ce4c 100644 --- a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go +++ b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go @@ -26,17 +26,20 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/throttler" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) const ( @@ -47,7 +50,7 @@ const ( onDemandHeartbeatDuration = 5 * time.Second throttlerEnabledTimeout = 60 * time.Second useDefaultQuery = "" - testAppName = "test" + testAppName = throttlerapp.TestingName ) var ( @@ -88,8 +91,6 @@ var ( httpClient = base.SetupHTTPClient(time.Second) throttledAppsAPIPath = "throttler/throttled-apps" - checkAPIPath = "throttler/check" - checkSelfAPIPath = "throttler/check-self" statusAPIPath = "throttler/status" getResponseBody = func(resp *http.Response) string { body, _ := io.ReadAll(resp.Body) @@ -173,13 +174,23 @@ func throttledApps(tablet *cluster.Vttablet) (resp *http.Response, respBody stri return resp, respBody, err } -func throttleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) (*http.Response, error) { - resp, err := httpClient.Get(fmt.Sprintf("http://localhost:%d/%s?app=%s&s=%t", tablet.HTTPPort, checkAPIPath, testAppName, skipRequestHeartbeats)) +func throttleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) (*vtctldatapb.CheckThrottlerResponse, error) { + flags := &throttle.CheckFlags{ + Scope: base.ShardScope, + SkipRequestHeartbeats: skipRequestHeartbeats, + MultiMetricsEnabled: true, + } + resp, err := throttler.CheckThrottler(clusterInstance, tablet, testAppName, flags) return resp, err } -func throttleCheckSelf(tablet *cluster.Vttablet) (*http.Response, error) { - return httpClient.Get(fmt.Sprintf("http://localhost:%d/%s?app=%s", tablet.HTTPPort, checkSelfAPIPath, testAppName)) +func throttleCheckSelf(tablet *cluster.Vttablet) (*vtctldatapb.CheckThrottlerResponse, error) { + flags := &throttle.CheckFlags{ + Scope: base.SelfScope, + MultiMetricsEnabled: true, + } + resp, err := throttler.CheckThrottler(clusterInstance, tablet, testAppName, flags) + return resp, err } func throttleStatus(t *testing.T, tablet *cluster.Vttablet) string { @@ -197,39 +208,32 @@ func warmUpHeartbeat(t *testing.T) (respStatus int) { // Let's warm it up. resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - defer resp.Body.Close() time.Sleep(time.Second) - return resp.StatusCode + return int(resp.Check.StatusCode) } // waitForThrottleCheckStatus waits for the tablet to return the provided HTTP code in a throttle check -func waitForThrottleCheckStatus(t *testing.T, tablet *cluster.Vttablet, wantCode int) { +func waitForThrottleCheckStatus(t *testing.T, tablet *cluster.Vttablet, wantCode int) bool { _ = warmUpHeartbeat(t) ctx, cancel := context.WithTimeout(context.Background(), onDemandHeartbeatDuration*4) defer cancel() + ticker := time.NewTicker(time.Second) + defer ticker.Stop() for { resp, err := throttleCheck(tablet, true) require.NoError(t, err) - if wantCode == resp.StatusCode { + if wantCode == int(resp.Check.StatusCode) { // Wait for any cached check values to be cleared and the new // status value to be in effect everywhere before returning. - resp.Body.Close() - return + return true } select { case <-ctx.Done(): - b, err := io.ReadAll(resp.Body) - require.NoError(t, err) - resp.Body.Close() - - assert.Equalf(t, wantCode, resp.StatusCode, "body: %s", string(b)) - return - default: - resp.Body.Close() - time.Sleep(time.Second) + return assert.EqualValues(t, wantCode, resp.Check.StatusCode, "response: %+v", resp) + case <-ticker.C: } } } @@ -259,24 +263,26 @@ func TestInitialThrottler(t *testing.T) { waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) }) t.Run("enabling throttler with very low threshold", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, true, false, unreasonablyLowThreshold.Seconds(), useDefaultQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true, Threshold: unreasonablyLowThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be enabled everywhere with the new config. for _, tablet := range clusterInstance.Keyspaces[0].Shards[0].Vttablets { - throttler.WaitForThrottlerStatusEnabled(t, tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: unreasonablyLowThreshold.Seconds()}, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: unreasonablyLowThreshold.Seconds()}, throttlerEnabledTimeout) } }) t.Run("validating pushback response from throttler", func(t *testing.T) { waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) }) t.Run("disabling throttler", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, false, true, unreasonablyLowThreshold.Seconds(), useDefaultQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Disable: true, Threshold: unreasonablyLowThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be disabled everywhere. for _, tablet := range clusterInstance.Keyspaces[0].Shards[0].Vttablets { - throttler.WaitForThrottlerStatusEnabled(t, tablet, false, nil, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, false, nil, throttlerEnabledTimeout) } }) t.Run("validating OK response from disabled throttler, again", func(t *testing.T) { @@ -285,36 +291,39 @@ func TestInitialThrottler(t *testing.T) { t.Run("enabling throttler, again", func(t *testing.T) { // Enable the throttler again with the default query which also moves us back // to the default threshold. - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, true, false, 0, useDefaultQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be enabled everywhere again with the default config. for _, tablet := range clusterInstance.Keyspaces[0].Shards[0].Vttablets { - throttler.WaitForThrottlerStatusEnabled(t, tablet, true, throttler.DefaultConfig, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, throttler.DefaultConfig, throttlerEnabledTimeout) } }) t.Run("validating pushback response from throttler, again", func(t *testing.T) { waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) }) t.Run("setting high threshold", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, false, false, extremelyHighThreshold.Seconds(), useDefaultQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: extremelyHighThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be enabled everywhere with new config. for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { - throttler.WaitForThrottlerStatusEnabled(t, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: extremelyHighThreshold.Seconds()}, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: extremelyHighThreshold.Seconds()}, throttlerEnabledTimeout) } }) t.Run("validating OK response from throttler with high threshold", func(t *testing.T) { waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) }) t.Run("setting low threshold", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, false, false, throttler.DefaultThreshold.Seconds(), useDefaultQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be enabled everywhere with new config. for _, tablet := range clusterInstance.Keyspaces[0].Shards[0].Vttablets { - throttler.WaitForThrottlerStatusEnabled(t, tablet, true, throttler.DefaultConfig, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, throttler.DefaultConfig, throttlerEnabledTimeout) } }) t.Run("validating pushback response from throttler on low threshold", func(t *testing.T) { @@ -329,8 +338,12 @@ func TestInitialThrottler(t *testing.T) { cluster.ValidateReplicationIsHealthy(t, replicaTablet) resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - defer resp.Body.Close() - if !assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) { + require.NotNil(t, resp) + for _, metrics := range resp.Check.Metrics { + assert.Equal(t, base.ShardScope.String(), metrics.Scope) + } + + if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) assert.NoError(t, err) t.Logf("Seconds_Behind_Source: %s", rs.Named().Row()["Seconds_Behind_Source"].ToString()) @@ -344,8 +357,11 @@ func TestInitialThrottler(t *testing.T) { cluster.ValidateReplicationIsHealthy(t, replicaTablet) resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - defer resp.Body.Close() - if !assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) { + require.NotNil(t, resp) + for _, metrics := range resp.Check.Metrics { + assert.Equal(t, base.ShardScope.String(), metrics.Scope) + } + if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) assert.NoError(t, err) t.Logf("Seconds_Behind_Source: %s", rs.Named().Row()["Seconds_Behind_Source"].ToString()) @@ -373,6 +389,7 @@ func TestThrottleViaApplySchema(t *testing.T) { require.NoError(t, err) require.NotNil(t, keyspace) require.NotNil(t, keyspace.Keyspace.ThrottlerConfig) + require.NotNil(t, keyspace.Keyspace.ThrottlerConfig.ThrottledApps) require.NotEmpty(t, keyspace.Keyspace.ThrottlerConfig.ThrottledApps, "throttler config: %+v", keyspace.Keyspace.ThrottlerConfig) appRule, ok := keyspace.Keyspace.ThrottlerConfig.ThrottledApps[throttlerapp.OnlineDDLName.String()] require.True(t, ok, "throttled apps: %v", keyspace.Keyspace.ThrottlerConfig.ThrottledApps) @@ -394,14 +411,10 @@ func TestThrottleViaApplySchema(t *testing.T) { require.NoError(t, err) require.NotNil(t, keyspace) require.NotNil(t, keyspace.Keyspace.ThrottlerConfig) - require.NotEmpty(t, keyspace.Keyspace.ThrottlerConfig.ThrottledApps, "throttler config: %+v", keyspace.Keyspace.ThrottlerConfig) + require.NotNil(t, keyspace.Keyspace.ThrottlerConfig.ThrottledApps) + // ThrottledApps will actually be empty at this point, but more specifically we want to see that "online-ddl" is not there. appRule, ok := keyspace.Keyspace.ThrottlerConfig.ThrottledApps[throttlerapp.OnlineDDLName.String()] - require.True(t, ok, "throttled apps: %v", keyspace.Keyspace.ThrottlerConfig.ThrottledApps) - require.NotNil(t, appRule) - assert.Equal(t, throttlerapp.OnlineDDLName.String(), appRule.Name) - assert.EqualValues(t, 1.0, appRule.Ratio) - expireAt := time.Unix(appRule.ExpiresAt.Seconds, int64(appRule.ExpiresAt.Nanoseconds)) - assert.True(t, expireAt.Before(time.Now()), "expected rule to have expired, but it has not: %v", expireAt) + assert.True(t, ok, "app rule: %v", appRule) }) } @@ -418,19 +431,17 @@ func TestThrottlerAfterMetricsCollected(t *testing.T) { require.NoError(t, err) defer resp.Body.Close() assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) - assert.Contains(t, body, "always-throttled-app") + assert.Contains(t, body, throttlerapp.TestingAlwaysThrottlerName) }) t.Run("validating primary check self", func(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) t.Run("validating replica check self", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) } @@ -457,15 +468,17 @@ func TestLag(t *testing.T) { t.Run("expecting throttler push back", func(t *testing.T) { resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusTooManyRequests, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) t.Run("primary self-check should still be fine", func(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - defer resp.Body.Close() + require.NotNil(t, resp) + for _, metrics := range resp.Check.Metrics { + assert.Equal(t, base.SelfScope.String(), metrics.Scope) + } // self (on primary) is unaffected by replication lag - if !assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) { + if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) } @@ -473,25 +486,72 @@ func TestLag(t *testing.T) { t.Run("replica self-check should show error", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusTooManyRequests, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + require.NotNil(t, resp) + for _, metrics := range resp.Check.Metrics { + assert.Equal(t, base.SelfScope.String(), metrics.Scope) + } + assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) t.Run("exempting test app", func(t *testing.T) { appRule := &topodatapb.ThrottledAppRule{ - Name: testAppName, + Name: testAppName.String(), ExpiresAt: protoutil.TimeToProto(time.Now().Add(time.Hour)), Exempt: true, } - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, false, false, throttler.DefaultThreshold.Seconds(), useDefaultQuery, appRule) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, appRule, nil) assert.NoError(t, err) waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) }) t.Run("unexempting test app", func(t *testing.T) { appRule := &topodatapb.ThrottledAppRule{ - Name: testAppName, + Name: testAppName.String(), + ExpiresAt: protoutil.TimeToProto(time.Now()), + } + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, appRule, nil) + assert.NoError(t, err) + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) + t.Run("exempting all apps", func(t *testing.T) { + appRule := &topodatapb.ThrottledAppRule{ + Name: throttlerapp.AllName.String(), + ExpiresAt: protoutil.TimeToProto(time.Now().Add(time.Hour)), + Exempt: true, + } + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, appRule, nil) + assert.NoError(t, err) + waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) + }) + t.Run("throttling test app", func(t *testing.T) { + appRule := &topodatapb.ThrottledAppRule{ + Name: testAppName.String(), + Ratio: throttle.DefaultThrottleRatio, + ExpiresAt: protoutil.TimeToProto(time.Now().Add(time.Hour)), + } + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, appRule, nil) + assert.NoError(t, err) + waitForThrottleCheckStatus(t, primaryTablet, http.StatusExpectationFailed) + }) + t.Run("unthrottling test app", func(t *testing.T) { + appRule := &topodatapb.ThrottledAppRule{ + Name: testAppName.String(), ExpiresAt: protoutil.TimeToProto(time.Now()), } - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, false, false, throttler.DefaultThreshold.Seconds(), useDefaultQuery, appRule) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, appRule, nil) + assert.NoError(t, err) + waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) + }) + t.Run("unexempting all apps", func(t *testing.T) { + appRule := &topodatapb.ThrottledAppRule{ + Name: throttlerapp.AllName.String(), + ExpiresAt: protoutil.TimeToProto(time.Now()), + } + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, appRule, nil) assert.NoError(t, err) waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) }) @@ -506,15 +566,13 @@ func TestLag(t *testing.T) { t.Run("primary self-check should be fine", func(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - defer resp.Body.Close() // self (on primary) is unaffected by replication lag - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) t.Run("replica self-check should be fine", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) } @@ -540,7 +598,8 @@ func TestCustomQuery(t *testing.T) { defer cluster.PanicHandler(t) t.Run("enabling throttler with custom query and threshold", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, true, false, customThreshold, customQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true, Threshold: customThreshold, CustomQuery: customQuery} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be enabled everywhere with new custom config. @@ -548,7 +607,7 @@ func TestCustomQuery(t *testing.T) { for _, ks := range clusterInstance.Keyspaces { for _, shard := range ks.Shards { for _, tablet := range shard.Vttablets { - throttler.WaitForThrottlerStatusEnabled(t, tablet, true, expectConfig, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, expectConfig, throttlerEnabledTimeout) } } } @@ -557,8 +616,7 @@ func TestCustomQuery(t *testing.T) { throttler.WaitForValidData(t, primaryTablet, throttlerEnabledTimeout) resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) t.Run("test threads running", func(t *testing.T) { sleepDuration := 20 * time.Second @@ -584,8 +642,7 @@ func TestCustomQuery(t *testing.T) { { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusTooManyRequests, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) } }) t.Run("wait for queries to terminate", func(t *testing.T) { @@ -596,8 +653,7 @@ func TestCustomQuery(t *testing.T) { { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) } }) }) @@ -608,22 +664,169 @@ func TestRestoreDefaultQuery(t *testing.T) { // Validate going back from custom-query to default-query (replication lag) still works. t.Run("enabling throttler with default query and threshold", func(t *testing.T) { - _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, true, false, throttler.DefaultThreshold.Seconds(), useDefaultQuery, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true, Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) assert.NoError(t, err) // Wait for the throttler to be up and running everywhere again with the default config. for _, tablet := range clusterInstance.Keyspaces[0].Shards[0].Vttablets { - throttler.WaitForThrottlerStatusEnabled(t, tablet, true, throttler.DefaultConfig, throttlerEnabledTimeout) + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, throttler.DefaultConfig, throttlerEnabledTimeout) } }) t.Run("validating OK response from throttler with default threshold, heartbeats running", func(t *testing.T) { resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - defer resp.Body.Close() - assert.Equalf(t, http.StatusOK, resp.StatusCode, "Unexpected response from throttler: %s", getResponseBody(resp)) + assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) }) t.Run("validating pushback response from throttler on default threshold once heartbeats go stale", func(t *testing.T) { time.Sleep(2 * onDemandHeartbeatDuration) // just... really wait long enough, make sure on-demand stops waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) }) } + +func TestUpdateMetricThresholds(t *testing.T) { + t.Run("validating pushback from throttler", func(t *testing.T) { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: throttler.DefaultThreshold.Seconds()}, throttlerEnabledTimeout) + } + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) + t.Run("setting low general threshold, and high threshold for 'lag' metric", func(t *testing.T) { + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{MetricName: "lag", Threshold: extremelyHighThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: unreasonablyLowThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: unreasonablyLowThreshold.Seconds()}, throttlerEnabledTimeout) + } + }) + t.Run("validating OK response from throttler thanks to high 'lag' threshold", func(t *testing.T) { + // Note that the default threshold is extremely low, but gets overriden. + waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) + }) + t.Run("removing explicit 'lag' threshold", func(t *testing.T) { + req := &vtctldatapb.UpdateThrottlerConfigRequest{MetricName: "lag", Threshold: 0} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + }) + t.Run("validating pushback from throttler again", func(t *testing.T) { + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) + t.Run("restoring standard threshold", func(t *testing.T) { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: throttler.DefaultThreshold.Seconds()}, throttlerEnabledTimeout) + } + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) +} + +func TestUpdateAppCheckedMetrics(t *testing.T) { + t.Run("ensure replica is not dormant", func(t *testing.T) { + _, err := throttleCheck(replicaTablet, false) + require.NoError(t, err) + }) + t.Run("validating pushback from throttler", func(t *testing.T) { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: throttler.DefaultThreshold.Seconds()}, throttlerEnabledTimeout) + } + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) + t.Run("assigning 'loadavg' metrics to 'test' app", func(t *testing.T) { + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{MetricName: "loadavg", Threshold: 7777} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{} + appCheckedMetrics := map[string]*topodatapb.ThrottlerConfig_MetricNames{ + testAppName.String(): {Names: []string{"loadavg"}}, + } + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, appCheckedMetrics) + assert.NoError(t, err) + } + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: unreasonablyLowThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: unreasonablyLowThreshold.Seconds()}, throttlerEnabledTimeout) + } + t.Run("validating OK response from throttler since it's checking loadavg", func(t *testing.T) { + if !waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) { + t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) + t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) + } + }) + }) + t.Run("assigning 'loadavg,lag' metrics to 'test' app", func(t *testing.T) { + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{} + appCheckedMetrics := map[string]*topodatapb.ThrottlerConfig_MetricNames{ + testAppName.String(): {Names: []string{"loadavg,lag"}}, + } + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, appCheckedMetrics) + assert.NoError(t, err) + } + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: unreasonablyLowThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: unreasonablyLowThreshold.Seconds()}, throttlerEnabledTimeout) + } + t.Run("validating pushback from throttler since lag is above threshold", func(t *testing.T) { + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) + }) + t.Run("removing assignment from 'test' app and restoring defaults", func(t *testing.T) { + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{MetricName: "loadavg", Threshold: 0} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{} + appCheckedMetrics := map[string]*topodatapb.ThrottlerConfig_MetricNames{ + testAppName.String(): {Names: []string{}}, + } + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, appCheckedMetrics) + assert.NoError(t, err) + } + { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Threshold: throttler.DefaultThreshold.Seconds()} + _, err := throttler.UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) + assert.NoError(t, err) + } + // Wait for the throttler to be enabled everywhere with new config. + for _, tablet := range []cluster.Vttablet{*primaryTablet, *replicaTablet} { + throttler.WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, &tablet, true, &throttler.Config{Query: throttler.DefaultQuery, Threshold: throttler.DefaultThreshold.Seconds()}, throttlerEnabledTimeout) + } + t.Run("validating error response from throttler since lag is still high", func(t *testing.T) { + waitForThrottleCheckStatus(t, primaryTablet, http.StatusTooManyRequests) + }) + }) +} diff --git a/go/test/endtoend/throttler/util.go b/go/test/endtoend/throttler/util.go index 602f8622a3b..fccad19c324 100644 --- a/go/test/endtoend/throttler/util.go +++ b/go/test/endtoend/throttler/util.go @@ -29,15 +29,19 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" + "google.golang.org/protobuf/encoding/protojson" "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) type Config struct { @@ -56,24 +60,71 @@ var DefaultConfig = &Config{ Threshold: DefaultThreshold.Seconds(), } +// CheckThrottlerRaw runs vtctldclient CheckThrottler +func CheckThrottlerRaw(vtctldProcess *cluster.VtctldClientProcess, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags) (result string, err error) { + args := []string{} + args = append(args, "CheckThrottler") + if flags == nil { + flags = &throttle.CheckFlags{ + Scope: base.SelfScope, + MultiMetricsEnabled: true, + } + } + if appName != "" { + args = append(args, "--app-name", appName.String()) + } + if flags.Scope != base.UndefinedScope { + args = append(args, "--scope", flags.Scope.String()) + } + if flags.OKIfNotExists { + args = append(args, "--ok-if-not-exists") + } + if !flags.SkipRequestHeartbeats { + args = append(args, "--request-heartbeats") + } + args = append(args, tablet.Alias) + + result, err = vtctldProcess.ExecuteCommandWithOutput(args...) + return result, err +} + +// GetThrottlerStatusRaw runs vtctldclient GetThrottlerStatus +func GetThrottlerStatusRaw(vtctldProcess *cluster.VtctldClientProcess, tablet *cluster.Vttablet) (result string, err error) { + args := []string{} + args = append(args, "GetThrottlerStatus") + args = append(args, tablet.Alias) + + result, err = vtctldProcess.ExecuteCommandWithOutput(args...) + return result, err +} + // UpdateThrottlerTopoConfig runs vtctlclient UpdateThrottlerConfig. // This retries the command until it succeeds or times out as the // SrvKeyspace record may not yet exist for a newly created // Keyspace that is still initializing before it becomes serving. -func UpdateThrottlerTopoConfigRaw(vtctldProcess *cluster.VtctldClientProcess, keyspaceName string, enable bool, disable bool, threshold float64, metricsQuery string, appRule *topodatapb.ThrottledAppRule) (result string, err error) { +func UpdateThrottlerTopoConfigRaw( + vtctldProcess *cluster.VtctldClientProcess, + keyspaceName string, + opts *vtctldatapb.UpdateThrottlerConfigRequest, + appRule *topodatapb.ThrottledAppRule, + appCheckedMetrics map[string]*topodatapb.ThrottlerConfig_MetricNames, +) (result string, err error) { args := []string{} args = append(args, "UpdateThrottlerConfig") - if enable { + if opts.Enable { args = append(args, "--enable") } - if disable { + if opts.Disable { args = append(args, "--disable") } - if threshold > 0 { - args = append(args, "--threshold", fmt.Sprintf("%f", threshold)) + if opts.MetricName != "" { + args = append(args, "--metric-name", opts.MetricName) } - args = append(args, "--custom-query", metricsQuery) - if metricsQuery != "" { + if opts.Threshold > 0 || opts.MetricName != "" { + args = append(args, "--threshold", fmt.Sprintf("%f", opts.Threshold)) + } + args = append(args, "--custom-query", opts.CustomQuery) + if opts.CustomQuery != "" { args = append(args, "--check-as-check-self") } else { args = append(args, "--check-as-check-shard") @@ -86,6 +137,15 @@ func UpdateThrottlerTopoConfigRaw(vtctldProcess *cluster.VtctldClientProcess, ke args = append(args, "--throttle-app-exempt") } } + if appCheckedMetrics != nil { + if len(appCheckedMetrics) != 1 { + return "", fmt.Errorf("appCheckedMetrics must either be nil or have exactly one entry") + } + for app, metrics := range appCheckedMetrics { + args = append(args, "--app-name", app) + args = append(args, "--app-metrics", strings.Join(metrics.Names, ",")) + } + } args = append(args, keyspaceName) ctx, cancel := context.WithTimeout(context.Background(), ConfigTimeout) @@ -107,18 +167,74 @@ func UpdateThrottlerTopoConfigRaw(vtctldProcess *cluster.VtctldClientProcess, ke } } +// CheckThrottler runs vtctldclient CheckThrottler. +func CheckThrottler(clusterInstance *cluster.LocalProcessCluster, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags) (*vtctldatapb.CheckThrottlerResponse, error) { + output, err := CheckThrottlerRaw(&clusterInstance.VtctldClientProcess, tablet, appName, flags) + if err != nil { + return nil, err + } + var resp vtctldatapb.CheckThrottlerResponse + if err := protojson.Unmarshal([]byte(output), &resp); err != nil { + return nil, err + } + return &resp, err +} + +// GetThrottlerStatus runs vtctldclient CheckThrottler. +func GetThrottlerStatus(vtctldProcess *cluster.VtctldClientProcess, tablet *cluster.Vttablet) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + output, err := GetThrottlerStatusRaw(vtctldProcess, tablet) + if err != nil && strings.HasSuffix(tablet.VttabletProcess.Binary, "-last") { + // TODO(shlomi): Remove in v22! + // GetThrottlerStatus gRPC was added in v21. Upgrade-downgrade tests which run a + // v20 tablet for cross-version compatibility check will fail this command because the + // tablet server will not serve this gRPC call. + // We therefore resort to checking the /throttler/status endpoint + throttlerURL := fmt.Sprintf("http://localhost:%d/throttler/status", tablet.HTTPPort) + throttlerBody := getHTTPBody(throttlerURL) + if throttlerBody == "" { + return nil, fmt.Errorf("failed to get throttler status from %s. Empty result via /status endpoint, and GetThrottlerStatus error: %v", tablet.Alias, err) + } + resp := vtctldatapb.GetThrottlerStatusResponse{ + Status: &tabletmanagerdatapb.GetThrottlerStatusResponse{}, + } + resp.Status.IsEnabled = gjson.Get(throttlerBody, "IsEnabled").Bool() + resp.Status.LagMetricQuery = gjson.Get(throttlerBody, "Query").String() + resp.Status.DefaultThreshold = gjson.Get(throttlerBody, "Threshold").Float() + resp.Status.MetricsHealth = make(map[string]*tabletmanagerdatapb.GetThrottlerStatusResponse_MetricHealth) + gjson.Get(throttlerBody, "MetricsHealth").ForEach(func(key, value gjson.Result) bool { + // We just need to know that metrics health is non-empty. We don't need to parse the actual values. + resp.Status.MetricsHealth[key.String()] = &tabletmanagerdatapb.GetThrottlerStatusResponse_MetricHealth{} + return true + }) + return resp.Status, nil + } + if err != nil { + return nil, err + } + var resp vtctldatapb.GetThrottlerStatusResponse + if err := protojson.Unmarshal([]byte(output), &resp); err != nil { + return nil, err + } + return resp.Status, err +} + // UpdateThrottlerTopoConfig runs vtctlclient UpdateThrottlerConfig. // This retries the command until it succeeds or times out as the // SrvKeyspace record may not yet exist for a newly created // Keyspace that is still initializing before it becomes serving. -func UpdateThrottlerTopoConfig(clusterInstance *cluster.LocalProcessCluster, enable bool, disable bool, threshold float64, metricsQuery string, appRule *topodatapb.ThrottledAppRule) (string, error) { +func UpdateThrottlerTopoConfig( + clusterInstance *cluster.LocalProcessCluster, + opts *vtctldatapb.UpdateThrottlerConfigRequest, + appRule *topodatapb.ThrottledAppRule, + appCheckedMetrics map[string]*topodatapb.ThrottlerConfig_MetricNames, +) (string, error) { rec := concurrency.AllErrorRecorder{} var ( err error res strings.Builder ) for _, ks := range clusterInstance.Keyspaces { - ires, err := UpdateThrottlerTopoConfigRaw(&clusterInstance.VtctldClientProcess, ks.Name, enable, disable, threshold, metricsQuery, appRule) + ires, err := UpdateThrottlerTopoConfigRaw(&clusterInstance.VtctldClientProcess, ks.Name, opts, appRule, appCheckedMetrics) if err != nil { rec.RecordError(err) } @@ -252,30 +368,15 @@ func UnthrottleAppAndWaitUntilTabletsConfirm(t *testing.T, clusterInstance *clus // WaitForThrottlerStatusEnabled waits for a tablet to report its throttler status as // enabled/disabled and have the provided config (if any) until the specified timeout. -func WaitForThrottlerStatusEnabled(t *testing.T, tablet *cluster.Vttablet, enabled bool, config *Config, timeout time.Duration) { - enabledJSONPath := "IsEnabled" - queryJSONPath := "Query" - thresholdJSONPath := "Threshold" - throttlerURL := fmt.Sprintf("http://localhost:%d/throttler/status", tablet.HTTPPort) - tabletURL := fmt.Sprintf("http://localhost:%d/debug/status_details", tablet.HTTPPort) +func WaitForThrottlerStatusEnabled(t *testing.T, vtctldProcess *cluster.VtctldClientProcess, tablet *cluster.Vttablet, enabled bool, config *Config, timeout time.Duration) { ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() ticker := time.NewTicker(time.Second) defer ticker.Stop() + tabletURL := fmt.Sprintf("http://localhost:%d/debug/status_details", tablet.HTTPPort) + for { - throttlerBody := getHTTPBody(throttlerURL) - isEnabled := gjson.Get(throttlerBody, enabledJSONPath).Bool() - if isEnabled == enabled { - if config == nil { - return - } - query := gjson.Get(throttlerBody, queryJSONPath).String() - threshold := gjson.Get(throttlerBody, thresholdJSONPath).Float() - if query == config.Query && threshold == config.Threshold { - return - } - } // If the tablet is Not Serving due to e.g. being involved in a // Reshard where its QueryService is explicitly disabled, then // we should not fail the test as the throttler will not be Open. @@ -286,10 +387,35 @@ func WaitForThrottlerStatusEnabled(t *testing.T, tablet *cluster.Vttablet, enabl log.Infof("tablet %s is Not Serving, so ignoring throttler status as the throttler will not be Opened", tablet.Alias) return } + + status, err := GetThrottlerStatus(vtctldProcess, tablet) + good := func() bool { + if err != nil { + log.Errorf("GetThrottlerStatus failed: %v", err) + return false + } + if status.IsEnabled != enabled { + return false + } + if status.IsEnabled && len(status.MetricsHealth) == 0 { + // throttler is enabled, but no metrics collected yet. Wait for something to be collected. + return false + } + if config == nil { + return true + } + if status.LagMetricQuery == config.Query && status.DefaultThreshold == config.Threshold { + return true + } + return false + } + if good() { + return + } select { case <-ctx.Done(): - t.Errorf("timed out waiting for the %s tablet's throttler status enabled to be %t with the correct config after %v; last seen value: %s", - tablet.Alias, enabled, timeout, throttlerBody) + assert.Fail(t, "timeout", "waiting for the %s tablet's throttler status enabled to be %t with the correct config after %v; last seen status: %+v", + tablet.Alias, enabled, timeout, status) return case <-ticker.C: } @@ -334,7 +460,7 @@ func WaitForThrottledApp(t *testing.T, tablet *cluster.Vttablet, throttlerApp th } select { case <-ctx.Done(): - t.Errorf("timed out waiting for the %s tablet's throttled apps with the correct config (expecting %s to be %v) after %v; last seen value: %s", + assert.Fail(t, "timeout", "waiting for the %s tablet's throttled apps with the correct config (expecting %s to be %v) after %v; last seen value: %s", tablet.Alias, throttlerApp.String(), expectThrottled, timeout, throttledAppsBody) return case <-ticker.C: @@ -345,19 +471,39 @@ func WaitForThrottledApp(t *testing.T, tablet *cluster.Vttablet, throttlerApp th // EnableLagThrottlerAndWaitForStatus is a utility function to enable the throttler at the beginning of an endtoend test. // The throttler is configued to use the standard replication lag metric. The function waits until the throttler is confirmed // to be running on all tablets. -func EnableLagThrottlerAndWaitForStatus(t *testing.T, clusterInstance *cluster.LocalProcessCluster, lag time.Duration) { - _, err := UpdateThrottlerTopoConfig(clusterInstance, true, false, lag.Seconds(), "", nil) +func EnableLagThrottlerAndWaitForStatus(t *testing.T, clusterInstance *cluster.LocalProcessCluster) { + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true} + _, err := UpdateThrottlerTopoConfig(clusterInstance, req, nil, nil) require.NoError(t, err) for _, ks := range clusterInstance.Keyspaces { for _, shard := range ks.Shards { for _, tablet := range shard.Vttablets { - WaitForThrottlerStatusEnabled(t, tablet, true, nil, time.Minute) + WaitForThrottlerStatusEnabled(t, &clusterInstance.VtctldClientProcess, tablet, true, nil, time.Minute) } } } } +func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalProcessCluster, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags, expect int32, timeout time.Duration) (*vtctldatapb.CheckThrottlerResponse, error) { + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + for { + resp, err := CheckThrottler(clusterInstance, tablet, appName, flags) + require.NoError(t, err) + if resp.Check.StatusCode == expect { + return resp, nil + } + select { + case <-ctx.Done(): + return nil, fmt.Errorf("timed out waiting for %s tablet's throttler to return a valid result after %v", tablet.Alias, timeout) + case <-ticker.C: + } + } +} + func getHTTPBody(url string) string { resp, err := http.Get(url) if err != nil { diff --git a/go/test/endtoend/vreplication/cluster_test.go b/go/test/endtoend/vreplication/cluster_test.go index a758944d3d9..218fc2b768a 100644 --- a/go/test/endtoend/vreplication/cluster_test.go +++ b/go/test/endtoend/vreplication/cluster_test.go @@ -30,19 +30,18 @@ import ( "testing" "time" - "vitess.io/vitess/go/vt/vttablet" - "vitess.io/vitess/go/mysql" - + "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/throttler" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/mysqlctl" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" + "vitess.io/vitess/go/vt/vttablet" - "github.com/stretchr/testify/require" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" - "vitess.io/vitess/go/test/endtoend/cluster" - "vitess.io/vitess/go/test/endtoend/throttler" - "vitess.io/vitess/go/vt/log" + "github.com/stretchr/testify/require" ) var ( @@ -477,7 +476,8 @@ func (vc *VitessCluster) AddKeyspace(t *testing.T, cells []*Cell, ksName string, } log.Infof("Applying throttler config for keyspace %s", keyspace.Name) - res, err := throttler.UpdateThrottlerTopoConfigRaw(vc.VtctldClient, keyspace.Name, true, false, throttlerConfig.Threshold, throttlerConfig.Query, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{Enable: true, Threshold: throttlerConfig.Threshold, CustomQuery: throttlerConfig.Query} + res, err := throttler.UpdateThrottlerTopoConfigRaw(vc.VtctldClient, keyspace.Name, req, nil, nil) require.NoError(t, err, res) cellsToWatch := "" @@ -743,7 +743,7 @@ func (vc *VitessCluster) AddShards(t *testing.T, cells []*Cell, keyspace *Keyspa HTTPPort: tablet.Vttablet.Port, } log.Infof("+ Waiting for throttler config to be applied on %s, type=%v", tablet.Name, tablet.Vttablet.TabletType) - throttler.WaitForThrottlerStatusEnabled(t, clusterTablet, true, nil, time.Minute) + throttler.WaitForThrottlerStatusEnabled(t, vc.VtctldClient, clusterTablet, true, nil, time.Minute) } } log.Infof("Throttler config applied on all shards") diff --git a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go index 78ad843ca1d..1e93a54b850 100644 --- a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go +++ b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go @@ -750,7 +750,12 @@ func testPartialSwitches(t *testing.T) { func testRestOfWorkflow(t *testing.T) { // Relax the throttler so that it does not cause switches to fail because it can block // the catchup for the intra-keyspace materialization. - res, err := throttler.UpdateThrottlerTopoConfigRaw(vc.VtctldClient, "customer", true, false, throttlerConfig.Threshold*5, throttlerConfig.Query, nil) + req := &vtctldatapb.UpdateThrottlerConfigRequest{ + Enable: true, + Threshold: throttlerConfig.Threshold * 5, + CustomQuery: throttlerConfig.Query, + } + res, err := throttler.UpdateThrottlerTopoConfigRaw(vc.VtctldClient, "customer", req, nil, nil) require.NoError(t, err, res) testPartialSwitches(t) diff --git a/go/test/utils/noleak.go b/go/test/utils/noleak.go index 31d454ec789..41e1a42b960 100644 --- a/go/test/utils/noleak.go +++ b/go/test/utils/noleak.go @@ -81,6 +81,7 @@ func ensureNoGoroutines() error { goleak.IgnoreTopFunction("vitess.io/vitess/go/vt/logutil.(*ThrottledLogger).log.func1"), goleak.IgnoreTopFunction("vitess.io/vitess/go/vt/vttablet/tabletserver/throttle.initThrottleTicker.func1.1"), goleak.IgnoreTopFunction("vitess.io/vitess/go/vt/vttablet/tabletserver/throttle.NewBackgroundClient.initThrottleTicker.func1.1"), + goleak.IgnoreTopFunction("vitess.io/vitess/go/stats.(*Rates).track"), goleak.IgnoreTopFunction("testing.tRunner.func1"), } diff --git a/go/timer/suspendable_ticker.go b/go/timer/suspendable_ticker.go index f2694a5cab3..2288460e13d 100644 --- a/go/timer/suspendable_ticker.go +++ b/go/timer/suspendable_ticker.go @@ -17,6 +17,7 @@ limitations under the License. package timer import ( + "context" "sync/atomic" "time" ) @@ -29,19 +30,22 @@ type SuspendableTicker struct { C chan time.Time suspended atomic.Bool + cancel context.CancelFunc } // NewSuspendableTicker creates a new suspendable ticker, indicating whether the ticker should start // suspendable or running func NewSuspendableTicker(d time.Duration, initiallySuspended bool) *SuspendableTicker { + ctx, cancel := context.WithCancel(context.Background()) s := &SuspendableTicker{ ticker: time.NewTicker(d), C: make(chan time.Time), + cancel: cancel, } if initiallySuspended { s.suspended.Store(true) } - go s.loop() + go s.loop(ctx) return s } @@ -58,7 +62,7 @@ func (s *SuspendableTicker) Resume() { // Stop completely stops the timer, like time.Timer func (s *SuspendableTicker) Stop() { - s.ticker.Stop() + s.cancel() } // TickNow generates a tick at this point in time. It may block @@ -78,11 +82,22 @@ func (s *SuspendableTicker) TickAfter(d time.Duration) { }) } -func (s *SuspendableTicker) loop() { - for t := range s.ticker.C { - if !s.suspended.Load() { - // not suspended - s.C <- t +func (s *SuspendableTicker) loop(ctx context.Context) { + defer s.ticker.Stop() + + for { + select { + case <-ctx.Done(): + return + case t := <-s.ticker.C: + if !s.suspended.Load() { + // not suspended + select { + case <-ctx.Done(): + return + case s.C <- t: + } + } } } } diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index ae20ac21ec1..a79acd29dab 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -2840,22 +2840,8 @@ type CheckThrottlerResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - // Value is the metric value collected by the tablet - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` - // Threshold is the throttling threshold the table was comparing the value with - Threshold float64 `protobuf:"fixed64,3,opt,name=threshold,proto3" json:"threshold,omitempty"` - // Error indicates an error retrieving the value - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - // Message - Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` - // RecentlyChecked indicates that the tablet has been hit with a user-facing check, which can then imply - // that heartbeats lease should be renwed. - RecentlyChecked bool `protobuf:"varint,6,opt,name=recently_checked,json=recentlyChecked,proto3" json:"recently_checked,omitempty"` - // Metrics is a map (metric name -> metric value/error) so that the client has as much - // information as possible about all the checked metrics. - Metrics map[string]*CheckThrottlerResponse_Metric `protobuf:"bytes,7,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TabletAlias *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` + Check *tabletmanagerdata.CheckThrottlerResponse `protobuf:"bytes,2,opt,name=Check,proto3" json:"Check,omitempty"` } func (x *CheckThrottlerResponse) Reset() { @@ -2890,51 +2876,16 @@ func (*CheckThrottlerResponse) Descriptor() ([]byte, []int) { return file_vtctldata_proto_rawDescGZIP(), []int{31} } -func (x *CheckThrottlerResponse) GetStatusCode() int32 { +func (x *CheckThrottlerResponse) GetTabletAlias() *topodata.TabletAlias { if x != nil { - return x.StatusCode - } - return 0 -} - -func (x *CheckThrottlerResponse) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *CheckThrottlerResponse) GetThreshold() float64 { - if x != nil { - return x.Threshold - } - return 0 -} - -func (x *CheckThrottlerResponse) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -func (x *CheckThrottlerResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *CheckThrottlerResponse) GetRecentlyChecked() bool { - if x != nil { - return x.RecentlyChecked + return x.TabletAlias } - return false + return nil } -func (x *CheckThrottlerResponse) GetMetrics() map[string]*CheckThrottlerResponse_Metric { +func (x *CheckThrottlerResponse) GetCheck() *tabletmanagerdata.CheckThrottlerResponse { if x != nil { - return x.Metrics + return x.Check } return nil } @@ -7347,42 +7298,7 @@ type GetThrottlerStatusResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // TabletAlias is the alias of probed tablet - TabletAlias string `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,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"` - // IsLeader indicates if the tablet is the leader of the shard, ie. the primary - IsLeader bool `protobuf:"varint,4,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"` - // IsOpen per stateManager - IsOpen bool `protobuf:"varint,5,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` - // IsEnabled per throttler configuration - IsEnabled bool `protobuf:"varint,6,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - // IsDormant: whether the throttler is dormant, ie has not received any checks in a while - // and goes into low-frequency probing mode. - IsDormant bool `protobuf:"varint,7,opt,name=is_dormant,json=isDormant,proto3" json:"is_dormant,omitempty"` - // LagMetricQuery is the query used to check the lag metric, a constant used by the throttler. - LagMetricQuery string `protobuf:"bytes,8,opt,name=lag_metric_query,json=lagMetricQuery,proto3" json:"lag_metric_query,omitempty"` - // CustomMetricQuery is the query used to check the custom metric, supplied by the user. - CustomMetricQuery string `protobuf:"bytes,9,opt,name=custom_metric_query,json=customMetricQuery,proto3" json:"custom_metric_query,omitempty"` - // DefaultThreshold is the threshold used by the throttler for the default metric (lag or custom in single-metric throttlers) - DefaultThreshold float64 `protobuf:"fixed64,10,opt,name=default_threshold,json=defaultThreshold,proto3" json:"default_threshold,omitempty"` - // MetricNameUsedAsDefault is the name of the metric used as the default metric: "lag" or "custom", for backwards compatibility - // with single-metric throttlers - MetricNameUsedAsDefault string `protobuf:"bytes,11,opt,name=metric_name_used_as_default,json=metricNameUsedAsDefault,proto3" json:"metric_name_used_as_default,omitempty"` - // AggregatedMetrics is a map of metric names to their values/errors - // Names are, for example, "self", "self/lag", "shard/lag", "shard/loadavg", etc. - AggregatedMetrics map[string]*GetThrottlerStatusResponse_MetricResult `protobuf:"bytes,12,rep,name=aggregated_metrics,json=aggregatedMetrics,proto3" json:"aggregated_metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // MetricThresholds is a map of metric names to their thresholds. - MetricThresholds map[string]float64 `protobuf:"bytes,13,rep,name=metric_thresholds,json=metricThresholds,proto3" json:"metric_thresholds,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - // MetricsHealth is a map of metric names to their health status. - MetricsHealth map[string]*GetThrottlerStatusResponse_MetricHealth `protobuf:"bytes,14,rep,name=metrics_health,json=metricsHealth,proto3" json:"metrics_health,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // ThrottledApps is a map of app names to their throttling rules - ThrottledApps map[string]*topodata.ThrottledAppRule `protobuf:"bytes,15,rep,name=throttled_apps,json=throttledApps,proto3" json:"throttled_apps,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // AppCheckedMetrics is a map of app names to their assigned metrics - AppCheckedMetrics map[string]string `protobuf:"bytes,16,rep,name=app_checked_metrics,json=appCheckedMetrics,proto3" json:"app_checked_metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - RecentlyChecked bool `protobuf:"varint,17,opt,name=recently_checked,json=recentlyChecked,proto3" json:"recently_checked,omitempty"` - // RecentApps is a map of app names to their recent check status - RecentApps map[string]*GetThrottlerStatusResponse_RecentApp `protobuf:"bytes,18,rep,name=recent_apps,json=recentApps,proto3" json:"recent_apps,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Status *tabletmanagerdata.GetThrottlerStatusResponse `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` } func (x *GetThrottlerStatusResponse) Reset() { @@ -7417,128 +7333,9 @@ func (*GetThrottlerStatusResponse) Descriptor() ([]byte, []int) { return file_vtctldata_proto_rawDescGZIP(), []int{111} } -func (x *GetThrottlerStatusResponse) GetTabletAlias() string { - if x != nil { - return x.TabletAlias - } - return "" -} - -func (x *GetThrottlerStatusResponse) GetKeyspace() string { - if x != nil { - return x.Keyspace - } - return "" -} - -func (x *GetThrottlerStatusResponse) GetShard() string { - if x != nil { - return x.Shard - } - return "" -} - -func (x *GetThrottlerStatusResponse) GetIsLeader() bool { - if x != nil { - return x.IsLeader - } - return false -} - -func (x *GetThrottlerStatusResponse) GetIsOpen() bool { - if x != nil { - return x.IsOpen - } - return false -} - -func (x *GetThrottlerStatusResponse) GetIsEnabled() bool { - if x != nil { - return x.IsEnabled - } - return false -} - -func (x *GetThrottlerStatusResponse) GetIsDormant() bool { +func (x *GetThrottlerStatusResponse) GetStatus() *tabletmanagerdata.GetThrottlerStatusResponse { if x != nil { - return x.IsDormant - } - return false -} - -func (x *GetThrottlerStatusResponse) GetLagMetricQuery() string { - if x != nil { - return x.LagMetricQuery - } - return "" -} - -func (x *GetThrottlerStatusResponse) GetCustomMetricQuery() string { - if x != nil { - return x.CustomMetricQuery - } - return "" -} - -func (x *GetThrottlerStatusResponse) GetDefaultThreshold() float64 { - if x != nil { - return x.DefaultThreshold - } - return 0 -} - -func (x *GetThrottlerStatusResponse) GetMetricNameUsedAsDefault() string { - if x != nil { - return x.MetricNameUsedAsDefault - } - return "" -} - -func (x *GetThrottlerStatusResponse) GetAggregatedMetrics() map[string]*GetThrottlerStatusResponse_MetricResult { - if x != nil { - return x.AggregatedMetrics - } - return nil -} - -func (x *GetThrottlerStatusResponse) GetMetricThresholds() map[string]float64 { - if x != nil { - return x.MetricThresholds - } - return nil -} - -func (x *GetThrottlerStatusResponse) GetMetricsHealth() map[string]*GetThrottlerStatusResponse_MetricHealth { - if x != nil { - return x.MetricsHealth - } - return nil -} - -func (x *GetThrottlerStatusResponse) GetThrottledApps() map[string]*topodata.ThrottledAppRule { - if x != nil { - return x.ThrottledApps - } - return nil -} - -func (x *GetThrottlerStatusResponse) GetAppCheckedMetrics() map[string]string { - if x != nil { - return x.AppCheckedMetrics - } - return nil -} - -func (x *GetThrottlerStatusResponse) GetRecentlyChecked() bool { - if x != nil { - return x.RecentlyChecked - } - return false -} - -func (x *GetThrottlerStatusResponse) GetRecentApps() map[string]*GetThrottlerStatusResponse_RecentApp { - if x != nil { - return x.RecentApps + return x.Status } return nil } @@ -16380,108 +16177,6 @@ func (x *ApplyVSchemaResponse_ParamList) GetParams() []string { return nil } -type CheckThrottlerResponse_Metric struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the metric - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - // Value is the metric value collected by the tablet - Value float64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` - // Threshold is the throttling threshold the table was comparing the value with - Threshold float64 `protobuf:"fixed64,4,opt,name=threshold,proto3" json:"threshold,omitempty"` - // Error indicates an error retrieving the value - Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` - // Message - Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` - // Scope used in this check - Scope string `protobuf:"bytes,7,opt,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *CheckThrottlerResponse_Metric) Reset() { - *x = CheckThrottlerResponse_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[260] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckThrottlerResponse_Metric) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckThrottlerResponse_Metric) ProtoMessage() {} - -func (x *CheckThrottlerResponse_Metric) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[260] - 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 CheckThrottlerResponse_Metric.ProtoReflect.Descriptor instead. -func (*CheckThrottlerResponse_Metric) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{31, 0} -} - -func (x *CheckThrottlerResponse_Metric) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CheckThrottlerResponse_Metric) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - -func (x *CheckThrottlerResponse_Metric) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *CheckThrottlerResponse_Metric) GetThreshold() float64 { - if x != nil { - return x.Threshold - } - return 0 -} - -func (x *CheckThrottlerResponse_Metric) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -func (x *CheckThrottlerResponse_Metric) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *CheckThrottlerResponse_Metric) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - type GetSrvKeyspaceNamesResponse_NameList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -16493,7 +16188,7 @@ type GetSrvKeyspaceNamesResponse_NameList struct { func (x *GetSrvKeyspaceNamesResponse_NameList) Reset() { *x = GetSrvKeyspaceNamesResponse_NameList{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[269] + mi := &file_vtctldata_proto_msgTypes[267] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16506,7 +16201,7 @@ func (x *GetSrvKeyspaceNamesResponse_NameList) String() string { func (*GetSrvKeyspaceNamesResponse_NameList) ProtoMessage() {} func (x *GetSrvKeyspaceNamesResponse_NameList) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[269] + mi := &file_vtctldata_proto_msgTypes[267] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16529,32 +16224,33 @@ func (x *GetSrvKeyspaceNamesResponse_NameList) GetNames() []string { return nil } -type GetThrottlerStatusResponse_MetricResult struct { +type MoveTablesCreateResponse_TabletInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Tablet *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet,proto3" json:"tablet,omitempty"` + // Created is set if the workflow was created on this tablet or not. + Created bool `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` } -func (x *GetThrottlerStatusResponse_MetricResult) Reset() { - *x = GetThrottlerStatusResponse_MetricResult{} +func (x *MoveTablesCreateResponse_TabletInfo) Reset() { + *x = MoveTablesCreateResponse_TabletInfo{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[272] + mi := &file_vtctldata_proto_msgTypes[271] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetThrottlerStatusResponse_MetricResult) String() string { +func (x *MoveTablesCreateResponse_TabletInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetThrottlerStatusResponse_MetricResult) ProtoMessage() {} +func (*MoveTablesCreateResponse_TabletInfo) ProtoMessage() {} -func (x *GetThrottlerStatusResponse_MetricResult) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[272] +func (x *MoveTablesCreateResponse_TabletInfo) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[271] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16565,51 +16261,52 @@ func (x *GetThrottlerStatusResponse_MetricResult) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use GetThrottlerStatusResponse_MetricResult.ProtoReflect.Descriptor instead. -func (*GetThrottlerStatusResponse_MetricResult) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{111, 0} +// Deprecated: Use MoveTablesCreateResponse_TabletInfo.ProtoReflect.Descriptor instead. +func (*MoveTablesCreateResponse_TabletInfo) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{143, 0} } -func (x *GetThrottlerStatusResponse_MetricResult) GetValue() float64 { +func (x *MoveTablesCreateResponse_TabletInfo) GetTablet() *topodata.TabletAlias { if x != nil { - return x.Value + return x.Tablet } - return 0 + return nil } -func (x *GetThrottlerStatusResponse_MetricResult) GetError() string { +func (x *MoveTablesCreateResponse_TabletInfo) GetCreated() bool { if x != nil { - return x.Error + return x.Created } - return "" + return false } -type GetThrottlerStatusResponse_MetricHealth struct { +type WorkflowDeleteResponse_TabletInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LastHealthyAt *vttime.Time `protobuf:"bytes,1,opt,name=last_healthy_at,json=lastHealthyAt,proto3" json:"last_healthy_at,omitempty"` - SecondsSinceLastHealthy int64 `protobuf:"varint,2,opt,name=seconds_since_last_healthy,json=secondsSinceLastHealthy,proto3" json:"seconds_since_last_healthy,omitempty"` + Tablet *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet,proto3" json:"tablet,omitempty"` + // Delete is set if the workflow was deleted on this tablet. + Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"` } -func (x *GetThrottlerStatusResponse_MetricHealth) Reset() { - *x = GetThrottlerStatusResponse_MetricHealth{} +func (x *WorkflowDeleteResponse_TabletInfo) Reset() { + *x = WorkflowDeleteResponse_TabletInfo{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[275] + mi := &file_vtctldata_proto_msgTypes[281] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetThrottlerStatusResponse_MetricHealth) String() string { +func (x *WorkflowDeleteResponse_TabletInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetThrottlerStatusResponse_MetricHealth) ProtoMessage() {} +func (*WorkflowDeleteResponse_TabletInfo) ProtoMessage() {} -func (x *GetThrottlerStatusResponse_MetricHealth) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[275] +func (x *WorkflowDeleteResponse_TabletInfo) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[281] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16620,51 +16317,55 @@ func (x *GetThrottlerStatusResponse_MetricHealth) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use GetThrottlerStatusResponse_MetricHealth.ProtoReflect.Descriptor instead. -func (*GetThrottlerStatusResponse_MetricHealth) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{111, 3} +// Deprecated: Use WorkflowDeleteResponse_TabletInfo.ProtoReflect.Descriptor instead. +func (*WorkflowDeleteResponse_TabletInfo) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{238, 0} } -func (x *GetThrottlerStatusResponse_MetricHealth) GetLastHealthyAt() *vttime.Time { +func (x *WorkflowDeleteResponse_TabletInfo) GetTablet() *topodata.TabletAlias { if x != nil { - return x.LastHealthyAt + return x.Tablet } return nil } -func (x *GetThrottlerStatusResponse_MetricHealth) GetSecondsSinceLastHealthy() int64 { +func (x *WorkflowDeleteResponse_TabletInfo) GetDeleted() bool { if x != nil { - return x.SecondsSinceLastHealthy + return x.Deleted } - return 0 + return false } -type GetThrottlerStatusResponse_RecentApp struct { +type WorkflowStatusResponse_TableCopyState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CheckedAt *vttime.Time `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"` - StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + RowsCopied int64 `protobuf:"varint,1,opt,name=rows_copied,json=rowsCopied,proto3" json:"rows_copied,omitempty"` + RowsTotal int64 `protobuf:"varint,2,opt,name=rows_total,json=rowsTotal,proto3" json:"rows_total,omitempty"` + RowsPercentage float32 `protobuf:"fixed32,3,opt,name=rows_percentage,json=rowsPercentage,proto3" json:"rows_percentage,omitempty"` + BytesCopied int64 `protobuf:"varint,4,opt,name=bytes_copied,json=bytesCopied,proto3" json:"bytes_copied,omitempty"` + BytesTotal int64 `protobuf:"varint,5,opt,name=bytes_total,json=bytesTotal,proto3" json:"bytes_total,omitempty"` + BytesPercentage float32 `protobuf:"fixed32,6,opt,name=bytes_percentage,json=bytesPercentage,proto3" json:"bytes_percentage,omitempty"` } -func (x *GetThrottlerStatusResponse_RecentApp) Reset() { - *x = GetThrottlerStatusResponse_RecentApp{} +func (x *WorkflowStatusResponse_TableCopyState) Reset() { + *x = WorkflowStatusResponse_TableCopyState{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[279] + mi := &file_vtctldata_proto_msgTypes[282] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetThrottlerStatusResponse_RecentApp) String() string { +func (x *WorkflowStatusResponse_TableCopyState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetThrottlerStatusResponse_RecentApp) ProtoMessage() {} +func (*WorkflowStatusResponse_TableCopyState) ProtoMessage() {} -func (x *GetThrottlerStatusResponse_RecentApp) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[279] +func (x *WorkflowStatusResponse_TableCopyState) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[282] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16675,192 +16376,21 @@ func (x *GetThrottlerStatusResponse_RecentApp) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use GetThrottlerStatusResponse_RecentApp.ProtoReflect.Descriptor instead. -func (*GetThrottlerStatusResponse_RecentApp) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{111, 7} +// Deprecated: Use WorkflowStatusResponse_TableCopyState.ProtoReflect.Descriptor instead. +func (*WorkflowStatusResponse_TableCopyState) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{240, 0} } -func (x *GetThrottlerStatusResponse_RecentApp) GetCheckedAt() *vttime.Time { +func (x *WorkflowStatusResponse_TableCopyState) GetRowsCopied() int64 { if x != nil { - return x.CheckedAt + return x.RowsCopied } - return nil + return 0 } -func (x *GetThrottlerStatusResponse_RecentApp) GetStatusCode() int32 { +func (x *WorkflowStatusResponse_TableCopyState) GetRowsTotal() int64 { if x != nil { - return x.StatusCode - } - return 0 -} - -type MoveTablesCreateResponse_TabletInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tablet *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet,proto3" json:"tablet,omitempty"` - // Created is set if the workflow was created on this tablet or not. - Created bool `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` -} - -func (x *MoveTablesCreateResponse_TabletInfo) Reset() { - *x = MoveTablesCreateResponse_TabletInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[282] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MoveTablesCreateResponse_TabletInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveTablesCreateResponse_TabletInfo) ProtoMessage() {} - -func (x *MoveTablesCreateResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[282] - 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 MoveTablesCreateResponse_TabletInfo.ProtoReflect.Descriptor instead. -func (*MoveTablesCreateResponse_TabletInfo) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{143, 0} -} - -func (x *MoveTablesCreateResponse_TabletInfo) GetTablet() *topodata.TabletAlias { - if x != nil { - return x.Tablet - } - return nil -} - -func (x *MoveTablesCreateResponse_TabletInfo) GetCreated() bool { - if x != nil { - return x.Created - } - return false -} - -type WorkflowDeleteResponse_TabletInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tablet *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet,proto3" json:"tablet,omitempty"` - // Delete is set if the workflow was deleted on this tablet. - Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"` -} - -func (x *WorkflowDeleteResponse_TabletInfo) Reset() { - *x = WorkflowDeleteResponse_TabletInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[292] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowDeleteResponse_TabletInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowDeleteResponse_TabletInfo) ProtoMessage() {} - -func (x *WorkflowDeleteResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[292] - 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 WorkflowDeleteResponse_TabletInfo.ProtoReflect.Descriptor instead. -func (*WorkflowDeleteResponse_TabletInfo) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{238, 0} -} - -func (x *WorkflowDeleteResponse_TabletInfo) GetTablet() *topodata.TabletAlias { - if x != nil { - return x.Tablet - } - return nil -} - -func (x *WorkflowDeleteResponse_TabletInfo) GetDeleted() bool { - if x != nil { - return x.Deleted - } - return false -} - -type WorkflowStatusResponse_TableCopyState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RowsCopied int64 `protobuf:"varint,1,opt,name=rows_copied,json=rowsCopied,proto3" json:"rows_copied,omitempty"` - RowsTotal int64 `protobuf:"varint,2,opt,name=rows_total,json=rowsTotal,proto3" json:"rows_total,omitempty"` - RowsPercentage float32 `protobuf:"fixed32,3,opt,name=rows_percentage,json=rowsPercentage,proto3" json:"rows_percentage,omitempty"` - BytesCopied int64 `protobuf:"varint,4,opt,name=bytes_copied,json=bytesCopied,proto3" json:"bytes_copied,omitempty"` - BytesTotal int64 `protobuf:"varint,5,opt,name=bytes_total,json=bytesTotal,proto3" json:"bytes_total,omitempty"` - BytesPercentage float32 `protobuf:"fixed32,6,opt,name=bytes_percentage,json=bytesPercentage,proto3" json:"bytes_percentage,omitempty"` -} - -func (x *WorkflowStatusResponse_TableCopyState) Reset() { - *x = WorkflowStatusResponse_TableCopyState{} - if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[293] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowStatusResponse_TableCopyState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowStatusResponse_TableCopyState) ProtoMessage() {} - -func (x *WorkflowStatusResponse_TableCopyState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[293] - 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 WorkflowStatusResponse_TableCopyState.ProtoReflect.Descriptor instead. -func (*WorkflowStatusResponse_TableCopyState) Descriptor() ([]byte, []int) { - return file_vtctldata_proto_rawDescGZIP(), []int{240, 0} -} - -func (x *WorkflowStatusResponse_TableCopyState) GetRowsCopied() int64 { - if x != nil { - return x.RowsCopied - } - return 0 -} - -func (x *WorkflowStatusResponse_TableCopyState) GetRowsTotal() int64 { - if x != nil { - return x.RowsTotal + return x.RowsTotal } return 0 } @@ -16909,7 +16439,7 @@ type WorkflowStatusResponse_ShardStreamState struct { func (x *WorkflowStatusResponse_ShardStreamState) Reset() { *x = WorkflowStatusResponse_ShardStreamState{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[294] + mi := &file_vtctldata_proto_msgTypes[283] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16922,7 +16452,7 @@ func (x *WorkflowStatusResponse_ShardStreamState) String() string { func (*WorkflowStatusResponse_ShardStreamState) ProtoMessage() {} func (x *WorkflowStatusResponse_ShardStreamState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[294] + mi := &file_vtctldata_proto_msgTypes[283] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16991,7 +16521,7 @@ type WorkflowStatusResponse_ShardStreams struct { func (x *WorkflowStatusResponse_ShardStreams) Reset() { *x = WorkflowStatusResponse_ShardStreams{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[295] + mi := &file_vtctldata_proto_msgTypes[284] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17004,7 +16534,7 @@ func (x *WorkflowStatusResponse_ShardStreams) String() string { func (*WorkflowStatusResponse_ShardStreams) ProtoMessage() {} func (x *WorkflowStatusResponse_ShardStreams) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[295] + mi := &file_vtctldata_proto_msgTypes[284] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17041,7 +16571,7 @@ type WorkflowUpdateResponse_TabletInfo struct { func (x *WorkflowUpdateResponse_TabletInfo) Reset() { *x = WorkflowUpdateResponse_TabletInfo{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[298] + mi := &file_vtctldata_proto_msgTypes[287] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17054,7 +16584,7 @@ func (x *WorkflowUpdateResponse_TabletInfo) String() string { func (*WorkflowUpdateResponse_TabletInfo) ProtoMessage() {} func (x *WorkflowUpdateResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[298] + mi := &file_vtctldata_proto_msgTypes[287] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17709,1091 +17239,170 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6f, 0x6b, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x22, 0xb2, 0x04, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, - 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x07, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, + 0x73, 0x22, 0x93, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, + 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0xb7, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x1a, 0x64, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x4f, 0x0a, 0x1d, 0x43, 0x6c, 0x65, 0x61, 0x6e, + 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x1e, 0x43, 0x6c, 0x65, + 0x61, 0x6e, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x16, 0x72, + 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x1d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, - 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x1e, 0x43, 0x6c, 0x65, 0x61, - 0x6e, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x16, 0x72, 0x6f, - 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, - 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x1e, 0x43, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x1e, + 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe3, + 0x01, 0x0a, 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x78, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe3, 0x01, - 0x0a, 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x78, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, - 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xdd, 0x02, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, 0x73, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0c, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, - 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, 0x64, - 0x65, 0x63, 0x61, 0x72, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x44, 0x62, 0x4e, 0x61, 0x6d, - 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, - 0x06, 0x10, 0x07, 0x22, 0x49, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x8c, - 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0xa0, 0x01, - 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x30, - 0x0a, 0x14, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x22, 0x41, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, - 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x1c, 0x0a, - 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x13, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, 0x0a, - 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x65, - 0x76, 0x65, 0x6e, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x49, 0x66, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, - 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x14, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 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, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x81, 0x03, 0x0a, 0x1d, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 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, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 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, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3e, 0x0a, 0x0f, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, - 0x04, 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, 0x0e, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x44, 0x0a, 0x15, - 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, - 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, - 0x6f, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x14, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, - 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x11, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x1e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, - 0x63, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 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, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, - 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x5f, 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, 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, 0x04, 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, 0xa0, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x75, - 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x75, - 0x73, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0xd3, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, - 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa5, - 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, - 0x55, 0x0a, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, - 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x68, 0x6f, 0x6f, 0x6b, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd4, 0x01, 0x0a, 0x1d, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, - 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x73, 0x71, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, 0x6f, - 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x4e, 0x0a, - 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3c, 0x0a, - 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0xbe, 0x01, 0x0a, 0x1f, - 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4e, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x1a, - 0x4b, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x54, 0x0a, 0x22, - 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 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, 0x12, - 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, - 0x69, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x23, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, - 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x16, 0x72, 0x6f, - 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, - 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, - 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x9e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, + 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, + 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdd, 0x02, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, + 0x73, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, + 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, + 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, + 0x64, 0x65, 0x63, 0x61, 0x72, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x44, 0x62, 0x4e, 0x61, + 0x6d, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, + 0x08, 0x06, 0x10, 0x07, 0x22, 0x49, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, + 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, + 0x8c, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x22, 0x44, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x79, 0x73, 0x71, 0x6c, - 0x63, 0x74, 0x6c, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x65, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0xa0, + 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, + 0x30, 0x0a, 0x14, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x22, 0x41, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, + 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, + 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, + 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x15, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 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, 0x1c, + 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, + 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x26, 0x0a, 0x0f, + 0x65, 0x76, 0x65, 0x6e, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x49, 0x66, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, - 0x6c, 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, - 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, - 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xb6, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, - 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x1a, 0x50, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x4c, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x22, 0x46, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x51, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, - 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x76, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x16, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x18, - 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, - 0xb0, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, - 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, - 0x77, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x6e, - 0x6c, 0x79, 0x22, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x22, 0xb8, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, + 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 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, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x81, 0x03, 0x0a, 0x1d, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, - 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, - 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x72, - 0x65, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, - 0x65, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x6b, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x22, - 0x59, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, - 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x64, 0x0a, 0x1a, 0x47, 0x65, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, - 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x7d, 0x0a, 0x19, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, - 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x1a, - 0x65, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x6a, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x11, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x32, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, - 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, - 0xf3, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x47, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, - 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x69, 0x0a, 0x0a, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x20, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x63, - 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, - 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, - 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x72, 0x76, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x1a, 0x56, 0x0a, 0x11, 0x53, 0x72, 0x76, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xe4, 0x03, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x28, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6c, - 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x73, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x2f, 0x0a, 0x14, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x73, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x68, - 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x74, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x5f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0c, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x61, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, - 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x0c, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x72, - 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x73, 0x72, 0x76, 0x56, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x22, 0xc5, 0x01, 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, 0x56, - 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x72, 0x76, 0x56, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x1a, 0x53, 0x0a, 0x10, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3d, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, - 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x3c, - 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, - 0x18, 0x05, 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, 0x0d, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, - 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x98, 0x0f, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 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, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x07, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x69, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x6f, 0x72, - 0x6d, 0x61, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2e, - 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x1b, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, - 0x61, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x17, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x64, - 0x41, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x6b, 0x0a, 0x12, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x68, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3b, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, - 0x12, 0x5f, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x12, 0x5f, 0x0a, 0x0e, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, - 0x70, 0x70, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x76, 0x74, 0x63, 0x74, - 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, - 0x70, 0x73, 0x12, 0x6c, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, - 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, - 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x0b, 0x72, - 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x35, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, - 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, - 0x70, 0x70, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, - 0x78, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x81, - 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, - 0x34, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, - 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x79, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x79, 0x1a, 0x74, 0x0a, 0x12, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, - 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5c, 0x0a, 0x12, 0x54, 0x68, 0x72, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x41, 0x70, 0x70, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x59, 0x0a, 0x09, - 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x6e, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x65, 0x6e, - 0x74, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x6f, - 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x17, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x61, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x6f, - 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, - 0x22, 0x80, 0x01, 0x0a, 0x0c, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, 0x65, 0x6c, - 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x4d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, - 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 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, 0x1b, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, - 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x17, - 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x52, 0x0a, 0x1a, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x17, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6c, 0x65, - 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x42, 0x0a, 0x18, 0x49, 0x6e, 0x69, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 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, 0x4e, 0x0a, - 0x1c, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x01, - 0x0a, 0x1d, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x76, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x41, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x75, 0x6e, - 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xff, 0x02, 0x0a, 0x19, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x76, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, - 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x42, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x77, 0x69, - 0x74, 0x68, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, - 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, - 0x79, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x77, 0x0a, 0x1e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x1f, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x18, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x1b, - 0x0a, 0x19, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x14, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, - 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, - 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x70, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f, 0x72, - 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, - 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, - 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x16, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, - 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, - 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, - 0x79, 0x52, 0x75, 0x6e, 0x22, 0x5b, 0x0a, 0x17, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x22, 0x85, 0x01, 0x0a, 0x14, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, - 0x70, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, - 0x6f, 0x70, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, - 0x70, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, - 0x6f, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x16, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x4d, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, - 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, - 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, - 0x70, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x70, - 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, - 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x6f, 0x75, 0x6e, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x29, 0x0a, 0x11, - 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x82, 0x07, 0x0a, 0x17, 0x4d, 0x6f, 0x76, 0x65, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, - 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x15, - 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, - 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x2a, 0x0a, - 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, - 0x79, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x46, 0x6f, - 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, - 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, - 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x63, - 0x6f, 0x70, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x74, 0x6f, 0x6d, 0x69, - 0x63, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x45, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd5, 0x01, 0x0a, - 0x18, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, - 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x22, 0x81, 0x02, 0x0a, 0x19, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, - 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, - 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x4d, 0x6f, 0x76, 0x65, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, - 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x69, 0x6e, 0x67, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x02, - 0x0a, 0x1b, 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, 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, - 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 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, 0x0a, 0x6e, 0x65, 0x77, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x61, 0x76, 0x6f, 0x69, 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, 0x0c, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x19, 0x74, 0x6f, 0x6c, - 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, - 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, - 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, - 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 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, 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, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3e, 0x0a, + 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, + 0x18, 0x04, 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, 0x0e, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x44, 0x0a, + 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, + 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x14, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, + 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x1e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, + 0x6e, 0x63, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 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, @@ -18804,526 +17413,1275 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 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, 0x74, 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, 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x19, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0xd3, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, + 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, + 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0xa5, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x12, 0x55, 0x0a, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, + 0x0a, 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, + 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x68, 0x6f, 0x6f, + 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd4, 0x01, 0x0a, 0x1d, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, + 0x42, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, + 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x4e, + 0x0a, 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3c, + 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 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, 0x22, 0xbe, 0x01, 0x0a, + 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4e, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x1a, 0x4b, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x54, 0x0a, + 0x22, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1e, 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, 0x22, 0x32, 0x0a, 0x1a, 0x52, 0x65, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x1d, - 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, - 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, - 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x23, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, + 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x16, 0x72, + 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, + 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, + 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, + 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x22, 0x44, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x63, 0x74, 0x6c, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, + 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, + 0x6c, 0x6c, 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, + 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x65, + 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, + 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, + 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x1a, 0x50, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x4c, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 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, 0x22, 0x46, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x51, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x76, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x16, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, + 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x22, 0xb0, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, + 0x65, 0x77, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x28, 0x0a, + 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, + 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, + 0x6e, 0x6c, 0x79, 0x22, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xb8, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x01, 0x0a, - 0x1b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, - 0x69, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x1b, - 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, - 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 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, - 0xbc, 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, 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, 0x23, - 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 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, 0x04, 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, 0x05, 0x20, 0x01, 0x28, - 0x05, 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, 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, 0x22, 0x5b, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x06, + 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x6b, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, + 0x22, 0x59, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3a, 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x64, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x7d, 0x0a, 0x19, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, + 0x65, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, + 0x1a, 0x65, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 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, 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, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, - 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, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, 0x1c, 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, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x6a, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x11, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x32, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, + 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, + 0x22, 0xf3, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x69, 0x0a, 0x0a, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x20, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 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, + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, + 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x72, 0x76, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x1a, 0x56, 0x0a, 0x11, 0x53, 0x72, 0x76, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xe4, 0x03, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1d, - 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 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, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x46, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, + 0x6c, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, + 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x2f, 0x0a, 0x14, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, + 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x74, + 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, + 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0c, + 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, + 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x61, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x0c, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, + 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x73, 0x72, 0x76, 0x56, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x22, 0xc5, 0x01, 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, + 0x56, 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x72, 0x76, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x1a, 0x53, 0x0a, 0x10, 0x53, 0x72, 0x76, 0x56, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3d, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x28, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, + 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, + 0x73, 0x18, 0x05, 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, 0x0d, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, + 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0x7b, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x22, 0x8f, 0x04, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 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, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, - 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x70, - 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, - 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, - 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, - 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x22, 0x82, 0x02, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x63, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x73, + 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x73, 0x4a, + 0x73, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, + 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x80, 0x01, 0x0a, 0x0c, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2f, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 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, 0x22, + 0x4d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2d, - 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, - 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, - 0x50, 0x6f, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x14, - 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x12, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x54, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xad, 0x01, 0x0a, - 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 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, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x1b, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1c, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x16, - 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, - 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x76, - 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, - 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x51, 0x0a, 0x15, 0x52, - 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x2e, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x42, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x76, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 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, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, + 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, + 0x6f, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x49, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 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, 0x52, 0x0a, 0x1a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 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, + 0x17, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x44, + 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x22, 0x42, 0x0a, 0x18, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 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, 0x4e, 0x0a, 0x1c, 0x4c, 0x61, 0x75, 0x6e, + 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x1d, 0x4c, 0x61, 0x75, + 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x16, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, + 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, 0x02, 0x0a, 0x19, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x76, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x42, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x57, 0x69, 0x74, 0x68, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, + 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, 0x0a, 0x1e, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x1f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x22, 0x56, 0x0a, 0x18, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, + 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x14, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, + 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, + 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, + 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, + 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, + 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x16, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, + 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, + 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, + 0x5b, 0x0a, 0x17, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x85, 0x01, 0x0a, + 0x14, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, + 0x16, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, + 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x82, + 0x01, 0x0a, 0x11, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x29, 0x0a, 0x11, 0x4d, 0x6f, 0x75, 0x6e, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x22, 0x82, 0x07, 0x0a, 0x17, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, + 0x6f, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, + 0x64, 0x64, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x70, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, + 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, + 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, + 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x70, 0x79, + 0x12, 0x45, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x18, 0x4d, 0x6f, 0x76, 0x65, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x48, + 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x76, 0x65, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 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, 0x06, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, + 0x81, 0x02, 0x0a, 0x19, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, + 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x64, + 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x02, 0x0a, 0x1b, 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, 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, 0x36, 0x0a, 0x0b, 0x6e, 0x65, + 0x77, 0x5f, 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, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x61, 0x76, 0x6f, 0x69, 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, 0x0c, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x44, + 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x19, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, + 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x74, 0x6f, 0x6c, 0x65, 0x72, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x61, 0x67, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 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, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, + 0x64, 0x5f, 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, 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, 0x04, 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, + 0x74, 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, 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, 0x63, 0x65, + 0x6c, 0x6c, 0x73, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1e, 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, 0x22, 0x32, 0x0a, 0x1a, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x64, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x4f, 0x0a, + 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x18, - 0x0a, 0x16, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x2b, 0x0a, 0x11, 0x64, 0x75, - 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x55, 0x0a, 0x23, 0x53, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5e, - 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, + 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0x03, 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, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0xbc, 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, 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, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, + 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 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, 0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x05, 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, 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, 0x22, 0x5b, + 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x7f, 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, 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, + 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, + 0x73, 0x69, 0x76, 0x65, 0x22, 0x1c, 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, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 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, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x51, - 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x72, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 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, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x22, 0x46, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x6a, 0x0a, 0x12, 0x53, 0x65, 0x74, - 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 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, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x43, + 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, 0x15, 0x52, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x22, 0x7b, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 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, + 0x22, 0x8f, 0x04, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x64, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 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, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6b, 0x69, 0x70, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, + 0x70, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, + 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, + 0x79, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, + 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x22, 0x82, 0x02, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, + 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x72, 0x69, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x72, 0x69, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, - 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x38, 0x0a, - 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x54, 0x0a, 0x1b, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, - 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0x54, 0x0a, 0x20, 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, 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, 0x22, 0xaa, 0x03, 0x0a, 0x21, 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, 0x78, 0x0a, 0x14, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 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, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 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, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, - 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, - 0x61, 0x70, 0x1a, 0x5f, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x12, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x15, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x16, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x5e, 0x0a, 0x18, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x19, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x22, 0x53, 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, 0x38, 0x0a, 0x0c, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1a, 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, 0x22, 0x52, 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, 0x38, 0x0a, 0x0c, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x19, 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, - 0x22, 0x52, 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, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x52, 0x12, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xad, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 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, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x1b, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, + 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, + 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x51, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x06, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x22, 0xc6, 0x01, 0x0a, 0x22, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x75, 0x6e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x2b, 0x0a, 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x22, 0x55, 0x0a, 0x23, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x1e, 0x53, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x36, 0x0a, - 0x0b, 0x6e, 0x65, 0x77, 0x5f, 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, 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, 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, 0x6f, 0x6c, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x5c, 0x0a, - 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, - 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5d, 0x0a, 0x16, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, - 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x17, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, - 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x22, 0x65, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, - 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x34, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, - 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfb, 0x01, - 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x13, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 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, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x1a, 0x69, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x17, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, + 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x51, 0x0a, 0x1f, 0x53, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x72, 0x0a, 0x1f, + 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, + 0x22, 0x49, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x8e, 0x02, 0x0a, 0x1c, + 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x35, + 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, + 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x46, 0x0a, 0x1d, + 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x22, 0x6a, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x10, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 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, 0x2e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, - 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 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, 0x1a, 0x0a, 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, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x62, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x54, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x20, 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, + 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, 0x22, 0xaa, 0x03, 0x0a, 0x21, 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, 0x78, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 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, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, + 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 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, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x5f, 0x0a, + 0x18, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, + 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, + 0x01, 0x0a, 0x1d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 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, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 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, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x20, 0x0a, 0x1e, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, + 0x0a, 0x12, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2c, + 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, + 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, + 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x5e, 0x0a, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x53, 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, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x22, 0x1a, 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, 0x22, 0x52, 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, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x22, 0x19, 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, 0x22, 0x52, 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, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, + 0xc6, 0x01, 0x0a, 0x22, 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, + 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, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x26, - 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x4e, 0x6f, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, - 0x88, 0x02, 0x0a, 0x1e, 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, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x10, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 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, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, 0x14, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 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, 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, 0x31, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3c, 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, 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, 0x22, 0x8a, 0x02, 0x0a, 0x1f, 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, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3e, 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, + 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, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, + 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, 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, + 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, 0x6f, 0x6c, + 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x5c, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, + 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5d, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x65, 0x0a, 0x18, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, + 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x22, 0x34, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, + 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 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, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x69, 0x0a, 0x16, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 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, 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, 0x21, 0x0a, + 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, + 0x22, 0xfc, 0x01, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x37, 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, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 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, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xd8, 0x01, 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, 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, 0x25, 0x0a, + 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, + 0x70, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x4e, 0x6f, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x56, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x88, 0x02, 0x0a, 0x1e, 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, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3d, 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, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, @@ -19333,340 +18691,371 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x38, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x22, 0x98, 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, - 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x17, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, + 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, 0x31, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3c, 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, 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, 0x22, 0x8a, 0x02, 0x0a, 0x1f, 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, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x12, 0x60, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, + 0x73, 0x12, 0x68, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 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, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x88, 0x07, 0x0a, 0x12, 0x56, 0x44, 0x69, - 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, + 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 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, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x4f, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x38, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x16, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, + 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, + 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x88, 0x07, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x65, + 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x55, + 0x0a, 0x1e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x69, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, + 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x70, + 0x5f, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6f, 0x6e, 0x6c, 0x79, 0x50, + 0x4b, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x38, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x77, + 0x73, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x61, + 0x69, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x12, 0x42, + 0x0a, 0x14, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, + 0x77, 0x61, 0x69, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x72, + 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6d, + 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x78, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x73, + 0x12, 0x3c, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, + 0x61, 0x78, 0x44, 0x69, 0x66, 0x66, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, + 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x22, 0x6b, 0x0a, 0x12, 0x56, 0x44, 0x69, + 0x66, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, - 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x55, 0x0a, 0x1e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x61, 0x69, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x09, 0x6f, - 0x6e, 0x6c, 0x79, 0x5f, 0x70, 0x5f, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x6f, 0x6e, 0x6c, 0x79, 0x50, 0x4b, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x72, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x74, - 0x72, 0x61, 0x52, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, - 0x61, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x14, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x61, 0x69, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x6f, 0x52, 0x65, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, - 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, - 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x3c, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x69, 0x66, - 0x66, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x66, 0x66, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x55, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x22, 0x6b, - 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x72, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x56, - 0x44, 0x69, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, - 0x64, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, - 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, + 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, + 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, + 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, 0xd7, + 0x01, 0x0a, 0x11, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, + 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x1a, 0x64, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, + 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x61, 0x72, 0x67, 0x22, 0xd7, 0x01, 0x0a, 0x11, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, - 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x64, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, - 0x10, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, - 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x56, 0x44, - 0x69, 0x66, 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xb2, 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, - 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, - 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x0a, 0x09, + 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, + 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, + 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x22, 0x67, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0xe6, 0x07, 0x0a, + 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x33, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xe8, 0x01, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x72, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x0e, 0x72, 0x6f, 0x77, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x70, + 0x69, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x0f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x1a, 0xbc, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 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, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x1a, 0x5c, 0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x1a, + 0x73, 0x0a, 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6f, 0x0a, 0x11, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x44, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xef, 0x03, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, 0x0a, + 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x3c, + 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, + 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, + 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, + 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x5b, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x34, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x67, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x1a, 0x0a, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x73, 0x22, 0xe6, 0x07, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, - 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x58, 0x0a, - 0x0d, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xe8, 0x01, 0x0a, - 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, - 0x27, 0x0a, 0x0f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x72, 0x6f, 0x77, 0x73, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x1a, 0xbc, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x1a, 0x5c, 0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x07, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x1a, 0x73, 0x0a, 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, - 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6f, 0x0a, 0x11, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xef, 0x03, 0x0a, 0x1c, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, - 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2a, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, - 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, - 0x79, 0x52, 0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0b, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0xa7, 0x01, 0x0a, - 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, - 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 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, 0x5b, 0x0a, 0x0e, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, - 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 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, 0x06, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x17, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0b, 0x6d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x1c, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x70, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x7f, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x69, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0b, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, - 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, - 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, - 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, - 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, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x37, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x22, 0x7f, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, + 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, + 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x56, 0x45, 0x54, 0x41, + 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x02, 0x2a, 0x38, 0x0a, + 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x08, + 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, 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, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -19682,7 +19071,7 @@ func file_vtctldata_proto_rawDescGZIP() []byte { } var file_vtctldata_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 299) +var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 288) var file_vtctldata_proto_goTypes = []any{ (MaterializationIntent)(0), // 0: vtctldata.MaterializationIntent (QueryOrdering)(0), // 1: vtctldata.QueryOrdering @@ -19948,327 +19337,307 @@ var file_vtctldata_proto_goTypes = []any{ nil, // 261: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry (*ApplyVSchemaResponse_ParamList)(nil), // 262: vtctldata.ApplyVSchemaResponse.ParamList nil, // 263: vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry - (*CheckThrottlerResponse_Metric)(nil), // 264: vtctldata.CheckThrottlerResponse.Metric - nil, // 265: vtctldata.CheckThrottlerResponse.MetricsEntry - nil, // 266: vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 267: vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 268: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - nil, // 269: vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 270: vtctldata.GetCellsAliasesResponse.AliasesEntry - nil, // 271: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry - nil, // 272: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 273: vtctldata.GetSrvKeyspaceNamesResponse.NameList - nil, // 274: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - nil, // 275: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - (*GetThrottlerStatusResponse_MetricResult)(nil), // 276: vtctldata.GetThrottlerStatusResponse.MetricResult - nil, // 277: vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry - nil, // 278: vtctldata.GetThrottlerStatusResponse.MetricThresholdsEntry - (*GetThrottlerStatusResponse_MetricHealth)(nil), // 279: vtctldata.GetThrottlerStatusResponse.MetricHealth - nil, // 280: vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry - nil, // 281: vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry - nil, // 282: vtctldata.GetThrottlerStatusResponse.AppCheckedMetricsEntry - (*GetThrottlerStatusResponse_RecentApp)(nil), // 283: vtctldata.GetThrottlerStatusResponse.RecentApp - nil, // 284: vtctldata.GetThrottlerStatusResponse.RecentAppsEntry - nil, // 285: vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry - (*MoveTablesCreateResponse_TabletInfo)(nil), // 286: vtctldata.MoveTablesCreateResponse.TabletInfo - nil, // 287: vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 288: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - nil, // 289: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - nil, // 290: vtctldata.ValidateResponse.ResultsByKeyspaceEntry - nil, // 291: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - nil, // 292: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - nil, // 293: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - nil, // 294: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - nil, // 295: vtctldata.VDiffShowResponse.TabletResponsesEntry - (*WorkflowDeleteResponse_TabletInfo)(nil), // 296: vtctldata.WorkflowDeleteResponse.TabletInfo - (*WorkflowStatusResponse_TableCopyState)(nil), // 297: vtctldata.WorkflowStatusResponse.TableCopyState - (*WorkflowStatusResponse_ShardStreamState)(nil), // 298: vtctldata.WorkflowStatusResponse.ShardStreamState - (*WorkflowStatusResponse_ShardStreams)(nil), // 299: vtctldata.WorkflowStatusResponse.ShardStreams - nil, // 300: vtctldata.WorkflowStatusResponse.TableCopyStateEntry - nil, // 301: vtctldata.WorkflowStatusResponse.ShardStreamsEntry - (*WorkflowUpdateResponse_TabletInfo)(nil), // 302: vtctldata.WorkflowUpdateResponse.TabletInfo - (*logutil.Event)(nil), // 303: logutil.Event - (tabletmanagerdata.TabletSelectionPreference)(0), // 304: tabletmanagerdata.TabletSelectionPreference - (*topodata.Keyspace)(nil), // 305: topodata.Keyspace - (*vttime.Time)(nil), // 306: vttime.Time - (*topodata.TabletAlias)(nil), // 307: topodata.TabletAlias - (*vttime.Duration)(nil), // 308: vttime.Duration - (*topodata.Shard)(nil), // 309: topodata.Shard - (*topodata.CellInfo)(nil), // 310: topodata.CellInfo - (*vschema.KeyspaceRoutingRules)(nil), // 311: vschema.KeyspaceRoutingRules - (*vschema.RoutingRules)(nil), // 312: vschema.RoutingRules - (*vschema.ShardRoutingRules)(nil), // 313: vschema.ShardRoutingRules - (*vtrpc.CallerID)(nil), // 314: vtrpc.CallerID - (*vschema.Keyspace)(nil), // 315: vschema.Keyspace - (topodata.TabletType)(0), // 316: topodata.TabletType - (*topodata.Tablet)(nil), // 317: topodata.Tablet - (topodata.KeyspaceType)(0), // 318: topodata.KeyspaceType - (*query.QueryResult)(nil), // 319: query.QueryResult - (*tabletmanagerdata.ExecuteHookRequest)(nil), // 320: tabletmanagerdata.ExecuteHookRequest - (*tabletmanagerdata.ExecuteHookResponse)(nil), // 321: tabletmanagerdata.ExecuteHookResponse - (*mysqlctl.BackupInfo)(nil), // 322: mysqlctl.BackupInfo - (*replicationdata.FullStatus)(nil), // 323: replicationdata.FullStatus - (*tabletmanagerdata.Permissions)(nil), // 324: tabletmanagerdata.Permissions - (*tabletmanagerdata.SchemaDefinition)(nil), // 325: tabletmanagerdata.SchemaDefinition - (*topodata.ThrottledAppRule)(nil), // 326: topodata.ThrottledAppRule - (*vschema.SrvVSchema)(nil), // 327: vschema.SrvVSchema - (*topodata.ShardReplicationError)(nil), // 328: topodata.ShardReplicationError - (*topodata.KeyRange)(nil), // 329: topodata.KeyRange - (*topodata.CellsAlias)(nil), // 330: topodata.CellsAlias - (*tabletmanagerdata.UpdateVReplicationWorkflowRequest)(nil), // 331: tabletmanagerdata.UpdateVReplicationWorkflowRequest - (*vschema.MirrorRules)(nil), // 332: vschema.MirrorRules - (*topodata.Shard_TabletControl)(nil), // 333: topodata.Shard.TabletControl - (*binlogdata.BinlogSource)(nil), // 334: binlogdata.BinlogSource - (*topodata.ShardReplication)(nil), // 335: topodata.ShardReplication - (*topodata.SrvKeyspace)(nil), // 336: topodata.SrvKeyspace - (*replicationdata.Status)(nil), // 337: replicationdata.Status - (*tabletmanagerdata.VDiffResponse)(nil), // 338: tabletmanagerdata.VDiffResponse + nil, // 264: vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 265: vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 266: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + nil, // 267: vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 268: vtctldata.GetCellsAliasesResponse.AliasesEntry + nil, // 269: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry + nil, // 270: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 271: vtctldata.GetSrvKeyspaceNamesResponse.NameList + nil, // 272: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + nil, // 273: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + nil, // 274: vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry + (*MoveTablesCreateResponse_TabletInfo)(nil), // 275: vtctldata.MoveTablesCreateResponse.TabletInfo + nil, // 276: vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 277: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + nil, // 278: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + nil, // 279: vtctldata.ValidateResponse.ResultsByKeyspaceEntry + nil, // 280: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + nil, // 281: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + nil, // 282: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + nil, // 283: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + nil, // 284: vtctldata.VDiffShowResponse.TabletResponsesEntry + (*WorkflowDeleteResponse_TabletInfo)(nil), // 285: vtctldata.WorkflowDeleteResponse.TabletInfo + (*WorkflowStatusResponse_TableCopyState)(nil), // 286: vtctldata.WorkflowStatusResponse.TableCopyState + (*WorkflowStatusResponse_ShardStreamState)(nil), // 287: vtctldata.WorkflowStatusResponse.ShardStreamState + (*WorkflowStatusResponse_ShardStreams)(nil), // 288: vtctldata.WorkflowStatusResponse.ShardStreams + nil, // 289: vtctldata.WorkflowStatusResponse.TableCopyStateEntry + nil, // 290: vtctldata.WorkflowStatusResponse.ShardStreamsEntry + (*WorkflowUpdateResponse_TabletInfo)(nil), // 291: vtctldata.WorkflowUpdateResponse.TabletInfo + (*logutil.Event)(nil), // 292: logutil.Event + (tabletmanagerdata.TabletSelectionPreference)(0), // 293: tabletmanagerdata.TabletSelectionPreference + (*topodata.Keyspace)(nil), // 294: topodata.Keyspace + (*vttime.Time)(nil), // 295: vttime.Time + (*topodata.TabletAlias)(nil), // 296: topodata.TabletAlias + (*vttime.Duration)(nil), // 297: vttime.Duration + (*topodata.Shard)(nil), // 298: topodata.Shard + (*topodata.CellInfo)(nil), // 299: topodata.CellInfo + (*vschema.KeyspaceRoutingRules)(nil), // 300: vschema.KeyspaceRoutingRules + (*vschema.RoutingRules)(nil), // 301: vschema.RoutingRules + (*vschema.ShardRoutingRules)(nil), // 302: vschema.ShardRoutingRules + (*vtrpc.CallerID)(nil), // 303: vtrpc.CallerID + (*vschema.Keyspace)(nil), // 304: vschema.Keyspace + (topodata.TabletType)(0), // 305: topodata.TabletType + (*topodata.Tablet)(nil), // 306: topodata.Tablet + (*tabletmanagerdata.CheckThrottlerResponse)(nil), // 307: tabletmanagerdata.CheckThrottlerResponse + (topodata.KeyspaceType)(0), // 308: topodata.KeyspaceType + (*query.QueryResult)(nil), // 309: query.QueryResult + (*tabletmanagerdata.ExecuteHookRequest)(nil), // 310: tabletmanagerdata.ExecuteHookRequest + (*tabletmanagerdata.ExecuteHookResponse)(nil), // 311: tabletmanagerdata.ExecuteHookResponse + (*mysqlctl.BackupInfo)(nil), // 312: mysqlctl.BackupInfo + (*replicationdata.FullStatus)(nil), // 313: replicationdata.FullStatus + (*tabletmanagerdata.Permissions)(nil), // 314: tabletmanagerdata.Permissions + (*tabletmanagerdata.SchemaDefinition)(nil), // 315: tabletmanagerdata.SchemaDefinition + (*topodata.ThrottledAppRule)(nil), // 316: topodata.ThrottledAppRule + (*vschema.SrvVSchema)(nil), // 317: vschema.SrvVSchema + (*tabletmanagerdata.GetThrottlerStatusResponse)(nil), // 318: tabletmanagerdata.GetThrottlerStatusResponse + (*topodata.ShardReplicationError)(nil), // 319: topodata.ShardReplicationError + (*topodata.KeyRange)(nil), // 320: topodata.KeyRange + (*topodata.CellsAlias)(nil), // 321: topodata.CellsAlias + (*tabletmanagerdata.UpdateVReplicationWorkflowRequest)(nil), // 322: tabletmanagerdata.UpdateVReplicationWorkflowRequest + (*vschema.MirrorRules)(nil), // 323: vschema.MirrorRules + (*topodata.Shard_TabletControl)(nil), // 324: topodata.Shard.TabletControl + (*binlogdata.BinlogSource)(nil), // 325: binlogdata.BinlogSource + (*topodata.ShardReplication)(nil), // 326: topodata.ShardReplication + (*topodata.SrvKeyspace)(nil), // 327: topodata.SrvKeyspace + (*replicationdata.Status)(nil), // 328: replicationdata.Status + (*tabletmanagerdata.VDiffResponse)(nil), // 329: tabletmanagerdata.VDiffResponse } var file_vtctldata_proto_depIdxs = []int32{ - 303, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event + 292, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event 6, // 1: vtctldata.MaterializeSettings.table_settings:type_name -> vtctldata.TableMaterializeSettings 0, // 2: vtctldata.MaterializeSettings.materialization_intent:type_name -> vtctldata.MaterializationIntent - 304, // 3: vtctldata.MaterializeSettings.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 293, // 3: vtctldata.MaterializeSettings.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 11, // 4: vtctldata.MaterializeSettings.workflow_options:type_name -> vtctldata.WorkflowOptions - 305, // 5: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace + 294, // 5: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace 2, // 6: vtctldata.SchemaMigration.strategy:type_name -> vtctldata.SchemaMigration.Strategy - 306, // 7: vtctldata.SchemaMigration.added_at:type_name -> vttime.Time - 306, // 8: vtctldata.SchemaMigration.requested_at:type_name -> vttime.Time - 306, // 9: vtctldata.SchemaMigration.ready_at:type_name -> vttime.Time - 306, // 10: vtctldata.SchemaMigration.started_at:type_name -> vttime.Time - 306, // 11: vtctldata.SchemaMigration.liveness_timestamp:type_name -> vttime.Time - 306, // 12: vtctldata.SchemaMigration.completed_at:type_name -> vttime.Time - 306, // 13: vtctldata.SchemaMigration.cleaned_up_at:type_name -> vttime.Time + 295, // 7: vtctldata.SchemaMigration.added_at:type_name -> vttime.Time + 295, // 8: vtctldata.SchemaMigration.requested_at:type_name -> vttime.Time + 295, // 9: vtctldata.SchemaMigration.ready_at:type_name -> vttime.Time + 295, // 10: vtctldata.SchemaMigration.started_at:type_name -> vttime.Time + 295, // 11: vtctldata.SchemaMigration.liveness_timestamp:type_name -> vttime.Time + 295, // 12: vtctldata.SchemaMigration.completed_at:type_name -> vttime.Time + 295, // 13: vtctldata.SchemaMigration.cleaned_up_at:type_name -> vttime.Time 3, // 14: vtctldata.SchemaMigration.status:type_name -> vtctldata.SchemaMigration.Status - 307, // 15: vtctldata.SchemaMigration.tablet:type_name -> topodata.TabletAlias - 308, // 16: vtctldata.SchemaMigration.artifact_retention:type_name -> vttime.Duration - 306, // 17: vtctldata.SchemaMigration.last_throttled_at:type_name -> vttime.Time - 306, // 18: vtctldata.SchemaMigration.cancelled_at:type_name -> vttime.Time - 306, // 19: vtctldata.SchemaMigration.reviewed_at:type_name -> vttime.Time - 306, // 20: vtctldata.SchemaMigration.ready_to_complete_at:type_name -> vttime.Time - 309, // 21: vtctldata.Shard.shard:type_name -> topodata.Shard + 296, // 15: vtctldata.SchemaMigration.tablet:type_name -> topodata.TabletAlias + 297, // 16: vtctldata.SchemaMigration.artifact_retention:type_name -> vttime.Duration + 295, // 17: vtctldata.SchemaMigration.last_throttled_at:type_name -> vttime.Time + 295, // 18: vtctldata.SchemaMigration.cancelled_at:type_name -> vttime.Time + 295, // 19: vtctldata.SchemaMigration.reviewed_at:type_name -> vttime.Time + 295, // 20: vtctldata.SchemaMigration.ready_to_complete_at:type_name -> vttime.Time + 298, // 21: vtctldata.Shard.shard:type_name -> topodata.Shard 254, // 22: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation 254, // 23: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation 253, // 24: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry 11, // 25: vtctldata.Workflow.options:type_name -> vtctldata.WorkflowOptions - 310, // 26: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 311, // 27: vtctldata.ApplyKeyspaceRoutingRulesRequest.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 311, // 28: vtctldata.ApplyKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 312, // 29: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules - 313, // 30: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 308, // 31: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration - 314, // 32: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID + 299, // 26: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 300, // 27: vtctldata.ApplyKeyspaceRoutingRulesRequest.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 300, // 28: vtctldata.ApplyKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 301, // 29: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules + 302, // 30: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 297, // 31: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration + 303, // 32: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID 260, // 33: vtctldata.ApplySchemaResponse.rows_affected_by_shard:type_name -> vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry - 315, // 34: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace - 315, // 35: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 304, // 34: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace + 304, // 35: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace 261, // 36: vtctldata.ApplyVSchemaResponse.unknown_vindex_params:type_name -> vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry - 307, // 37: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 38: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 303, // 39: vtctldata.BackupResponse.event:type_name -> logutil.Event + 296, // 37: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 38: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 292, // 39: vtctldata.BackupResponse.event:type_name -> logutil.Event 263, // 40: vtctldata.CancelSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry - 307, // 41: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias - 316, // 42: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType - 317, // 43: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet - 317, // 44: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet - 307, // 45: vtctldata.CheckThrottlerRequest.tablet_alias:type_name -> topodata.TabletAlias - 265, // 46: vtctldata.CheckThrottlerResponse.metrics:type_name -> vtctldata.CheckThrottlerResponse.MetricsEntry - 266, // 47: vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry - 267, // 48: vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry - 318, // 49: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType - 306, // 50: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time - 8, // 51: vtctldata.CreateKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace - 8, // 52: vtctldata.CreateShardResponse.keyspace:type_name -> vtctldata.Keyspace - 10, // 53: vtctldata.CreateShardResponse.shard:type_name -> vtctldata.Shard - 10, // 54: vtctldata.DeleteShardsRequest.shards:type_name -> vtctldata.Shard - 307, // 55: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 307, // 56: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 307, // 57: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias - 308, // 58: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 307, // 59: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 303, // 60: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event - 307, // 61: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias - 319, // 62: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult - 307, // 63: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 319, // 64: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult - 307, // 65: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias - 320, // 66: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest - 321, // 67: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse - 307, // 68: vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 319, // 69: vtctldata.ExecuteMultiFetchAsDBAResponse.results:type_name -> query.QueryResult - 268, // 70: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - 269, // 71: vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry - 322, // 72: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo - 310, // 73: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 270, // 74: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry - 307, // 75: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 323, // 76: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus - 8, // 77: vtctldata.GetKeyspacesResponse.keyspaces:type_name -> vtctldata.Keyspace - 8, // 78: vtctldata.GetKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace - 307, // 79: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias - 324, // 80: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions - 311, // 81: vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 312, // 82: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules - 307, // 83: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 325, // 84: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition - 3, // 85: vtctldata.GetSchemaMigrationsRequest.status:type_name -> vtctldata.SchemaMigration.Status - 308, // 86: vtctldata.GetSchemaMigrationsRequest.recent:type_name -> vttime.Duration - 1, // 87: vtctldata.GetSchemaMigrationsRequest.order:type_name -> vtctldata.QueryOrdering - 9, // 88: vtctldata.GetSchemaMigrationsResponse.migrations:type_name -> vtctldata.SchemaMigration - 271, // 89: vtctldata.GetShardReplicationResponse.shard_replication_by_cell:type_name -> vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry - 10, // 90: vtctldata.GetShardResponse.shard:type_name -> vtctldata.Shard - 313, // 91: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 272, // 92: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - 274, // 93: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - 326, // 94: vtctldata.UpdateThrottlerConfigRequest.throttled_app:type_name -> topodata.ThrottledAppRule - 327, // 95: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema - 275, // 96: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - 307, // 97: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 317, // 98: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet - 307, // 99: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 316, // 100: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType - 317, // 101: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet - 307, // 102: vtctldata.GetThrottlerStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 277, // 103: vtctldata.GetThrottlerStatusResponse.aggregated_metrics:type_name -> vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry - 278, // 104: vtctldata.GetThrottlerStatusResponse.metric_thresholds:type_name -> vtctldata.GetThrottlerStatusResponse.MetricThresholdsEntry - 280, // 105: vtctldata.GetThrottlerStatusResponse.metrics_health:type_name -> vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry - 281, // 106: vtctldata.GetThrottlerStatusResponse.throttled_apps:type_name -> vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry - 282, // 107: vtctldata.GetThrottlerStatusResponse.app_checked_metrics:type_name -> vtctldata.GetThrottlerStatusResponse.AppCheckedMetricsEntry - 284, // 108: vtctldata.GetThrottlerStatusResponse.recent_apps:type_name -> vtctldata.GetThrottlerStatusResponse.RecentAppsEntry - 118, // 109: vtctldata.GetTopologyPathResponse.cell:type_name -> vtctldata.TopologyCell - 307, // 110: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias - 315, // 111: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace - 12, // 112: vtctldata.GetWorkflowsResponse.workflows:type_name -> vtctldata.Workflow - 307, // 113: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias - 308, // 114: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration - 303, // 115: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event - 285, // 116: vtctldata.LaunchSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry - 315, // 117: vtctldata.LookupVindexCreateRequest.vindex:type_name -> vschema.Keyspace - 316, // 118: vtctldata.LookupVindexCreateRequest.tablet_types:type_name -> topodata.TabletType - 304, // 119: vtctldata.LookupVindexCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 7, // 120: vtctldata.MaterializeCreateRequest.settings:type_name -> vtctldata.MaterializeSettings - 316, // 121: vtctldata.MigrateCreateRequest.tablet_types:type_name -> topodata.TabletType - 304, // 122: vtctldata.MigrateCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 316, // 123: vtctldata.MoveTablesCreateRequest.tablet_types:type_name -> topodata.TabletType - 304, // 124: vtctldata.MoveTablesCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 11, // 125: vtctldata.MoveTablesCreateRequest.workflow_options:type_name -> vtctldata.WorkflowOptions - 286, // 126: vtctldata.MoveTablesCreateResponse.details:type_name -> vtctldata.MoveTablesCreateResponse.TabletInfo - 307, // 127: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 128: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 307, // 129: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias - 308, // 130: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 308, // 131: vtctldata.PlannedReparentShardRequest.tolerable_replication_lag:type_name -> vttime.Duration - 307, // 132: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 303, // 133: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event - 307, // 134: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 135: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 303, // 136: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event - 303, // 137: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event - 307, // 138: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias - 307, // 139: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias - 316, // 140: vtctldata.ReshardCreateRequest.tablet_types:type_name -> topodata.TabletType - 304, // 141: vtctldata.ReshardCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 307, // 142: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 306, // 143: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time - 306, // 144: vtctldata.RestoreFromBackupRequest.restore_to_timestamp:type_name -> vttime.Time - 307, // 145: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 303, // 146: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event - 287, // 147: vtctldata.RetrySchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry - 307, // 148: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias - 305, // 149: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace - 305, // 150: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace - 309, // 151: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard - 316, // 152: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType - 309, // 153: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard - 307, // 154: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 155: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias - 328, // 156: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError - 288, // 157: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - 289, // 158: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - 307, // 159: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 160: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 308, // 161: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration - 329, // 162: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange - 309, // 163: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard - 309, // 164: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard - 307, // 165: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 166: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 307, // 167: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias - 307, // 168: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias - 307, // 169: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias - 310, // 170: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 310, // 171: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 330, // 172: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias - 330, // 173: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias - 290, // 174: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry - 291, // 175: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - 292, // 176: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - 293, // 177: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - 294, // 178: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - 316, // 179: vtctldata.VDiffCreateRequest.tablet_types:type_name -> topodata.TabletType - 304, // 180: vtctldata.VDiffCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 308, // 181: vtctldata.VDiffCreateRequest.filtered_replication_wait_time:type_name -> vttime.Duration - 308, // 182: vtctldata.VDiffCreateRequest.wait_update_interval:type_name -> vttime.Duration - 308, // 183: vtctldata.VDiffCreateRequest.max_diff_duration:type_name -> vttime.Duration - 295, // 184: vtctldata.VDiffShowResponse.tablet_responses:type_name -> vtctldata.VDiffShowResponse.TabletResponsesEntry - 296, // 185: vtctldata.WorkflowDeleteResponse.details:type_name -> vtctldata.WorkflowDeleteResponse.TabletInfo - 300, // 186: vtctldata.WorkflowStatusResponse.table_copy_state:type_name -> vtctldata.WorkflowStatusResponse.TableCopyStateEntry - 301, // 187: vtctldata.WorkflowStatusResponse.shard_streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamsEntry - 316, // 188: vtctldata.WorkflowSwitchTrafficRequest.tablet_types:type_name -> topodata.TabletType - 308, // 189: vtctldata.WorkflowSwitchTrafficRequest.max_replication_lag_allowed:type_name -> vttime.Duration - 308, // 190: vtctldata.WorkflowSwitchTrafficRequest.timeout:type_name -> vttime.Duration - 331, // 191: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVReplicationWorkflowRequest - 302, // 192: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo - 332, // 193: vtctldata.GetMirrorRulesResponse.mirror_rules:type_name -> vschema.MirrorRules - 316, // 194: vtctldata.WorkflowMirrorTrafficRequest.tablet_types:type_name -> topodata.TabletType - 255, // 195: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream - 256, // 196: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream - 333, // 197: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl - 307, // 198: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias - 334, // 199: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource - 306, // 200: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time - 306, // 201: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time - 257, // 202: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState - 258, // 203: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log - 259, // 204: vtctldata.Workflow.Stream.throttler_status:type_name -> vtctldata.Workflow.Stream.ThrottlerStatus - 316, // 205: vtctldata.Workflow.Stream.tablet_types:type_name -> topodata.TabletType - 304, // 206: vtctldata.Workflow.Stream.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 306, // 207: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time - 306, // 208: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time - 306, // 209: vtctldata.Workflow.Stream.ThrottlerStatus.time_throttled:type_name -> vttime.Time - 262, // 210: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry.value:type_name -> vtctldata.ApplyVSchemaResponse.ParamList - 264, // 211: vtctldata.CheckThrottlerResponse.MetricsEntry.value:type_name -> vtctldata.CheckThrottlerResponse.Metric - 10, // 212: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard - 330, // 213: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias - 335, // 214: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry.value:type_name -> topodata.ShardReplication - 273, // 215: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList - 336, // 216: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace - 327, // 217: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema - 276, // 218: vtctldata.GetThrottlerStatusResponse.AggregatedMetricsEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.MetricResult - 306, // 219: vtctldata.GetThrottlerStatusResponse.MetricHealth.last_healthy_at:type_name -> vttime.Time - 279, // 220: vtctldata.GetThrottlerStatusResponse.MetricsHealthEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.MetricHealth - 326, // 221: vtctldata.GetThrottlerStatusResponse.ThrottledAppsEntry.value:type_name -> topodata.ThrottledAppRule - 306, // 222: vtctldata.GetThrottlerStatusResponse.RecentApp.checked_at:type_name -> vttime.Time - 283, // 223: vtctldata.GetThrottlerStatusResponse.RecentAppsEntry.value:type_name -> vtctldata.GetThrottlerStatusResponse.RecentApp - 307, // 224: vtctldata.MoveTablesCreateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 337, // 225: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status - 317, // 226: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet - 220, // 227: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse - 224, // 228: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 224, // 229: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 224, // 230: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 224, // 231: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 338, // 232: vtctldata.VDiffShowResponse.TabletResponsesEntry.value:type_name -> tabletmanagerdata.VDiffResponse - 307, // 233: vtctldata.WorkflowDeleteResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 307, // 234: vtctldata.WorkflowStatusResponse.ShardStreamState.tablet:type_name -> topodata.TabletAlias - 298, // 235: vtctldata.WorkflowStatusResponse.ShardStreams.streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamState - 297, // 236: vtctldata.WorkflowStatusResponse.TableCopyStateEntry.value:type_name -> vtctldata.WorkflowStatusResponse.TableCopyState - 299, // 237: vtctldata.WorkflowStatusResponse.ShardStreamsEntry.value:type_name -> vtctldata.WorkflowStatusResponse.ShardStreams - 307, // 238: vtctldata.WorkflowUpdateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 239, // [239:239] is the sub-list for method output_type - 239, // [239:239] is the sub-list for method input_type - 239, // [239:239] is the sub-list for extension type_name - 239, // [239:239] is the sub-list for extension extendee - 0, // [0:239] is the sub-list for field type_name + 296, // 41: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias + 305, // 42: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType + 306, // 43: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet + 306, // 44: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet + 296, // 45: vtctldata.CheckThrottlerRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 46: vtctldata.CheckThrottlerResponse.tablet_alias:type_name -> topodata.TabletAlias + 307, // 47: vtctldata.CheckThrottlerResponse.Check:type_name -> tabletmanagerdata.CheckThrottlerResponse + 264, // 48: vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry + 265, // 49: vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry + 308, // 50: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType + 295, // 51: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time + 8, // 52: vtctldata.CreateKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace + 8, // 53: vtctldata.CreateShardResponse.keyspace:type_name -> vtctldata.Keyspace + 10, // 54: vtctldata.CreateShardResponse.shard:type_name -> vtctldata.Shard + 10, // 55: vtctldata.DeleteShardsRequest.shards:type_name -> vtctldata.Shard + 296, // 56: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 296, // 57: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 296, // 58: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias + 297, // 59: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 296, // 60: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 292, // 61: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event + 296, // 62: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias + 309, // 63: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult + 296, // 64: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 309, // 65: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult + 296, // 66: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias + 310, // 67: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest + 311, // 68: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse + 296, // 69: vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 309, // 70: vtctldata.ExecuteMultiFetchAsDBAResponse.results:type_name -> query.QueryResult + 266, // 71: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + 267, // 72: vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry + 312, // 73: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo + 299, // 74: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 268, // 75: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry + 296, // 76: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 313, // 77: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus + 8, // 78: vtctldata.GetKeyspacesResponse.keyspaces:type_name -> vtctldata.Keyspace + 8, // 79: vtctldata.GetKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace + 296, // 80: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias + 314, // 81: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions + 300, // 82: vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 301, // 83: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules + 296, // 84: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 315, // 85: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition + 3, // 86: vtctldata.GetSchemaMigrationsRequest.status:type_name -> vtctldata.SchemaMigration.Status + 297, // 87: vtctldata.GetSchemaMigrationsRequest.recent:type_name -> vttime.Duration + 1, // 88: vtctldata.GetSchemaMigrationsRequest.order:type_name -> vtctldata.QueryOrdering + 9, // 89: vtctldata.GetSchemaMigrationsResponse.migrations:type_name -> vtctldata.SchemaMigration + 269, // 90: vtctldata.GetShardReplicationResponse.shard_replication_by_cell:type_name -> vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry + 10, // 91: vtctldata.GetShardResponse.shard:type_name -> vtctldata.Shard + 302, // 92: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 270, // 93: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + 272, // 94: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + 316, // 95: vtctldata.UpdateThrottlerConfigRequest.throttled_app:type_name -> topodata.ThrottledAppRule + 317, // 96: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema + 273, // 97: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + 296, // 98: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 306, // 99: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet + 296, // 100: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 305, // 101: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType + 306, // 102: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet + 296, // 103: vtctldata.GetThrottlerStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 318, // 104: vtctldata.GetThrottlerStatusResponse.status:type_name -> tabletmanagerdata.GetThrottlerStatusResponse + 118, // 105: vtctldata.GetTopologyPathResponse.cell:type_name -> vtctldata.TopologyCell + 296, // 106: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias + 304, // 107: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 12, // 108: vtctldata.GetWorkflowsResponse.workflows:type_name -> vtctldata.Workflow + 296, // 109: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias + 297, // 110: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration + 292, // 111: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event + 274, // 112: vtctldata.LaunchSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry + 304, // 113: vtctldata.LookupVindexCreateRequest.vindex:type_name -> vschema.Keyspace + 305, // 114: vtctldata.LookupVindexCreateRequest.tablet_types:type_name -> topodata.TabletType + 293, // 115: vtctldata.LookupVindexCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 7, // 116: vtctldata.MaterializeCreateRequest.settings:type_name -> vtctldata.MaterializeSettings + 305, // 117: vtctldata.MigrateCreateRequest.tablet_types:type_name -> topodata.TabletType + 293, // 118: vtctldata.MigrateCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 305, // 119: vtctldata.MoveTablesCreateRequest.tablet_types:type_name -> topodata.TabletType + 293, // 120: vtctldata.MoveTablesCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 11, // 121: vtctldata.MoveTablesCreateRequest.workflow_options:type_name -> vtctldata.WorkflowOptions + 275, // 122: vtctldata.MoveTablesCreateResponse.details:type_name -> vtctldata.MoveTablesCreateResponse.TabletInfo + 296, // 123: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 124: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 296, // 125: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias + 297, // 126: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 297, // 127: vtctldata.PlannedReparentShardRequest.tolerable_replication_lag:type_name -> vttime.Duration + 296, // 128: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 292, // 129: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event + 296, // 130: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 131: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 292, // 132: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event + 292, // 133: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event + 296, // 134: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias + 296, // 135: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias + 305, // 136: vtctldata.ReshardCreateRequest.tablet_types:type_name -> topodata.TabletType + 293, // 137: vtctldata.ReshardCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 296, // 138: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 295, // 139: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time + 295, // 140: vtctldata.RestoreFromBackupRequest.restore_to_timestamp:type_name -> vttime.Time + 296, // 141: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 292, // 142: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event + 276, // 143: vtctldata.RetrySchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry + 296, // 144: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias + 294, // 145: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace + 294, // 146: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace + 298, // 147: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard + 305, // 148: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType + 298, // 149: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard + 296, // 150: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 151: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias + 319, // 152: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError + 277, // 153: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + 278, // 154: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + 296, // 155: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 156: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 297, // 157: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration + 320, // 158: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange + 298, // 159: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard + 298, // 160: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard + 296, // 161: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 162: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 296, // 163: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias + 296, // 164: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias + 296, // 165: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias + 299, // 166: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 299, // 167: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 321, // 168: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias + 321, // 169: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias + 279, // 170: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry + 280, // 171: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + 281, // 172: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + 282, // 173: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + 283, // 174: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + 305, // 175: vtctldata.VDiffCreateRequest.tablet_types:type_name -> topodata.TabletType + 293, // 176: vtctldata.VDiffCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 297, // 177: vtctldata.VDiffCreateRequest.filtered_replication_wait_time:type_name -> vttime.Duration + 297, // 178: vtctldata.VDiffCreateRequest.wait_update_interval:type_name -> vttime.Duration + 297, // 179: vtctldata.VDiffCreateRequest.max_diff_duration:type_name -> vttime.Duration + 284, // 180: vtctldata.VDiffShowResponse.tablet_responses:type_name -> vtctldata.VDiffShowResponse.TabletResponsesEntry + 285, // 181: vtctldata.WorkflowDeleteResponse.details:type_name -> vtctldata.WorkflowDeleteResponse.TabletInfo + 289, // 182: vtctldata.WorkflowStatusResponse.table_copy_state:type_name -> vtctldata.WorkflowStatusResponse.TableCopyStateEntry + 290, // 183: vtctldata.WorkflowStatusResponse.shard_streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamsEntry + 305, // 184: vtctldata.WorkflowSwitchTrafficRequest.tablet_types:type_name -> topodata.TabletType + 297, // 185: vtctldata.WorkflowSwitchTrafficRequest.max_replication_lag_allowed:type_name -> vttime.Duration + 297, // 186: vtctldata.WorkflowSwitchTrafficRequest.timeout:type_name -> vttime.Duration + 322, // 187: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVReplicationWorkflowRequest + 291, // 188: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo + 323, // 189: vtctldata.GetMirrorRulesResponse.mirror_rules:type_name -> vschema.MirrorRules + 305, // 190: vtctldata.WorkflowMirrorTrafficRequest.tablet_types:type_name -> topodata.TabletType + 255, // 191: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream + 256, // 192: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream + 324, // 193: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl + 296, // 194: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias + 325, // 195: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource + 295, // 196: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time + 295, // 197: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time + 257, // 198: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState + 258, // 199: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log + 259, // 200: vtctldata.Workflow.Stream.throttler_status:type_name -> vtctldata.Workflow.Stream.ThrottlerStatus + 305, // 201: vtctldata.Workflow.Stream.tablet_types:type_name -> topodata.TabletType + 293, // 202: vtctldata.Workflow.Stream.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 295, // 203: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time + 295, // 204: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time + 295, // 205: vtctldata.Workflow.Stream.ThrottlerStatus.time_throttled:type_name -> vttime.Time + 262, // 206: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry.value:type_name -> vtctldata.ApplyVSchemaResponse.ParamList + 10, // 207: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard + 321, // 208: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias + 326, // 209: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry.value:type_name -> topodata.ShardReplication + 271, // 210: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList + 327, // 211: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace + 317, // 212: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema + 296, // 213: vtctldata.MoveTablesCreateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 328, // 214: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status + 306, // 215: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet + 220, // 216: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse + 224, // 217: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 224, // 218: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 224, // 219: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 224, // 220: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 329, // 221: vtctldata.VDiffShowResponse.TabletResponsesEntry.value:type_name -> tabletmanagerdata.VDiffResponse + 296, // 222: vtctldata.WorkflowDeleteResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 296, // 223: vtctldata.WorkflowStatusResponse.ShardStreamState.tablet:type_name -> topodata.TabletAlias + 287, // 224: vtctldata.WorkflowStatusResponse.ShardStreams.streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamState + 286, // 225: vtctldata.WorkflowStatusResponse.TableCopyStateEntry.value:type_name -> vtctldata.WorkflowStatusResponse.TableCopyState + 288, // 226: vtctldata.WorkflowStatusResponse.ShardStreamsEntry.value:type_name -> vtctldata.WorkflowStatusResponse.ShardStreams + 296, // 227: vtctldata.WorkflowUpdateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 228, // [228:228] is the sub-list for method output_type + 228, // [228:228] is the sub-list for method input_type + 228, // [228:228] is the sub-list for extension type_name + 228, // [228:228] is the sub-list for extension extendee + 0, // [0:228] is the sub-list for field type_name } func init() { file_vtctldata_proto_init() } @@ -23349,19 +22718,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[260].Exporter = func(v any, i int) any { - switch v := v.(*CheckThrottlerResponse_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vtctldata_proto_msgTypes[269].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[267].Exporter = func(v any, i int) any { switch v := v.(*GetSrvKeyspaceNamesResponse_NameList); i { case 0: return &v.state @@ -23373,43 +22730,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[272].Exporter = func(v any, i int) any { - switch v := v.(*GetThrottlerStatusResponse_MetricResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vtctldata_proto_msgTypes[275].Exporter = func(v any, i int) any { - switch v := v.(*GetThrottlerStatusResponse_MetricHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vtctldata_proto_msgTypes[279].Exporter = func(v any, i int) any { - switch v := v.(*GetThrottlerStatusResponse_RecentApp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vtctldata_proto_msgTypes[282].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[271].Exporter = func(v any, i int) any { switch v := v.(*MoveTablesCreateResponse_TabletInfo); i { case 0: return &v.state @@ -23421,7 +22742,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[292].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[281].Exporter = func(v any, i int) any { switch v := v.(*WorkflowDeleteResponse_TabletInfo); i { case 0: return &v.state @@ -23433,7 +22754,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[293].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[282].Exporter = func(v any, i int) any { switch v := v.(*WorkflowStatusResponse_TableCopyState); i { case 0: return &v.state @@ -23445,7 +22766,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[294].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[283].Exporter = func(v any, i int) any { switch v := v.(*WorkflowStatusResponse_ShardStreamState); i { case 0: return &v.state @@ -23457,7 +22778,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[295].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[284].Exporter = func(v any, i int) any { switch v := v.(*WorkflowStatusResponse_ShardStreams); i { case 0: return &v.state @@ -23469,7 +22790,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[298].Exporter = func(v any, i int) any { + file_vtctldata_proto_msgTypes[287].Exporter = func(v any, i int) any { switch v := v.(*WorkflowUpdateResponse_TabletInfo); i { case 0: return &v.state @@ -23488,7 +22809,7 @@ func file_vtctldata_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vtctldata_proto_rawDesc, NumEnums: 4, - NumMessages: 299, + NumMessages: 288, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go index cd52155d618..7e38623a907 100644 --- a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go +++ b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go @@ -984,48 +984,13 @@ func (m *CheckThrottlerRequest) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *CheckThrottlerResponse_Metric) CloneVT() *CheckThrottlerResponse_Metric { - if m == nil { - return (*CheckThrottlerResponse_Metric)(nil) - } - r := &CheckThrottlerResponse_Metric{ - Name: m.Name, - StatusCode: m.StatusCode, - Value: m.Value, - Threshold: m.Threshold, - Error: m.Error, - Message: m.Message, - Scope: m.Scope, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CheckThrottlerResponse_Metric) CloneMessageVT() proto.Message { - return m.CloneVT() -} - func (m *CheckThrottlerResponse) CloneVT() *CheckThrottlerResponse { if m == nil { return (*CheckThrottlerResponse)(nil) } r := &CheckThrottlerResponse{ - StatusCode: m.StatusCode, - Value: m.Value, - Threshold: m.Threshold, - Error: m.Error, - Message: m.Message, - RecentlyChecked: m.RecentlyChecked, - } - if rhs := m.Metrics; rhs != nil { - tmpContainer := make(map[string]*CheckThrottlerResponse_Metric, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Metrics = tmpContainer + TabletAlias: m.TabletAlias.CloneVT(), + Check: m.Check.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -2668,122 +2633,12 @@ func (m *GetThrottlerStatusRequest) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *GetThrottlerStatusResponse_MetricResult) CloneVT() *GetThrottlerStatusResponse_MetricResult { - if m == nil { - return (*GetThrottlerStatusResponse_MetricResult)(nil) - } - r := &GetThrottlerStatusResponse_MetricResult{ - Value: m.Value, - Error: m.Error, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *GetThrottlerStatusResponse_MetricResult) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *GetThrottlerStatusResponse_MetricHealth) CloneVT() *GetThrottlerStatusResponse_MetricHealth { - if m == nil { - return (*GetThrottlerStatusResponse_MetricHealth)(nil) - } - r := &GetThrottlerStatusResponse_MetricHealth{ - LastHealthyAt: m.LastHealthyAt.CloneVT(), - SecondsSinceLastHealthy: m.SecondsSinceLastHealthy, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *GetThrottlerStatusResponse_MetricHealth) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *GetThrottlerStatusResponse_RecentApp) CloneVT() *GetThrottlerStatusResponse_RecentApp { - if m == nil { - return (*GetThrottlerStatusResponse_RecentApp)(nil) - } - r := &GetThrottlerStatusResponse_RecentApp{ - CheckedAt: m.CheckedAt.CloneVT(), - StatusCode: m.StatusCode, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *GetThrottlerStatusResponse_RecentApp) CloneMessageVT() proto.Message { - return m.CloneVT() -} - func (m *GetThrottlerStatusResponse) CloneVT() *GetThrottlerStatusResponse { if m == nil { return (*GetThrottlerStatusResponse)(nil) } r := &GetThrottlerStatusResponse{ - TabletAlias: m.TabletAlias, - Keyspace: m.Keyspace, - Shard: m.Shard, - IsLeader: m.IsLeader, - IsOpen: m.IsOpen, - IsEnabled: m.IsEnabled, - IsDormant: m.IsDormant, - LagMetricQuery: m.LagMetricQuery, - CustomMetricQuery: m.CustomMetricQuery, - DefaultThreshold: m.DefaultThreshold, - MetricNameUsedAsDefault: m.MetricNameUsedAsDefault, - RecentlyChecked: m.RecentlyChecked, - } - if rhs := m.AggregatedMetrics; rhs != nil { - tmpContainer := make(map[string]*GetThrottlerStatusResponse_MetricResult, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.AggregatedMetrics = tmpContainer - } - if rhs := m.MetricThresholds; rhs != nil { - tmpContainer := make(map[string]float64, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.MetricThresholds = tmpContainer - } - if rhs := m.MetricsHealth; rhs != nil { - tmpContainer := make(map[string]*GetThrottlerStatusResponse_MetricHealth, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.MetricsHealth = tmpContainer - } - if rhs := m.ThrottledApps; rhs != nil { - tmpContainer := make(map[string]*topodata.ThrottledAppRule, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.ThrottledApps = tmpContainer - } - if rhs := m.AppCheckedMetrics; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.AppCheckedMetrics = tmpContainer - } - if rhs := m.RecentApps; rhs != nil { - tmpContainer := make(map[string]*GetThrottlerStatusResponse_RecentApp, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.RecentApps = tmpContainer + Status: m.Status.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -8867,84 +8722,6 @@ func (m *CheckThrottlerRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *CheckThrottlerResponse_Metric) 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 *CheckThrottlerResponse_Metric) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CheckThrottlerResponse_Metric) 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 len(m.Scope) > 0 { - i -= len(m.Scope) - copy(dAtA[i:], m.Scope) - i = encodeVarint(dAtA, i, uint64(len(m.Scope))) - i-- - dAtA[i] = 0x3a - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x32 - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarint(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x2a - } - if m.Threshold != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Threshold)))) - i-- - dAtA[i] = 0x21 - } - if m.Value != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x19 - } - if m.StatusCode != 0 { - i = encodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *CheckThrottlerResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -8975,68 +8752,25 @@ func (m *CheckThrottlerResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Metrics) > 0 { - for k := range m.Metrics { - v := m.Metrics[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if m.RecentlyChecked { - i-- - if m.RecentlyChecked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.Check != nil { + size, err := m.Check.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x30 - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarint(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x22 - } - if m.Threshold != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Threshold)))) - i-- - dAtA[i] = 0x19 - } - if m.Value != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x11 + dAtA[i] = 0x12 } - if m.StatusCode != 0 { - i = encodeVarint(dAtA, i, uint64(m.StatusCode)) + if m.TabletAlias != nil { + size, err := m.TabletAlias.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -13066,148 +12800,6 @@ func (m *GetThrottlerStatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *GetThrottlerStatusResponse_MetricResult) 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 *GetThrottlerStatusResponse_MetricResult) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetThrottlerStatusResponse_MetricResult) 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 len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarint(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if m.Value != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *GetThrottlerStatusResponse_MetricHealth) 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 *GetThrottlerStatusResponse_MetricHealth) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetThrottlerStatusResponse_MetricHealth) 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.SecondsSinceLastHealthy != 0 { - i = encodeVarint(dAtA, i, uint64(m.SecondsSinceLastHealthy)) - i-- - dAtA[i] = 0x10 - } - if m.LastHealthyAt != nil { - size, err := m.LastHealthyAt.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetThrottlerStatusResponse_RecentApp) 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 *GetThrottlerStatusResponse_RecentApp) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetThrottlerStatusResponse_RecentApp) 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.StatusCode != 0 { - i = encodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x10 - } - if m.CheckedAt != nil { - size, err := m.CheckedAt.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *GetThrottlerStatusResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -13238,232 +12830,13 @@ func (m *GetThrottlerStatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, e i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.RecentApps) > 0 { - for k := range m.RecentApps { - v := m.RecentApps[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - } - if m.RecentlyChecked { - i-- - if m.RecentlyChecked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if len(m.AppCheckedMetrics) > 0 { - for k := range m.AppCheckedMetrics { - v := m.AppCheckedMetrics[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - } - if len(m.ThrottledApps) > 0 { - for k := range m.ThrottledApps { - v := m.ThrottledApps[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x7a - } - } - if len(m.MetricsHealth) > 0 { - for k := range m.MetricsHealth { - v := m.MetricsHealth[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x72 - } - } - if len(m.MetricThresholds) > 0 { - for k := range m.MetricThresholds { - v := m.MetricThresholds[k] - baseI := i - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x6a - } - } - if len(m.AggregatedMetrics) > 0 { - for k := range m.AggregatedMetrics { - v := m.AggregatedMetrics[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x62 - } - } - if len(m.MetricNameUsedAsDefault) > 0 { - i -= len(m.MetricNameUsedAsDefault) - copy(dAtA[i:], m.MetricNameUsedAsDefault) - i = encodeVarint(dAtA, i, uint64(len(m.MetricNameUsedAsDefault))) - i-- - dAtA[i] = 0x5a - } - if m.DefaultThreshold != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultThreshold)))) - i-- - dAtA[i] = 0x51 - } - if len(m.CustomMetricQuery) > 0 { - i -= len(m.CustomMetricQuery) - copy(dAtA[i:], m.CustomMetricQuery) - i = encodeVarint(dAtA, i, uint64(len(m.CustomMetricQuery))) - i-- - dAtA[i] = 0x4a - } - if len(m.LagMetricQuery) > 0 { - i -= len(m.LagMetricQuery) - copy(dAtA[i:], m.LagMetricQuery) - i = encodeVarint(dAtA, i, uint64(len(m.LagMetricQuery))) - i-- - dAtA[i] = 0x42 - } - if m.IsDormant { - i-- - if m.IsDormant { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.IsEnabled { - i-- - if m.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.IsOpen { - i-- - if m.IsOpen { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.IsLeader { - i-- - if m.IsLeader { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.Status != nil { + size, err := m.Status.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - 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.TabletAlias) > 0 { - i -= len(m.TabletAlias) - copy(dAtA[i:], m.TabletAlias) - i = encodeVarint(dAtA, i, uint64(len(m.TabletAlias))) + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -22700,80 +22073,20 @@ func (m *CheckThrottlerRequest) SizeVT() (n int) { return n } -func (m *CheckThrottlerResponse_Metric) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.StatusCode != 0 { - n += 1 + sov(uint64(m.StatusCode)) - } - if m.Value != 0 { - n += 9 - } - if m.Threshold != 0 { - n += 9 - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Scope) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - func (m *CheckThrottlerResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.StatusCode != 0 { - n += 1 + sov(uint64(m.StatusCode)) - } - if m.Value != 0 { - n += 9 - } - if m.Threshold != 0 { - n += 9 - } - l = len(m.Error) - if l > 0 { + if m.TabletAlias != nil { + l = m.TabletAlias.SizeVT() n += 1 + l + sov(uint64(l)) } - l = len(m.Message) - if l > 0 { + if m.Check != nil { + l = m.Check.SizeVT() n += 1 + l + sov(uint64(l)) } - if m.RecentlyChecked { - n += 2 - } - if len(m.Metrics) > 0 { - for k, v := range m.Metrics { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } n += len(m.unknownFields) return n } @@ -24230,173 +23543,16 @@ func (m *GetThrottlerStatusRequest) SizeVT() (n int) { return n } -func (m *GetThrottlerStatusResponse_MetricResult) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *GetThrottlerStatusResponse_MetricHealth) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LastHealthyAt != nil { - l = m.LastHealthyAt.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.SecondsSinceLastHealthy != 0 { - n += 1 + sov(uint64(m.SecondsSinceLastHealthy)) - } - n += len(m.unknownFields) - return n -} - -func (m *GetThrottlerStatusResponse_RecentApp) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CheckedAt != nil { - l = m.CheckedAt.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.StatusCode != 0 { - n += 1 + sov(uint64(m.StatusCode)) - } - n += len(m.unknownFields) - return n -} - func (m *GetThrottlerStatusResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.TabletAlias) - 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.IsLeader { - n += 2 - } - if m.IsOpen { - n += 2 - } - if m.IsEnabled { - n += 2 - } - if m.IsDormant { - n += 2 - } - l = len(m.LagMetricQuery) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.CustomMetricQuery) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.DefaultThreshold != 0 { - n += 9 - } - l = len(m.MetricNameUsedAsDefault) - if l > 0 { + if m.Status != nil { + l = m.Status.SizeVT() n += 1 + l + sov(uint64(l)) } - if len(m.AggregatedMetrics) > 0 { - for k, v := range m.AggregatedMetrics { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.MetricThresholds) > 0 { - for k, v := range m.MetricThresholds { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.MetricsHealth) > 0 { - for k, v := range m.MetricsHealth { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.ThrottledApps) > 0 { - for k, v := range m.ThrottledApps { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.AppCheckedMetrics) > 0 { - for k, v := range m.AppCheckedMetrics { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 2 + sov(uint64(mapEntrySize)) - } - } - if m.RecentlyChecked { - n += 3 - } - if len(m.RecentApps) > 0 { - for k, v := range m.RecentApps { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 2 + sov(uint64(mapEntrySize)) - } - } n += len(m.unknownFields) return n } @@ -35522,7 +34678,7 @@ func (m *CheckThrottlerRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { +func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -35545,17 +34701,17 @@ func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CheckThrottlerResponse_Metric: wiretype end group for non-group") + return fmt.Errorf("proto: CheckThrottlerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CheckThrottlerResponse_Metric: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CheckThrottlerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TabletAlias", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -35565,102 +34721,33 @@ func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Threshold = float64(math.Float64frombits(v)) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 m.TabletAlias == nil { + m.TabletAlias = &topodata.TabletAlias{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.TabletAlias.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -35670,55 +34757,27 @@ func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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 + if m.Check == nil { + m.Check = &tabletmanagerdata.CheckThrottlerResponse{} } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Check.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Scope = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -35742,7 +34801,7 @@ func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { +func (m *CleanupSchemaMigrationRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -35765,56 +34824,15 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CheckThrottlerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CleanupSchemaMigrationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CheckThrottlerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CleanupSchemaMigrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Threshold = float64(math.Float64frombits(v)) - case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -35842,11 +34860,11 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Error = string(dAtA[iNdEx:postIndex]) + m.Keyspace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -35874,31 +34892,62 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + m.Uuid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RecentlyChecked", wireType) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - 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 - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength } - m.RecentlyChecked = bool(v != 0) - case 7: + 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 *CleanupSchemaMigrationResponse) 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: CleanupSchemaMigrationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CleanupSchemaMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RowsAffectedByShard", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -35925,11 +34974,11 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metrics == nil { - m.Metrics = make(map[string]*CheckThrottlerResponse_Metric) + if m.RowsAffectedByShard == nil { + m.RowsAffectedByShard = make(map[string]uint64) } var mapkey string - var mapvalue *CheckThrottlerResponse_Metric + var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -35978,7 +35027,6 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -35988,26 +35036,11 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + mapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &CheckThrottlerResponse_Metric{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skip(dAtA[iNdEx:]) @@ -36023,7 +35056,7 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { iNdEx += skippy } } - m.Metrics[mapkey] = mapvalue + m.RowsAffectedByShard[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -36047,7 +35080,7 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CleanupSchemaMigrationRequest) UnmarshalVT(dAtA []byte) error { +func (m *CompleteSchemaMigrationRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -36070,10 +35103,10 @@ func (m *CleanupSchemaMigrationRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CleanupSchemaMigrationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CompleteSchemaMigrationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CleanupSchemaMigrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompleteSchemaMigrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -36162,7 +35195,7 @@ func (m *CleanupSchemaMigrationRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CleanupSchemaMigrationResponse) UnmarshalVT(dAtA []byte) error { +func (m *CompleteSchemaMigrationResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -36185,289 +35218,10 @@ func (m *CleanupSchemaMigrationResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CleanupSchemaMigrationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CompleteSchemaMigrationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CleanupSchemaMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RowsAffectedByShard", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RowsAffectedByShard == nil { - m.RowsAffectedByShard = make(map[string]uint64) - } - var mapkey string - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.RowsAffectedByShard[mapkey] = mapvalue - 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 *CompleteSchemaMigrationRequest) 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: CompleteSchemaMigrationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompleteSchemaMigrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uuid", 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.Uuid = 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]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompleteSchemaMigrationResponse) 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: CompleteSchemaMigrationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompleteSchemaMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompleteSchemaMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -45284,207 +44038,7 @@ func (m *GetThrottlerStatusRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetThrottlerStatusResponse_MetricResult) 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: GetThrottlerStatusResponse_MetricResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetThrottlerStatusResponse_MetricResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetThrottlerStatusResponse_MetricHealth) 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: GetThrottlerStatusResponse_MetricHealth: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetThrottlerStatusResponse_MetricHealth: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHealthyAt", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastHealthyAt == nil { - m.LastHealthyAt = &vttime.Time{} - } - if err := m.LastHealthyAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SecondsSinceLastHealthy", wireType) - } - m.SecondsSinceLastHealthy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SecondsSinceLastHealthy |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *GetThrottlerStatusResponse_RecentApp) UnmarshalVT(dAtA []byte) error { +func (m *GetThrottlerStatusResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -45507,15 +44061,15 @@ func (m *GetThrottlerStatusResponse_RecentApp) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetThrottlerStatusResponse_RecentApp: wiretype end group for non-group") + return fmt.Errorf("proto: GetThrottlerStatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetThrottlerStatusResponse_RecentApp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetThrottlerStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -45542,1134 +44096,12 @@ func (m *GetThrottlerStatusResponse_RecentApp) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CheckedAt == nil { - m.CheckedAt = &vttime.Time{} - } - if err := m.CheckedAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + if m.Status == nil { + m.Status = &tabletmanagerdata.GetThrottlerStatusResponse{} } - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { + if err := m.Status.UnmarshalVT(dAtA[iNdEx:postIndex]); 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 *GetThrottlerStatusResponse) 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: GetThrottlerStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetThrottlerStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TabletAlias", 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.TabletAlias = 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 IsLeader", 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.IsLeader = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsOpen", 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.IsOpen = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", 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.IsEnabled = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsDormant", 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.IsDormant = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LagMetricQuery", 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.LagMetricQuery = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomMetricQuery", 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.CustomMetricQuery = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultThreshold", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DefaultThreshold = float64(math.Float64frombits(v)) - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetricNameUsedAsDefault", 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.MetricNameUsedAsDefault = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregatedMetrics", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AggregatedMetrics == nil { - m.AggregatedMetrics = make(map[string]*GetThrottlerStatusResponse_MetricResult) - } - var mapkey string - var mapvalue *GetThrottlerStatusResponse_MetricResult - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &GetThrottlerStatusResponse_MetricResult{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AggregatedMetrics[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetricThresholds", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetricThresholds == nil { - m.MetricThresholds = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MetricThresholds[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetricsHealth", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetricsHealth == nil { - m.MetricsHealth = make(map[string]*GetThrottlerStatusResponse_MetricHealth) - } - var mapkey string - var mapvalue *GetThrottlerStatusResponse_MetricHealth - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &GetThrottlerStatusResponse_MetricHealth{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MetricsHealth[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ThrottledApps", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ThrottledApps == nil { - m.ThrottledApps = make(map[string]*topodata.ThrottledAppRule) - } - var mapkey string - var mapvalue *topodata.ThrottledAppRule - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &topodata.ThrottledAppRule{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ThrottledApps[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppCheckedMetrics", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AppCheckedMetrics == nil { - m.AppCheckedMetrics = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AppCheckedMetrics[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RecentlyChecked", 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.RecentlyChecked = bool(v != 0) - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecentApps", wireType) - } - 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 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RecentApps == nil { - m.RecentApps = make(map[string]*GetThrottlerStatusResponse_RecentApp) - } - var mapkey string - var mapvalue *GetThrottlerStatusResponse_RecentApp - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &GetThrottlerStatusResponse_RecentApp{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.RecentApps[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex diff --git a/go/vt/schemamanager/tablet_executor.go b/go/vt/schemamanager/tablet_executor.go index 0acae6459db..68270e0babc 100644 --- a/go/vt/schemamanager/tablet_executor.go +++ b/go/vt/schemamanager/tablet_executor.go @@ -248,7 +248,17 @@ func (exec *TabletExecutor) executeAlterMigrationThrottle(ctx context.Context, a if throttlerConfig.ThrottledApps == nil { throttlerConfig.ThrottledApps = make(map[string]*topodatapb.ThrottledAppRule) } - throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + if req.ThrottledApp != nil && req.ThrottledApp.Name != "" { + // TODO(shlomi) in v22: replace the following line with the commented out block + throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + // timeNow := time.Now() + // if protoutil.TimeFromProto(req.ThrottledApp.ExpiresAt).After(timeNow) { + // throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + // } else { + // delete(throttlerConfig.ThrottledApps, req.ThrottledApp.Name) + // } + } + return throttlerConfig } // We have already locked the keyspace diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index 77db2d0afef..99f7544d18a 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -975,6 +975,10 @@ func (itmc *internalTabletManagerClient) CheckThrottler(context.Context, *topoda return nil, fmt.Errorf("not implemented in vtcombo") } +func (itmc *internalTabletManagerClient) GetThrottlerStatus(context.Context, *topodatapb.Tablet, *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + return nil, fmt.Errorf("not implemented in vtcombo") +} + func (itmc *internalTabletManagerClient) Close() { } diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 65f99c43694..0ab76e6b523 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -64,6 +64,7 @@ import ( "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/vindexes" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tmclient" logutilpb "vitess.io/vitess/go/vt/proto/logutil" @@ -680,6 +681,64 @@ func (s *VtctldServer) ChangeTabletType(ctx context.Context, req *vtctldatapb.Ch }, nil } +// CheckThrottler is part of the vtctlservicepb.VtctldServer interface. +func (s *VtctldServer) CheckThrottler(ctx context.Context, req *vtctldatapb.CheckThrottlerRequest) (resp *vtctldatapb.CheckThrottlerResponse, err error) { + span, ctx := trace.NewSpan(ctx, "VtctldServer.CheckThrottler") + defer span.Finish() + + defer panicHandler(&err) + + span.Annotate("tablet_alias", topoproto.TabletAliasString(req.TabletAlias)) + span.Annotate("app_name", req.AppName) + + ti, err := s.ts.GetTablet(ctx, req.TabletAlias) + if err != nil { + return nil, err + } + + tmReq := &tabletmanagerdatapb.CheckThrottlerRequest{ + AppName: req.AppName, + Scope: req.Scope, + SkipRequestHeartbeats: req.SkipRequestHeartbeats, + OkIfNotExists: req.OkIfNotExists, + MultiMetricsEnabled: true, + } + r, err := s.tmc.CheckThrottler(ctx, ti.Tablet, tmReq) + if err != nil { + return nil, err + } + + resp = &vtctldatapb.CheckThrottlerResponse{ + TabletAlias: req.TabletAlias, + Check: r, + } + return resp, nil +} + +// GetThrottlerStatus is part of the vtctlservicepb.VtctldServer interface. +func (s *VtctldServer) GetThrottlerStatus(ctx context.Context, req *vtctldatapb.GetThrottlerStatusRequest) (resp *vtctldatapb.GetThrottlerStatusResponse, err error) { + span, ctx := trace.NewSpan(ctx, "VtctldServer.GetThrottlerStatus") + defer span.Finish() + + defer panicHandler(&err) + + span.Annotate("tablet_alias", topoproto.TabletAliasString(req.TabletAlias)) + + ti, err := s.ts.GetTablet(ctx, req.TabletAlias) + if err != nil { + return nil, err + } + + r, err := s.tmc.GetThrottlerStatus(ctx, ti.Tablet, &tabletmanagerdatapb.GetThrottlerStatusRequest{}) + if err != nil { + return nil, err + } + resp = &vtctldatapb.GetThrottlerStatusResponse{ + Status: r, + } + return resp, nil +} + // CleanupSchemaMigration is part of the vtctlservicepb.VtctldServer interface. func (s *VtctldServer) CleanupSchemaMigration(ctx context.Context, req *vtctldatapb.CleanupSchemaMigrationRequest) (resp *vtctldatapb.CleanupSchemaMigrationResponse, err error) { span, ctx := trace.NewSpan(ctx, "VtctldServer.CleanupSchemaMigration") @@ -1929,6 +1988,24 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata return nil, fmt.Errorf("--check-as-check-self and --check-as-check-shard are mutually exclusive") } + if req.MetricName != "" && !base.KnownMetricNames.Contains(base.MetricName(req.MetricName)) { + return nil, fmt.Errorf("unknown metric name: %s", req.MetricName) + } + + if len(req.AppCheckedMetrics) > 0 { + specifiedMetrics := map[base.MetricName]bool{} + for _, metricName := range req.AppCheckedMetrics { + _, knownMetric, err := base.DisaggregateMetricName(metricName) + if err != nil { + return nil, fmt.Errorf("invalid metric name: %s", metricName) + } + if _, ok := specifiedMetrics[knownMetric]; ok { + return nil, fmt.Errorf("duplicate metric name: %s", knownMetric) + } + specifiedMetrics[knownMetric] = true + } + } + update := func(throttlerConfig *topodatapb.ThrottlerConfig) *topodatapb.ThrottlerConfig { if throttlerConfig == nil { throttlerConfig = &topodatapb.ThrottlerConfig{} @@ -1936,14 +2013,37 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata if throttlerConfig.ThrottledApps == nil { throttlerConfig.ThrottledApps = make(map[string]*topodatapb.ThrottledAppRule) } - if req.CustomQuerySet { - // custom query provided - throttlerConfig.CustomQuery = req.CustomQuery - throttlerConfig.Threshold = req.Threshold // allowed to be zero/negative because who knows what kind of custom query this is + if throttlerConfig.AppCheckedMetrics == nil { + throttlerConfig.AppCheckedMetrics = make(map[string]*topodatapb.ThrottlerConfig_MetricNames) + } + if throttlerConfig.MetricThresholds == nil { + throttlerConfig.MetricThresholds = make(map[string]float64) + } + if req.MetricName == "" { + // v20 behavior + if req.CustomQuerySet { + // custom query provided + throttlerConfig.CustomQuery = req.CustomQuery + throttlerConfig.Threshold = req.Threshold // allowed to be zero/negative because who knows what kind of custom query this is + } else if req.Threshold > 0 { + // no custom query, throttler works by querying replication lag. We only allow positive values + throttlerConfig.Threshold = req.Threshold + } } else { - // no custom query, throttler works by querying replication lag. We only allow positive values + // --metric-name specified. We apply the threshold to the metric if req.Threshold > 0 { - throttlerConfig.Threshold = req.Threshold + throttlerConfig.MetricThresholds[req.MetricName] = req.Threshold + } else { + delete(throttlerConfig.MetricThresholds, req.MetricName) + } + } + if req.AppName != "" { + if len(req.AppCheckedMetrics) > 0 { + throttlerConfig.AppCheckedMetrics[req.AppName] = &topodatapb.ThrottlerConfig_MetricNames{ + Names: req.AppCheckedMetrics, + } + } else { + delete(throttlerConfig.AppCheckedMetrics, req.AppName) } } if req.Enable { @@ -1959,7 +2059,14 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata throttlerConfig.CheckAsCheckSelf = false } if req.ThrottledApp != nil && req.ThrottledApp.Name != "" { + // TODO(shlomi) in v22: replace the following line with the commented out block throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + // timeNow := time.Now() + // if protoutil.TimeFromProto(req.ThrottledApp.ExpiresAt).After(timeNow) { + // throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + // } else { + // delete(throttlerConfig.ThrottledApps, req.ThrottledApp.Name) + // } } return throttlerConfig } diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index 7d0a053f477..03b9e3d7077 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -3656,7 +3656,7 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su req.ThrottledApp = &topodatapb.ThrottledAppRule{ Name: *unthrottledApp, Ratio: 0, - ExpiresAt: protoutil.TimeToProto(time.Now()), + ExpiresAt: &vttime.Time{}, // zero } } _, err = wr.VtctldServer().UpdateThrottlerConfig(ctx, req) diff --git a/go/vt/vtgate/vcursor_impl.go b/go/vt/vtgate/vcursor_impl.go index 9372012f77d..4f40305d3c6 100644 --- a/go/vt/vtgate/vcursor_impl.go +++ b/go/vt/vtgate/vcursor_impl.go @@ -1225,7 +1225,16 @@ func (vc *vcursorImpl) ThrottleApp(ctx context.Context, throttledAppRule *topoda if throttlerConfig.ThrottledApps == nil { throttlerConfig.ThrottledApps = make(map[string]*topodatapb.ThrottledAppRule) } - throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + if req.ThrottledApp != nil && req.ThrottledApp.Name != "" { + // TODO(shlomi) in v22: replace the following line with the commented out block + throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + // timeNow := time.Now() + // if protoutil.TimeFromProto(req.ThrottledApp.ExpiresAt).After(timeNow) { + // throttlerConfig.ThrottledApps[req.ThrottledApp.Name] = req.ThrottledApp + // } else { + // delete(throttlerConfig.ThrottledApps, req.ThrottledApp.Name) + // } + } return throttlerConfig } diff --git a/go/vt/vttablet/faketmclient/fake_client.go b/go/vt/vttablet/faketmclient/fake_client.go index f7ef32ce18f..3aeeff71e85 100644 --- a/go/vt/vttablet/faketmclient/fake_client.go +++ b/go/vt/vttablet/faketmclient/fake_client.go @@ -371,6 +371,10 @@ func (client *FakeTabletManagerClient) CheckThrottler(ctx context.Context, table return &tabletmanagerdatapb.CheckThrottlerResponse{}, nil } +func (client *FakeTabletManagerClient) GetThrottlerStatus(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + return &tabletmanagerdatapb.GetThrottlerStatusResponse{}, nil +} + // // Management related methods // diff --git a/go/vt/vttablet/grpctmclient/client.go b/go/vt/vttablet/grpctmclient/client.go index 023622c6370..c3ff1b02767 100644 --- a/go/vt/vttablet/grpctmclient/client.go +++ b/go/vt/vttablet/grpctmclient/client.go @@ -1205,6 +1205,24 @@ func (client *Client) CheckThrottler(ctx context.Context, tablet *topodatapb.Tab return response, nil } +// GetThrottlerStatus is part of the tmclient.TabletManagerClient interface. +// It always tries to use a cached client via the dialer pool as this is +// called very frequently between tablets when the throttler is enabled in +// a keyspace and the overhead of creating a new gRPC connection/channel +// and dialing the other tablet every time is not practical. +func (client *Client) GetThrottlerStatus(ctx context.Context, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + c, closer, err := client.dialer.dial(ctx, tablet) + if err != nil { + return nil, err + } + defer closer.Close() + response, err := c.GetThrottlerStatus(ctx, req) + if err != nil { + return nil, err + } + return response, nil +} + type restoreFromBackupStreamAdapter struct { stream tabletmanagerservicepb.TabletManager_RestoreFromBackupClient closer io.Closer diff --git a/go/vt/vttablet/grpctmclient/client_test.go b/go/vt/vttablet/grpctmclient/client_test.go index 1487303163d..2a5ae3ff6d0 100644 --- a/go/vt/vttablet/grpctmclient/client_test.go +++ b/go/vt/vttablet/grpctmclient/client_test.go @@ -76,10 +76,18 @@ func TestDialDedicatedPool(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - req := &tabletmanagerdatapb.CheckThrottlerRequest{} + req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} _, err := client.CheckThrottler(ctx, tablet, req) assert.Error(t, err) }) + t.Run("GetThrottlerStatus", func(t *testing.T) { + ctx, cancel := context.WithTimeout(ctx, time.Second) + defer cancel() + + req := &tabletmanagerdatapb.GetThrottlerStatusRequest{} + _, err := client.GetThrottlerStatus(ctx, tablet, req) + assert.Error(t, err) + }) t.Run("empty map", func(t *testing.T) { rpcClient, ok := client.dialer.(*grpcClient) require.True(t, ok) @@ -133,7 +141,7 @@ func TestDialPool(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - req := &tabletmanagerdatapb.CheckThrottlerRequest{} + req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} _, err := client.CheckThrottler(ctx, tablet, req) assert.Error(t, err) }) diff --git a/go/vt/vttablet/grpctmserver/server.go b/go/vt/vttablet/grpctmserver/server.go index 196f7a14882..42cfd441eeb 100644 --- a/go/vt/vttablet/grpctmserver/server.go +++ b/go/vt/vttablet/grpctmserver/server.go @@ -596,6 +596,13 @@ func (s *server) CheckThrottler(ctx context.Context, request *tabletmanagerdatap return response, err } +func (s *server) GetThrottlerStatus(ctx context.Context, request *tabletmanagerdatapb.GetThrottlerStatusRequest) (response *tabletmanagerdatapb.GetThrottlerStatusResponse, err error) { + defer s.tm.HandleRPCPanic(ctx, "GetThrottlerStatus", request, response, false /*verbose*/, &err) + ctx = callinfo.GRPCCallInfo(ctx) + response, err = s.tm.GetThrottlerStatus(ctx, request) + return response, err +} + // registration glue func init() { diff --git a/go/vt/vttablet/tabletmanager/rpc_agent.go b/go/vt/vttablet/tabletmanager/rpc_agent.go index da70dd9adde..6dd21a21915 100644 --- a/go/vt/vttablet/tabletmanager/rpc_agent.go +++ b/go/vt/vttablet/tabletmanager/rpc_agent.go @@ -156,4 +156,5 @@ type RPCTM interface { // Throttler CheckThrottler(ctx context.Context, request *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) + GetThrottlerStatus(ctx context.Context, request *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) } diff --git a/go/vt/vttablet/tabletmanager/rpc_throttler.go b/go/vt/vttablet/tabletmanager/rpc_throttler.go index ab153b3ef43..8ec3bb592da 100644 --- a/go/vt/vttablet/tabletmanager/rpc_throttler.go +++ b/go/vt/vttablet/tabletmanager/rpc_throttler.go @@ -19,22 +19,34 @@ package tabletmanager import ( "context" + "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/stats" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" ) +var ( + statsThrottlerCheckRequests = stats.NewCounter("ThrottlerCheckRequest", "CheckThrottler requests") + statsThrottlerStatusRequests = stats.NewCounter("GetThrottlerStatusRequest", "GetThrottlerStatus requests") +) + // CheckThrottler executes a throttler check func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) { - go stats.GetOrNewCounter("ThrottlerCheckRequest", "CheckThrottler requests").Add(1) + statsThrottlerCheckRequests.Add(1) if req.AppName == "" { req.AppName = throttlerapp.VitessName.String() } flags := &throttle.CheckFlags{ - SkipRequestHeartbeats: true, + Scope: base.Scope(req.Scope), + SkipRequestHeartbeats: req.SkipRequestHeartbeats, + OKIfNotExists: req.OkIfNotExists, + MultiMetricsEnabled: req.MultiMetricsEnabled, } checkResult := tm.QueryServiceControl.CheckThrottler(ctx, req.AppName, flags) if checkResult == nil { @@ -46,9 +58,89 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd Threshold: checkResult.Threshold, Message: checkResult.Message, RecentlyChecked: checkResult.RecentlyChecked, + Metrics: make(map[string]*tabletmanagerdatapb.CheckThrottlerResponse_Metric), + } + for name, metric := range checkResult.Metrics { + resp.Metrics[name] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ + Name: name, + Scope: metric.Scope, + StatusCode: int32(metric.StatusCode), + Value: metric.Value, + Threshold: metric.Threshold, + Message: metric.Message, + } + } + if len(checkResult.Metrics) == 0 { + // For backwards compatibility, when the checked tablet is of lower version, it does not return a + // matrics map, but only the one metric. + resp.Metrics[base.DefaultMetricName.String()] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ + StatusCode: int32(checkResult.StatusCode), + Value: checkResult.Value, + Threshold: checkResult.Threshold, + Message: checkResult.Message, + } } if checkResult.Error != nil { resp.Error = checkResult.Error.Error() } return resp, nil } + +// GetThrottlerStatus returns a detailed breakdown of the throttler status +func (tm *TabletManager) GetThrottlerStatus(ctx context.Context, req *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + statsThrottlerStatusRequests.Add(1) + status := tm.QueryServiceControl.GetThrottlerStatus(ctx) + if status == nil { + return nil, vterrors.Errorf(vtrpc.Code_INTERNAL, "nil status") + } + resp := &tabletmanagerdatapb.GetThrottlerStatusResponse{ + TabletAlias: topoproto.TabletAliasString(tm.Tablet().Alias), + Keyspace: status.Keyspace, + Shard: status.Shard, + IsLeader: status.IsLeader, + IsOpen: status.IsOpen, + IsEnabled: status.IsEnabled, + IsDormant: status.IsDormant, + RecentlyChecked: status.RecentlyChecked, + LagMetricQuery: status.Query, + CustomMetricQuery: status.CustomQuery, + DefaultThreshold: status.Threshold, + MetricNameUsedAsDefault: status.MetricNameUsedAsDefault, + AggregatedMetrics: make(map[string]*tabletmanagerdatapb.GetThrottlerStatusResponse_MetricResult), + MetricThresholds: status.MetricsThresholds, + MetricsHealth: make(map[string]*tabletmanagerdatapb.GetThrottlerStatusResponse_MetricHealth), + ThrottledApps: make(map[string]*topodatapb.ThrottledAppRule), + AppCheckedMetrics: status.AppCheckedMetrics, + RecentApps: make(map[string]*tabletmanagerdatapb.GetThrottlerStatusResponse_RecentApp), + } + for k, m := range status.AggregatedMetrics { + val, err := m.Get() + resp.AggregatedMetrics[k] = &tabletmanagerdatapb.GetThrottlerStatusResponse_MetricResult{ + Value: val, + } + if err != nil { + resp.AggregatedMetrics[k].Error = err.Error() + } + } + for k, m := range status.MetricsHealth { + resp.MetricsHealth[k] = &tabletmanagerdatapb.GetThrottlerStatusResponse_MetricHealth{ + LastHealthyAt: protoutil.TimeToProto(m.LastHealthyAt), + SecondsSinceLastHealthy: m.SecondsSinceLastHealthy, + } + } + for _, app := range status.ThrottledApps { + resp.ThrottledApps[app.AppName] = &topodatapb.ThrottledAppRule{ + Name: app.AppName, + Ratio: app.Ratio, + ExpiresAt: protoutil.TimeToProto(app.ExpireAt), + Exempt: app.Exempt, + } + } + for _, recentApp := range status.RecentApps { + resp.RecentApps[recentApp.AppName] = &tabletmanagerdatapb.GetThrottlerStatusResponse_RecentApp{ + CheckedAt: protoutil.TimeToProto(recentApp.CheckedAt), + StatusCode: int32(recentApp.StatusCode), + } + } + return resp, nil +} diff --git a/go/vt/vttablet/tabletmanager/vdiff/framework_test.go b/go/vt/vttablet/tabletmanager/vdiff/framework_test.go index 43aa76894d4..cf24950bda3 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/framework_test.go +++ b/go/vt/vttablet/tabletmanager/vdiff/framework_test.go @@ -510,6 +510,10 @@ func (tmc *fakeTMClient) CheckThrottler(ctx context.Context, tablet *topodatapb. return &tabletmanagerdatapb.CheckThrottlerResponse{}, nil } +func (tmc *fakeTMClient) GetThrottlerStatus(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + return &tabletmanagerdatapb.GetThrottlerStatusResponse{}, nil +} + // ---------------------------------------------- // testVDiffEnv diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine.go b/go/vt/vttablet/tabletmanager/vreplication/engine.go index 54902928e02..d407bfe403b 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/engine.go +++ b/go/vt/vttablet/tabletmanager/vreplication/engine.go @@ -40,6 +40,7 @@ import ( "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" @@ -139,7 +140,7 @@ func NewEngine(env *vtenv.Environment, config *tabletenv.TabletConfig, ts *topo. mysqld: mysqld, journaler: make(map[string]*journalEvent), ec: newExternalConnector(env, config.ExternalConnections), - throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerapp.VReplicationName, throttle.ThrottleCheckPrimaryWrite), + throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerapp.VReplicationName, base.UndefinedScope), } return vre diff --git a/go/vt/vttablet/tabletserver/controller.go b/go/vt/vttablet/tabletserver/controller.go index 4d7e35862de..0336d9a73cc 100644 --- a/go/vt/vttablet/tabletserver/controller.go +++ b/go/vt/vttablet/tabletserver/controller.go @@ -92,6 +92,7 @@ type Controller interface { // CheckThrottler CheckThrottler(ctx context.Context, appName string, flags *throttle.CheckFlags) *throttle.CheckResult + GetThrottlerStatus(ctx context.Context) *throttle.ThrottlerStatus } // Ensure TabletServer satisfies Controller interface. diff --git a/go/vt/vttablet/tabletserver/gc/tablegc.go b/go/vt/vttablet/tabletserver/gc/tablegc.go index fced176b027..f1d64aebea3 100644 --- a/go/vt/vttablet/tabletserver/gc/tablegc.go +++ b/go/vt/vttablet/tabletserver/gc/tablegc.go @@ -39,6 +39,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" ) @@ -138,7 +139,7 @@ type Status struct { // NewTableGC creates a table collector func NewTableGC(env tabletenv.Env, ts *topo.Server, lagThrottler *throttle.Throttler) *TableGC { collector := &TableGC{ - throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerapp.TableGCName, throttle.ThrottleCheckPrimaryWrite), + throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerapp.TableGCName, base.UndefinedScope), isOpen: 0, env: env, diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 2238195c97d..18825f51f77 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -62,6 +62,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" "vitess.io/vitess/go/vt/vttablet/tabletserver/txserializer" "vitess.io/vitess/go/vt/vttablet/tabletserver/txthrottler" @@ -1663,7 +1664,13 @@ func (tsv *TabletServer) TopoServer() *topo.Server { // CheckThrottler issues a self check func (tsv *TabletServer) CheckThrottler(ctx context.Context, appName string, flags *throttle.CheckFlags) *throttle.CheckResult { - r := tsv.lagThrottler.CheckByType(ctx, appName, "", flags, throttle.ThrottleCheckSelf) + r := tsv.lagThrottler.Check(ctx, appName, nil, flags) + return r +} + +// GetThrottlerStatus gets the status of the tablet throttler +func (tsv *TabletServer) GetThrottlerStatus(ctx context.Context) *throttle.ThrottlerStatus { + r := tsv.lagThrottler.Status() return r } @@ -1765,22 +1772,20 @@ func (tsv *TabletServer) registerMigrationStatusHandler() { // registerThrottlerCheckHandlers registers throttler "check" requests func (tsv *TabletServer) registerThrottlerCheckHandlers() { - handle := func(path string, checkType throttle.ThrottleCheckType) { + handle := func(path string, scope base.Scope) { tsv.exporter.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { ctx := tabletenv.LocalContext() - remoteAddr := r.Header.Get("X-Forwarded-For") - if remoteAddr == "" { - remoteAddr = r.RemoteAddr - remoteAddr = strings.Split(remoteAddr, ":")[0] - } appName := r.URL.Query().Get("app") if appName == "" { - appName = throttlerapp.DefaultName.String() + appName = throttlerapp.VitessName.String() } flags := &throttle.CheckFlags{ + Scope: scope, SkipRequestHeartbeats: (r.URL.Query().Get("s") == "true"), + MultiMetricsEnabled: true, } - checkResult := tsv.lagThrottler.CheckByType(ctx, appName, remoteAddr, flags, checkType) + metricNames := tsv.lagThrottler.MetricNames(r.URL.Query()["m"]) + checkResult := tsv.lagThrottler.Check(ctx, appName, metricNames, flags) if checkResult.StatusCode == http.StatusNotFound && flags.OKIfNotExists { checkResult.StatusCode = http.StatusOK // 200 } @@ -1794,8 +1799,8 @@ func (tsv *TabletServer) registerThrottlerCheckHandlers() { } }) } - handle("/throttler/check", throttle.ThrottleCheckPrimaryWrite) - handle("/throttler/check-self", throttle.ThrottleCheckSelf) + handle("/throttler/check", base.ShardScope) + handle("/throttler/check-self", base.SelfScope) } // registerThrottlerStatusHandler registers a throttler "status" request diff --git a/go/vt/vttablet/tabletserver/throttle/base/recent_app.go b/go/vt/vttablet/tabletserver/throttle/base/recent_app.go index 64527c4cc1c..148e6b31fe4 100644 --- a/go/vt/vttablet/tabletserver/throttle/base/recent_app.go +++ b/go/vt/vttablet/tabletserver/throttle/base/recent_app.go @@ -46,15 +46,17 @@ import ( // RecentApp indicates when an app was last checked type RecentApp struct { - CheckedAtEpoch int64 - MinutesSinceChecked int64 + AppName string + CheckedAt time.Time + StatusCode int } // NewRecentApp creates a RecentApp -func NewRecentApp(checkedAt time.Time) *RecentApp { +func NewRecentApp(appName string, statusCode int) *RecentApp { result := &RecentApp{ - CheckedAtEpoch: checkedAt.Unix(), - MinutesSinceChecked: int64(time.Since(checkedAt).Minutes()), + AppName: appName, + CheckedAt: time.Now(), + StatusCode: statusCode, } return result } diff --git a/go/vt/vttablet/tabletserver/throttle/base/throttle_metric.go b/go/vt/vttablet/tabletserver/throttle/base/throttle_metric.go index 3d4c4f95a2e..054687cdd3f 100644 --- a/go/vt/vttablet/tabletserver/throttle/base/throttle_metric.go +++ b/go/vt/vttablet/tabletserver/throttle/base/throttle_metric.go @@ -14,38 +14,169 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This codebase originates from https://github.com/github/freno, See https://github.com/github/freno/blob/master/LICENSE -/* - MIT License - - Copyright (c) 2017 GitHub - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - package base import ( "errors" + "fmt" + "slices" "strings" ) +// Scope defines the tablet range from which a metric is collected. This can be the local tablet +// ("self") or the entire shard ("shard") +type Scope string + +const ( + UndefinedScope Scope = "" + ShardScope Scope = "shard" + SelfScope Scope = "self" +) + +func (s Scope) String() string { + return string(s) +} + +func ScopeFromString(s string) (Scope, error) { + switch scope := Scope(s); scope { + case UndefinedScope, ShardScope, SelfScope: + return scope, nil + default: + return "", fmt.Errorf("unknown scope: %s", s) + } +} + +// MetricName is a formalized name for a metric, such as "lag" or "threads_running". A metric name +// may include a scope, such as "self/lag" or "shard/threads_running". It is possible to add a +// scope to a name, or to parse the scope out of a name, and there is also always a default scope +// associated with a metric name. +type MetricName string + +// MetricNames is a formalized list of metric names +type MetricNames []MetricName + +func (names MetricNames) Contains(name MetricName) bool { + return slices.Contains(names, name) +} + +func (names MetricNames) String() string { + s := make([]string, len(names)) + for i, name := range names { + s[i] = name.String() + } + return strings.Join(s, ",") +} + +// Unique returns a subset of unique metric names, in same order as the original names +func (names MetricNames) Unique() MetricNames { + if names == nil { + return nil + } + uniqueMetricNamesMap := map[MetricName]bool{} + uniqueMetricNames := MetricNames{} + for _, metricName := range names { + if _, ok := uniqueMetricNamesMap[metricName]; !ok { + uniqueMetricNames = append(uniqueMetricNames, metricName) + uniqueMetricNamesMap[metricName] = true + } + } + return uniqueMetricNames +} + +const ( + DefaultMetricName MetricName = "default" + LagMetricName MetricName = "lag" + ThreadsRunningMetricName MetricName = "threads_running" + CustomMetricName MetricName = "custom" + LoadAvgMetricName MetricName = "loadavg" +) + +func (metric MetricName) DefaultScope() Scope { + switch metric { + case LagMetricName: + return ShardScope + default: + return SelfScope + } +} + +func (metric MetricName) String() string { + return string(metric) +} + +// AggregatedName returns the string representation of this metric in the given scope, e.g.: +// - "self/loadavg" +// - "shard/lag" +func (metric MetricName) AggregatedName(scope Scope) string { + if metric == DefaultMetricName { + // backwards (v20) compatibility + return scope.String() + } + if scope == UndefinedScope { + scope = metric.DefaultScope() + } + return fmt.Sprintf("%s/%s", scope.String(), metric.String()) +} + +// Disaggregated returns a breakdown of this metric into scope + name. +func (metric MetricName) Disaggregated() (scope Scope, metricName MetricName, err error) { + return DisaggregateMetricName(metric.String()) +} + +var KnownMetricNames = MetricNames{ + DefaultMetricName, + LagMetricName, + ThreadsRunningMetricName, + CustomMetricName, + LoadAvgMetricName, +} + +type AggregatedMetricName struct { + Scope Scope + Metric MetricName +} + +var ( + // aggregatedMetricNames precomputes the aggregated metric names for all known metric names, + // mapped to their breakdowns. e.g. "self/loadavg" -> {SelfScope, LoadAvgMetricName} + // This means: + // - no textual parsing is needed in the critical path + // - we can easily check if a metric name is valid + aggregatedMetricNames map[string]AggregatedMetricName +) + +func init() { + aggregatedMetricNames = make(map[string]AggregatedMetricName, 3*len(KnownMetricNames)) + for _, metricName := range KnownMetricNames { + aggregatedMetricNames[metricName.String()] = AggregatedMetricName{ + Scope: metricName.DefaultScope(), + Metric: metricName, + } + for _, scope := range []Scope{ShardScope, SelfScope} { + aggregatedName := metricName.AggregatedName(scope) + aggregatedMetricNames[aggregatedName] = AggregatedMetricName{ + Scope: scope, + Metric: metricName, + } + } + } +} + +// DisaggregateMetricName splits a metric name into its scope name and metric name +// aggregated metric name could be in the form: +// - loadavg +// - self +// - self/threads_running +// - shard +// - shard/lag +func DisaggregateMetricName(aggregatedMetricName string) (scope Scope, metricName MetricName, err error) { + breakdown, ok := aggregatedMetricNames[aggregatedMetricName] + if !ok { + return UndefinedScope, DefaultMetricName, ErrNoSuchMetric + } + return breakdown.Scope, breakdown.Metric, nil +} + // MetricResult is what we expect our probes to return. This can be a numeric result, or // a special type of result indicating more meta-information type MetricResult interface { @@ -55,15 +186,25 @@ type MetricResult interface { // MetricResultFunc is a function that returns a metric result type MetricResultFunc func() (metricResult MetricResult, threshold float64) +type MetricResultMap map[MetricName]MetricResult + +func NewMetricResultMap() MetricResultMap { + result := make(MetricResultMap, len(KnownMetricNames)) + for _, metricName := range KnownMetricNames { + result[metricName] = nil + } + return result +} + // ErrThresholdExceeded is the common error one may get checking on metric result -var ErrThresholdExceeded = errors.New("Threshold exceeded") -var errNoResultYet = errors.New("Metric not collected yet") +var ErrThresholdExceeded = errors.New("threshold exceeded") +var ErrNoResultYet = errors.New("metric not collected yet") // ErrNoSuchMetric is for when a user requests a metric by an unknown metric name -var ErrNoSuchMetric = errors.New("No such metric") +var ErrNoSuchMetric = errors.New("no such metric") // ErrInvalidCheckType is an internal error indicating an unknown check type -var ErrInvalidCheckType = errors.New("Unknown throttler check type") +var ErrInvalidCheckType = errors.New("unknown throttler check type") // IsDialTCPError sees if the given error indicates a TCP issue func IsDialTCPError(e error) bool { @@ -87,7 +228,7 @@ type noMetricResultYet struct{} // Get implements MetricResult func (metricResult *noMetricResultYet) Get() (float64, error) { - return 0, errNoResultYet + return 0, ErrNoResultYet } // NoMetricResultYet is a result indicating "no data" diff --git a/go/vt/vttablet/tabletserver/throttle/base/throttle_metric_test.go b/go/vt/vttablet/tabletserver/throttle/base/throttle_metric_test.go new file mode 100644 index 00000000000..8a0f9b85a16 --- /dev/null +++ b/go/vt/vttablet/tabletserver/throttle/base/throttle_metric_test.go @@ -0,0 +1,232 @@ +/* +Copyright 2024 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 base + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestAggregateName(t *testing.T) { + tcases := []struct { + aggregatedName string + scope Scope + metricName MetricName + expectErr string + }{ + { + aggregatedName: "", + expectErr: ErrNoSuchMetric.Error(), + }, + { + aggregatedName: "self", + scope: SelfScope, + metricName: DefaultMetricName, + }, + { + aggregatedName: "shard", + scope: ShardScope, + metricName: DefaultMetricName, + }, + { + aggregatedName: "self/default", + expectErr: ErrNoSuchMetric.Error(), + }, + { + aggregatedName: "lag", + scope: ShardScope, + metricName: LagMetricName, + }, + { + aggregatedName: "loadavg", + scope: SelfScope, + metricName: LoadAvgMetricName, + }, + { + aggregatedName: "lag2", + expectErr: ErrNoSuchMetric.Error(), + }, + { + aggregatedName: "self/lag", + scope: SelfScope, + metricName: LagMetricName, + }, + { + aggregatedName: "shard/lag", + scope: ShardScope, + metricName: LagMetricName, + }, + { + aggregatedName: "shard/lag3", + expectErr: ErrNoSuchMetric.Error(), + }, + { + aggregatedName: "shard/lag/zone1-01", + expectErr: ErrNoSuchMetric.Error(), + }, + { + aggregatedName: "shard/loadavg", + scope: ShardScope, + metricName: LoadAvgMetricName, + }, + } + assert.Equal(t, 3*len(KnownMetricNames), len(aggregatedMetricNames)) + for _, tcase := range tcases { + t.Run(tcase.aggregatedName, func(t *testing.T) { + scope, metricName, err := DisaggregateMetricName(tcase.aggregatedName) + { + scope2, metricName2, err2 := MetricName(tcase.aggregatedName).Disaggregated() + assert.Equal(t, scope, scope2) + assert.Equal(t, metricName, metricName2) + assert.Equal(t, err, err2) + } + if tcase.expectErr != "" { + assert.ErrorContains(t, err, tcase.expectErr) + return + } + assert.NoError(t, err) + assert.NotEqual(t, UndefinedScope, scope) + assert.Equal(t, tcase.scope, scope) + assert.Equal(t, tcase.metricName, metricName) + + if strings.Contains(tcase.aggregatedName, "/") && tcase.metricName != DefaultMetricName { + // Run the reverse. + // Remember that for backwards compatibility, we do not add "default" to the aggregated name, + // and we therefore skip tests that would fail because of this. + aggregatedName := metricName.AggregatedName(scope) + assert.Equal(t, tcase.aggregatedName, aggregatedName) + } + }) + } +} + +func TestScopeFromString(t *testing.T) { + { + scope, err := ScopeFromString("") + assert.NoError(t, err) + assert.Equal(t, UndefinedScope, scope) + } + { + scope, err := ScopeFromString("self") + assert.NoError(t, err) + assert.Equal(t, SelfScope, scope) + } + { + scope, err := ScopeFromString("shard") + assert.NoError(t, err) + assert.Equal(t, ShardScope, scope) + } + { + _, err := ScopeFromString("something") + assert.ErrorContains(t, err, "unknown scope") + } + { + _, err := ScopeFromString("self/lag") + assert.ErrorContains(t, err, "unknown scope") + } +} + +func TestUnique(t *testing.T) { + tcases := []struct { + names MetricNames + expect MetricNames + }{ + { + names: nil, + expect: nil, + }, + { + names: MetricNames{}, + expect: MetricNames{}, + }, + { + names: MetricNames{LagMetricName}, + expect: MetricNames{LagMetricName}, + }, + { + names: MetricNames{LagMetricName, LagMetricName}, + expect: MetricNames{LagMetricName}, + }, + { + names: MetricNames{LagMetricName, ThreadsRunningMetricName, LagMetricName}, + expect: MetricNames{LagMetricName, ThreadsRunningMetricName}, + }, + { + names: MetricNames{LagMetricName, ThreadsRunningMetricName, LagMetricName, LoadAvgMetricName, LoadAvgMetricName, CustomMetricName}, + expect: MetricNames{LagMetricName, ThreadsRunningMetricName, LoadAvgMetricName, CustomMetricName}, + }, + } + for _, tcase := range tcases { + t.Run(tcase.names.String(), func(t *testing.T) { + assert.Equal(t, tcase.expect, tcase.names.Unique()) + }) + } +} + +func TestContains(t *testing.T) { + tcases := []struct { + names MetricNames + name MetricName + expect bool + }{ + { + names: nil, + name: LagMetricName, + }, + { + names: MetricNames{}, + name: LagMetricName, + }, + { + names: MetricNames{LagMetricName}, + name: LagMetricName, + expect: true, + }, + { + names: MetricNames{LagMetricName}, + name: ThreadsRunningMetricName, + expect: false, + }, + { + names: MetricNames{LagMetricName, LagMetricName}, + name: LagMetricName, + expect: true, + }, + { + names: MetricNames{LagMetricName, ThreadsRunningMetricName, LagMetricName}, + name: LagMetricName, + expect: true, + }, + { + names: MetricNames{LagMetricName, ThreadsRunningMetricName, LagMetricName, LoadAvgMetricName, LoadAvgMetricName, CustomMetricName}, + name: LoadAvgMetricName, + expect: true, + }, + { + names: MetricNames{LagMetricName, ThreadsRunningMetricName, LagMetricName, LoadAvgMetricName, LoadAvgMetricName}, + name: CustomMetricName, + expect: false, + }, + } + for _, tcase := range tcases { + t.Run(tcase.names.String(), func(t *testing.T) { + assert.Equal(t, tcase.expect, tcase.names.Contains(tcase.name)) + }) + } +} diff --git a/go/vt/vttablet/tabletserver/throttle/check.go b/go/vt/vttablet/tabletserver/throttle/check.go index c15d8963d05..1287ef945ed 100644 --- a/go/vt/vttablet/tabletserver/throttle/check.go +++ b/go/vt/vttablet/tabletserver/throttle/check.go @@ -45,7 +45,6 @@ import ( "context" "fmt" "net/http" - "strings" "time" "vitess.io/vitess/go/stats" @@ -63,16 +62,22 @@ var ( statsThrottlerCheckAnyError = stats.GetOrNewCounter("ThrottlerCheckAnyError", "total number of failed checks") ) +type ThrottlePriority int + // CheckFlags provide hints for a check type CheckFlags struct { + Scope base.Scope ReadCheck bool OverrideThreshold float64 OKIfNotExists bool SkipRequestHeartbeats bool + MultiMetricsEnabled bool } -// StandardCheckFlags have no special hints -var StandardCheckFlags = &CheckFlags{} +// selfCheckFlags have no special hints +var selfCheckFlags = &CheckFlags{ + MultiMetricsEnabled: true, +} // ThrottlerCheck provides methods for an app checking on metrics type ThrottlerCheck struct { @@ -87,7 +92,7 @@ func NewThrottlerCheck(throttler *Throttler) *ThrottlerCheck { } // checkAppMetricResult allows an app to check on a metric -func (check *ThrottlerCheck) checkAppMetricResult(ctx context.Context, appName string, storeType string, storeName string, metricResultFunc base.MetricResultFunc, flags *CheckFlags) (checkResult *CheckResult) { +func (check *ThrottlerCheck) checkAppMetricResult(ctx context.Context, appName string, metricResultFunc base.MetricResultFunc, flags *CheckFlags) (checkResult *CheckResult) { // Handle deprioritized app logic denyApp := false // @@ -124,72 +129,125 @@ func (check *ThrottlerCheck) checkAppMetricResult(ctx context.Context, appName s } // Check is the core function that runs when a user wants to check a metric -func (check *ThrottlerCheck) Check(ctx context.Context, appName string, storeType string, storeName string, remoteAddr string, flags *CheckFlags) (checkResult *CheckResult) { - var metricResultFunc base.MetricResultFunc - switch storeType { - case "mysql": - { - metricResultFunc = func() (metricResult base.MetricResult, threshold float64) { - return check.throttler.getMySQLClusterMetrics(ctx, storeName) - } - } +func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope base.Scope, metricNames base.MetricNames, flags *CheckFlags) (checkResult *CheckResult) { + checkResult = &CheckResult{ + StatusCode: http.StatusOK, + Metrics: make(map[string]*MetricResult), } - if metricResultFunc == nil { - return NoSuchMetricCheckResult + if len(metricNames) == 0 { + metricNames = base.MetricNames{check.throttler.metricNameUsedAsDefault()} + } + metricNames = metricNames.Unique() + applyMetricToCheckResult := func(metric *MetricResult) { + checkResult.StatusCode = metric.StatusCode + checkResult.Value = metric.Value + checkResult.Threshold = metric.Threshold + checkResult.Error = metric.Error + checkResult.Message = metric.Message } + for _, metricName := range metricNames { + // Make sure not to modify the given scope. We create a new scope variable to work with. + metricScope := scope + // It's possible that the metric name looks like "shard/loadavg". This means the the check is meant to + // check the "loadavg" metric for the "shard" scope (while normally "loadavg" is a "self" scope metric). + // So we first need to find out what the underlying metric name is ("loadavg" in this case), and then + // see whether we need to change the scope. + // It's also possible that the metric name is just "loadavg", in which case we extract the default + // scope for this metric. + // If given scope is defined, then it overrides any metric scope. + // Noteworthy that self checks will always have a defined scope, because those are based on aggregated metrics. + if disaggregatedScope, disaggregatedName, err := metricName.Disaggregated(); err == nil { + if metricScope == base.UndefinedScope { + // Client has not indicated any specific scope, so we use the disaggregated scope + metricScope = disaggregatedScope + } + metricName = disaggregatedName + } - checkResult = check.checkAppMetricResult(ctx, appName, storeType, storeName, metricResultFunc, flags) - check.throttler.markRecentApp(appName, remoteAddr) - if !throttlerapp.VitessName.Equals(appName) { - go func(statusCode int) { - statsThrottlerCheckAnyTotal.Add(1) - stats.GetOrNewCounter(fmt.Sprintf("ThrottlerCheckAny%s%sTotal", textutil.SingleWordCamel(storeType), textutil.SingleWordCamel(storeName)), "").Add(1) + metricResultFunc := func() (metricResult base.MetricResult, threshold float64) { + return check.throttler.getMySQLStoreMetric(ctx, metricScope, metricName) + } - if statusCode != http.StatusOK { - statsThrottlerCheckAnyError.Add(1) - stats.GetOrNewCounter(fmt.Sprintf("ThrottlerCheckAny%s%sError", textutil.SingleWordCamel(storeType), textutil.SingleWordCamel(storeName)), "").Add(1) - } - }(checkResult.StatusCode) + metricCheckResult := check.checkAppMetricResult(ctx, appName, metricResultFunc, flags) + if !throttlerapp.VitessName.Equals(appName) { + go func(statusCode int) { + if metricScope == base.UndefinedScope { + // While we should never get here, the following code will panic if we do + // because it will attempt to recreate ThrottlerCheckAnyTotal. + // Out of abundance of caution, we will protect against such a scenario. + return + } + stats.GetOrNewCounter(fmt.Sprintf("ThrottlerCheck%s%sTotal", textutil.SingleWordCamel(metricScope.String()), textutil.SingleWordCamel(metricName.String())), "").Add(1) + if statusCode != http.StatusOK { + stats.GetOrNewCounter(fmt.Sprintf("ThrottlerCheck%s%sError", textutil.SingleWordCamel(metricScope.String()), textutil.SingleWordCamel(metricName.String())), "").Add(1) + } + }(metricCheckResult.StatusCode) + } + if metricCheckResult.RecentlyChecked { + checkResult.RecentlyChecked = true + } + metric := &MetricResult{ + StatusCode: metricCheckResult.StatusCode, + Value: metricCheckResult.Value, + Threshold: metricCheckResult.Threshold, + Error: metricCheckResult.Error, + Message: metricCheckResult.Message, + Scope: metricScope.String(), // This reports back the actual scope used for the check + } + checkResult.Metrics[metricName.String()] = metric + if flags.MultiMetricsEnabled && !metricCheckResult.IsOK() && metricName != base.DefaultMetricName { + // If we're checking multiple metrics, and one of them fails, we should return any of the failing metric. + // For backwards compatibility, if flags.MultiMetricsEnabled is not set, we do not report back failing + // metrics, because a v20 primary would not know how to deal with it, and is not expecting any of those + // metrics. + // The only metric we ever report back is the default metric, see below. + applyMetricToCheckResult(metric) + } } - return checkResult -} - -func (check *ThrottlerCheck) splitMetricTokens(metricName string) (storeType string, storeName string, err error) { - metricTokens := strings.Split(metricName, "/") - if len(metricTokens) != 2 { - return storeType, storeName, base.ErrNoSuchMetric + if metric, ok := checkResult.Metrics[check.throttler.metricNameUsedAsDefault().String()]; ok && checkResult.IsOK() { + applyMetricToCheckResult(metric) } - storeType = metricTokens[0] - storeName = metricTokens[1] - - return storeType, storeName, nil + if metric, ok := checkResult.Metrics[base.DefaultMetricName.String()]; ok && checkResult.IsOK() { + // v20 compatibility: if this v21 server is a replica, reporting to a v20 primary, + // then we must supply the v20-flavor check result. + // If checkResult is not OK, then we will have populated these fields already by the failing metric. + applyMetricToCheckResult(metric) + } + go func(statusCode int) { + statsThrottlerCheckAnyTotal.Add(1) + if statusCode != http.StatusOK { + statsThrottlerCheckAnyError.Add(1) + } + }(checkResult.StatusCode) + go check.throttler.markRecentApp(appName, checkResult.StatusCode) + return checkResult } // localCheck -func (check *ThrottlerCheck) localCheck(ctx context.Context, metricName string) (checkResult *CheckResult) { - storeType, storeName, err := check.splitMetricTokens(metricName) +func (check *ThrottlerCheck) localCheck(ctx context.Context, aggregatedMetricName string) (checkResult *CheckResult) { + scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) if err != nil { return NoSuchMetricCheckResult } - checkResult = check.Check(ctx, throttlerapp.VitessName.String(), storeType, storeName, "local", StandardCheckFlags) + checkResult = check.Check(ctx, throttlerapp.VitessName.String(), scope, base.MetricNames{metricName}, selfCheckFlags) if checkResult.StatusCode == http.StatusOK { - check.throttler.markMetricHealthy(metricName) + check.throttler.markMetricHealthy(aggregatedMetricName) } - if timeSinceHealthy, found := check.throttler.timeSinceMetricHealthy(metricName); found { - stats.GetOrNewGauge(fmt.Sprintf("ThrottlerCheck%s%sSecondsSinceHealthy", textutil.SingleWordCamel(storeType), textutil.SingleWordCamel(storeName)), fmt.Sprintf("seconds since last healthy cehck for %s.%s", storeType, storeName)).Set(int64(timeSinceHealthy.Seconds())) + if timeSinceHealthy, found := check.throttler.timeSinceMetricHealthy(aggregatedMetricName); found { + go stats.GetOrNewGauge(fmt.Sprintf("ThrottlerCheck%sSecondsSinceHealthy", textutil.SingleWordCamel(scope.String())), fmt.Sprintf("seconds since last healthy check for %v", scope)).Set(int64(timeSinceHealthy.Seconds())) } return checkResult } -func (check *ThrottlerCheck) reportAggregated(metricName string, metricResult base.MetricResult) { - storeType, storeName, err := check.splitMetricTokens(metricName) +func (check *ThrottlerCheck) reportAggregated(aggregatedMetricName string, metricResult base.MetricResult) { + scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) if err != nil { return } if value, err := metricResult.Get(); err == nil { - stats.GetOrNewGaugeFloat64(fmt.Sprintf("ThrottlerAggregated%s%s", textutil.SingleWordCamel(storeType), textutil.SingleWordCamel(storeName)), fmt.Sprintf("aggregated value for %s.%s", storeType, storeName)).Set(value) + stats.GetOrNewGaugeFloat64(fmt.Sprintf("ThrottlerAggregated%s%s", textutil.SingleWordCamel(scope.String()), textutil.SingleWordCamel(metricName.String())), fmt.Sprintf("aggregated value for %v", scope)).Set(value) } } @@ -198,11 +256,6 @@ func (check *ThrottlerCheck) AggregatedMetrics(ctx context.Context) map[string]b return check.throttler.aggregatedMetricsSnapshot() } -// MetricsHealth is a convenience access method into throttler's `metricsHealthSnapshot` -func (check *ThrottlerCheck) MetricsHealth() map[string](*base.MetricHealth) { - return check.throttler.metricsHealthSnapshot() -} - // SelfChecks runs checks on all known metrics as if we were an app. // This runs asynchronously, continuously, and independently of any user interaction func (check *ThrottlerCheck) SelfChecks(ctx context.Context) { @@ -214,11 +267,11 @@ func (check *ThrottlerCheck) SelfChecks(ctx context.Context) { return case <-selfCheckTicker.C: for metricName, metricResult := range check.AggregatedMetrics(ctx) { - metricName := metricName + aggregatedMetricName := metricName metricResult := metricResult - go check.localCheck(ctx, metricName) - go check.reportAggregated(metricName, metricResult) + go check.localCheck(ctx, aggregatedMetricName) + go check.reportAggregated(aggregatedMetricName, metricResult) } } } diff --git a/go/vt/vttablet/tabletserver/throttle/check_result.go b/go/vt/vttablet/tabletserver/throttle/check_result.go index 41a1b240934..3c8852e4042 100644 --- a/go/vt/vttablet/tabletserver/throttle/check_result.go +++ b/go/vt/vttablet/tabletserver/throttle/check_result.go @@ -47,14 +47,24 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) +type MetricResult struct { + StatusCode int `json:"StatusCode"` + Scope string `json:"Scope"` + Value float64 `json:"Value"` + Threshold float64 `json:"Threshold"` + Error error `json:"-"` + Message string `json:"Message"` +} + // CheckResult is the result for an app inquiring on a metric. It also exports as JSON via the API type CheckResult struct { - StatusCode int `json:"StatusCode"` - Value float64 `json:"Value"` - Threshold float64 `json:"Threshold"` - Error error `json:"-"` - Message string `json:"Message"` - RecentlyChecked bool `json:"RecentlyChecked"` + StatusCode int `json:"StatusCode"` + Value float64 `json:"Value"` + Threshold float64 `json:"Threshold"` + Error error `json:"-"` + Message string `json:"Message"` + RecentlyChecked bool `json:"RecentlyChecked"` + Metrics map[string]*MetricResult `json:"Metrics"` // New in multi-metrics support. Will eventually replace the above fields. } // NewCheckResult returns a CheckResult @@ -71,6 +81,10 @@ func NewCheckResult(statusCode int, value float64, threshold float64, err error) return result } +func (c *CheckResult) IsOK() bool { + return c.StatusCode == http.StatusOK +} + // NewErrorCheckResult returns a check result that indicates an error func NewErrorCheckResult(statusCode int, err error) *CheckResult { return NewCheckResult(statusCode, 0, 0, err) diff --git a/go/vt/vttablet/tabletserver/throttle/client.go b/go/vt/vttablet/tabletserver/throttle/client.go index 5194ba19f98..e8eed627e04 100644 --- a/go/vt/vttablet/tabletserver/throttle/client.go +++ b/go/vt/vttablet/tabletserver/throttle/client.go @@ -23,6 +23,7 @@ import ( "sync/atomic" "time" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" ) @@ -35,6 +36,7 @@ var throttleInit sync.Once func initThrottleTicker() { throttleInit.Do(func() { + throttleTicks = 1 // above zero so that `lastSuccessfulThrottle` is initially stale go func() { tick := time.NewTicker(throttleCheckDuration) defer tick.Stop() @@ -49,24 +51,37 @@ func initThrottleTicker() { type Client struct { throttler *Throttler appName throttlerapp.Name - checkType ThrottleCheckType flags CheckFlags lastSuccessfulThrottleMu sync.Mutex - lastSuccessfulThrottle int64 + // lastSuccessfulThrottle records the latest tick (value of `throttleTicks`) when the throttler was + // satisfied for a given metric. This makes it possible to potentially skip a throttler check. + // key is the app name. + lastSuccessfulThrottle map[string]int64 } -// NewBackgroundClient creates a client -func NewBackgroundClient(throttler *Throttler, appName throttlerapp.Name, checkType ThrottleCheckType) *Client { +// NewBackgroundClient creates a client suitable for background jobs, which have low priority over production traffic, +// e.g. migration, table pruning, vreplication +func NewBackgroundClient(throttler *Throttler, appName throttlerapp.Name, scope base.Scope) *Client { initThrottleTicker() return &Client{ throttler: throttler, appName: appName, - checkType: checkType, - flags: CheckFlags{}, + flags: CheckFlags{ + Scope: scope, + MultiMetricsEnabled: true, + }, + lastSuccessfulThrottle: make(map[string]int64), } } +// clearSuccessfulResultsCache clears lastSuccessfulThrottleMu, so that the next check will be fresh. +func (c *Client) clearSuccessfulResultsCache() { + c.lastSuccessfulThrottleMu.Lock() + defer c.lastSuccessfulThrottleMu.Unlock() + c.lastSuccessfulThrottle = make(map[string]int64) +} + // ThrottleCheckOK checks the throttler, and returns 'true' when the throttler is satisfied. // It does not sleep. // The function caches results for a brief amount of time, hence it's safe and efficient to @@ -81,22 +96,27 @@ func (c *Client) ThrottleCheckOK(ctx context.Context, overrideAppName throttlera // no throttler return true } + checkApp := c.appName + if overrideAppName != "" { + checkApp = overrideAppName + } c.lastSuccessfulThrottleMu.Lock() defer c.lastSuccessfulThrottleMu.Unlock() - if c.lastSuccessfulThrottle >= atomic.LoadInt64(&throttleTicks) { + if c.lastSuccessfulThrottle[checkApp.String()] >= atomic.LoadInt64(&throttleTicks) { // if last check was OK just very recently there is no need to check again return true } // It's time to run a throttler check - checkApp := c.appName - if overrideAppName != "" { - checkApp = overrideAppName - } - checkResult := c.throttler.CheckByType(ctx, checkApp.String(), "", &c.flags, c.checkType) + checkResult := c.throttler.Check(ctx, checkApp.String(), nil, &c.flags) if checkResult.StatusCode != http.StatusOK { return false } - c.lastSuccessfulThrottle = atomic.LoadInt64(&throttleTicks) + for _, metricResult := range checkResult.Metrics { + if metricResult.StatusCode != http.StatusOK { + return false + } + } + c.lastSuccessfulThrottle[checkApp.String()] = atomic.LoadInt64(&throttleTicks) return true } @@ -106,11 +126,15 @@ func (c *Client) ThrottleCheckOK(ctx context.Context, overrideAppName throttlera // Non-empty appName overrides the default appName. // The function is not thread safe. func (c *Client) ThrottleCheckOKOrWaitAppName(ctx context.Context, appName throttlerapp.Name) bool { - ok := c.ThrottleCheckOK(ctx, appName) - if !ok { - time.Sleep(throttleCheckDuration) + if c.ThrottleCheckOK(ctx, appName) { + return true } - return ok + if ctx.Err() != nil { + // context expired, skip sleeping + return false + } + time.Sleep(throttleCheckDuration) + return false } // ThrottleCheckOKOrWait checks the throttler; if throttler is satisfied, the function returns 'true' immediately, @@ -124,12 +148,7 @@ func (c *Client) ThrottleCheckOKOrWait(ctx context.Context) bool { // The function sleeps between throttle checks. // The function is not thread safe. func (c *Client) Throttle(ctx context.Context) { - for { - if ctx.Err() != nil { - return - } - if c.ThrottleCheckOKOrWait(ctx) { - return - } + for !c.ThrottleCheckOKOrWait(ctx) { + // The function incorporates a bit of sleep so this is not a busy wait. } } diff --git a/go/vt/vttablet/tabletserver/throttle/config/config.go b/go/vt/vttablet/tabletserver/throttle/config/config.go index f6234955cc4..26311bc5981 100644 --- a/go/vt/vttablet/tabletserver/throttle/config/config.go +++ b/go/vt/vttablet/tabletserver/throttle/config/config.go @@ -41,11 +41,6 @@ limitations under the License. package config -// NewConfigurationSettings creates new throttler configuration settings. -func NewConfigurationSettings() *ConfigurationSettings { - return &ConfigurationSettings{} -} - // ConfigurationSettings models a set of configurable values, that can be // provided by the user via one or several JSON formatted files. // @@ -57,5 +52,10 @@ type ConfigurationSettings struct { Environment string Domain string EnableProfiling bool // enable pprof profiling http api - Stores StoresSettings + MySQLStore MySQLConfigurationSettings +} + +// NewConfigurationSettings creates new throttler configuration settings. +func NewConfigurationSettings() *ConfigurationSettings { + return &ConfigurationSettings{} } diff --git a/go/vt/vttablet/tabletserver/throttle/config/mysql_config.go b/go/vt/vttablet/tabletserver/throttle/config/mysql_config.go index 3aa0607fb28..d4beb40deb4 100644 --- a/go/vt/vttablet/tabletserver/throttle/config/mysql_config.go +++ b/go/vt/vttablet/tabletserver/throttle/config/mysql_config.go @@ -43,31 +43,23 @@ package config import ( "sync/atomic" + + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) // // MySQL-specific configuration // -// MySQLClusterConfigurationSettings has the settings for a specific MySQL cluster. It derives its information -// from MySQLConfigurationSettings -type MySQLClusterConfigurationSettings struct { - MetricQuery string // override MySQLConfigurationSettings's, or leave empty to inherit those settings - CacheMillis int // override MySQLConfigurationSettings's, or leave empty to inherit those settings - ThrottleThreshold *atomic.Uint64 // override MySQLConfigurationSettings's, or leave empty to inherit those settings - Port int // Specify if different than 3306 or if different than specified by MySQLConfigurationSettings - IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding thresholds - IgnoreHostsThreshold float64 // Threshold beyond which IgnoreHostsCount applies (default: 0) - HTTPCheckPort int // Specify if different than specified by MySQLConfigurationSettings. -1 to disable HTTP check - HTTPCheckPath string // Specify if different than specified by MySQLConfigurationSettings - IgnoreHosts []string // override MySQLConfigurationSettings's, or leave empty to inherit those settings +type MySQLMetricConfigurationSettings struct { + Name base.MetricName + CustomQuery string + Threshold atomic.Uint64 } // MySQLConfigurationSettings has the general configuration for all MySQL clusters type MySQLConfigurationSettings struct { - MetricQuery string - CacheMillis int // optional, if defined then probe result will be cached, and future probes may use cached value - ThrottleThreshold *atomic.Uint64 + CacheMillis int // optional, if defined then probe result will be cached, and future probes may use cached value Port int // Specify if different than 3306; applies to all clusters IgnoreDialTCPErrors bool // Skip hosts where a metric cannot be retrieved due to TCP dial errors IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding thresholds @@ -76,5 +68,5 @@ type MySQLConfigurationSettings struct { HTTPCheckPath string // If non-empty, requires HTTPCheckPort IgnoreHosts []string // If non empty, substrings to indicate hosts to be ignored/skipped - Clusters map[string](*MySQLClusterConfigurationSettings) // cluster name -> cluster config + Metrics map[base.MetricName]*MySQLMetricConfigurationSettings } diff --git a/go/vt/vttablet/tabletserver/throttle/config/store_config.go b/go/vt/vttablet/tabletserver/throttle/config/store_config.go deleted file mode 100644 index 7e5594050d9..00000000000 --- a/go/vt/vttablet/tabletserver/throttle/config/store_config.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2023 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. -*/ - -// This codebase originates from https://github.com/github/freno, See https://github.com/github/freno/blob/master/LICENSE -/* - MIT License - - Copyright (c) 2017 GitHub - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -package config - -// -// General-store configuration -// - -// StoresSettings is a general settings container for specific stores. -type StoresSettings struct { - MySQL MySQLConfigurationSettings // Any and all MySQL setups go here - - // Futuristic stores can come here. -} diff --git a/go/vt/vttablet/tabletserver/throttle/mysql.go b/go/vt/vttablet/tabletserver/throttle/mysql.go index 81a967ddacb..ae0361c6018 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql.go +++ b/go/vt/vttablet/tabletserver/throttle/mysql.go @@ -51,8 +51,7 @@ import ( func aggregateMySQLProbes( ctx context.Context, - probes mysql.Probes, - clusterName string, + metricName base.MetricName, tabletResultsMap mysql.TabletResultMap, ignoreHostsCount int, IgnoreDialTCPErrors bool, @@ -61,12 +60,14 @@ func aggregateMySQLProbes( // probes is known not to change. It can be *replaced*, but not changed. // so it's safe to iterate it probeValues := []float64{} - for _, probe := range probes { - tabletMetricResult, ok := tabletResultsMap[mysql.GetClusterTablet(clusterName, probe.Alias)] + for _, tabletMetricResults := range tabletResultsMap { + tabletMetricResult, ok := tabletMetricResults[metricName] if !ok { + return base.NoSuchMetric + } + if tabletMetricResult == nil { return base.NoMetricResultYet } - value, err := tabletMetricResult.Get() if err != nil { if IgnoreDialTCPErrors && base.IsDialTCPError(err) { diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go b/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go index 744bcc99a44..f8ae0e26f11 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go +++ b/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go @@ -45,35 +45,29 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) -// ClusterTablet combines a cluster name with a tablet alias -type ClusterTablet struct { - ClusterName string - Alias string -} +// TabletResultMap maps a tablet to a result +type TabletResultMap map[string]base.MetricResultMap -// GetClusterTablet creates a GetClusterTablet object -func GetClusterTablet(clusterName string, alias string) ClusterTablet { - return ClusterTablet{ClusterName: clusterName, Alias: alias} +func (m TabletResultMap) Split(alias string) (withAlias TabletResultMap, all TabletResultMap) { + withAlias = make(TabletResultMap) + if val, ok := m[alias]; ok { + withAlias[alias] = val + } + return withAlias, m } -// TabletResultMap maps a cluster-tablet to a result -type TabletResultMap map[ClusterTablet]base.MetricResult - // Inventory has the operational data about probes, their metrics, and relevant configuration type Inventory struct { - ClustersProbes map[string](Probes) - IgnoreHostsCount map[string]int - IgnoreHostsThreshold map[string]float64 + ClustersProbes Probes + IgnoreHostsCount int + IgnoreHostsThreshold float64 TabletMetrics TabletResultMap } // NewInventory creates a Inventory func NewInventory() *Inventory { inventory := &Inventory{ - ClustersProbes: make(map[string](Probes)), - IgnoreHostsCount: make(map[string]int), - IgnoreHostsThreshold: make(map[string]float64), - TabletMetrics: make(map[ClusterTablet]base.MetricResult), + TabletMetrics: make(TabletResultMap), } return inventory } diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go b/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go new file mode 100644 index 00000000000..fe6204a36c2 --- /dev/null +++ b/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go @@ -0,0 +1,49 @@ +/* +Copyright 2024 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 mysql + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "golang.org/x/exp/maps" + + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" +) + +func TestTabletResultMapSplit(t *testing.T) { + tabletResultMap := TabletResultMap{ + "a": make(base.MetricResultMap), + "b": make(base.MetricResultMap), + "c": make(base.MetricResultMap), + } + { + withAlias, all := tabletResultMap.Split("b") + + assert.Equal(t, 1, len(withAlias)) + assert.EqualValues(t, maps.Keys(withAlias), []string{"b"}) + assert.Equal(t, 3, len(all)) + assert.ElementsMatch(t, maps.Keys(all), []string{"a", "b", "c"}) + } + { + withAlias, all := tabletResultMap.Split("x") + + assert.Equal(t, 0, len(withAlias)) + assert.Equal(t, 3, len(all)) + assert.ElementsMatch(t, maps.Keys(all), []string{"a", "b", "c"}) + } +} diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go b/go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go index 966c7a93d7f..58447315a94 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go +++ b/go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go @@ -42,13 +42,14 @@ limitations under the License. package mysql import ( - "fmt" + "context" "strings" "time" "github.com/patrickmn/go-cache" "vitess.io/vitess/go/stats" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) // MetricsQueryType indicates the type of metrics query on MySQL backend. See following. @@ -68,26 +69,28 @@ const ( var mysqlMetricCache = cache.New(cache.NoExpiration, 10*time.Second) func getMySQLMetricCacheKey(probe *Probe) string { - return fmt.Sprintf("%s:%s", probe.Alias, probe.MetricQuery) + return probe.Alias } -func cacheMySQLThrottleMetric(probe *Probe, mySQLThrottleMetric *MySQLThrottleMetric) *MySQLThrottleMetric { - if mySQLThrottleMetric.Err != nil { - return mySQLThrottleMetric +func cacheMySQLThrottleMetric(probe *Probe, mySQLThrottleMetrics MySQLThrottleMetrics) MySQLThrottleMetrics { + for _, metric := range mySQLThrottleMetrics { + if metric.Err != nil { + return mySQLThrottleMetrics + } } if probe.CacheMillis > 0 { - mysqlMetricCache.Set(getMySQLMetricCacheKey(probe), mySQLThrottleMetric, time.Duration(probe.CacheMillis)*time.Millisecond) + mysqlMetricCache.Set(getMySQLMetricCacheKey(probe), mySQLThrottleMetrics, time.Duration(probe.CacheMillis)*time.Millisecond) } - return mySQLThrottleMetric + return mySQLThrottleMetrics } -func getCachedMySQLThrottleMetric(probe *Probe) *MySQLThrottleMetric { +func getCachedMySQLThrottleMetrics(probe *Probe) MySQLThrottleMetrics { if probe.CacheMillis == 0 { return nil } - if metric, found := mysqlMetricCache.Get(getMySQLMetricCacheKey(probe)); found { - mySQLThrottleMetric, _ := metric.(*MySQLThrottleMetric) - return mySQLThrottleMetric + if metrics, found := mysqlMetricCache.Get(getMySQLMetricCacheKey(probe)); found { + mySQLThrottleMetrics, _ := metrics.(MySQLThrottleMetrics) + return mySQLThrottleMetrics } return nil } @@ -108,20 +111,23 @@ func GetMetricsQueryType(query string) MetricsQueryType { // MySQLThrottleMetric has the probed metric for a tablet type MySQLThrottleMetric struct { // nolint:revive - ClusterName string - Alias string - Value float64 - Err error + Name base.MetricName + Scope base.Scope + Alias string + Value float64 + Err error } +type MySQLThrottleMetrics map[base.MetricName]*MySQLThrottleMetric // nolint:revive + // NewMySQLThrottleMetric creates a new MySQLThrottleMetric func NewMySQLThrottleMetric() *MySQLThrottleMetric { return &MySQLThrottleMetric{Value: 0} } // GetClusterTablet returns the ClusterTablet part of the metric -func (metric *MySQLThrottleMetric) GetClusterTablet() ClusterTablet { - return GetClusterTablet(metric.ClusterName, metric.Alias) +func (metric *MySQLThrottleMetric) GetTabletAlias() string { + return metric.Alias } // Get implements MetricResult @@ -129,29 +135,32 @@ func (metric *MySQLThrottleMetric) Get() (float64, error) { return metric.Value, metric.Err } -// ReadThrottleMetric returns a metric for the given probe. Either by explicit query +// WithError returns this metric with given error +func (metric *MySQLThrottleMetric) WithError(err error) *MySQLThrottleMetric { + metric.Err = err + return metric +} + +// ReadThrottleMetrics returns a metric for the given probe. Either by explicit query // or via SHOW REPLICA STATUS -func ReadThrottleMetric(probe *Probe, clusterName string, overrideGetMetricFunc func() *MySQLThrottleMetric) (mySQLThrottleMetric *MySQLThrottleMetric) { - if mySQLThrottleMetric := getCachedMySQLThrottleMetric(probe); mySQLThrottleMetric != nil { - return mySQLThrottleMetric - // On cached results we avoid taking latency metrics +func ReadThrottleMetrics(ctx context.Context, probe *Probe, metricsFunc func(context.Context) MySQLThrottleMetrics) MySQLThrottleMetrics { + if metrics := getCachedMySQLThrottleMetrics(probe); metrics != nil { + return metrics } started := time.Now() - mySQLThrottleMetric = NewMySQLThrottleMetric() - mySQLThrottleMetric.ClusterName = clusterName - mySQLThrottleMetric.Alias = probe.Alias - - defer func(metric *MySQLThrottleMetric, started time.Time) { - go func() { - stats.GetOrNewGauge("ThrottlerProbesLatency", "probes latency").Set(time.Since(started).Nanoseconds()) - stats.GetOrNewCounter("ThrottlerProbesTotal", "total probes").Add(1) + mySQLThrottleMetrics := metricsFunc(ctx) + + go func(metrics MySQLThrottleMetrics, started time.Time) { + stats.GetOrNewGauge("ThrottlerProbesLatency", "probes latency").Set(time.Since(started).Nanoseconds()) + stats.GetOrNewCounter("ThrottlerProbesTotal", "total probes").Add(1) + for _, metric := range metrics { if metric.Err != nil { stats.GetOrNewCounter("ThrottlerProbesError", "total probes errors").Add(1) + break } - }() - }(mySQLThrottleMetric, started) + } + }(mySQLThrottleMetrics, started) - mySQLThrottleMetric = overrideGetMetricFunc() - return cacheMySQLThrottleMetric(probe, mySQLThrottleMetric) + return cacheMySQLThrottleMetric(probe, mySQLThrottleMetrics) } diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/probe.go b/go/vt/vttablet/tabletserver/throttle/mysql/probe.go index 8c3e069c0d1..af0d660096e 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/probe.go +++ b/go/vt/vttablet/tabletserver/throttle/mysql/probe.go @@ -50,7 +50,6 @@ import ( // Probe is the minimal configuration required to connect to a MySQL server type Probe struct { Alias string - MetricQuery string Tablet *topodatapb.Tablet CacheMillis int QueryInProgress int64 @@ -61,7 +60,6 @@ type Probes map[string](*Probe) // ClusterProbes has the probes for a specific cluster type ClusterProbes struct { - ClusterName string IgnoreHostsCount int IgnoreHostsThreshold float64 TabletProbes Probes diff --git a/go/vt/vttablet/tabletserver/throttle/mysql_test.go b/go/vt/vttablet/tabletserver/throttle/mysql_test.go index 15d6feab03f..78cc1fdbdd3 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql_test.go +++ b/go/vt/vttablet/tabletserver/throttle/mysql_test.go @@ -59,57 +59,71 @@ var ( alias5 = "zone1-0005" ) +const ( + nonexistentMetricName base.MetricName = "nonexistent" +) + +func newMetricResultMap(val float64) base.MetricResultMap { + return base.MetricResultMap{ + base.DefaultMetricName: base.NewSimpleMetricResult(val), + base.LagMetricName: base.NewSimpleMetricResult(val), + base.LoadAvgMetricName: base.NewSimpleMetricResult(3.14), + } +} +func noSuchMetricMap() base.MetricResultMap { + result := make(base.MetricResultMap) + for _, metricName := range base.KnownMetricNames { + result[metricName] = base.NoSuchMetric + } + return result +} + func TestAggregateMySQLProbesNoErrors(t *testing.T) { ctx := context.Background() - clusterName := "c0" - key1cluster := mysql.GetClusterTablet(clusterName, alias1) - key2cluster := mysql.GetClusterTablet(clusterName, alias2) - key3cluster := mysql.GetClusterTablet(clusterName, alias3) - key4cluster := mysql.GetClusterTablet(clusterName, alias4) - key5cluster := mysql.GetClusterTablet(clusterName, alias5) tabletResultsMap := mysql.TabletResultMap{ - key1cluster: base.NewSimpleMetricResult(1.2), - key2cluster: base.NewSimpleMetricResult(1.7), - key3cluster: base.NewSimpleMetricResult(0.3), - key4cluster: base.NewSimpleMetricResult(0.6), - key5cluster: base.NewSimpleMetricResult(1.1), + alias1: newMetricResultMap(1.2), + alias2: newMetricResultMap(1.7), + alias3: newMetricResultMap(0.3), + alias4: newMetricResultMap(0.6), + alias5: newMetricResultMap(1.1), } var probes mysql.Probes = map[string](*mysql.Probe){} for clusterKey := range tabletResultsMap { - probes[clusterKey.Alias] = &mysql.Probe{Alias: clusterKey.Alias} + probes[clusterKey] = &mysql.Probe{Alias: clusterKey} } + { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 0, false, 0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.7) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 1, false, 0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.2) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 2, false, 0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.1) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 3, false, 0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 3, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 0.6) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 4, false, 0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 4, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 0.3) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 5, false, 0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 5, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 0.3) @@ -118,55 +132,49 @@ func TestAggregateMySQLProbesNoErrors(t *testing.T) { func TestAggregateMySQLProbesNoErrorsIgnoreHostsThreshold(t *testing.T) { ctx := context.Background() - clusterName := "c0" - key1cluster := mysql.GetClusterTablet(clusterName, alias1) - key2cluster := mysql.GetClusterTablet(clusterName, alias2) - key3cluster := mysql.GetClusterTablet(clusterName, alias3) - key4cluster := mysql.GetClusterTablet(clusterName, alias4) - key5cluster := mysql.GetClusterTablet(clusterName, alias5) - tableteResultsMap := mysql.TabletResultMap{ - key1cluster: base.NewSimpleMetricResult(1.2), - key2cluster: base.NewSimpleMetricResult(1.7), - key3cluster: base.NewSimpleMetricResult(0.3), - key4cluster: base.NewSimpleMetricResult(0.6), - key5cluster: base.NewSimpleMetricResult(1.1), + tabletResultsMap := mysql.TabletResultMap{ + alias1: newMetricResultMap(1.2), + alias2: newMetricResultMap(1.7), + alias3: newMetricResultMap(0.3), + alias4: newMetricResultMap(0.6), + alias5: newMetricResultMap(1.1), } var probes mysql.Probes = map[string](*mysql.Probe){} - for clusterKey := range tableteResultsMap { - probes[clusterKey.Alias] = &mysql.Probe{Alias: clusterKey.Alias} + for clusterKey := range tabletResultsMap { + probes[clusterKey] = &mysql.Probe{Alias: clusterKey} } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tableteResultsMap, 0, false, 1.0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 1.0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.7) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tableteResultsMap, 1, false, 1.0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 1.0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.2) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tableteResultsMap, 2, false, 1.0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 1.0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.1) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tableteResultsMap, 3, false, 1.0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 3, false, 1.0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 0.6) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tableteResultsMap, 4, false, 1.0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 4, false, 1.0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 0.6) } { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tableteResultsMap, 5, false, 1.0) + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 5, false, 1.0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 0.6) @@ -175,59 +183,60 @@ func TestAggregateMySQLProbesNoErrorsIgnoreHostsThreshold(t *testing.T) { func TestAggregateMySQLProbesWithErrors(t *testing.T) { ctx := context.Background() - clusterName := "c0" - key1cluster := mysql.GetClusterTablet(clusterName, alias1) - key2cluster := mysql.GetClusterTablet(clusterName, alias2) - key3cluster := mysql.GetClusterTablet(clusterName, alias3) - key4cluster := mysql.GetClusterTablet(clusterName, alias4) - key5cluster := mysql.GetClusterTablet(clusterName, alias5) tabletResultsMap := mysql.TabletResultMap{ - key1cluster: base.NewSimpleMetricResult(1.2), - key2cluster: base.NewSimpleMetricResult(1.7), - key3cluster: base.NewSimpleMetricResult(0.3), - key4cluster: base.NoSuchMetric, - key5cluster: base.NewSimpleMetricResult(1.1), + alias1: newMetricResultMap(1.2), + alias2: newMetricResultMap(1.7), + alias3: newMetricResultMap(0.3), + alias4: noSuchMetricMap(), + alias5: newMetricResultMap(1.1), } var probes mysql.Probes = map[string](*mysql.Probe){} for clusterKey := range tabletResultsMap { - probes[clusterKey.Alias] = &mysql.Probe{Alias: clusterKey.Alias} + probes[clusterKey] = &mysql.Probe{Alias: clusterKey} } - { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 0, false, 0) + + t.Run("nonexistent", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, nonexistentMetricName, tabletResultsMap, 0, false, 0) _, err := worstMetric.Get() assert.Error(t, err) - assert.Equal(t, err, base.ErrNoSuchMetric) - } - { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 1, false, 0) + assert.Equal(t, base.ErrNoSuchMetric, err) + }) + t.Run("no ignore", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 0) + _, err := worstMetric.Get() + assert.Error(t, err) + assert.Equal(t, base.ErrNoSuchMetric, err) + }) + t.Run("ignore 1", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) - assert.Equal(t, value, 1.7) - } - { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 2, false, 0) + assert.Equal(t, 1.7, value) + }) + t.Run("ignore 2", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) - assert.Equal(t, value, 1.2) - } + assert.Equal(t, 1.2, value) + }) - tabletResultsMap[key1cluster] = base.NoSuchMetric - { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 0, false, 0) + tabletResultsMap[alias1][base.DefaultMetricName] = base.NoSuchMetric + t.Run("no such metric", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 0) _, err := worstMetric.Get() assert.Error(t, err) - assert.Equal(t, err, base.ErrNoSuchMetric) - } - { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 1, false, 0) + assert.Equal(t, base.ErrNoSuchMetric, err) + }) + t.Run("no such metric, ignore 1", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 0) _, err := worstMetric.Get() assert.Error(t, err) - assert.Equal(t, err, base.ErrNoSuchMetric) - } - { - worstMetric := aggregateMySQLProbes(ctx, probes, clusterName, tabletResultsMap, 2, false, 0) + assert.Equal(t, base.ErrNoSuchMetric, err) + }) + t.Run("metric found", func(t *testing.T) { + worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 0) value, err := worstMetric.Get() assert.NoError(t, err) assert.Equal(t, value, 1.7) - } + }) } diff --git a/go/vt/vttablet/tabletserver/throttle/throttler.go b/go/vt/vttablet/tabletserver/throttle/throttler.go index 803f331cef4..e3e36123e7e 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler.go @@ -42,12 +42,14 @@ limitations under the License. package throttle import ( + "bufio" "context" "errors" "fmt" "math" "math/rand/v2" "net/http" + "os" "strconv" "strings" "sync" @@ -91,27 +93,33 @@ const ( recentCheckRateLimiterInterval = 1 * time.Second // Ticker assisting in determining when the throttler was last checked aggregatedMetricsExpiration = 5 * time.Second - recentAppsExpiration = time.Hour * 24 + recentAppsExpiration = time.Hour dormantPeriod = time.Minute // How long since last check to be considered dormant DefaultAppThrottleDuration = time.Hour DefaultThrottleRatio = 1.0 - shardStoreName = "shard" - selfStoreName = "self" - defaultReplicationLagQuery = "select unix_timestamp(now(6))-max(ts/1000000000) as replication_lag from %s.heartbeat" + threadsRunningQuery = "show global status like 'threads_running'" + + inventoryPrefix = "inventory/" + throttlerConfigPrefix = "config/" ) var ( - // flag vars - defaultThrottleLagThreshold = 5 * time.Second - throttleTabletTypes = "replica" + throttleTabletTypes = "replica" + + defaultThresholds = map[base.MetricName]float64{ + base.DefaultMetricName: 5 * time.Second.Seconds(), + base.LagMetricName: 5 * time.Second.Seconds(), + base.ThreadsRunningMetricName: 100, + base.CustomMetricName: 0, + base.LoadAvgMetricName: 1.0, + } ) var ( statsThrottlerHeartbeatRequests = stats.NewCounter("ThrottlerHeartbeatRequests", "heartbeat requests") - statsThrottlerRecentlyChecked = stats.NewCounter("ThrottlerRecentlyChecked", "recently checked") statsThrottlerProbeRecentlyChecked = stats.NewCounter("ThrottlerProbeRecentlyChecked", "probe recently checked") ) @@ -128,16 +136,6 @@ var ( ErrThrottlerNotOpen = errors.New("throttler not open") ) -// ThrottleCheckType allows a client to indicate what type of check it wants to issue. See available types below. -type ThrottleCheckType int // nolint:revive - -const ( - // ThrottleCheckPrimaryWrite indicates a check before making a write on a primary server - ThrottleCheckPrimaryWrite ThrottleCheckType = iota - // ThrottleCheckSelf indicates a check on a specific server health - ThrottleCheckSelf -) - // throttlerTopoService represents the functionality we expect from a TopoServer, abstracted so that // it can be mocked in unit tests type throttlerTopoService interface { @@ -174,6 +172,7 @@ type Throttler struct { srvTopoServer srvtopo.Server heartbeatWriter heartbeat.HeartbeatWriter overrideTmClient tmclient.TabletManagerClient + tabletAlias string recentCheckRateLimiter *timer.RateLimiter recentCheckDormantDiff int64 @@ -182,21 +181,23 @@ type Throttler struct { throttleTabletTypesMap map[topodatapb.TabletType]bool mysqlThrottleMetricChan chan *mysql.MySQLThrottleMetric - mysqlInventoryChan chan *mysql.Inventory mysqlClusterProbesChan chan *mysql.ClusterProbes throttlerConfigChan chan *topodatapb.ThrottlerConfig + serialFuncChan chan func() // Used by unit tests to inject non-racy behavior mysqlInventory *mysql.Inventory - metricsQuery atomic.Value - MetricsThreshold atomic.Uint64 - checkAsCheckSelf atomic.Bool + metricsQuery atomic.Value + customMetricsQuery atomic.Value + MetricsThreshold atomic.Uint64 + checkAsCheckSelf atomic.Bool - mysqlClusterThresholds *cache.Cache - aggregatedMetrics *cache.Cache - throttledApps *cache.Cache - recentApps *cache.Cache - metricsHealth *cache.Cache + mysqlMetricThresholds *cache.Cache + aggregatedMetrics *cache.Cache + throttledApps *cache.Cache + recentApps *cache.Cache + metricsHealth *cache.Cache + appCheckedMetrics *cache.Cache initMutex sync.Mutex enableMutex sync.Mutex @@ -204,9 +205,11 @@ type Throttler struct { cancelEnableContext context.CancelFunc throttledAppsMutex sync.Mutex - readSelfThrottleMetric func(context.Context, *mysql.Probe) *mysql.MySQLThrottleMetric // overwritten by unit test + readSelfThrottleMetrics func(context.Context) mysql.MySQLThrottleMetrics // overwritten by unit test httpClient *http.Client + + hostCpuCoreCount atomic.Int32 } // ThrottlerStatus published some status values from the throttler @@ -214,17 +217,23 @@ type ThrottlerStatus struct { Keyspace string Shard string - IsLeader bool - IsOpen bool - IsEnabled bool - IsDormant bool - IsRecentlyChecked bool + IsLeader bool + IsOpen bool + IsEnabled bool + IsDormant bool + RecentlyChecked bool - Query string - Threshold float64 + Query string + CustomQuery string + Threshold float64 + MetricNameUsedAsDefault string AggregatedMetrics map[string]base.MetricResult + MetricsThresholds map[string]float64 MetricsHealth base.MetricHealthMap + ThrottledApps []base.AppThrottle + AppCheckedMetrics map[string]string + RecentApps map[string](*base.RecentApp) } // NewThrottler creates a Throttler @@ -243,16 +252,17 @@ func NewThrottler(env tabletenv.Env, srvTopoServer srvtopo.Server, ts *topo.Serv } throttler.mysqlThrottleMetricChan = make(chan *mysql.MySQLThrottleMetric) - throttler.mysqlInventoryChan = make(chan *mysql.Inventory, 1) throttler.mysqlClusterProbesChan = make(chan *mysql.ClusterProbes) throttler.throttlerConfigChan = make(chan *topodatapb.ThrottlerConfig) + throttler.serialFuncChan = make(chan func()) throttler.mysqlInventory = mysql.NewInventory() throttler.throttledApps = cache.New(cache.NoExpiration, 0) - throttler.mysqlClusterThresholds = cache.New(cache.NoExpiration, 0) + throttler.mysqlMetricThresholds = cache.New(cache.NoExpiration, 0) throttler.aggregatedMetrics = cache.New(aggregatedMetricsExpiration, 0) - throttler.recentApps = cache.New(recentAppsExpiration, 0) + throttler.recentApps = cache.New(recentAppsExpiration, recentAppsExpiration) throttler.metricsHealth = cache.New(cache.NoExpiration, 0) + throttler.appCheckedMetrics = cache.New(cache.NoExpiration, 0) throttler.httpClient = base.SetupHTTPClient(2 * mysqlCollectInterval) throttler.initThrottleTabletTypes() @@ -271,9 +281,9 @@ func NewThrottler(env tabletenv.Env, srvTopoServer srvtopo.Server, ts *topo.Serv throttler.recentCheckDiff = 1 } - throttler.StoreMetricsThreshold(defaultThrottleLagThreshold.Seconds()) //default - throttler.readSelfThrottleMetric = func(ctx context.Context, p *mysql.Probe) *mysql.MySQLThrottleMetric { - return throttler.readSelfMySQLThrottleMetric(ctx, p) + throttler.StoreMetricsThreshold(defaultThresholds[base.LagMetricName]) + throttler.readSelfThrottleMetrics = func(ctx context.Context) mysql.MySQLThrottleMetrics { + return throttler.readSelfThrottleMetricsInternal(ctx) } return throttler @@ -309,6 +319,14 @@ func (throttler *Throttler) GetMetricsQuery() string { return throttler.metricsQuery.Load().(string) } +func (throttler *Throttler) GetCustomMetricsQuery() string { + val := throttler.customMetricsQuery.Load() + if val == nil { + return "" + } + return val.(string) +} + func (throttler *Throttler) GetMetricsThreshold() float64 { return math.Float64frombits(throttler.MetricsThreshold.Load()) } @@ -318,23 +336,31 @@ func (throttler *Throttler) initConfig() { log.Infof("Throttler: initializing config") throttler.configSettings = &config.ConfigurationSettings{ - Stores: config.StoresSettings{ - MySQL: config.MySQLConfigurationSettings{ - IgnoreDialTCPErrors: true, - Clusters: map[string](*config.MySQLClusterConfigurationSettings){}, - }, + MySQLStore: config.MySQLConfigurationSettings{ + IgnoreDialTCPErrors: true, }, } - throttler.configSettings.Stores.MySQL.Clusters[selfStoreName] = &config.MySQLClusterConfigurationSettings{ - MetricQuery: throttler.GetMetricsQuery(), - ThrottleThreshold: &throttler.MetricsThreshold, - IgnoreHostsCount: 0, - } - throttler.configSettings.Stores.MySQL.Clusters[shardStoreName] = &config.MySQLClusterConfigurationSettings{ - MetricQuery: throttler.GetMetricsQuery(), - ThrottleThreshold: &throttler.MetricsThreshold, - IgnoreHostsCount: 0, + metrics := make(map[base.MetricName]*config.MySQLMetricConfigurationSettings) + for _, metricsName := range base.KnownMetricNames { + metrics[metricsName] = &config.MySQLMetricConfigurationSettings{ + Name: metricsName, + } } + metrics[base.DefaultMetricName].CustomQuery = "" + metrics[base.DefaultMetricName].Threshold.Store(throttler.MetricsThreshold.Load()) + + metrics[base.LagMetricName].CustomQuery = sqlparser.BuildParsedQuery(defaultReplicationLagQuery, sidecar.GetIdentifier()).Query + metrics[base.LagMetricName].Threshold.Store(throttler.MetricsThreshold.Load()) + + metrics[base.ThreadsRunningMetricName].CustomQuery = threadsRunningQuery + metrics[base.ThreadsRunningMetricName].Threshold.Store(math.Float64bits(defaultThresholds[base.ThreadsRunningMetricName])) + + metrics[base.CustomMetricName].CustomQuery = "" + metrics[base.CustomMetricName].Threshold.Store(math.Float64bits(defaultThresholds[base.CustomMetricName])) + + metrics[base.LoadAvgMetricName].Threshold.Store(math.Float64bits(defaultThresholds[base.LoadAvgMetricName])) + + throttler.configSettings.MySQLStore.Metrics = metrics } // readThrottlerConfig proactively reads the throttler's config from SrvKeyspace in local topo @@ -354,10 +380,16 @@ func (throttler *Throttler) normalizeThrottlerConfig(throttlerConfig *topodatapb if throttlerConfig.ThrottledApps == nil { throttlerConfig.ThrottledApps = make(map[string]*topodatapb.ThrottledAppRule) } + if throttlerConfig.AppCheckedMetrics == nil { + throttlerConfig.AppCheckedMetrics = make(map[string]*topodatapb.ThrottlerConfig_MetricNames) + } + if throttlerConfig.MetricThresholds == nil { + throttlerConfig.MetricThresholds = make(map[string]float64) + } if throttlerConfig.CustomQuery == "" { // no custom query; we check replication lag if throttlerConfig.Threshold == 0 { - throttlerConfig.Threshold = defaultThrottleLagThreshold.Seconds() + throttlerConfig.Threshold = defaultThresholds[base.LagMetricName] } } return throttlerConfig @@ -388,6 +420,24 @@ func (throttler *Throttler) WatchSrvKeyspaceCallback(srvks *topodatapb.SrvKeyspa return true } +// convergeMetricThresholds looks at metric thresholds as defined by: +// - inventory (also includes changes to throttler.MetricsThreshold). This always includes all known metrics +// ie lag, threads_running, etc... +// - throttler config. This can be a list of zero or more entries. These metrics override the inventory. +func (throttler *Throttler) convergeMetricThresholds() { + for _, metricName := range base.KnownMetricNames { + if val, ok := throttler.mysqlMetricThresholds.Get(throttlerConfigPrefix + metricName.String()); ok { + // Value supplied by throttler config takes precedence + throttler.mysqlMetricThresholds.Set(metricName.String(), val, cache.DefaultExpiration) + continue + } + // metric not indicated in the throttler config, therefore we should use the default threshold for that metric + if val, ok := throttler.mysqlMetricThresholds.Get(inventoryPrefix + metricName.String()); ok { + throttler.mysqlMetricThresholds.Set(metricName.String(), val, cache.DefaultExpiration) + } + } +} + // applyThrottlerConfig receives a Throttlerconfig as read from SrvKeyspace, and applies the configuration. // This may cause the throttler to be enabled/disabled, and of course it affects the throttling query/threshold. // Note: you should be holding the initMutex when calling this function. @@ -398,10 +448,70 @@ func (throttler *Throttler) applyThrottlerConfig(ctx context.Context, throttlerC } else { throttler.metricsQuery.Store(throttlerConfig.CustomQuery) } - throttler.StoreMetricsThreshold(throttlerConfig.Threshold) + throttler.customMetricsQuery.Store(throttlerConfig.CustomQuery) + if throttlerConfig.Threshold > 0 || throttlerConfig.CustomQuery != "" { + // We do not allow Threshold=0, unless there is a custom query. + // Without a custom query, the theshold applies to replication lag, + // which does not make sense to have as zero. + // This is already validated in VtctldServer.UpdateThrottlerConfig() in grpcvtctldserver/server.go, + // but worth validating again. + // Once transition to multi-metrics is complete (1 or 2 versions after first shipping it), + // this legacy behavior can be removed. We won't be using `Threadhold` anymore, and we will + // require per-metric threshold. + throttler.StoreMetricsThreshold(throttlerConfig.Threshold) + } throttler.checkAsCheckSelf.Store(throttlerConfig.CheckAsCheckSelf) - for _, appRule := range throttlerConfig.ThrottledApps { - throttler.ThrottleApp(appRule.Name, protoutil.TimeFromProto(appRule.ExpiresAt).UTC(), appRule.Ratio, appRule.Exempt) + { + // Throttled apps/rules + for _, appRule := range throttlerConfig.ThrottledApps { + throttler.ThrottleApp(appRule.Name, protoutil.TimeFromProto(appRule.ExpiresAt).UTC(), appRule.Ratio, appRule.Exempt) + } + for app := range throttler.throttledAppsSnapshot() { + if app == throttlerapp.TestingAlwaysThrottlerName.String() { + // Never remove this app + continue + } + if _, ok := throttlerConfig.ThrottledApps[app]; !ok { + // app not indicated in the throttler config, therefore should be removed from the map + throttler.UnthrottleApp(app) + } + } + } + { + // throttler.appCheckedMetrics needs to reflect throttlerConfig.AppCheckedMetrics + for app, metrics := range throttlerConfig.AppCheckedMetrics { + metricNames := base.MetricNames{} + if len(metrics.Names) > 0 { + for _, name := range metrics.Names { + metricName := base.MetricName(name) + metricNames = append(metricNames, metricName) + } + throttler.appCheckedMetrics.Set(app, metricNames, cache.DefaultExpiration) + } else { + // Empty list of metrics means we should use the default metrics + throttler.appCheckedMetrics.Delete(app) + } + } + for app := range throttler.appCheckedMetricsSnapshot() { + if _, ok := throttlerConfig.AppCheckedMetrics[app]; !ok { + // app not indicated in the throttler config, therefore should be removed from the map + throttler.appCheckedMetrics.Delete(app) + } + } + } + { + // Metric thresholds + for metricName, threshold := range throttlerConfig.MetricThresholds { + throttler.mysqlMetricThresholds.Set(throttlerConfigPrefix+metricName, threshold, cache.DefaultExpiration) + } + for _, metricName := range base.KnownMetricNames { + if _, ok := throttlerConfig.MetricThresholds[metricName.String()]; !ok { + // metric not indicated in the throttler config, therefore should be removed from the map + // so that we know to apply the inventory default threshold + throttler.mysqlMetricThresholds.Delete(throttlerConfigPrefix + metricName.String()) + } + } + throttler.convergeMetricThresholds() } if throttlerConfig.Enabled { go throttler.Enable() @@ -469,7 +579,6 @@ func (throttler *Throttler) Disable() bool { return false } log.Infof("Throttler: disabling") - // _ = throttler.updateConfig(ctx, false, throttler.MetricsThreshold.Get()) // TODO(shlomi) throttler.cancelEnableContext() return true @@ -542,10 +651,11 @@ func (throttler *Throttler) Open() error { // is not known when the TabletServer is created, which in turn creates the // Throttler. throttler.metricsQuery.Store(sqlparser.BuildParsedQuery(defaultReplicationLagQuery, sidecar.GetIdentifier()).Query) // default + throttler.customMetricsQuery.Store("") throttler.initConfig() throttler.pool.Open(throttler.env.Config().DB.AppWithDB(), throttler.env.Config().DB.DbaWithDB(), throttler.env.Config().DB.AppDebugWithDB()) - throttler.ThrottleApp("always-throttled-app", time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false) + throttler.ThrottleApp(throttlerapp.TestingAlwaysThrottlerName.String(), time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false) go throttler.retryReadAndApplyThrottlerConfig(ctx) @@ -617,40 +727,83 @@ func (throttler *Throttler) stimulatePrimaryThrottler(ctx context.Context, tmCli return nil } -func (throttler *Throttler) generateSelfMySQLThrottleMetricFunc(ctx context.Context, probe *mysql.Probe) func() *mysql.MySQLThrottleMetric { - f := func() *mysql.MySQLThrottleMetric { - return throttler.readSelfThrottleMetric(ctx, probe) +func (throttler *Throttler) readSelfLoadAvgPerCore(ctx context.Context) *mysql.MySQLThrottleMetric { + metric := &mysql.MySQLThrottleMetric{ + Scope: base.SelfScope, + Alias: throttler.tabletAlias, + } + + coreCount := throttler.hostCpuCoreCount.Load() + if coreCount == 0 { + // Count cores. This number is not going to change in the lifetime of this tablet, + // hence it makes sense to read it once then cache it. + + // We choose to read /proc/cpuinfo over executing "nproc" or similar commands. + var coreCount int32 + f, err := os.Open("/proc/cpuinfo") + if err != nil { + return metric.WithError(err) + } + defer f.Close() + + scanner := bufio.NewScanner(f) + for scanner.Scan() { + if strings.HasPrefix(scanner.Text(), "processor") { + coreCount++ + } + } + + if err := scanner.Err(); err != nil { + return metric.WithError(err) + } + throttler.hostCpuCoreCount.Store(coreCount) + } + if coreCount == 0 { + return metric.WithError(fmt.Errorf("could not determine number of cores")) } - return f + { + content, err := os.ReadFile("/proc/loadavg") + if err != nil { + return metric.WithError(err) + } + fields := strings.Fields(string(content)) + if len(fields) == 0 { + return metric.WithError(fmt.Errorf("unexpected /proc/loadavg content")) + } + loadAvg, err := strconv.ParseFloat(fields[0], 64) + if err != nil { + return metric.WithError(err) + } + metric.Value = loadAvg / float64(throttler.hostCpuCoreCount.Load()) + } + return metric } // readSelfMySQLThrottleMetric reads the mysql metric from thi very tablet's backend mysql. -func (throttler *Throttler) readSelfMySQLThrottleMetric(ctx context.Context, probe *mysql.Probe) *mysql.MySQLThrottleMetric { +func (throttler *Throttler) readSelfMySQLThrottleMetric(ctx context.Context, query string) *mysql.MySQLThrottleMetric { metric := &mysql.MySQLThrottleMetric{ - ClusterName: selfStoreName, - Alias: "", - Value: 0, - Err: nil, + Scope: base.SelfScope, + Alias: throttler.tabletAlias, + } + if query == "" { + return metric } conn, err := throttler.pool.Get(ctx, nil) if err != nil { - metric.Err = err - return metric + return metric.WithError(err) } defer conn.Recycle() - tm, err := conn.Conn.Exec(ctx, probe.MetricQuery, 1, true) + tm, err := conn.Conn.Exec(ctx, query, 1, true) if err != nil { - metric.Err = err - return metric + return metric.WithError(err) } row := tm.Named().Row() if row == nil { - metric.Err = fmt.Errorf("no results for readSelfMySQLThrottleMetric") - return metric + return metric.WithError(fmt.Errorf("no results for readSelfMySQLThrottleMetric")) } - metricsQueryType := mysql.GetMetricsQueryType(throttler.GetMetricsQuery()) + metricsQueryType := mysql.GetMetricsQueryType(query) switch metricsQueryType { case mysql.MetricsQueryTypeSelect: // We expect a single row, single column result. @@ -719,12 +872,13 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { wg.Add(1) go func() { + defer wg.Done() // Called last, once all tickers are stopped. + defer func() { throttler.recentCheckRateLimiter.Stop() primaryStimulatorRateLimiter.Stop() throttler.aggregatedMetrics.Flush() throttler.recentApps.Flush() - wg.Done() }() // we do not flush throttler.throttledApps because this is data submitted by the user; the user expects the data to survive a disable+enable @@ -778,13 +932,9 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { if throttler.IsOpen() { // frequent // Always collect self metrics: - throttler.collectMySQLMetrics(ctx, tmClient, func(clusterName string) bool { - return clusterName == selfStoreName - }) + throttler.collectSelfMySQLMetrics(ctx, tmClient) if !throttler.isDormant() { - throttler.collectMySQLMetrics(ctx, tmClient, func(clusterName string) bool { - return clusterName != selfStoreName - }) + throttler.collectShardMySQLMetrics(ctx, tmClient) } // if throttler.recentlyChecked() { @@ -810,14 +960,17 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { if throttler.IsOpen() { // infrequent if throttler.isDormant() { - throttler.collectMySQLMetrics(ctx, tmClient, func(clusterName string) bool { - return clusterName != selfStoreName - }) + throttler.collectShardMySQLMetrics(ctx, tmClient) } } case metric := <-throttler.mysqlThrottleMetricChan: // incoming MySQL metric, frequent, as result of collectMySQLMetrics() - throttler.mysqlInventory.TabletMetrics[metric.GetClusterTablet()] = metric + metricResultsMap, ok := throttler.mysqlInventory.TabletMetrics[metric.GetTabletAlias()] + if !ok { + metricResultsMap = base.NewMetricResultMap() + throttler.mysqlInventory.TabletMetrics[metric.GetTabletAlias()] = metricResultsMap + } + metricResultsMap[metric.Name] = metric case <-mysqlRefreshTicker.C: // sparse if throttler.IsOpen() { @@ -836,31 +989,47 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { } case throttlerConfig := <-throttler.throttlerConfigChan: throttler.applyThrottlerConfig(ctx, throttlerConfig) + case f := <-throttler.serialFuncChan: + // Used in unit testing to serialize operations and avoid race conditions + f() } } }() } -func (throttler *Throttler) generateTabletProbeFunction(ctx context.Context, clusterName string, tmClient tmclient.TabletManagerClient, probe *mysql.Probe) (probeFunc func() *mysql.MySQLThrottleMetric) { - return func() *mysql.MySQLThrottleMetric { +func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, tmClient tmclient.TabletManagerClient, probe *mysql.Probe) (probeFunc func(context.Context) mysql.MySQLThrottleMetrics) { + metricsWithError := func(err error) mysql.MySQLThrottleMetrics { + metrics := mysql.MySQLThrottleMetrics{} + for _, metricName := range base.KnownMetricNames { + metrics[metricName] = &mysql.MySQLThrottleMetric{ + Name: metricName, + Scope: scope, + Alias: probe.Alias, + Err: err, + } + } + return metrics + } + return func(ctx context.Context) mysql.MySQLThrottleMetrics { // Some reasonable timeout, to ensure we release connections even if they're hanging (otherwise grpc-go keeps polling those connections forever) ctx, cancel := context.WithTimeout(ctx, 4*mysqlCollectInterval) defer cancel() // Hit a tablet's `check-self` via HTTP, and convert its CheckResult JSON output into a MySQLThrottleMetric mySQLThrottleMetric := mysql.NewMySQLThrottleMetric() - mySQLThrottleMetric.ClusterName = clusterName + mySQLThrottleMetric.Name = base.DefaultMetricName + mySQLThrottleMetric.Scope = scope mySQLThrottleMetric.Alias = probe.Alias if probe.Tablet == nil { - mySQLThrottleMetric.Err = fmt.Errorf("found nil tablet reference for alias %v, hostname %v", probe.Alias, probe.Tablet.Hostname) - return mySQLThrottleMetric + return metricsWithError(fmt.Errorf("found nil tablet reference for alias '%v'", probe.Alias)) } - req := &tabletmanagerdatapb.CheckThrottlerRequest{} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space + metrics := make(mysql.MySQLThrottleMetrics) + + req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space resp, gRPCErr := tmClient.CheckThrottler(ctx, probe.Tablet, req) if gRPCErr != nil { - mySQLThrottleMetric.Err = fmt.Errorf("gRPC error accessing tablet %v. Err=%v", probe.Alias, gRPCErr) - return mySQLThrottleMetric + return metricsWithError(fmt.Errorf("gRPC error accessing tablet %v. Err=%v", probe.Alias, gRPCErr)) } mySQLThrottleMetric.Value = resp.Value if resp.StatusCode == http.StatusInternalServerError { @@ -872,67 +1041,113 @@ func (throttler *Throttler) generateTabletProbeFunction(ctx context.Context, clu throttler.requestHeartbeats() statsThrottlerProbeRecentlyChecked.Add(1) } - return mySQLThrottleMetric + for name, metric := range resp.Metrics { + metricName := base.MetricName(name) + metrics[metricName] = &mysql.MySQLThrottleMetric{ + Name: metricName, + Scope: scope, + Alias: probe.Alias, + Value: metric.Value, + } + if metric.Error != "" { + metrics[metricName].Err = errors.New(metric.Error) + } + } + if len(resp.Metrics) == 0 { + // Backwards compatibility to v20. v20 does not report multi metrics. + mySQLThrottleMetric.Name = throttler.metricNameUsedAsDefault() + metrics[mySQLThrottleMetric.Name] = mySQLThrottleMetric + } + + return metrics + } +} + +func (throttler *Throttler) readSelfThrottleMetricsInternal(ctx context.Context) mysql.MySQLThrottleMetrics { + + writeMetric := func(metricName base.MetricName, metric *mysql.MySQLThrottleMetric) { + metric.Name = metricName + select { + case <-ctx.Done(): + return + case throttler.mysqlThrottleMetricChan <- metric: + } + } + + go writeMetric(base.LagMetricName, throttler.readSelfMySQLThrottleMetric(ctx, sqlparser.BuildParsedQuery(defaultReplicationLagQuery, sidecar.GetIdentifier()).Query)) + go writeMetric(base.ThreadsRunningMetricName, throttler.readSelfMySQLThrottleMetric(ctx, threadsRunningQuery)) + go writeMetric(base.CustomMetricName, throttler.readSelfMySQLThrottleMetric(ctx, throttler.GetCustomMetricsQuery())) + go writeMetric(base.LoadAvgMetricName, throttler.readSelfLoadAvgPerCore(ctx)) + return nil +} + +func (throttler *Throttler) collectSelfMySQLMetrics(ctx context.Context, tmClient tmclient.TabletManagerClient) { + probe := throttler.mysqlInventory.ClustersProbes[throttler.tabletAlias] + if probe == nil { + // probe not created yet + return } + go func() { + // Avoid querying the same server twice at the same time. If previous read is still there, + // we avoid re-reading it. + if !atomic.CompareAndSwapInt64(&probe.QueryInProgress, 0, 1) { + return + } + defer atomic.StoreInt64(&probe.QueryInProgress, 0) + + // Throttler is probing its own tablet's metrics: + _ = mysql.ReadThrottleMetrics(ctx, probe, throttler.readSelfThrottleMetrics) + }() } -func (throttler *Throttler) collectMySQLMetrics(ctx context.Context, tmClient tmclient.TabletManagerClient, includeCluster func(clusterName string) bool) error { - // synchronously, get lists of probes - for clusterName, probes := range throttler.mysqlInventory.ClustersProbes { - if !includeCluster(clusterName) { +func (throttler *Throttler) collectShardMySQLMetrics(ctx context.Context, tmClient tmclient.TabletManagerClient) { + // probes is known not to change. It can be *replaced*, but not changed. + // so it's safe to iterate it + for _, probe := range throttler.mysqlInventory.ClustersProbes { + if probe.Alias == throttler.tabletAlias { + // We skip collecting our own metrics continue } - clusterName := clusterName - // probes is known not to change. It can be *replaced*, but not changed. - // so it's safe to iterate it - for _, probe := range probes { - go func(probe *mysql.Probe) { - // Avoid querying the same server twice at the same time. If previous read is still there, - // we avoid re-reading it. - if !atomic.CompareAndSwapInt64(&probe.QueryInProgress, 0, 1) { - return - } - defer atomic.StoreInt64(&probe.QueryInProgress, 0) - - var throttleMetricFunc func() *mysql.MySQLThrottleMetric - if clusterName == selfStoreName { - // Throttler is probing its own tablet's metrics: - throttleMetricFunc = throttler.generateSelfMySQLThrottleMetricFunc(ctx, probe) - } else { - // Throttler probing other tablets: - throttleMetricFunc = throttler.generateTabletProbeFunction(ctx, clusterName, tmClient, probe) - } - throttleMetrics := mysql.ReadThrottleMetric(probe, clusterName, throttleMetricFunc) + go func(probe *mysql.Probe) { + // Avoid querying the same server twice at the same time. If previous read is still there, + // we avoid re-reading it. + if !atomic.CompareAndSwapInt64(&probe.QueryInProgress, 0, 1) { + return + } + defer atomic.StoreInt64(&probe.QueryInProgress, 0) + + // Throttler probing other tablets: + throttleMetricFunc := throttler.generateTabletProbeFunction(base.ShardScope, tmClient, probe) + + throttleMetrics := mysql.ReadThrottleMetrics(ctx, probe, throttleMetricFunc) + for _, metric := range throttleMetrics { select { case <-ctx.Done(): return - case throttler.mysqlThrottleMetricChan <- throttleMetrics: + case throttler.mysqlThrottleMetricChan <- metric: } - }(probe) - } + } + }(probe) } - return nil } // refreshMySQLInventory will re-structure the inventory based on reading config settings func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { // distribute the query/threshold from the throttler down to the cluster settings and from there to the probes - metricsQuery := throttler.GetMetricsQuery() - metricsThreshold := throttler.MetricsThreshold.Load() - addProbe := func(alias string, tablet *topodatapb.Tablet, clusterName string, clusterSettings *config.MySQLClusterConfigurationSettings, probes mysql.Probes) bool { - for _, ignore := range clusterSettings.IgnoreHosts { + addProbe := func(alias string, tablet *topodatapb.Tablet, scope base.Scope, mysqlSettings *config.MySQLConfigurationSettings, probes mysql.Probes) bool { + for _, ignore := range mysqlSettings.IgnoreHosts { if strings.Contains(alias, ignore) { log.Infof("Throttler: tablet ignored: %+v", alias) return false } } - if clusterName != selfStoreName { + if scope != base.SelfScope { if alias == "" { - log.Errorf("Throttler: got empty alias for cluster: %+v", clusterName) + log.Errorf("Throttler: got empty alias for scope: %+v", scope) return false } if tablet == nil { - log.Errorf("Throttler: got nil tablet for alias: %v in cluster: %+v", alias, clusterName) + log.Errorf("Throttler: got nil tablet for alias: %v in scope: %+v", alias, scope) return false } } @@ -940,8 +1155,7 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { probe := &mysql.Probe{ Alias: alias, Tablet: tablet, - MetricQuery: clusterSettings.MetricQuery, - CacheMillis: clusterSettings.CacheMillis, + CacheMillis: mysqlSettings.CacheMillis, } probes[alias] = probe return true @@ -956,101 +1170,151 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { } } - for clusterName, clusterSettings := range throttler.configSettings.Stores.MySQL.Clusters { - clusterName := clusterName - clusterSettings.MetricQuery = metricsQuery - clusterSettings.ThrottleThreshold.Store(metricsThreshold) - - clusterSettingsCopy := *clusterSettings - // config may dynamically change, but internal structure (config.Settings().Stores.MySQL.Clusters in our case) - // is immutable and can only be _replaced_. Hence, it's safe to read in a goroutine: - collect := func() error { - throttler.mysqlClusterThresholds.Set(clusterName, math.Float64frombits(clusterSettingsCopy.ThrottleThreshold.Load()), cache.DefaultExpiration) - clusterProbes := &mysql.ClusterProbes{ - ClusterName: clusterName, - IgnoreHostsCount: clusterSettingsCopy.IgnoreHostsCount, - TabletProbes: mysql.NewProbes(), - } + metricsThreshold := throttler.MetricsThreshold.Load() + metricNameUsedAsDefault := throttler.metricNameUsedAsDefault() + mysqlSettings := &throttler.configSettings.MySQLStore + mysqlSettings.Metrics[base.DefaultMetricName].Threshold.Store(metricsThreshold) + for metricName, metricConfig := range mysqlSettings.Metrics { + threshold := metricConfig.Threshold.Load() + if metricName == metricNameUsedAsDefault && metricsThreshold != 0 { + // backwards compatibility to v20: + threshold = metricsThreshold + } - if clusterName == selfStoreName { - // special case: just looking at this tablet's MySQL server. - // We will probe this "cluster" (of one server) is a special way. - addProbe("", nil, clusterName, &clusterSettingsCopy, clusterProbes.TabletProbes) - return attemptWriteProbes(clusterProbes) - } - if !throttler.isLeader.Load() { - // This tablet may have used to be the primary, but it isn't now. It may have a recollection - // of previous clusters it used to probe. It may have recollection of specific probes for such clusters. - // This now ensures any existing cluster probes are overridden with an empty list of probes. - // `clusterProbes` was created above as empty, and identifiable via `clusterName`. This will in turn - // be used to overwrite throttler.mysqlInventory.ClustersProbes[clusterProbes.ClusterName] in - // updateMySQLClusterProbes(). - return attemptWriteProbes(clusterProbes) - // not the leader (primary tablet)? Then no more work for us. - } - // The primary tablet is also in charge of collecting the shard's metrics - ctx, cancel := context.WithTimeout(ctx, mysqlRefreshInterval) - defer cancel() + throttler.mysqlMetricThresholds.Set(inventoryPrefix+metricName.String(), math.Float64frombits(threshold), cache.DefaultExpiration) + } + throttler.convergeMetricThresholds() + clusterSettingsCopy := *mysqlSettings + // config may dynamically change, but internal structure (config.Settings().MySQLStore.Clusters in our case) + // is immutable and can only be _replaced_. Hence, it's safe to read in a goroutine: + collect := func() error { + clusterProbes := &mysql.ClusterProbes{ + IgnoreHostsCount: clusterSettingsCopy.IgnoreHostsCount, + TabletProbes: mysql.NewProbes(), + } + // self tablet + addProbe(throttler.tabletAlias, nil, base.SelfScope, &clusterSettingsCopy, clusterProbes.TabletProbes) + if !throttler.isLeader.Load() { + // This tablet may have used to be the primary, but it isn't now. It may have a recollection + // of previous clusters it used to probe. It may have recollection of specific probes for such clusters. + // This now ensures any existing cluster probes are overridden with an empty list of probes. + // `clusterProbes` was created above as empty, and identifiable via `scope`. This will in turn + // be used to overwrite throttler.mysqlInventory.ClustersProbes[clusterProbes.scope] in + // updateMySQLClusterProbes(). + return attemptWriteProbes(clusterProbes) + // not the leader (primary tablet)? Then no more work for us. + } + // The primary tablet is also in charge of collecting the shard's metrics + ctx, cancel := context.WithTimeout(ctx, mysqlRefreshInterval) + defer cancel() - tabletAliases, err := throttler.ts.FindAllTabletAliasesInShard(ctx, throttler.keyspace, throttler.shard) + tabletAliases, err := throttler.ts.FindAllTabletAliasesInShard(ctx, throttler.keyspace, throttler.shard) + if err != nil { + return err + } + for _, tabletAlias := range tabletAliases { + tablet, err := throttler.ts.GetTablet(ctx, tabletAlias) if err != nil { return err } - for _, tabletAlias := range tabletAliases { - tablet, err := throttler.ts.GetTablet(ctx, tabletAlias) - if err != nil { - return err - } - if throttler.throttleTabletTypesMap[tablet.Type] { - addProbe(topoproto.TabletAliasString(tabletAlias), tablet.Tablet, clusterName, &clusterSettingsCopy, clusterProbes.TabletProbes) - } + if throttler.throttleTabletTypesMap[tablet.Type] { + addProbe(topoproto.TabletAliasString(tabletAlias), tablet.Tablet, base.ShardScope, &clusterSettingsCopy, clusterProbes.TabletProbes) } - return attemptWriteProbes(clusterProbes) } - go func() { - if err := collect(); err != nil { - log.Errorf("refreshMySQLInventory: %+v", err) - } - }() + + return attemptWriteProbes(clusterProbes) } + go func() { + if err := collect(); err != nil { + log.Errorf("refreshMySQLInventory: %+v", err) + } + }() return nil } // synchronous update of inventory func (throttler *Throttler) updateMySQLClusterProbes(ctx context.Context, clusterProbes *mysql.ClusterProbes) error { - throttler.mysqlInventory.ClustersProbes[clusterProbes.ClusterName] = clusterProbes.TabletProbes - throttler.mysqlInventory.IgnoreHostsCount[clusterProbes.ClusterName] = clusterProbes.IgnoreHostsCount - throttler.mysqlInventory.IgnoreHostsThreshold[clusterProbes.ClusterName] = clusterProbes.IgnoreHostsThreshold + throttler.mysqlInventory.ClustersProbes = clusterProbes.TabletProbes + throttler.mysqlInventory.IgnoreHostsCount = clusterProbes.IgnoreHostsCount + throttler.mysqlInventory.IgnoreHostsThreshold = clusterProbes.IgnoreHostsThreshold return nil } +func (throttler *Throttler) metricNameUsedAsDefault() base.MetricName { + if throttler.GetCustomMetricsQuery() == "" { + return base.LagMetricName + } + return base.CustomMetricName +} + // synchronous aggregation of collected data func (throttler *Throttler) aggregateMySQLMetrics(ctx context.Context) error { - for clusterName, probes := range throttler.mysqlInventory.ClustersProbes { - metricName := fmt.Sprintf("mysql/%s", clusterName) - ignoreHostsCount := throttler.mysqlInventory.IgnoreHostsCount[clusterName] - ignoreHostsThreshold := throttler.mysqlInventory.IgnoreHostsThreshold[clusterName] - aggregatedMetric := aggregateMySQLProbes(ctx, probes, clusterName, throttler.mysqlInventory.TabletMetrics, ignoreHostsCount, throttler.configSettings.Stores.MySQL.IgnoreDialTCPErrors, ignoreHostsThreshold) - throttler.aggregatedMetrics.Set(metricName, aggregatedMetric, cache.DefaultExpiration) + metricNameUsedAsDefault := throttler.metricNameUsedAsDefault() + aggregateTabletsMetrics := func(scope base.Scope, metricName base.MetricName, tabletResultsMap mysql.TabletResultMap) { + ignoreHostsCount := throttler.mysqlInventory.IgnoreHostsCount + ignoreHostsThreshold := throttler.mysqlInventory.IgnoreHostsThreshold + ignoreDialTCPErrors := throttler.configSettings.MySQLStore.IgnoreDialTCPErrors + + aggregatedMetric := aggregateMySQLProbes(ctx, metricName, tabletResultsMap, ignoreHostsCount, ignoreDialTCPErrors, ignoreHostsThreshold) + aggregatedMetricName := metricName.AggregatedName(scope) + throttler.aggregatedMetrics.Set(aggregatedMetricName, aggregatedMetric, cache.DefaultExpiration) + if metricName == metricNameUsedAsDefault { + throttler.aggregatedMetrics.Set(base.DefaultMetricName.AggregatedName(scope), aggregatedMetric, cache.DefaultExpiration) + } + } + for _, metricName := range base.KnownMetricNames { + if metricName == base.DefaultMetricName { + // "default metric" is for backwards compatibility with v20, which does not support multi-metrics. + // We do not measure "default metric". Instead, we aggregate _actual_ metrics, and decide which one + // is to be stored as "default" + continue + } + selfResultsMap, shardResultsMap := throttler.mysqlInventory.TabletMetrics.Split(throttler.tabletAlias) + aggregateTabletsMetrics(base.SelfScope, metricName, selfResultsMap) + aggregateTabletsMetrics(base.ShardScope, metricName, shardResultsMap) } return nil } -func (throttler *Throttler) getNamedMetric(metricName string) base.MetricResult { - if metricResultVal, found := throttler.aggregatedMetrics.Get(metricName); found { +func (throttler *Throttler) getAggregatedMetric(aggregatedName string) base.MetricResult { + if metricResultVal, found := throttler.aggregatedMetrics.Get(aggregatedName); found { return metricResultVal.(base.MetricResult) } return base.NoSuchMetric } -func (throttler *Throttler) getMySQLClusterMetrics(ctx context.Context, clusterName string) (base.MetricResult, float64) { - if thresholdVal, found := throttler.mysqlClusterThresholds.Get(clusterName); found { - threshold, _ := thresholdVal.(float64) - metricName := fmt.Sprintf("mysql/%s", clusterName) - return throttler.getNamedMetric(metricName), threshold +func (throttler *Throttler) getMySQLStoreMetric(ctx context.Context, scope base.Scope, metricName base.MetricName) (base.MetricResult, float64) { + thresholdVal, found := throttler.mysqlMetricThresholds.Get(metricName.String()) + if !found { + return base.NoSuchMetric, 0 + } + threshold, _ := thresholdVal.(float64) + aggregatedName := metricName.AggregatedName(scope) + return throttler.getAggregatedMetric(aggregatedName), threshold +} + +func (throttler *Throttler) mysqlMetricThresholdsSnapshot() map[string]float64 { + snapshot := make(map[string]float64) + for key, value := range throttler.mysqlMetricThresholds.Items() { + threshold, _ := value.Object.(float64) + snapshot[key] = threshold } + return snapshot +} - return base.NoSuchMetric, 0 +func (throttler *Throttler) appCheckedMetricsSnapshot() map[string]string { + snapshot := make(map[string]string) + for key, item := range throttler.appCheckedMetrics.Items() { + var metricNames base.MetricNames + switch val := item.Object.(type) { + case base.MetricNames: + metricNames = val + case []base.MetricName: + metricNames = val + } + snapshot[key] = metricNames.String() + } + return snapshot } func (throttler *Throttler) aggregatedMetricsSnapshot() map[string]base.MetricResult { @@ -1066,7 +1330,7 @@ func (throttler *Throttler) expireThrottledApps() { now := time.Now() for appName, item := range throttler.throttledApps.Items() { appThrottle := item.Object.(*base.AppThrottle) - if appThrottle.ExpireAt.Before(now) { + if !appThrottle.ExpireAt.After(now) { throttler.UnthrottleApp(appName) } } @@ -1096,7 +1360,7 @@ func (throttler *Throttler) ThrottleApp(appName string, expireAt time.Time, rati } appThrottle = base.NewAppThrottle(appName, expireAt, ratio, exempt) } - if now.Before(appThrottle.ExpireAt) { + if appThrottle.ExpireAt.After(now) { throttler.throttledApps.Set(appName, appThrottle, cache.DefaultExpiration) } else { throttler.UnthrottleApp(appName) @@ -1116,6 +1380,7 @@ func (throttler *Throttler) UnthrottleApp(appName string) (appThrottle *base.App // Assuming an app is throttled to some extend, it will randomize the result based // on the throttle ratio func (throttler *Throttler) IsAppThrottled(appName string) bool { + appFound := false isSingleAppNameThrottled := func(singleAppName string) bool { object, found := throttler.throttledApps.Get(singleAppName) if !found { @@ -1123,9 +1388,12 @@ func (throttler *Throttler) IsAppThrottled(appName string) bool { } appThrottle := object.(*base.AppThrottle) if !appThrottle.ExpireAt.After(time.Now()) { - // throttling cleanup hasn't purged yet, but it is expired + // throttling cleanup hasn't purged yet, but it is expired. return false } + // From this point on, we consider that this app has some throttling configuration + // of any sort. + appFound = true if appThrottle.Exempt { return false } @@ -1138,7 +1406,7 @@ func (throttler *Throttler) IsAppThrottled(appName string) bool { if isSingleAppNameThrottled(appName) { return true } - for _, singleAppName := range strings.Split(appName, ":") { + for _, singleAppName := range throttlerapp.Name(appName).SplitStrings() { if singleAppName == "" { continue } @@ -1146,6 +1414,17 @@ func (throttler *Throttler) IsAppThrottled(appName string) bool { return true } } + // If app was found then there was some explicit throttle instruction for the app, and the app + // passed the test. + if appFound { + return false + } + // If the app was not found, ie no specific throttle instruction was found for the app, then + // the app should also consider the case where the "all" app is throttled. + if isSingleAppNameThrottled(throttlerapp.AllName.String()) { + // Means the "all" app is throttled. This is a special case, and it means "all apps are throttled" + return true + } return false } @@ -1172,7 +1451,7 @@ func (throttler *Throttler) IsAppExempted(appName string) bool { if isSingleAppNameExempted(appName) { return true } - for _, singleAppName := range strings.Split(appName, ":") { + for _, singleAppName := range throttlerapp.Name(appName).SplitStrings() { if singleAppName == "" { continue } @@ -1180,6 +1459,11 @@ func (throttler *Throttler) IsAppExempted(appName string) bool { return true } } + + if isSingleAppNameExempted(throttlerapp.AllName.String()) && !throttler.IsAppThrottled(appName) { + return true + } + return false } @@ -1195,17 +1479,17 @@ func (throttler *Throttler) ThrottledAppsMap() (result map[string](*base.AppThro } // markRecentApp takes note that an app has just asked about throttling, making it "recent" -func (throttler *Throttler) markRecentApp(appName string, remoteAddr string) { - recentAppKey := fmt.Sprintf("%s/%s", appName, remoteAddr) - throttler.recentApps.Set(recentAppKey, time.Now(), cache.DefaultExpiration) +func (throttler *Throttler) markRecentApp(appName string, statusCode int) { + recentApp := base.NewRecentApp(appName, statusCode) + throttler.recentApps.Set(appName, recentApp, cache.DefaultExpiration) } -// RecentAppsMap returns a (copy) map of apps which checked for throttling recently -func (throttler *Throttler) RecentAppsMap() (result map[string](*base.RecentApp)) { +// recentAppsSnapshot returns a (copy) map of apps which checked for throttling recently +func (throttler *Throttler) recentAppsSnapshot() (result map[string](*base.RecentApp)) { result = make(map[string](*base.RecentApp)) for recentAppKey, item := range throttler.recentApps.Items() { - recentApp := base.NewRecentApp(item.Object.(time.Time)) + recentApp := item.Object.(*base.RecentApp) result[recentAppKey] = recentApp } return result @@ -1244,8 +1528,8 @@ func (throttler *Throttler) AppRequestMetricResult(ctx context.Context, appName return metricResultFunc() } -// checkStore checks the aggregated value of given MySQL store -func (throttler *Throttler) checkStore(ctx context.Context, appName string, storeName string, remoteAddr string, flags *CheckFlags) (checkResult *CheckResult) { +// checkScope checks the aggregated value of given MySQL store +func (throttler *Throttler) checkScope(ctx context.Context, appName string, scope base.Scope, metricNames base.MetricNames, flags *CheckFlags) (checkResult *CheckResult) { if !throttler.IsRunning() { return okMetricCheckResult } @@ -1255,7 +1539,43 @@ func (throttler *Throttler) checkStore(ctx context.Context, appName string, stor return okMetricCheckResult } - checkResult = throttler.check.Check(ctx, appName, "mysql", storeName, remoteAddr, flags) + if len(metricNames) == 0 { + // No explicit metrics requested. + // Get the metric names mappd to the given app + for _, appToken := range throttlerapp.Name(appName).SplitStrings() { + if val, found := throttler.appCheckedMetrics.Get(appToken); found { + // Due to golang type system, it's possible that we put in a base.MetricNames and get back a []base.MetricName. + // We allow both forms, which are technically the same type. + switch val := val.(type) { + case base.MetricNames: + metricNames = append(metricNames, val...) + case []base.MetricName: + metricNames = append(metricNames, val...) + } + } + } + } + if len(metricNames) == 0 && !throttlerapp.AllName.Equals(appName) { + // No specific metrics mapped to this app. Are there specific metrics + // mapped to the "all" app? + if val, found := throttler.appCheckedMetrics.Get(throttlerapp.AllName.String()); found { + switch val := val.(type) { + case base.MetricNames: + metricNames = val + case []base.MetricName: + metricNames = val + } + } + } + if throttlerapp.VitessName.Equals(appName) { + // "vitess" always checks all metrics, irrespective of what is mapped. + metricNames = base.KnownMetricNames + } + if len(metricNames) == 0 { + // Nothing mapped? For backwards compatibility and as default, we use the "default" metric. + metricNames = base.MetricNames{throttler.metricNameUsedAsDefault()} + } + checkResult = throttler.check.Check(ctx, appName, scope, metricNames, flags) shouldRequestHeartbeats := !flags.SkipRequestHeartbeats if throttlerapp.VitessName.Equals(appName) { @@ -1274,7 +1594,6 @@ func (throttler *Throttler) checkStore(ctx context.Context, appName string, stor // We mark the fact that someone just made a check. If this is a REPLICA or RDONLY tables, this will be reported back // to the PRIMARY so that it knows it must renew the heartbeat lease. checkResult.RecentlyChecked = true - statsThrottlerRecentlyChecked.Add(1) } if !checkResult.RecentlyChecked { checkResult.RecentlyChecked = throttler.recentlyChecked() @@ -1283,29 +1602,34 @@ func (throttler *Throttler) checkStore(ctx context.Context, appName string, stor return checkResult } -// checkShard checks the health of the shard, and runs on the primary tablet only -func (throttler *Throttler) checkShard(ctx context.Context, appName string, remoteAddr string, flags *CheckFlags) (checkResult *CheckResult) { - return throttler.checkStore(ctx, appName, shardStoreName, remoteAddr, flags) +// Check runs a check by requested check type +func (throttler *Throttler) Check(ctx context.Context, appName string, metricNames base.MetricNames, flags *CheckFlags) (checkResult *CheckResult) { + scope := base.UndefinedScope + if flags != nil { + scope = flags.Scope + } + if scope == base.ShardScope && throttler.checkAsCheckSelf.Load() { + scope = base.SelfScope + } + return throttler.checkScope(ctx, appName, scope, metricNames, flags) } -// CheckSelf is checks the mysql/self metric, and is available on each tablet -func (throttler *Throttler) checkSelf(ctx context.Context, appName string, remoteAddr string, flags *CheckFlags) (checkResult *CheckResult) { - return throttler.checkStore(ctx, appName, selfStoreName, remoteAddr, flags) +func (throttler *Throttler) MetricName(s string) base.MetricName { + if s == "" { + return base.DefaultMetricName + } + return base.MetricName(s) } -// CheckByType runs a check by requested check type -func (throttler *Throttler) CheckByType(ctx context.Context, appName string, remoteAddr string, flags *CheckFlags, checkType ThrottleCheckType) (checkResult *CheckResult) { - switch checkType { - case ThrottleCheckSelf: - return throttler.checkSelf(ctx, appName, remoteAddr, flags) - case ThrottleCheckPrimaryWrite: - if throttler.checkAsCheckSelf.Load() { - return throttler.checkSelf(ctx, appName, remoteAddr, flags) - } - return throttler.checkShard(ctx, appName, remoteAddr, flags) - default: - return invalidCheckTypeCheckResult +func (throttler *Throttler) MetricNames(s []string) base.MetricNames { + result := make(base.MetricNames, len(s)) + for i, metricName := range s { + result[i] = throttler.MetricName(metricName) } + if len(s) == 0 { + result = append(result, base.DefaultMetricName) + } + return result } // Status exports a status breakdown @@ -1314,16 +1638,22 @@ func (throttler *Throttler) Status() *ThrottlerStatus { Keyspace: throttler.keyspace, Shard: throttler.shard, - IsLeader: throttler.isLeader.Load(), - IsOpen: throttler.isOpen.Load(), - IsEnabled: throttler.isEnabled.Load(), - IsDormant: throttler.isDormant(), - IsRecentlyChecked: throttler.recentlyChecked(), + IsLeader: throttler.isLeader.Load(), + IsOpen: throttler.isOpen.Load(), + IsEnabled: throttler.isEnabled.Load(), + IsDormant: throttler.isDormant(), + RecentlyChecked: throttler.recentlyChecked(), - Query: throttler.GetMetricsQuery(), - Threshold: throttler.GetMetricsThreshold(), + Query: throttler.GetMetricsQuery(), + CustomQuery: throttler.GetCustomMetricsQuery(), + Threshold: throttler.GetMetricsThreshold(), + MetricNameUsedAsDefault: throttler.metricNameUsedAsDefault().String(), AggregatedMetrics: throttler.aggregatedMetricsSnapshot(), + MetricsThresholds: throttler.mysqlMetricThresholdsSnapshot(), MetricsHealth: throttler.metricsHealthSnapshot(), + ThrottledApps: throttler.ThrottledApps(), + AppCheckedMetrics: throttler.appCheckedMetricsSnapshot(), + RecentApps: throttler.recentAppsSnapshot(), } } diff --git a/go/vt/vttablet/tabletserver/throttle/throttler_test.go b/go/vt/vttablet/tabletserver/throttle/throttler_test.go index a745ca66fe7..d9b910a3152 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler_test.go @@ -19,6 +19,7 @@ package throttle import ( "context" "fmt" + "math" "net/http" "sync" "sync/atomic" @@ -28,11 +29,14 @@ import ( "github.com/patrickmn/go-cache" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "golang.org/x/exp/maps" + "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/config" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/mysql" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" @@ -42,13 +46,62 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) +var ( + selfMetrics = mysql.MySQLThrottleMetrics{ + base.LagMetricName: &mysql.MySQLThrottleMetric{ + Scope: base.SelfScope, + Alias: "", + Value: 0.3, + Err: nil, + }, + base.ThreadsRunningMetricName: &mysql.MySQLThrottleMetric{ + Scope: base.SelfScope, + Alias: "", + Value: 26, + Err: nil, + }, + base.CustomMetricName: &mysql.MySQLThrottleMetric{ + Scope: base.SelfScope, + Alias: "", + Value: 17, + Err: nil, + }, + base.LoadAvgMetricName: &mysql.MySQLThrottleMetric{ + Scope: base.SelfScope, + Alias: "", + Value: 2.718, + Err: nil, + }, + } + replicaMetrics = map[string]*MetricResult{ + base.LagMetricName.String(): { + StatusCode: http.StatusOK, + Value: 0.9, + }, + base.ThreadsRunningMetricName.String(): { + StatusCode: http.StatusOK, + Value: 13, + }, + base.CustomMetricName.String(): { + StatusCode: http.StatusOK, + Value: 14, + }, + base.LoadAvgMetricName.String(): { + StatusCode: http.StatusOK, + Value: 5.1, + }, + } +) + const ( waitForProbesTimeout = 30 * time.Second + testAppName = throttlerapp.TestingName ) type fakeTMClient struct { tmclient.TabletManagerClient appNames []string + v20 atomic.Bool // help validate v20 backwards compatibility mu sync.Mutex } @@ -59,10 +112,22 @@ func (c *fakeTMClient) Close() { func (c *fakeTMClient) CheckThrottler(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) { resp := &tabletmanagerdatapb.CheckThrottlerResponse{ StatusCode: http.StatusOK, - Value: 0, + Value: 0.339, Threshold: 1, RecentlyChecked: false, } + if !c.v20.Load() { + resp.Metrics = make(map[string]*tabletmanagerdatapb.CheckThrottlerResponse_Metric) + for name, metric := range replicaMetrics { + resp.Metrics[name] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ + Name: name, + StatusCode: int32(metric.StatusCode), + Value: metric.Value, + Threshold: metric.Threshold, + Message: metric.Message, + } + } + } c.mu.Lock() defer c.mu.Unlock() c.appNames = append(c.appNames, request.AppName) @@ -98,9 +163,9 @@ func (ts *FakeTopoServer) GetTablet(ctx context.Context, alias *topodatapb.Table func (ts *FakeTopoServer) FindAllTabletAliasesInShard(ctx context.Context, keyspace, shard string) ([]*topodatapb.TabletAlias, error) { aliases := []*topodatapb.TabletAlias{ - {Cell: "fakezone1", Uid: 100}, - {Cell: "fakezone2", Uid: 101}, - {Cell: "fakezone3", Uid: 103}, + {Cell: "fakezone0", Uid: 100}, + {Cell: "fakezone1", Uid: 101}, + {Cell: "fakezone2", Uid: 102}, } return aliases, nil } @@ -122,22 +187,54 @@ func (w *FakeHeartbeatWriter) Requests() int64 { return w.requests.Load() } -func newTestThrottler() *Throttler { - metricsQuery := "select 1" - configSettings := config.NewConfigurationSettings() - configSettings.Stores.MySQL.Clusters = map[string]*config.MySQLClusterConfigurationSettings{ - selfStoreName: {}, - shardStoreName: {}, +func init() { + for metricName, metric := range selfMetrics { + metric.Name = metricName } - for _, s := range configSettings.Stores.MySQL.Clusters { - s.MetricQuery = metricsQuery - s.ThrottleThreshold = &atomic.Uint64{} - s.ThrottleThreshold.Store(1) +} + +func waitForMetricsToBeCollected(t *testing.T, ctx context.Context, throttler *Throttler) { + ticker := time.NewTicker(100 * time.Millisecond) + for { + foundAll := true + aggr := throttler.aggregatedMetricsSnapshot() + for _, metric := range base.KnownMetricNames { + if _, ok := aggr[metric.AggregatedName(base.SelfScope)]; !ok { + foundAll = false + break + } + if _, ok := aggr[metric.AggregatedName(base.ShardScope)]; !ok { + foundAll = false + break + } + } + if foundAll { + return + } + select { + case <-ctx.Done(): + assert.Fail(t, "timed out waiting for metrics to be collected") + return + case <-ticker.C: + } } +} +func sleepTillThresholdApplies() { + time.Sleep(time.Second) +} + +func TestGetAggregatedMetricName(t *testing.T) { + assert.Equal(t, "self", base.DefaultMetricName.AggregatedName(base.SelfScope)) + assert.Equal(t, "self/lag", base.LagMetricName.AggregatedName(base.SelfScope)) + assert.Equal(t, "shard/loadavg", base.LoadAvgMetricName.AggregatedName(base.ShardScope)) +} + +func newTestThrottler() *Throttler { + metricsQuery := "select 1" + env := tabletenv.NewEnv(vtenv.NewTestEnv(), nil, "TabletServerTest") throttler := &Throttler{ mysqlClusterProbesChan: make(chan *mysql.ClusterProbes), - mysqlClusterThresholds: cache.New(cache.NoExpiration, 0), heartbeatWriter: &FakeHeartbeatWriter{}, ts: &FakeTopoServer{}, mysqlInventory: mysql.NewInventory(), @@ -145,19 +242,22 @@ func newTestThrottler() *Throttler { tabletTypeFunc: func() topodatapb.TabletType { return topodatapb.TabletType_PRIMARY }, overrideTmClient: &fakeTMClient{}, } - throttler.configSettings = configSettings + throttler.metricsQuery.Store(metricsQuery) + throttler.MetricsThreshold.Store(math.Float64bits(0.75)) + throttler.configSettings = config.NewConfigurationSettings() + throttler.initConfig() throttler.mysqlThrottleMetricChan = make(chan *mysql.MySQLThrottleMetric) - throttler.mysqlInventoryChan = make(chan *mysql.Inventory, 1) throttler.mysqlClusterProbesChan = make(chan *mysql.ClusterProbes) throttler.throttlerConfigChan = make(chan *topodatapb.ThrottlerConfig) + throttler.serialFuncChan = make(chan func()) throttler.mysqlInventory = mysql.NewInventory() throttler.throttledApps = cache.New(cache.NoExpiration, 0) - throttler.mysqlClusterThresholds = cache.New(cache.NoExpiration, 0) + throttler.mysqlMetricThresholds = cache.New(cache.NoExpiration, 0) throttler.aggregatedMetrics = cache.New(10*aggregatedMetricsExpiration, 0) throttler.recentApps = cache.New(recentAppsExpiration, 0) throttler.metricsHealth = cache.New(cache.NoExpiration, 0) - throttler.metricsQuery.Store(metricsQuery) + throttler.appCheckedMetrics = cache.New(cache.NoExpiration, 0) throttler.initThrottleTabletTypes() throttler.check = NewThrottlerCheck(throttler) @@ -172,18 +272,39 @@ func newTestThrottler() *Throttler { throttler.recentCheckDormantDiff = int64(throttler.dormantPeriod / recentCheckRateLimiterInterval) throttler.recentCheckDiff = int64(3 * time.Second / recentCheckRateLimiterInterval) - throttler.readSelfThrottleMetric = func(ctx context.Context, p *mysql.Probe) *mysql.MySQLThrottleMetric { - return &mysql.MySQLThrottleMetric{ - ClusterName: selfStoreName, - Alias: "", - Value: 1, - Err: nil, + throttler.readSelfThrottleMetrics = func(ctx context.Context) mysql.MySQLThrottleMetrics { + for _, metric := range selfMetrics { + go func() { + select { + case <-ctx.Done(): + case throttler.mysqlThrottleMetricChan <- metric: + } + }() } + return selfMetrics } + throttler.ThrottleApp(throttlerapp.TestingAlwaysThrottlerName.String(), time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false) return throttler } +// runSerialFunction runs the given function inside the throttler's serial and goroutine-safe main `select` loop. +// This function returns a channel that is populated when the input function is completed. Callers of this +// function should read from the channel if they want to block until the function is completed, or that could +// ignore the channel if they just want to fire-and-forget the function. +func runSerialFunction(t *testing.T, ctx context.Context, throttler *Throttler, f func(context.Context)) (done chan any) { + done = make(chan any, 1) + select { + case throttler.serialFuncChan <- func() { + f(ctx) + done <- true + }: + case <-ctx.Done(): + assert.FailNow(t, ctx.Err().Error(), "waiting in runSerialFunction") + } + return done +} + func TestInitThrottler(t *testing.T) { throttler := newTestThrottler() assert.Equal(t, 5*time.Second, throttler.dormantPeriod) @@ -191,33 +312,552 @@ func TestInitThrottler(t *testing.T) { assert.EqualValues(t, 3, throttler.recentCheckDiff) } +func TestApplyThrottlerConfig(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + timeNow := time.Now() + throttler := newTestThrottler() + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: false, + Threshold: 14, + ThrottledApps: map[string]*topodatapb.ThrottledAppRule{ + throttlerapp.OnlineDDLName.String(): { + Name: throttlerapp.OnlineDDLName.String(), + Ratio: 0.5, + ExpiresAt: protoutil.TimeToProto(timeNow.Add(time.Hour)), + Exempt: false, + }, + throttlerapp.TableGCName.String(): { + Name: throttlerapp.TableGCName.String(), + ExpiresAt: protoutil.TimeToProto(timeNow.Add(time.Hour)), + Exempt: true, + }, + throttlerapp.VPlayerName.String(): { + Name: throttlerapp.VPlayerName.String(), + Ratio: DefaultThrottleRatio, + ExpiresAt: protoutil.TimeToProto(timeNow), // instantly expires + Exempt: false, + }, + }, + AppCheckedMetrics: map[string]*topodatapb.ThrottlerConfig_MetricNames{ + "app1": {Names: []string{"lag", "threads_running"}}, + throttlerapp.OnlineDDLName.String(): {Names: []string{"loadavg"}}, + }, + MetricThresholds: map[string]float64{ + "threads_running": 3.0, + }, + } + assert.Equal(t, 0.75, throttler.GetMetricsThreshold()) + throttler.appCheckedMetrics.Set("app1", base.MetricNames{base.ThreadsRunningMetricName}, cache.DefaultExpiration) + throttler.appCheckedMetrics.Set("app2", base.MetricNames{base.ThreadsRunningMetricName}, cache.DefaultExpiration) + throttler.appCheckedMetrics.Set("app3", base.MetricNames{base.ThreadsRunningMetricName}, cache.DefaultExpiration) + runThrottler(t, ctx, throttler, 10*time.Second, func(t *testing.T, ctx context.Context) { + defer cancel() // early termination + assert.True(t, throttler.IsEnabled()) + assert.Equal(t, 1, throttler.throttledApps.ItemCount(), "expecting always-throttled-app: %v", maps.Keys(throttler.throttledApps.Items())) + throttler.applyThrottlerConfig(ctx, throttlerConfig) + }) + + sleepTillThresholdApplies() + assert.Equal(t, 3, throttler.throttledApps.ItemCount(), "expecting online-ddl, tablegc, and always-throttled-app: %v", maps.Keys(throttler.throttledApps.Items())) + assert.False(t, throttler.IsEnabled()) + assert.Equal(t, float64(14), throttler.GetMetricsThreshold()) + assert.Equal(t, 2, throttler.appCheckedMetrics.ItemCount()) + t.Run("checked metrics", func(t *testing.T) { + { + value, ok := throttler.appCheckedMetrics.Get("app1") + assert.True(t, ok) + names := value.(base.MetricNames) + assert.Equal(t, base.MetricNames{base.LagMetricName, base.ThreadsRunningMetricName}, names) + } + { + value, ok := throttler.appCheckedMetrics.Get(throttlerapp.OnlineDDLName.String()) + assert.True(t, ok) + names := value.(base.MetricNames) + assert.Equal(t, base.MetricNames{base.LoadAvgMetricName}, names) + } + }) + t.Run("metric thresholds", func(t *testing.T) { + { + val, ok := throttler.mysqlMetricThresholds.Get("lag") + require.True(t, ok) + assert.Equal(t, float64(0.75), val) + } + { + val, ok := throttler.mysqlMetricThresholds.Get("threads_running") + require.True(t, ok) + assert.Equal(t, float64(3.0), val) + } + { + val, ok := throttler.mysqlMetricThresholds.Get("loadavg") + require.True(t, ok) + assert.Equal(t, float64(1.0), val) + } + }) +} + +// TestApplyThrottlerConfigMetricThresholds applies a specific 'lag' metric threshold, +// and validates that it overrides the default threshold. +func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + throttler := newTestThrottler() + runThrottler(t, ctx, throttler, 10*time.Second, func(t *testing.T, ctx context.Context) { + defer cancel() // early termination + assert.True(t, throttler.IsEnabled()) + + flags := &CheckFlags{ + Scope: base.SelfScope, + SkipRequestHeartbeats: true, + MultiMetricsEnabled: true, + } + t.Run("check before apply", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("apply low threshold", func(t *testing.T) { + assert.Equal(t, 0.75, throttler.GetMetricsThreshold()) + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: true, + Threshold: 0.0033, + } + throttler.applyThrottlerConfig(ctx, throttlerConfig) + assert.Equal(t, 0.0033, throttler.GetMetricsThreshold()) + }) + t.Run("check low threshold", func(t *testing.T) { + sleepTillThresholdApplies() + { + _, ok := throttler.mysqlMetricThresholds.Get("config/lag") + assert.False(t, ok) + } + assert.Equal(t, float64(0.0033), throttler.GetMetricsThreshold()) + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("apply low threshold but high 'lag' override", func(t *testing.T) { + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: true, + Threshold: 0.0033, + MetricThresholds: map[string]float64{ + "lag": 4444.0, + }, + } + throttler.applyThrottlerConfig(ctx, throttlerConfig) + }) + t.Run("check with high 'lag' threshold", func(t *testing.T) { + sleepTillThresholdApplies() + { + val, ok := throttler.mysqlMetricThresholds.Get("config/lag") + require.True(t, ok) + assert.Equal(t, float64(4444), val) + } + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + + assert.False(t, throttler.IsEnabled()) + assert.Equal(t, float64(0.0033), throttler.GetMetricsThreshold()) + t.Run("metric thresholds", func(t *testing.T) { + { + val, ok := throttler.mysqlMetricThresholds.Get("config/lag") + require.True(t, ok) + assert.Equal(t, float64(4444), val) + } + { + val, ok := throttler.mysqlMetricThresholds.Get("inventory/lag") + require.True(t, ok) + assert.Equal(t, float64(0.0033), val) + } + { + val, ok := throttler.mysqlMetricThresholds.Get("lag") + require.True(t, ok) + assert.Equal(t, float64(4444), val) + } + }) +} + +// TestApplyThrottlerConfigAppCheckedMetrics applies different metrics to the "test" app and checks the result +func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + throttler := newTestThrottler() + runThrottler(t, ctx, throttler, 10*time.Second, func(t *testing.T, ctx context.Context) { + defer cancel() // early termination + + assert.True(t, throttler.IsEnabled()) + aggr := throttler.aggregatedMetricsSnapshot() + assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric + assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() + for _, metric := range []string{"self", "shard", "self/lag", "shard/lag", "self/loadavg", "shard/loadavg"} { + _, ok := aggr[metric] + assert.True(t, ok, "missing metric: %s", metric) + } + flags := &CheckFlags{ + SkipRequestHeartbeats: true, + MultiMetricsEnabled: true, + } + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: true, + MetricThresholds: map[string]float64{}, + AppCheckedMetrics: map[string]*topodatapb.ThrottlerConfig_MetricNames{}, + } + + t.Run("check before apply", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("apply high lag threshold", func(t *testing.T) { + throttlerConfig.Threshold = 4444.0 + throttlerConfig.MetricThresholds["lag"] = 4444.0 + throttler.applyThrottlerConfig(ctx, throttlerConfig) + + t.Run("check after apply, no impact", func(t *testing.T) { + sleepTillThresholdApplies() + // "test" not supposed to check "loadavg" + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + t.Run("apply low 'loadavg' threshold", func(t *testing.T) { + throttlerConfig.MetricThresholds["loadavg"] = 0.0077 + throttler.applyThrottlerConfig(ctx, throttlerConfig) + + t.Run("check after apply, no impact", func(t *testing.T) { + sleepTillThresholdApplies() + // "test" not supposed to check "loadavg" + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + t.Run("assign 'loadavg' to test app", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"loadavg"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + + t.Run("check after assignment", func(t *testing.T) { + // "test" now checks "loadavg" + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "loadavg", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 2.718, checkResult.Value) // self loadavg value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + t.Run("assign 'shard/loadavg' to test app", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"shard/loadavg"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + + t.Run("check after assignment", func(t *testing.T) { + // "test" now checks "loadavg" + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "shard/loadavg", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 5.1, checkResult.Value) // shard loadavg value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + t.Run("assign 'lag,loadavg' to test app", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"lag", "loadavg"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check after assignment", func(t *testing.T) { + // "test" now checks both lag and loadavg + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "lag,loadavg", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 2.718, checkResult.Value) // self loadavg value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + }) + t.Run("assign 'lag,shard/loadavg' to test app", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"lag", "shard/loadavg"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check after assignment", func(t *testing.T) { + // "test" now checks both lag and loadavg + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "lag,shard/loadavg", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 5.1, checkResult.Value) // shard loadavg value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + }) + t.Run("clear 'loadavg' threshold", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"lag"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check after apply, clear", func(t *testing.T) { + sleepTillThresholdApplies() + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 1, len(checkResult.Metrics), "unexpected metrics: %+v", checkResult.Metrics) + }) + }) + t.Run("assign 'lag,threads_running' to test app", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"lag", "threads_running"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check after assignment", func(t *testing.T) { + // "test" now checks both lag and loadavg + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "lag,threads_running", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + }) + t.Run("assign 'custom,loadavg' to 'all' app", func(t *testing.T) { + throttlerConfig.AppCheckedMetrics[testAppName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"lag", "threads_running"}} + throttlerConfig.AppCheckedMetrics[throttlerapp.AllName.String()] = &topodatapb.ThrottlerConfig_MetricNames{Names: []string{"custom", "loadavg"}} + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check 'all' after assignment", func(t *testing.T) { + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[throttlerapp.AllName.String()] + require.True(t, ok) + assert.Equal(t, "custom,loadavg", metrics) + + checkResult := throttler.Check(ctx, throttlerapp.AllName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + t.Run("check 'test' after assignment", func(t *testing.T) { + // "test" app unaffected by 'all' assignment, because it has + // explicit metrics assignment. + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "lag,threads_running", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + t.Run("'online-ddl' app affected by 'all'", func(t *testing.T) { + // "online-ddl" app is affected by 'all' assignment, because it has + // no explicit metrics assignment. + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + _, ok := appCheckedMetrics[throttlerapp.OnlineDDLName.String()] + require.False(t, ok) + + checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + }) + t.Run("'vreplication:online-ddl:12345' app affected by 'all'", func(t *testing.T) { + // "vreplication:online-ddl:12345" app is affected by 'all' assignment, because it has + // no explicit metrics assignment. + checkResult := throttler.Check(ctx, "vreplication:online-ddl:12345", nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + t.Run("'vreplication:online-ddl:test' app affected by 'test' and not by 'all'", func(t *testing.T) { + // "vreplication:online-ddl:test" app is affected by 'test' assignment, because it has + // the split name "test" has explicit metrics assignment. + checkResult := throttler.Check(ctx, "vreplication:online-ddl:test", nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + t.Run("deassign metrics from 'all' app", func(t *testing.T) { + delete(throttlerConfig.AppCheckedMetrics, throttlerapp.AllName.String()) + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check 'all' after assignment", func(t *testing.T) { + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + _, ok := appCheckedMetrics[throttlerapp.AllName.String()] + require.False(t, ok) + + checkResult := throttler.Check(ctx, throttlerapp.AllName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("check 'test' after assignment", func(t *testing.T) { + // "test" app unaffected by the entire 'all' assignment, because it has + // explicit metrics assignment. + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + metrics, ok := appCheckedMetrics[testAppName.String()] + require.True(t, ok) + assert.Equal(t, "lag,threads_running", metrics) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, 2, len(checkResult.Metrics)) + }) + t.Run("'online-ddl' no longer has 'all' impact", func(t *testing.T) { + // "online-ddl" app is affected by 'all' assignment, because it has + // no explicit metrics assignment. + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + _, ok := appCheckedMetrics[throttlerapp.OnlineDDLName.String()] + require.False(t, ok) + + checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + + t.Run("deassign metrics from test app", func(t *testing.T) { + delete(throttlerConfig.AppCheckedMetrics, testAppName.String()) + throttler.applyThrottlerConfig(ctx, throttlerConfig) + t.Run("check after deassign, clear", func(t *testing.T) { + appCheckedMetrics := throttler.appCheckedMetricsSnapshot() + _, ok := appCheckedMetrics[testAppName.String()] + require.False(t, ok) + + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + }) + }) + }) +} + func TestIsAppThrottled(t *testing.T) { + plusOneHour := time.Now().Add(time.Hour) throttler := Throttler{ throttledApps: cache.New(cache.NoExpiration, 0), heartbeatWriter: &FakeHeartbeatWriter{}, } - assert.False(t, throttler.IsAppThrottled("app1")) - assert.False(t, throttler.IsAppThrottled("app2")) - assert.False(t, throttler.IsAppThrottled("app3")) - assert.False(t, throttler.IsAppThrottled("app4")) + t.Run("initial", func(t *testing.T) { + assert.False(t, throttler.IsAppThrottled("app1")) + assert.False(t, throttler.IsAppThrottled("app2")) + assert.False(t, throttler.IsAppThrottled("app3")) + assert.False(t, throttler.IsAppThrottled("app4")) + + assert.Equal(t, 0, throttler.throttledApps.ItemCount()) + }) // - throttler.ThrottleApp("app1", time.Now().Add(time.Hour), DefaultThrottleRatio, true) - throttler.ThrottleApp("app2", time.Now(), DefaultThrottleRatio, false) - throttler.ThrottleApp("app3", time.Now().Add(time.Hour), DefaultThrottleRatio, false) - throttler.ThrottleApp("app4", time.Now().Add(time.Hour), 0, false) - assert.False(t, throttler.IsAppThrottled("app1")) // exempted - assert.False(t, throttler.IsAppThrottled("app2")) // expired - assert.True(t, throttler.IsAppThrottled("app3")) - assert.False(t, throttler.IsAppThrottled("app4")) // ratio is zero + t.Run("set some rules", func(t *testing.T) { + throttler.ThrottleApp("app1", plusOneHour, DefaultThrottleRatio, true) + throttler.ThrottleApp("app2", time.Now(), DefaultThrottleRatio, false) // instantly expire + throttler.ThrottleApp("app3", plusOneHour, DefaultThrottleRatio, false) + throttler.ThrottleApp("app4", plusOneHour, 0, false) + assert.False(t, throttler.IsAppThrottled("app1")) // exempted + assert.False(t, throttler.IsAppThrottled("app2")) // expired + assert.True(t, throttler.IsAppThrottled("app3")) + assert.False(t, throttler.IsAppThrottled("app4")) // ratio is zero + assert.False(t, throttler.IsAppThrottled("app_other")) // not specified + + assert.Equal(t, 3, throttler.throttledApps.ItemCount()) + }) + t.Run("all", func(t *testing.T) { + // throttle "all", see how it affects app + throttler.ThrottleApp(throttlerapp.AllName.String(), plusOneHour, DefaultThrottleRatio, false) + defer throttler.UnthrottleApp(throttlerapp.AllName.String()) + assert.True(t, throttler.IsAppThrottled("all")) // + assert.False(t, throttler.IsAppThrottled("app1")) // exempted + assert.True(t, throttler.IsAppThrottled("app2")) // expired, so falls under "all" + assert.True(t, throttler.IsAppThrottled("app3")) + assert.False(t, throttler.IsAppThrottled("app4")) // ratio is zero, there is a specific instruction for this app, so it doesn't fall under "all" + assert.True(t, throttler.IsAppThrottled("app_other")) // falls under "all" + + // continuing previous test, we had 3 throttled apps. "all" is a new app being throttled. + assert.Equal(t, 4, throttler.throttledApps.ItemCount()) + }) // - throttler.UnthrottleApp("app1") - throttler.UnthrottleApp("app2") - throttler.UnthrottleApp("app3") - throttler.UnthrottleApp("app4") - assert.False(t, throttler.IsAppThrottled("app1")) - assert.False(t, throttler.IsAppThrottled("app2")) - assert.False(t, throttler.IsAppThrottled("app3")) - assert.False(t, throttler.IsAppThrottled("app4")) + t.Run("unthrottle", func(t *testing.T) { + throttler.UnthrottleApp("app1") + throttler.UnthrottleApp("app2") + throttler.UnthrottleApp("app3") + throttler.UnthrottleApp("app4") + assert.False(t, throttler.IsAppThrottled("app1")) + assert.False(t, throttler.IsAppThrottled("app2")) + assert.False(t, throttler.IsAppThrottled("app3")) + assert.False(t, throttler.IsAppThrottled("app4")) + + // we've manually unthrottled everything + assert.Equal(t, 0, throttler.throttledApps.ItemCount()) + }) + t.Run("all again", func(t *testing.T) { + // throttle "all", see how it affects app + throttler.ThrottleApp(throttlerapp.AllName.String(), plusOneHour, DefaultThrottleRatio, false) + defer throttler.UnthrottleApp(throttlerapp.AllName.String()) + assert.True(t, throttler.IsAppThrottled("all")) + assert.True(t, throttler.IsAppThrottled("app1")) + assert.True(t, throttler.IsAppThrottled("app2")) + assert.True(t, throttler.IsAppThrottled("app3")) + assert.True(t, throttler.IsAppThrottled("app4")) + assert.True(t, throttler.IsAppThrottled("app_other")) + + // one rule, for "all" app + assert.Equal(t, 1, throttler.throttledApps.ItemCount()) + }) + t.Run("exempt all", func(t *testing.T) { + // throttle "all", see how it affects app + throttler.ThrottleApp("app3", plusOneHour, DefaultThrottleRatio, false) + throttler.ThrottleApp(throttlerapp.AllName.String(), plusOneHour, DefaultThrottleRatio, true) + defer throttler.UnthrottleApp(throttlerapp.AllName.String()) + assert.False(t, throttler.IsAppThrottled("all")) + assert.False(t, throttler.IsAppThrottled("app1")) + assert.False(t, throttler.IsAppThrottled("app2")) + assert.True(t, throttler.IsAppThrottled("app3")) + assert.False(t, throttler.IsAppThrottled("app4")) + assert.False(t, throttler.IsAppThrottled("app_other")) + + assert.Equal(t, 2, throttler.throttledApps.ItemCount()) + }) } func TestIsAppExempted(t *testing.T) { @@ -251,51 +891,41 @@ func TestIsAppExempted(t *testing.T) { // TestRefreshMySQLInventory tests the behavior of the throttler's RefreshMySQLInventory() function, which // is called periodically in actual throttler. For a given cluster name, it generates a list of probes // the throttler will use to check metrics. -// On a "self" cluster, that list is expect to probe the tablet itself. -// On any other cluster, the list is expected to be empty if non-leader (only leader throttler, on a -// `PRIMARY` tablet, probes other tablets). On the leader, the list is expected to be non-empty. +// On a replica tablet, that list is expect to probe the tablet itself. +// On the PRIMARY, the list includes all shard tablets, including the PRIMARY itself. func TestRefreshMySQLInventory(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + metricsQuery := "select 1" configSettings := config.NewConfigurationSettings() - clusters := map[string]*config.MySQLClusterConfigurationSettings{ - selfStoreName: {}, - "ks1": {}, - "ks2": {}, - } - for _, s := range clusters { - s.MetricQuery = metricsQuery - s.ThrottleThreshold = &atomic.Uint64{} - s.ThrottleThreshold.Store(1) - } - configSettings.Stores.MySQL.Clusters = clusters throttler := &Throttler{ mysqlClusterProbesChan: make(chan *mysql.ClusterProbes), - mysqlClusterThresholds: cache.New(cache.NoExpiration, 0), + mysqlMetricThresholds: cache.New(cache.NoExpiration, 0), ts: &FakeTopoServer{}, mysqlInventory: mysql.NewInventory(), } - throttler.configSettings = configSettings throttler.metricsQuery.Store(metricsQuery) + throttler.configSettings = configSettings + throttler.initConfig() throttler.initThrottleTabletTypes() validateClusterProbes := func(t *testing.T, ctx context.Context) { testName := fmt.Sprintf("leader=%t", throttler.isLeader.Load()) t.Run(testName, func(t *testing.T) { // validateProbesCount expects number of probes according to cluster name and throttler's leadership status - validateProbesCount := func(t *testing.T, clusterName string, probes mysql.Probes) { - if clusterName == selfStoreName { - assert.Equal(t, 1, len(probes)) - } else if throttler.isLeader.Load() { - assert.NotZero(t, len(probes)) + validateProbesCount := func(t *testing.T, probes mysql.Probes) { + if throttler.isLeader.Load() { + assert.Equal(t, 3, len(probes)) } else { - assert.Empty(t, probes) + assert.Equal(t, 1, len(probes)) } } t.Run("waiting for probes", func(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, waitForProbesTimeout) defer cancel() - numClusterProbesResults := 0 for { select { case probes := <-throttler.mysqlClusterProbesChan: @@ -303,32 +933,21 @@ func TestRefreshMySQLInventory(t *testing.T) { // not run, and therefore there is none but us to both populate `mysqlClusterProbesChan` as well as // read from it. We do not compete here with any other goroutine. assert.NotNil(t, probes) - throttler.updateMySQLClusterProbes(ctx, probes) - - numClusterProbesResults++ - validateProbesCount(t, probes.ClusterName, probes.TabletProbes) - - if numClusterProbesResults == len(clusters) { - // Achieved our goal - return - } + validateProbesCount(t, probes.TabletProbes) + // Achieved our goal + return case <-ctx.Done(): - assert.FailNowf(t, ctx.Err().Error(), "waiting for %d cluster probes", len(clusters)) + assert.FailNowf(t, ctx.Err().Error(), "waiting for cluster probes") } } }) t.Run("validating probes", func(t *testing.T) { - for clusterName := range clusters { - probes, ok := throttler.mysqlInventory.ClustersProbes[clusterName] - require.True(t, ok) - validateProbesCount(t, clusterName, probes) - } + probes := throttler.mysqlInventory.ClustersProbes + validateProbesCount(t, probes) }) }) } - // - ctx := context.Background() t.Run("initial, not leader", func(t *testing.T) { throttler.isLeader.Store(false) @@ -382,6 +1001,7 @@ func runThrottler(t *testing.T, ctx context.Context, throttler *Throttler, timeo case <-ctx.Done(): return case <-time.After(sleepTime): + waitForMetricsToBeCollected(t, ctx, throttler) f(t, ctx) } } @@ -390,44 +1010,80 @@ func runThrottler(t *testing.T, ctx context.Context, throttler *Throttler, timeo assert.Error(t, ctx.Err()) throttler.Disable() + wg.Wait() assert.False(t, throttler.IsEnabled()) } // TestRace merely lets the throttler run with aggressive intervals for a few seconds, so as to detect race conditions. // This is relevant to `go test -race` func TestRace(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + throttler := newTestThrottler() - runThrottler(t, context.Background(), throttler, 5*time.Second, nil) + runThrottler(t, ctx, throttler, 5*time.Second, nil) } // TestProbes enables a throttler for a few seconds, and afterwards expects to find probes and metrics. func TestProbesWhileOperating(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + throttler := newTestThrottler() tmClient, ok := throttler.overrideTmClient.(*fakeTMClient) require.True(t, ok) assert.Empty(t, tmClient.AppNames()) - t.Run("aggregated", func(t *testing.T) { + t.Run("aggregated initial", func(t *testing.T) { assert.Equal(t, 0, throttler.aggregatedMetrics.ItemCount()) }) - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { + defer cancel() // early termination t.Run("aggregated", func(t *testing.T) { - assert.Equal(t, 2, throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() + assert.Equal(t, base.LagMetricName, throttler.metricNameUsedAsDefault()) aggr := throttler.aggregatedMetricsSnapshot() - assert.Equal(t, 2, len(aggr)) // "self" and "shard" clusters - for clusterName, metricResult := range aggr { + assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric + assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() + for aggregatedMetricName, metricResult := range aggr { val, err := metricResult.Get() - assert.NoError(t, err) - switch clusterName { - case "mysql/self": - assert.Equal(t, float64(1), val) - case "mysql/shard": - assert.Equal(t, float64(0), val) + assert.NoErrorf(t, err, "aggregatedMetricName: %v", aggregatedMetricName) + assert.NotEmpty(t, aggregatedMetricName) + scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) + assert.NotEmpty(t, metricName) + require.NoError(t, err) + + switch scope { + case base.UndefinedScope, base.SelfScope: + switch metricName { + case base.DefaultMetricName: + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" + case base.LagMetricName: + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) + case base.ThreadsRunningMetricName: + assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) + case base.CustomMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) + case base.LoadAvgMetricName: + assert.Equalf(t, float64(2.718), val, "scope=%v, metricName=%v", scope, metricName) + } + case base.ShardScope: + switch metricName { + case base.DefaultMetricName: + assert.Equalf(t, float64(0.9), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" + case base.LagMetricName: + assert.Equalf(t, float64(0.9), val, "scope=%v, metricName=%v", scope, metricName) + case base.ThreadsRunningMetricName: + assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) + case base.CustomMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) + case base.LoadAvgMetricName: + assert.Equalf(t, float64(5.1), val, "scope=%v, metricName=%v", scope, metricName) + } default: - assert.Failf(t, "unknown clusterName", "%v", clusterName) + assert.Failf(t, "unknown scope", "scope=%v", scope) } } assert.NotEmpty(t, tmClient.AppNames()) @@ -444,44 +1100,264 @@ func TestProbesWhileOperating(t *testing.T) { // And that's the only app we expect to see. assert.Equalf(t, 1, len(uniqueNames), "%+v", uniqueNames) - cancel() // end test early + t.Run("client, shard", func(t *testing.T) { + client := NewBackgroundClient(throttler, testAppName, base.UndefinedScope) + t.Run("threshold exceeded", func(t *testing.T) { + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) // we expect threshold exceeded + } + }) + + savedThreshold := throttler.MetricsThreshold.Load() + t.Run("adjust threshold", func(t *testing.T) { + throttler.MetricsThreshold.Store(math.Float64bits(0.95)) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.True(t, checkOK) + } + }) + t.Run("restore threshold", func(t *testing.T) { + throttler.MetricsThreshold.Store(savedThreshold) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + client.clearSuccessfulResultsCache() // ensure we don't read the successful result from the test above + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) + } + }) + }) + }) + + t.Run("aggregated with custom query", func(t *testing.T) { + // The query itself isn't important here, since we're emulating. What's important is that it's not empty. + // Hence, the throttler will choose to set the "custom" metric results in the aggregated "default" metrics, + // as opposed to choosing the "lag" metric results. + throttler.customMetricsQuery.Store("select non_empty") + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.aggregateMySQLMetrics(ctx) + }) + assert.Equal(t, base.CustomMetricName, throttler.metricNameUsedAsDefault()) + // throttler.aggregateMySQLMetrics(ctx) + aggr := throttler.aggregatedMetricsSnapshot() + assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric + assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() + for aggregatedMetricName, metricResult := range aggr { + val, err := metricResult.Get() + assert.NoErrorf(t, err, "aggregatedMetricName: %v", aggregatedMetricName) + assert.NotEmpty(t, aggregatedMetricName) + scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) + assert.NotEmpty(t, metricName) + require.NoError(t, err) + + switch scope { + case base.UndefinedScope, base.SelfScope: + switch metricName { + case base.DefaultMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) // same value as "custom" + case base.LagMetricName: + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) + case base.ThreadsRunningMetricName: + assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) + case base.CustomMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) + case base.LoadAvgMetricName: + assert.Equalf(t, float64(2.718), val, "scope=%v, metricName=%v", scope, metricName) + } + case base.ShardScope: + switch metricName { + case base.DefaultMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) // same value as "custom" + case base.LagMetricName: + assert.Equalf(t, float64(0.9), val, "scope=%v, metricName=%v", scope, metricName) + case base.ThreadsRunningMetricName: + assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) + case base.CustomMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) + case base.LoadAvgMetricName: + assert.Equalf(t, float64(5.1), val, "scope=%v, metricName=%v", scope, metricName) + } + default: + assert.Failf(t, "unknown scope", "scope=%v", scope) + } + } + + t.Run("client, shard", func(t *testing.T) { + client := NewBackgroundClient(throttler, testAppName, base.UndefinedScope) + t.Run("threshold exceeded", func(t *testing.T) { + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) // we expect threshold exceeded + } + }) + + savedThreshold := throttler.MetricsThreshold.Load() + t.Run("adjust threshold, too low", func(t *testing.T) { + throttler.MetricsThreshold.Store(math.Float64bits(0.95)) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) // 0.95 still too low for custom query + } + }) + t.Run("adjust threshold, still too low", func(t *testing.T) { + throttler.MetricsThreshold.Store(math.Float64bits(15)) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) // 15 still too low for custom query because primary has 17 + } + }) + t.Run("adjust threshold", func(t *testing.T) { + throttler.MetricsThreshold.Store(math.Float64bits(18)) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.True(t, checkOK) + } + }) + t.Run("restore threshold", func(t *testing.T) { + throttler.MetricsThreshold.Store(savedThreshold) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + client.clearSuccessfulResultsCache() // ensure we don't read the successful result from the test above + { + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) + } + }) + }) + }) + }) +} + +// TestProbesWithV20Replicas is similar to TestProbesWhileOperating, but assumes a v20 replica, which does not report any of the named metrics. +func TestProbesWithV20Replicas(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + throttler := newTestThrottler() + + tmClient, ok := throttler.overrideTmClient.(*fakeTMClient) + require.True(t, ok) + assert.Empty(t, tmClient.AppNames()) + tmClient.v20.Store(true) + + t.Run("aggregated initial", func(t *testing.T) { + assert.Equal(t, 0, throttler.aggregatedMetrics.ItemCount()) + }) + + runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { + defer cancel() // early termination + t.Run("aggregated", func(t *testing.T) { + aggr := throttler.aggregatedMetricsSnapshot() + assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric + assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() + for aggregatedMetricName, metricResult := range aggr { + assert.NotEmpty(t, aggregatedMetricName) + scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) + assert.NotEmpty(t, metricName) + require.NoError(t, err) + + val, metricResultErr := metricResult.Get() + expectMetricNotCollectedYet := false + switch base.Scope(scope) { + case base.SelfScope: + switch metricName { + case base.DefaultMetricName: + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" + case base.LagMetricName: + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) + case base.ThreadsRunningMetricName: + assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) + case base.CustomMetricName: + assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) + case base.LoadAvgMetricName: + assert.Equalf(t, float64(2.718), val, "scope=%v, metricName=%v", scope, metricName) + } + case base.ShardScope: + // Replicas will nto report named metrics, since they now assume v20 behavior. They will only + // produce the single v20 metric (which we call "default", though they don't advertise it under the name "base.DefaultMetricName") + switch metricName { + case base.DefaultMetricName: + assert.Equalf(t, float64(0.339), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" + case base.LagMetricName: + assert.Equalf(t, float64(0.339), val, "scope=%v, metricName=%v", scope, metricName) // + default: + assert.Zero(t, val, "scope=%v, metricName=%v", scope, metricName) + expectMetricNotCollectedYet = true + } + default: + assert.Failf(t, "unknown scope", "scope=%v", scope) + } + if expectMetricNotCollectedYet { + assert.ErrorIs(t, metricResultErr, base.ErrNoResultYet) + } else { + assert.NoErrorf(t, metricResultErr, "aggregatedMetricName: %v", aggregatedMetricName) + } + } + assert.NotEmpty(t, tmClient.AppNames()) + // The throttler here emulates a PRIMARY tablet, and therefore should probe the replicas using + // the "vitess" app name. + uniqueNames := map[string]int{} + for _, appName := range tmClient.AppNames() { + uniqueNames[appName]++ + } + // PRIMARY throttler probes replicas with empty app name, which is then + // interpreted as "vitess" name. + _, ok := uniqueNames[""] + assert.Truef(t, ok, "%+v", uniqueNames) + // And that's the only app we expect to see. + assert.Equalf(t, 1, len(uniqueNames), "%+v", uniqueNames) }) }) } // TestProbesPostDisable runs the throttler for some time, and then investigates the internal throttler maps and values. func TestProbesPostDisable(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + throttler := newTestThrottler() - runThrottler(t, context.Background(), throttler, 2*time.Second, nil) + runThrottler(t, ctx, throttler, 2*time.Second, nil) probes := throttler.mysqlInventory.ClustersProbes - assert.NotEmpty(t, probes) - - selfProbes := probes[selfStoreName] - t.Run("self", func(t *testing.T) { - assert.NotEmpty(t, selfProbes) - require.Equal(t, 1, len(selfProbes)) // should always be true once refreshMySQLInventory() runs - probe, ok := selfProbes[""] - assert.True(t, ok) - assert.NotNil(t, probe) - - assert.Equal(t, "", probe.Alias) - assert.Nil(t, probe.Tablet) - assert.Equal(t, "select 1", probe.MetricQuery) - assert.Zero(t, atomic.LoadInt64(&probe.QueryInProgress)) - }) - shardProbes := probes[shardStoreName] - t.Run("shard", func(t *testing.T) { - assert.NotEmpty(t, shardProbes) - assert.Equal(t, 2, len(shardProbes)) // see fake FindAllTabletAliasesInShard above - for _, probe := range shardProbes { + <-time.After(1 * time.Second) // throttler's context was cancelled, but still some functionality needs to complete + t.Run("probes", func(t *testing.T) { + assert.Equal(t, 3, len(probes)) // see fake FindAllTabletAliasesInShard above + localTabletFound := 0 + for _, probe := range probes { require.NotNil(t, probe) - assert.NotEmpty(t, probe.Alias) - assert.NotNil(t, probe.Tablet) - assert.Equal(t, "select 1", probe.MetricQuery) - assert.Zero(t, atomic.LoadInt64(&probe.QueryInProgress)) + if probe.Alias == throttler.tabletAlias { + localTabletFound++ + } else { + assert.NotEmpty(t, probe.Alias) + assert.NotNil(t, probe.Tablet) + } + assert.Zero(t, atomic.LoadInt64(&probe.QueryInProgress), "alias=%s", probe.Alias) } + assert.Equal(t, 1, localTabletFound) }) t.Run("metrics", func(t *testing.T) { @@ -496,7 +1372,8 @@ func TestProbesPostDisable(t *testing.T) { } func TestDormant(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) defer cancel() throttler := newTestThrottler() @@ -508,9 +1385,14 @@ func TestDormant(t *testing.T) { runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { assert.True(t, throttler.isDormant()) assert.EqualValues(t, 1, heartbeatWriter.Requests()) // once upon Enable() - flags := &CheckFlags{} - throttler.CheckByType(ctx, throttlerapp.VitessName.String(), "", flags, ThrottleCheckSelf) + flags := &CheckFlags{ + Scope: base.SelfScope, + MultiMetricsEnabled: true, + } + throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) go func() { + defer cancel() // early termination + select { case <-ctx.Done(): require.FailNow(t, "context expired before testing completed") @@ -518,7 +1400,7 @@ func TestDormant(t *testing.T) { assert.True(t, throttler.isDormant()) assert.EqualValues(t, 1, heartbeatWriter.Requests()) // "vitess" name does not cause heartbeat requests } - throttler.CheckByType(ctx, throttlerapp.ThrottlerStimulatorName.String(), "", flags, ThrottleCheckSelf) + throttler.Check(ctx, throttlerapp.ThrottlerStimulatorName.String(), nil, flags) select { case <-ctx.Done(): require.FailNow(t, "context expired before testing completed") @@ -526,7 +1408,7 @@ func TestDormant(t *testing.T) { assert.False(t, throttler.isDormant()) assert.Greater(t, heartbeatWriter.Requests(), int64(1)) } - throttler.CheckByType(ctx, throttlerapp.OnlineDDLName.String(), "", flags, ThrottleCheckSelf) + throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) select { case <-ctx.Done(): require.FailNow(t, "context expired before testing completed") @@ -542,13 +1424,247 @@ func TestDormant(t *testing.T) { case <-time.After(throttler.dormantPeriod): assert.True(t, throttler.isDormant()) } - cancel() // end test early }() }) } +func TestChecks(t *testing.T) { + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + throttler := newTestThrottler() + throttler.dormantPeriod = time.Minute + + tmClient, ok := throttler.overrideTmClient.(*fakeTMClient) + require.True(t, ok) + assert.Empty(t, tmClient.AppNames()) + + validateAppNames := func(t *testing.T) { + t.Run("app names", func(t *testing.T) { + assert.NotEmpty(t, tmClient.AppNames()) + // The throttler here emulates a PRIMARY tablet, and therefore should probe the replicas using + // the "vitess" app name. + uniqueNames := map[string]int{} + for _, appName := range tmClient.AppNames() { + uniqueNames[appName]++ + } + // PRIMARY throttler probes replicas with empty app name, which is then + // interpreted as "vitess" name. + _, ok := uniqueNames[""] + assert.Truef(t, ok, "%+v", uniqueNames) + assert.Equalf(t, 1, len(uniqueNames), "%+v", uniqueNames) + }) + } + + runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { + defer cancel() + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: true, + MetricThresholds: map[string]float64{}, + AppCheckedMetrics: map[string]*topodatapb.ThrottlerConfig_MetricNames{}, + } + + t.Run("apply high thresholds", func(t *testing.T) { + // We apply high thresholds because if a value exceeds a threshold, as is the case + // designed in the original values (load average 2.718 > 1) then the check result is + // an error and indicates the errored value. Which is something we already test in + // TestApplyThrottlerConfigAppCheckedMetrics. + // In this test, we specifically look for how "lag" is used as the default metric. + // We this mute other metrics by setting their thresholds to be high. + throttlerConfig.MetricThresholds["loadavg"] = 7777 + throttlerConfig.MetricThresholds["custom"] = 7778 + throttler.applyThrottlerConfig(ctx, throttlerConfig) + }) + sleepTillThresholdApplies() + + assert.Equal(t, base.LagMetricName, throttler.metricNameUsedAsDefault()) + aggr := throttler.aggregatedMetricsSnapshot() + assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric + assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() + + validateAppNames(t) + t.Run("checks, self scope", func(t *testing.T) { + flags := &CheckFlags{ + Scope: base.SelfScope, + MultiMetricsEnabled: true, + } + t.Run("implicit names", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("explicit names", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value + if !assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) { + for k, v := range checkResult.Metrics { + t.Logf("%s: %+v", k, v) + } + } + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + + assert.EqualValues(t, 0.3, checkResult.Metrics[base.LagMetricName.String()].Value) // self lag value, because flags.Scope is set + assert.EqualValues(t, 26, checkResult.Metrics[base.ThreadsRunningMetricName.String()].Value) // self value, because flags.Scope is set + assert.EqualValues(t, 17, checkResult.Metrics[base.CustomMetricName.String()].Value) // self value, because flags.Scope is set + assert.EqualValues(t, 2.718, checkResult.Metrics[base.LoadAvgMetricName.String()].Value) // self value, because flags.Scope is set + for _, metric := range checkResult.Metrics { + assert.EqualValues(t, base.SelfScope.String(), metric.Scope) + } + }) + }) + t.Run("checks, self scope, vitess app", func(t *testing.T) { + // "vitess" app always checks all known metrics. + flags := &CheckFlags{ + // scope not important for this test + MultiMetricsEnabled: true, + } + t.Run("implicit names, always all known", func(t *testing.T) { + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) + // "vitess" app always checks all known metrics: + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + }) + t.Run("explicit names, irrelevant, always all known", func(t *testing.T) { + metricNames := base.MetricNames{ + base.MetricName("self/threads_running"), + base.MetricName("custom"), + } + + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), metricNames, flags) + require.NotNil(t, checkResult) + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + }) + }) + + t.Run("checks, shard scope", func(t *testing.T) { + flags := &CheckFlags{ + Scope: base.ShardScope, + MultiMetricsEnabled: true, + } + t.Run("implicit names", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("explicit names", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + + assert.EqualValues(t, 0.9, checkResult.Metrics[base.LagMetricName.String()].Value) // shard lag value, because flags.Scope is set + assert.EqualValues(t, 26, checkResult.Metrics[base.ThreadsRunningMetricName.String()].Value) // shard value, because flags.Scope is set + assert.EqualValues(t, 17, checkResult.Metrics[base.CustomMetricName.String()].Value) // shard value, because flags.Scope is set + assert.EqualValues(t, 5.1, checkResult.Metrics[base.LoadAvgMetricName.String()].Value) // shard value, because flags.Scope is set + for _, metric := range checkResult.Metrics { + assert.EqualValues(t, base.ShardScope.String(), metric.Scope) + } + }) + }) + t.Run("checks, undefined scope", func(t *testing.T) { + flags := &CheckFlags{ + // Leaving scope undefined, so that each metrics picks its own scope + MultiMetricsEnabled: true, + } + t.Run("implicit names", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) + assert.Len(t, checkResult.Metrics, 1) + }) + t.Run("explicit names", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + + assert.EqualValues(t, 0.9, checkResult.Metrics[base.LagMetricName.String()].Value) // shard lag value, because "shard" is the default scope for lag + assert.EqualValues(t, 26, checkResult.Metrics[base.ThreadsRunningMetricName.String()].Value) // self value, because "self" is the default scope for threads_running + assert.EqualValues(t, 17, checkResult.Metrics[base.CustomMetricName.String()].Value) // self value, because "self" is the default scope for custom + assert.EqualValues(t, 2.718, checkResult.Metrics[base.LoadAvgMetricName.String()].Value) // self value, because "self" is the default scope for loadavg + assert.EqualValues(t, base.ShardScope.String(), checkResult.Metrics[base.LagMetricName.String()].Scope) + assert.EqualValues(t, base.SelfScope.String(), checkResult.Metrics[base.ThreadsRunningMetricName.String()].Scope) + assert.EqualValues(t, base.SelfScope.String(), checkResult.Metrics[base.CustomMetricName.String()].Scope) + assert.EqualValues(t, base.SelfScope.String(), checkResult.Metrics[base.LoadAvgMetricName.String()].Scope) + }) + }) + t.Run("checks, defined scope masks explicit scope metrics", func(t *testing.T) { + flags := &CheckFlags{ + Scope: base.ShardScope, + MultiMetricsEnabled: true, + } + t.Run("explicit names", func(t *testing.T) { + metricNames := base.MetricNames{ + base.MetricName("self/lag"), + base.MetricName("self/threads_running"), + base.MetricName("custom"), + base.MetricName("shard/loadavg"), + base.MetricName("default"), + } + checkResult := throttler.Check(ctx, testAppName.String(), metricNames, flags) + + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) + assert.Equal(t, len(metricNames), len(checkResult.Metrics)) + + assert.EqualValues(t, 0.9, checkResult.Metrics[base.LagMetricName.String()].Value) // shard lag value, even though scope name is in metric name + assert.EqualValues(t, 26, checkResult.Metrics[base.ThreadsRunningMetricName.String()].Value) // shard value, even though scope name is in metric name + assert.EqualValues(t, 17, checkResult.Metrics[base.CustomMetricName.String()].Value) // shard value because flags.Scope is set + assert.EqualValues(t, 5.1, checkResult.Metrics[base.LoadAvgMetricName.String()].Value) // shard value, not because scope name is in metric name but because flags.Scope is set + for _, metric := range checkResult.Metrics { + assert.EqualValues(t, base.ShardScope.String(), metric.Scope) + } + }) + }) + t.Run("checks, undefined scope and explicit scope metrics", func(t *testing.T) { + flags := &CheckFlags{ + // Leaving scope undefined + MultiMetricsEnabled: true, + } + t.Run("explicit names", func(t *testing.T) { + metricNames := base.MetricNames{ + base.MetricName("self/lag"), + base.MetricName("self/threads_running"), + base.MetricName("custom"), + base.MetricName("shard/loadavg"), + } + checkResult := throttler.Check(ctx, testAppName.String(), metricNames, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value) // explicitly set self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Equal(t, len(metricNames), len(checkResult.Metrics)) + + assert.EqualValues(t, 0.3, checkResult.Metrics[base.LagMetricName.String()].Value) // self lag value, because scope name is in metric name + assert.EqualValues(t, 26, checkResult.Metrics[base.ThreadsRunningMetricName.String()].Value) // self value, because scope name is in metric name + assert.EqualValues(t, 17, checkResult.Metrics[base.CustomMetricName.String()].Value) // self value, because that's the default... + assert.EqualValues(t, 5.1, checkResult.Metrics[base.LoadAvgMetricName.String()].Value) // shard value, because scope name is in metric name + assert.EqualValues(t, base.SelfScope.String(), checkResult.Metrics[base.LagMetricName.String()].Scope) + assert.EqualValues(t, base.SelfScope.String(), checkResult.Metrics[base.ThreadsRunningMetricName.String()].Scope) + assert.EqualValues(t, base.SelfScope.String(), checkResult.Metrics[base.CustomMetricName.String()].Scope) + assert.EqualValues(t, base.ShardScope.String(), checkResult.Metrics[base.LoadAvgMetricName.String()].Scope) + }) + }) + // done + }) +} + func TestReplica(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) + ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) + ctx, cancel := context.WithCancel(ctx) defer cancel() throttler := newTestThrottler() @@ -558,52 +1674,227 @@ func TestReplica(t *testing.T) { tmClient, ok := throttler.overrideTmClient.(*fakeTMClient) require.True(t, ok) assert.Empty(t, tmClient.AppNames()) - + { + _, ok := throttler.recentApps.Get(throttlerapp.VitessName.String()) + assert.False(t, ok) + } runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { assert.Empty(t, tmClient.AppNames()) - flags := &CheckFlags{} + flags := &CheckFlags{ + Scope: base.SelfScope, + MultiMetricsEnabled: true, + } { - checkResult := throttler.CheckByType(ctx, throttlerapp.VitessName.String(), "", flags, ThrottleCheckSelf) + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) + assert.NotNil(t, checkResult) assert.False(t, checkResult.RecentlyChecked) // "vitess" app does not mark the throttler as recently checked assert.False(t, throttler.recentlyChecked()) // "vitess" app does not mark the throttler as recently checked - } - go func() { - select { - case <-ctx.Done(): - require.FailNow(t, "context expired before testing completed") - case <-time.After(time.Second): - assert.Empty(t, tmClient.AppNames()) - } - throttler.CheckByType(ctx, throttlerapp.OnlineDDLName.String(), "", flags, ThrottleCheckSelf) - select { - case <-ctx.Done(): - require.FailNow(t, "context expired before testing completed") - case <-time.After(time.Second): - appNames := tmClient.AppNames() - assert.NotEmpty(t, appNames) - assert.Containsf(t, appNames, throttlerapp.ThrottlerStimulatorName.String(), "%+v", appNames) - assert.Equalf(t, 1, len(appNames), "%+v", appNames) - } { - checkResult := throttler.CheckByType(ctx, throttlerapp.OnlineDDLName.String(), "", flags, ThrottleCheckSelf) - assert.True(t, checkResult.RecentlyChecked) - assert.True(t, throttler.recentlyChecked()) - } - { - checkResult := throttler.CheckByType(ctx, throttlerapp.VitessName.String(), "", flags, ThrottleCheckSelf) - assert.True(t, checkResult.RecentlyChecked) // due to previous "online-ddl" check - assert.True(t, throttler.recentlyChecked()) // due to previous "online-ddl" check + _, ok := throttler.recentApps.Get(throttlerapp.VitessName.String()) + assert.True(t, ok) } + } + go func() { + defer cancel() // early termination + t.Run("checks", func(t *testing.T) { + select { + case <-ctx.Done(): + require.FailNow(t, "context expired before testing completed") + case <-time.After(time.Second): + assert.Empty(t, tmClient.AppNames()) + } + t.Run("validate stimulator", func(t *testing.T) { + checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + select { + case <-ctx.Done(): + require.FailNow(t, "context expired before testing completed") + case <-time.After(time.Second): + appNames := tmClient.AppNames() + // The replica reports to the primary that it had been checked, by issuing a CheckThrottler + // on the primary using the ThrottlerStimulatorName app. + assert.Equal(t, []string{throttlerapp.ThrottlerStimulatorName.String()}, appNames) + } + }) + t.Run("validate stimulator", func(t *testing.T) { + { + checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.EqualValues(t, 0.3, checkResult.Value) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.Len(t, checkResult.Metrics, 1) + assert.True(t, checkResult.RecentlyChecked) + assert.True(t, throttler.recentlyChecked()) + { + recentApp, ok := throttler.recentAppsSnapshot()[throttlerapp.OnlineDDLName.String()] + require.True(t, ok) + assert.EqualValues(t, http.StatusOK, recentApp.StatusCode) + } + } + { + { + _, ok := throttler.recentApps.Get(throttlerapp.VitessName.String()) + assert.True(t, ok) + } + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) + assert.True(t, checkResult.RecentlyChecked) // due to previous "online-ddl" check + assert.True(t, throttler.recentlyChecked()) // due to previous "online-ddl" check + { + _, ok := throttler.recentAppsSnapshot()[throttlerapp.VitessName.String()] + assert.True(t, ok) + } + } + select { + case <-ctx.Done(): + require.FailNow(t, "context expired before testing completed") + case <-time.After(time.Second): + // Due to stimulation rate limiting, we shouldn't see a 2nd CheckThrottler request. + appNames := tmClient.AppNames() + assert.Equal(t, []string{throttlerapp.ThrottlerStimulatorName.String()}, appNames) + } + }) + t.Run("validate multi-metric results", func(t *testing.T) { + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) + require.NotNil(t, checkResult) + // loadavg value exceeds threshold. This will show up in the check result as an error. + assert.EqualValues(t, 2.718, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value + assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + }) + t.Run("validate v20 non-multi-metric results", func(t *testing.T) { + flags := &CheckFlags{ + Scope: base.SelfScope, + MultiMetricsEnabled: false, + } + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) + require.NotNil(t, checkResult) + // loadavg value exceeds threshold. But since "MultiMetricsEnabled: false", the + // throttler, acting as a replica, assumes it's being probed by a v20 primary, and + // therefore does not report any of the multi-metric errors back. It only ever + // reports the default metric. + assert.EqualValues(t, 0.3, checkResult.Value) // self lag value + assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) + assert.EqualValues(t, 0.75, checkResult.Threshold) + // The replica will still report the multi-metrics, and that's fine. As long + // as it does not reflect any of their values in the checkResult.Value/StatusCode/Threshold/Error/Message. + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + }) + }) - select { - case <-ctx.Done(): - require.FailNow(t, "context expired before testing completed") - case <-time.After(time.Second): - // Due to stimulation rate limiting, we shouldn't see a 2nd CheckThrottler request. - appNames := tmClient.AppNames() - assert.Equalf(t, 1, len(appNames), "%+v", appNames) - } - cancel() // end test early + t.Run("metrics", func(t *testing.T) { + // See which metrics are available + checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), base.KnownMetricNames, flags) + require.NotNil(t, checkResult) + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + + for metricName, metricResult := range checkResult.Metrics { + val := metricResult.Value + threshold := metricResult.Threshold + scope := base.SelfScope + switch base.MetricName(metricName) { + case base.DefaultMetricName: + assert.NoError(t, metricResult.Error, "metricName=%v, value=%v, threshold=%v", metricName, metricResult.Value, metricResult.Threshold) + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" + assert.Equalf(t, float64(0.75), threshold, "scope=%v, metricName=%v", scope, metricName) + case base.LagMetricName: + assert.NoError(t, metricResult.Error, "metricName=%v, value=%v, threshold=%v", metricName, metricResult.Value, metricResult.Threshold) + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) + assert.Equalf(t, float64(0.75), threshold, "scope=%v, metricName=%v", scope, metricName) // default threshold + case base.ThreadsRunningMetricName: + assert.NoError(t, metricResult.Error, "metricName=%v, value=%v, threshold=%v", metricName, metricResult.Value, metricResult.Threshold) + assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) + assert.Equalf(t, float64(100), threshold, "scope=%v, metricName=%v", scope, metricName) + case base.CustomMetricName: + assert.ErrorIs(t, metricResult.Error, base.ErrThresholdExceeded) + assert.Equalf(t, float64(0), threshold, "scope=%v, metricName=%v", scope, metricName) + case base.LoadAvgMetricName: + assert.ErrorIs(t, metricResult.Error, base.ErrThresholdExceeded) + assert.Equalf(t, float64(1), threshold, "scope=%v, metricName=%v", scope, metricName) + } + } + }) + t.Run("metrics not named", func(t *testing.T) { + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.Len(t, checkResult.Metrics, 1) + for metricName, metricResult := range checkResult.Metrics { + assert.Equal(t, base.LagMetricName, throttler.metricNameUsedAsDefault()) + assert.Equal(t, base.LagMetricName.String(), metricName) + val := metricResult.Value + threshold := metricResult.Threshold + scope := base.SelfScope + + assert.NoError(t, metricResult.Error, "metricName=%v, value=%v, threshold=%v", metricName, metricResult.Value, metricResult.Threshold) + assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) + assert.Equalf(t, float64(0.75), threshold, "scope=%v, metricName=%v", scope, metricName) // default threshold + } + }) + t.Run("metrics names mapped", func(t *testing.T) { + throttler.appCheckedMetrics.Set(testAppName.String(), base.MetricNames{base.LoadAvgMetricName, base.LagMetricName, base.ThreadsRunningMetricName}, cache.DefaultExpiration) + defer throttler.appCheckedMetrics.Delete(testAppName.String()) + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + require.NotNil(t, checkResult) + assert.Equal(t, 3, len(checkResult.Metrics)) + }) + t.Run("client, OK", func(t *testing.T) { + client := NewBackgroundClient(throttler, throttlerapp.TestingName, base.UndefinedScope) + checkOK := client.ThrottleCheckOK(ctx, "") + assert.True(t, checkOK) + }) + t.Run("client, metrics names mapped, OK", func(t *testing.T) { + // Specified metrics do not exceed threshold, therefore overall result should be OK. + throttler.appCheckedMetrics.Set(throttlerapp.TestingName.String(), base.MetricNames{base.LagMetricName, base.ThreadsRunningMetricName}, cache.DefaultExpiration) + defer throttler.appCheckedMetrics.Delete(throttlerapp.TestingName.String()) + client := NewBackgroundClient(throttler, throttlerapp.TestingName, base.UndefinedScope) + checkOK := client.ThrottleCheckOK(ctx, "") + assert.True(t, checkOK) + }) + t.Run("client, metrics names mapped, not OK", func(t *testing.T) { + // LoadAvgMetricName metric exceeds threshold, therefore overall check should be in error. + throttler.appCheckedMetrics.Set(throttlerapp.TestingName.String(), base.MetricNames{base.LagMetricName, base.LoadAvgMetricName, base.ThreadsRunningMetricName}, cache.DefaultExpiration) + defer throttler.appCheckedMetrics.Delete(throttlerapp.TestingName.String()) + client := NewBackgroundClient(throttler, throttlerapp.TestingName, base.UndefinedScope) + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) + }) + + t.Run("custom query, metrics", func(t *testing.T) { + // For v20 backwards compatibility, we also report the standard metric/value in CheckResult: + checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) + assert.NoError(t, checkResult.Error, "value=%v, threshold=%v", checkResult.Value, checkResult.Threshold) + assert.Equal(t, float64(0.3), checkResult.Value) + // Change custom threshold + throttler.MetricsThreshold.Store(math.Float64bits(0.1)) + <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { + throttler.refreshMySQLInventory(ctx) + }) + checkResult = throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) + require.NotNil(t, checkResult) + assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) + + assert.Equal(t, base.LagMetricName, throttler.metricNameUsedAsDefault()) + + for metricName, metricResult := range checkResult.Metrics { + switch base.MetricName(metricName) { + case base.CustomMetricName, + base.LagMetricName, // Lag metrics affected by the new low threshold + base.LoadAvgMetricName, + base.DefaultMetricName: + assert.Error(t, metricResult.Error, "metricName=%v, value=%v, threshold=%v", metricName, metricResult.Value, metricResult.Threshold) + assert.ErrorIs(t, metricResult.Error, base.ErrThresholdExceeded) + case base.ThreadsRunningMetricName: + assert.NoError(t, metricResult.Error, "metricName=%v, value=%v, threshold=%v", metricName, metricResult.Value, metricResult.Threshold) + } + } + }) + t.Run("client, not OK", func(t *testing.T) { + client := NewBackgroundClient(throttler, throttlerapp.TestingName, base.SelfScope) + checkOK := client.ThrottleCheckOK(ctx, "") + assert.False(t, checkOK) + }) }() }) } diff --git a/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go b/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go index 7594df6c1b2..6fef3db453a 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go +++ b/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go @@ -39,11 +39,18 @@ func (n Name) ConcatenateString(s string) string { func (n Name) Concatenate(other Name) Name { return Name(n.ConcatenateString(other.String())) } +func (n Name) SplitStrings() []string { + return strings.Split(n.String(), ":") +} const ( - // DefaultName is the app name used by vitess when app doesn't indicate its name - DefaultName Name = "default" - VitessName Name = "vitess" + // AllName is a special catch-all name for all apps + AllName Name = "all" + // VitessName is used by vitess tablets when communicating between themselves, + // as well as for self checks. + // It is also the name used by checks that do not identify by any app name. + VitessName Name = "vitess" + // ThrottlerStimulatorName is used by a replica tablet to stimulate the throttler on the Primary tablet ThrottlerStimulatorName Name = "throttler-stimulator" TableGCName Name = "tablegc" @@ -63,6 +70,9 @@ const ( BinlogWatcherName Name = "binlog-watcher" MessagerName Name = "messager" SchemaTrackerName Name = "schema-tracker" + + TestingName Name = "test" + TestingAlwaysThrottlerName Name = "always-throttled-app" ) var ( diff --git a/go/vt/vttablet/tabletserver/throttle/throttlerapp/app_test.go b/go/vt/vttablet/tabletserver/throttle/throttlerapp/app_test.go index c468009c793..0a5969dd7de 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttlerapp/app_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttlerapp/app_test.go @@ -51,3 +51,21 @@ func TestConcatenate(t *testing.T) { assert.Equal(t, Name("vreplication:rowstreamer"), rowstreamerName) assert.Equal(t, "vreplication:rowstreamer", rowstreamerName.String()) } + +func TestSplit(t *testing.T) { + { + n := Name("vreplication:vcopier") + parts := n.SplitStrings() + assert.Equal(t, []string{"vreplication", "vcopier"}, parts) + } + { + n := VReplicationName + parts := n.SplitStrings() + assert.Equal(t, []string{"vreplication"}, parts) + } + { + n := Name("") + parts := n.SplitStrings() + assert.Equal(t, []string{""}, parts) + } +} diff --git a/go/vt/vttablet/tabletserver/vstreamer/engine.go b/go/vt/vttablet/tabletserver/vstreamer/engine.go index 501b3708eed..3dc1f5f9a92 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/engine.go +++ b/go/vt/vttablet/tabletserver/vstreamer/engine.go @@ -42,6 +42,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" + "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" @@ -115,7 +116,7 @@ func NewEngine(env tabletenv.Env, ts srvtopo.Server, se *schema.Engine, lagThrot ts: ts, se: se, cell: cell, - throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerapp.VStreamerName, throttle.ThrottleCheckSelf), + throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerapp.VStreamerName, base.UndefinedScope), streamers: make(map[int]*uvstreamer), rowStreamers: make(map[int]*rowStreamer), diff --git a/go/vt/vttablet/tabletservermock/controller.go b/go/vt/vttablet/tabletservermock/controller.go index 33a6b94d327..7c7055b3e15 100644 --- a/go/vt/vttablet/tabletservermock/controller.go +++ b/go/vt/vttablet/tabletservermock/controller.go @@ -221,6 +221,11 @@ func (tqsc *Controller) CheckThrottler(ctx context.Context, appName string, flag return nil } +// GetThrottlerStatus is part of the tabletserver.Controller interface +func (tqsc *Controller) GetThrottlerStatus(ctx context.Context) *throttle.ThrottlerStatus { + return nil +} + // EnterLameduck implements tabletserver.Controller. func (tqsc *Controller) EnterLameduck() { tqsc.mu.Lock() diff --git a/go/vt/vttablet/tmclient/rpc_client_api.go b/go/vt/vttablet/tmclient/rpc_client_api.go index f55d33c2e54..7da1a6196dd 100644 --- a/go/vt/vttablet/tmclient/rpc_client_api.go +++ b/go/vt/vttablet/tmclient/rpc_client_api.go @@ -261,6 +261,7 @@ type TabletManagerClient interface { // Throttler CheckThrottler(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) + GetThrottlerStatus(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) // // Management methods diff --git a/go/vt/vttablet/tmrpctest/test_tm_rpc.go b/go/vt/vttablet/tmrpctest/test_tm_rpc.go index 531841b1d16..9ba01b13d5a 100644 --- a/go/vt/vttablet/tmrpctest/test_tm_rpc.go +++ b/go/vt/vttablet/tmrpctest/test_tm_rpc.go @@ -1352,6 +1352,15 @@ func (fra *fakeRPCTM) CheckThrottler(ctx context.Context, req *tabletmanagerdata panic("implement me") } +func (fra *fakeRPCTM) GetThrottlerStatus(ctx context.Context, req *tabletmanagerdatapb.GetThrottlerStatusRequest) (*tabletmanagerdatapb.GetThrottlerStatusResponse, error) { + if fra.panics { + panic(fmt.Errorf("test-triggered panic")) + } + + //TODO implement me + panic("implement me") +} + func tmRPCTestRestoreFromBackup(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.RestoreFromBackupRequest) { stream, err := client.RestoreFromBackup(ctx, tablet, req) if err != nil { diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 398357c0423..317e8706584 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -506,39 +506,9 @@ message CheckThrottlerRequest { } message CheckThrottlerResponse { - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - int32 status_code = 1; - // Value is the metric value collected by the tablet - double value = 2; - // Threshold is the throttling threshold the table was comparing the value with - double threshold = 3; - // Error indicates an error retrieving the value - string error = 4; - // Message - string message = 5; - // RecentlyChecked indicates that the tablet has been hit with a user-facing check, which can then imply - // that heartbeats lease should be renwed. - bool recently_checked = 6; - - message Metric { - // Name of the metric - string name = 1; - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - int32 status_code = 2; - // Value is the metric value collected by the tablet - double value = 3; - // Threshold is the throttling threshold the table was comparing the value with - double threshold = 4; - // Error indicates an error retrieving the value - string error = 5; - // Message - string message = 6; - // Scope used in this check - string scope = 7; - } - // Metrics is a map (metric name -> metric value/error) so that the client has as much - // information as possible about all the checked metrics. - map metrics = 7; + topodata.TabletAlias tablet_alias = 1; + + tabletmanagerdata.CheckThrottlerResponse Check = 2; } message CleanupSchemaMigrationRequest { @@ -1108,61 +1078,7 @@ message GetThrottlerStatusRequest { } message GetThrottlerStatusResponse { - // TabletAlias is the alias of probed tablet - string tablet_alias = 1; - string keyspace = 2; - string shard = 3; - - // IsLeader indicates if the tablet is the leader of the shard, ie. the primary - bool is_leader = 4; - // IsOpen per stateManager - bool is_open = 5; - // IsEnabled per throttler configuration - bool is_enabled = 6; - // IsDormant: whether the throttler is dormant, ie has not received any checks in a while - // and goes into low-frequency probing mode. - bool is_dormant = 7; - - // LagMetricQuery is the query used to check the lag metric, a constant used by the throttler. - string lag_metric_query = 8; - // CustomMetricQuery is the query used to check the custom metric, supplied by the user. - string custom_metric_query = 9; - // DefaultThreshold is the threshold used by the throttler for the default metric (lag or custom in single-metric throttlers) - double default_threshold = 10; - // MetricNameUsedAsDefault is the name of the metric used as the default metric: "lag" or "custom", for backwards compatibility - // with single-metric throttlers - string metric_name_used_as_default = 11; - - message MetricResult { - double value = 1; - string error = 2; - } - - // AggregatedMetrics is a map of metric names to their values/errors - // Names are, for example, "self", "self/lag", "shard/lag", "shard/loadavg", etc. - map aggregated_metrics = 12; - // MetricThresholds is a map of metric names to their thresholds. - map metric_thresholds = 13; - - message MetricHealth { - vttime.Time last_healthy_at = 1; - int64 seconds_since_last_healthy = 2; - } - // MetricsHealth is a map of metric names to their health status. - map metrics_health = 14; - // ThrottledApps is a map of app names to their throttling rules - map throttled_apps = 15; - // AppCheckedMetrics is a map of app names to their assigned metrics - map app_checked_metrics = 16; - - bool recently_checked = 17; - - message RecentApp { - vttime.Time checked_at = 1; - int32 status_code = 2; - } - // RecentApps is a map of app names to their recent check status - map recent_apps = 18; + tabletmanagerdata.GetThrottlerStatusResponse status = 1; } message GetTopologyPathRequest { diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 67b1fca3d05..7cec9343085 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -50426,26 +50426,11 @@ export namespace vtctldata { /** Properties of a CheckThrottlerResponse. */ interface ICheckThrottlerResponse { - /** CheckThrottlerResponse status_code */ - status_code?: (number|null); - - /** CheckThrottlerResponse value */ - value?: (number|null); - - /** CheckThrottlerResponse threshold */ - threshold?: (number|null); - - /** CheckThrottlerResponse error */ - error?: (string|null); - - /** CheckThrottlerResponse message */ - message?: (string|null); - - /** CheckThrottlerResponse recently_checked */ - recently_checked?: (boolean|null); + /** CheckThrottlerResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); - /** CheckThrottlerResponse metrics */ - metrics?: ({ [k: string]: vtctldata.CheckThrottlerResponse.IMetric }|null); + /** CheckThrottlerResponse Check */ + Check?: (tabletmanagerdata.ICheckThrottlerResponse|null); } /** Represents a CheckThrottlerResponse. */ @@ -50457,26 +50442,11 @@ export namespace vtctldata { */ constructor(properties?: vtctldata.ICheckThrottlerResponse); - /** CheckThrottlerResponse status_code. */ - public status_code: number; - - /** CheckThrottlerResponse value. */ - public value: number; - - /** CheckThrottlerResponse threshold. */ - public threshold: number; - - /** CheckThrottlerResponse error. */ - public error: string; - - /** CheckThrottlerResponse message. */ - public message: string; - - /** CheckThrottlerResponse recently_checked. */ - public recently_checked: boolean; + /** CheckThrottlerResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); - /** CheckThrottlerResponse metrics. */ - public metrics: { [k: string]: vtctldata.CheckThrottlerResponse.IMetric }; + /** CheckThrottlerResponse Check. */ + public Check?: (tabletmanagerdata.ICheckThrottlerResponse|null); /** * Creates a new CheckThrottlerResponse instance using the specified properties. @@ -50556,142 +50526,6 @@ export namespace vtctldata { public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CheckThrottlerResponse { - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric name */ - name?: (string|null); - - /** Metric status_code */ - status_code?: (number|null); - - /** Metric value */ - value?: (number|null); - - /** Metric threshold */ - threshold?: (number|null); - - /** Metric error */ - error?: (string|null); - - /** Metric message */ - message?: (string|null); - - /** Metric scope */ - scope?: (string|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.CheckThrottlerResponse.IMetric); - - /** Metric name. */ - public name: string; - - /** Metric status_code. */ - public status_code: number; - - /** Metric value. */ - public value: number; - - /** Metric threshold. */ - public threshold: number; - - /** Metric error. */ - public error: string; - - /** Metric message. */ - public message: string; - - /** Metric scope. */ - public scope: string; - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: vtctldata.CheckThrottlerResponse.IMetric): vtctldata.CheckThrottlerResponse.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link vtctldata.CheckThrottlerResponse.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.CheckThrottlerResponse.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link vtctldata.CheckThrottlerResponse.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.CheckThrottlerResponse.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @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): vtctldata.CheckThrottlerResponse.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @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)): vtctldata.CheckThrottlerResponse.Metric; - - /** - * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): vtctldata.CheckThrottlerResponse.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.CheckThrottlerResponse.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - /** Properties of a CleanupSchemaMigrationRequest. */ interface ICleanupSchemaMigrationRequest { @@ -58860,59 +58694,8 @@ export namespace vtctldata { /** Properties of a GetThrottlerStatusResponse. */ interface IGetThrottlerStatusResponse { - /** GetThrottlerStatusResponse tablet_alias */ - tablet_alias?: (string|null); - - /** GetThrottlerStatusResponse keyspace */ - keyspace?: (string|null); - - /** GetThrottlerStatusResponse shard */ - shard?: (string|null); - - /** GetThrottlerStatusResponse is_leader */ - is_leader?: (boolean|null); - - /** GetThrottlerStatusResponse is_open */ - is_open?: (boolean|null); - - /** GetThrottlerStatusResponse is_enabled */ - is_enabled?: (boolean|null); - - /** GetThrottlerStatusResponse is_dormant */ - is_dormant?: (boolean|null); - - /** GetThrottlerStatusResponse lag_metric_query */ - lag_metric_query?: (string|null); - - /** GetThrottlerStatusResponse custom_metric_query */ - custom_metric_query?: (string|null); - - /** GetThrottlerStatusResponse default_threshold */ - default_threshold?: (number|null); - - /** GetThrottlerStatusResponse metric_name_used_as_default */ - metric_name_used_as_default?: (string|null); - - /** GetThrottlerStatusResponse aggregated_metrics */ - aggregated_metrics?: ({ [k: string]: vtctldata.GetThrottlerStatusResponse.IMetricResult }|null); - - /** GetThrottlerStatusResponse metric_thresholds */ - metric_thresholds?: ({ [k: string]: number }|null); - - /** GetThrottlerStatusResponse metrics_health */ - metrics_health?: ({ [k: string]: vtctldata.GetThrottlerStatusResponse.IMetricHealth }|null); - - /** GetThrottlerStatusResponse throttled_apps */ - throttled_apps?: ({ [k: string]: topodata.IThrottledAppRule }|null); - - /** GetThrottlerStatusResponse app_checked_metrics */ - app_checked_metrics?: ({ [k: string]: string }|null); - - /** GetThrottlerStatusResponse recently_checked */ - recently_checked?: (boolean|null); - - /** GetThrottlerStatusResponse recent_apps */ - recent_apps?: ({ [k: string]: vtctldata.GetThrottlerStatusResponse.IRecentApp }|null); + /** GetThrottlerStatusResponse status */ + status?: (tabletmanagerdata.IGetThrottlerStatusResponse|null); } /** Represents a GetThrottlerStatusResponse. */ @@ -58924,92 +58707,41 @@ export namespace vtctldata { */ constructor(properties?: vtctldata.IGetThrottlerStatusResponse); - /** GetThrottlerStatusResponse tablet_alias. */ - public tablet_alias: string; - - /** GetThrottlerStatusResponse keyspace. */ - public keyspace: string; + /** GetThrottlerStatusResponse status. */ + public status?: (tabletmanagerdata.IGetThrottlerStatusResponse|null); - /** GetThrottlerStatusResponse shard. */ - public shard: string; + /** + * Creates a new GetThrottlerStatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetThrottlerStatusResponse instance + */ + public static create(properties?: vtctldata.IGetThrottlerStatusResponse): vtctldata.GetThrottlerStatusResponse; - /** GetThrottlerStatusResponse is_leader. */ - public is_leader: boolean; + /** + * Encodes the specified GetThrottlerStatusResponse message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. + * @param message GetThrottlerStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.IGetThrottlerStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetThrottlerStatusResponse is_open. */ - public is_open: boolean; + /** + * Encodes the specified GetThrottlerStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. + * @param message GetThrottlerStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.IGetThrottlerStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetThrottlerStatusResponse is_enabled. */ - public is_enabled: boolean; - - /** GetThrottlerStatusResponse is_dormant. */ - public is_dormant: boolean; - - /** GetThrottlerStatusResponse lag_metric_query. */ - public lag_metric_query: string; - - /** GetThrottlerStatusResponse custom_metric_query. */ - public custom_metric_query: string; - - /** GetThrottlerStatusResponse default_threshold. */ - public default_threshold: number; - - /** GetThrottlerStatusResponse metric_name_used_as_default. */ - public metric_name_used_as_default: string; - - /** GetThrottlerStatusResponse aggregated_metrics. */ - public aggregated_metrics: { [k: string]: vtctldata.GetThrottlerStatusResponse.IMetricResult }; - - /** GetThrottlerStatusResponse metric_thresholds. */ - public metric_thresholds: { [k: string]: number }; - - /** GetThrottlerStatusResponse metrics_health. */ - public metrics_health: { [k: string]: vtctldata.GetThrottlerStatusResponse.IMetricHealth }; - - /** GetThrottlerStatusResponse throttled_apps. */ - public throttled_apps: { [k: string]: topodata.IThrottledAppRule }; - - /** GetThrottlerStatusResponse app_checked_metrics. */ - public app_checked_metrics: { [k: string]: string }; - - /** GetThrottlerStatusResponse recently_checked. */ - public recently_checked: boolean; - - /** GetThrottlerStatusResponse recent_apps. */ - public recent_apps: { [k: string]: vtctldata.GetThrottlerStatusResponse.IRecentApp }; - - /** - * Creates a new GetThrottlerStatusResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetThrottlerStatusResponse instance - */ - public static create(properties?: vtctldata.IGetThrottlerStatusResponse): vtctldata.GetThrottlerStatusResponse; - - /** - * Encodes the specified GetThrottlerStatusResponse message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. - * @param message GetThrottlerStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetThrottlerStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetThrottlerStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. - * @param message GetThrottlerStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetThrottlerStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetThrottlerStatusResponse - * @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): vtctldata.GetThrottlerStatusResponse; + /** + * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetThrottlerStatusResponse + * @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): vtctldata.GetThrottlerStatusResponse; /** * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer, length delimited. @@ -59056,318 +58788,6 @@ export namespace vtctldata { public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GetThrottlerStatusResponse { - - /** Properties of a MetricResult. */ - interface IMetricResult { - - /** MetricResult value */ - value?: (number|null); - - /** MetricResult error */ - error?: (string|null); - } - - /** Represents a MetricResult. */ - class MetricResult implements IMetricResult { - - /** - * Constructs a new MetricResult. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.GetThrottlerStatusResponse.IMetricResult); - - /** MetricResult value. */ - public value: number; - - /** MetricResult error. */ - public error: string; - - /** - * Creates a new MetricResult instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricResult instance - */ - public static create(properties?: vtctldata.GetThrottlerStatusResponse.IMetricResult): vtctldata.GetThrottlerStatusResponse.MetricResult; - - /** - * Encodes the specified MetricResult message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricResult.verify|verify} messages. - * @param message MetricResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.GetThrottlerStatusResponse.IMetricResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricResult message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricResult.verify|verify} messages. - * @param message MetricResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.GetThrottlerStatusResponse.IMetricResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricResult - * @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): vtctldata.GetThrottlerStatusResponse.MetricResult; - - /** - * Decodes a MetricResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricResult - * @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)): vtctldata.GetThrottlerStatusResponse.MetricResult; - - /** - * Verifies a MetricResult 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 MetricResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricResult - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetThrottlerStatusResponse.MetricResult; - - /** - * Creates a plain object from a MetricResult message. Also converts values to other types if specified. - * @param message MetricResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetThrottlerStatusResponse.MetricResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricHealth. */ - interface IMetricHealth { - - /** MetricHealth last_healthy_at */ - last_healthy_at?: (vttime.ITime|null); - - /** MetricHealth seconds_since_last_healthy */ - seconds_since_last_healthy?: (number|Long|null); - } - - /** Represents a MetricHealth. */ - class MetricHealth implements IMetricHealth { - - /** - * Constructs a new MetricHealth. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.GetThrottlerStatusResponse.IMetricHealth); - - /** MetricHealth last_healthy_at. */ - public last_healthy_at?: (vttime.ITime|null); - - /** MetricHealth seconds_since_last_healthy. */ - public seconds_since_last_healthy: (number|Long); - - /** - * Creates a new MetricHealth instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricHealth instance - */ - public static create(properties?: vtctldata.GetThrottlerStatusResponse.IMetricHealth): vtctldata.GetThrottlerStatusResponse.MetricHealth; - - /** - * Encodes the specified MetricHealth message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricHealth.verify|verify} messages. - * @param message MetricHealth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.GetThrottlerStatusResponse.IMetricHealth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricHealth message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricHealth.verify|verify} messages. - * @param message MetricHealth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.GetThrottlerStatusResponse.IMetricHealth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricHealth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricHealth - * @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): vtctldata.GetThrottlerStatusResponse.MetricHealth; - - /** - * Decodes a MetricHealth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricHealth - * @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)): vtctldata.GetThrottlerStatusResponse.MetricHealth; - - /** - * Verifies a MetricHealth 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 MetricHealth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricHealth - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetThrottlerStatusResponse.MetricHealth; - - /** - * Creates a plain object from a MetricHealth message. Also converts values to other types if specified. - * @param message MetricHealth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetThrottlerStatusResponse.MetricHealth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricHealth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricHealth - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecentApp. */ - interface IRecentApp { - - /** RecentApp checked_at */ - checked_at?: (vttime.ITime|null); - - /** RecentApp status_code */ - status_code?: (number|null); - } - - /** Represents a RecentApp. */ - class RecentApp implements IRecentApp { - - /** - * Constructs a new RecentApp. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.GetThrottlerStatusResponse.IRecentApp); - - /** RecentApp checked_at. */ - public checked_at?: (vttime.ITime|null); - - /** RecentApp status_code. */ - public status_code: number; - - /** - * Creates a new RecentApp instance using the specified properties. - * @param [properties] Properties to set - * @returns RecentApp instance - */ - public static create(properties?: vtctldata.GetThrottlerStatusResponse.IRecentApp): vtctldata.GetThrottlerStatusResponse.RecentApp; - - /** - * Encodes the specified RecentApp message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.RecentApp.verify|verify} messages. - * @param message RecentApp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.GetThrottlerStatusResponse.IRecentApp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecentApp message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.RecentApp.verify|verify} messages. - * @param message RecentApp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.GetThrottlerStatusResponse.IRecentApp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecentApp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecentApp - * @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): vtctldata.GetThrottlerStatusResponse.RecentApp; - - /** - * Decodes a RecentApp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecentApp - * @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)): vtctldata.GetThrottlerStatusResponse.RecentApp; - - /** - * Verifies a RecentApp 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 RecentApp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecentApp - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetThrottlerStatusResponse.RecentApp; - - /** - * Creates a plain object from a RecentApp message. Also converts values to other types if specified. - * @param message RecentApp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetThrottlerStatusResponse.RecentApp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecentApp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecentApp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - /** Properties of a GetTopologyPathRequest. */ interface IGetTopologyPathRequest { diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index f36e43dadec..9fd83e98430 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -124935,13 +124935,8 @@ export const vtctldata = $root.vtctldata = (() => { * Properties of a CheckThrottlerResponse. * @memberof vtctldata * @interface ICheckThrottlerResponse - * @property {number|null} [status_code] CheckThrottlerResponse status_code - * @property {number|null} [value] CheckThrottlerResponse value - * @property {number|null} [threshold] CheckThrottlerResponse threshold - * @property {string|null} [error] CheckThrottlerResponse error - * @property {string|null} [message] CheckThrottlerResponse message - * @property {boolean|null} [recently_checked] CheckThrottlerResponse recently_checked - * @property {Object.|null} [metrics] CheckThrottlerResponse metrics + * @property {topodata.ITabletAlias|null} [tablet_alias] CheckThrottlerResponse tablet_alias + * @property {tabletmanagerdata.ICheckThrottlerResponse|null} [Check] CheckThrottlerResponse Check */ /** @@ -124953,7 +124948,6 @@ export const vtctldata = $root.vtctldata = (() => { * @param {vtctldata.ICheckThrottlerResponse=} [properties] Properties to set */ function CheckThrottlerResponse(properties) { - this.metrics = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -124961,60 +124955,20 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * CheckThrottlerResponse status_code. - * @member {number} status_code - * @memberof vtctldata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.status_code = 0; - - /** - * CheckThrottlerResponse value. - * @member {number} value - * @memberof vtctldata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.value = 0; - - /** - * CheckThrottlerResponse threshold. - * @member {number} threshold - * @memberof vtctldata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.threshold = 0; - - /** - * CheckThrottlerResponse error. - * @member {string} error - * @memberof vtctldata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.error = ""; - - /** - * CheckThrottlerResponse message. - * @member {string} message - * @memberof vtctldata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.message = ""; - - /** - * CheckThrottlerResponse recently_checked. - * @member {boolean} recently_checked + * CheckThrottlerResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias * @memberof vtctldata.CheckThrottlerResponse * @instance */ - CheckThrottlerResponse.prototype.recently_checked = false; + CheckThrottlerResponse.prototype.tablet_alias = null; /** - * CheckThrottlerResponse metrics. - * @member {Object.} metrics + * CheckThrottlerResponse Check. + * @member {tabletmanagerdata.ICheckThrottlerResponse|null|undefined} Check * @memberof vtctldata.CheckThrottlerResponse * @instance */ - CheckThrottlerResponse.prototype.metrics = $util.emptyObject; + CheckThrottlerResponse.prototype.Check = null; /** * Creates a new CheckThrottlerResponse instance using the specified properties. @@ -125040,23 +124994,10 @@ export const vtctldata = $root.vtctldata = (() => { CheckThrottlerResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status_code); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.threshold); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.error); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.message); - if (message.recently_checked != null && Object.hasOwnProperty.call(message, "recently_checked")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.recently_checked); - if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) - for (let keys = Object.keys(message.metrics), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.CheckThrottlerResponse.Metric.encode(message.metrics[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.Check != null && Object.hasOwnProperty.call(message, "Check")) + $root.tabletmanagerdata.CheckThrottlerResponse.encode(message.Check, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -125087,55 +125028,16 @@ export const vtctldata = $root.vtctldata = (() => { CheckThrottlerResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CheckThrottlerResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CheckThrottlerResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.status_code = reader.int32(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; } case 2: { - message.value = reader.double(); - break; - } - case 3: { - message.threshold = reader.double(); - break; - } - case 4: { - message.error = reader.string(); - break; - } - case 5: { - message.message = reader.string(); - break; - } - case 6: { - message.recently_checked = reader.bool(); - break; - } - case 7: { - if (message.metrics === $util.emptyObject) - message.metrics = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.CheckThrottlerResponse.Metric.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metrics[key] = value; + message.Check = $root.tabletmanagerdata.CheckThrottlerResponse.decode(reader, reader.uint32()); break; } default: @@ -125173,33 +125075,15 @@ export const vtctldata = $root.vtctldata = (() => { CheckThrottlerResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (typeof message.threshold !== "number") - return "threshold: number expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.recently_checked != null && message.hasOwnProperty("recently_checked")) - if (typeof message.recently_checked !== "boolean") - return "recently_checked: boolean expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!$util.isObject(message.metrics)) - return "metrics: object expected"; - let key = Object.keys(message.metrics); - for (let i = 0; i < key.length; ++i) { - let error = $root.vtctldata.CheckThrottlerResponse.Metric.verify(message.metrics[key[i]]); - if (error) - return "metrics." + error; - } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.Check != null && message.hasOwnProperty("Check")) { + let error = $root.tabletmanagerdata.CheckThrottlerResponse.verify(message.Check); + if (error) + return "Check." + error; } return null; }; @@ -125216,27 +125100,15 @@ export const vtctldata = $root.vtctldata = (() => { if (object instanceof $root.vtctldata.CheckThrottlerResponse) return object; let message = new $root.vtctldata.CheckThrottlerResponse(); - if (object.status_code != null) - message.status_code = object.status_code | 0; - if (object.value != null) - message.value = Number(object.value); - if (object.threshold != null) - message.threshold = Number(object.threshold); - if (object.error != null) - message.error = String(object.error); - if (object.message != null) - message.message = String(object.message); - if (object.recently_checked != null) - message.recently_checked = Boolean(object.recently_checked); - if (object.metrics) { - if (typeof object.metrics !== "object") - throw TypeError(".vtctldata.CheckThrottlerResponse.metrics: object expected"); - message.metrics = {}; - for (let keys = Object.keys(object.metrics), i = 0; i < keys.length; ++i) { - if (typeof object.metrics[keys[i]] !== "object") - throw TypeError(".vtctldata.CheckThrottlerResponse.metrics: object expected"); - message.metrics[keys[i]] = $root.vtctldata.CheckThrottlerResponse.Metric.fromObject(object.metrics[keys[i]]); - } + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.CheckThrottlerResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.Check != null) { + if (typeof object.Check !== "object") + throw TypeError(".vtctldata.CheckThrottlerResponse.Check: object expected"); + message.Check = $root.tabletmanagerdata.CheckThrottlerResponse.fromObject(object.Check); } return message; }; @@ -125254,34 +125126,14 @@ export const vtctldata = $root.vtctldata = (() => { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.metrics = {}; if (options.defaults) { - object.status_code = 0; - object.value = 0; - object.threshold = 0; - object.error = ""; - object.message = ""; - object.recently_checked = false; - } - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.recently_checked != null && message.hasOwnProperty("recently_checked")) - object.recently_checked = message.recently_checked; - let keys2; - if (message.metrics && (keys2 = Object.keys(message.metrics)).length) { - object.metrics = {}; - for (let j = 0; j < keys2.length; ++j) - object.metrics[keys2[j]] = $root.vtctldata.CheckThrottlerResponse.Metric.toObject(message.metrics[keys2[j]], options); + object.tablet_alias = null; + object.Check = null; } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.Check != null && message.hasOwnProperty("Check")) + object.Check = $root.tabletmanagerdata.CheckThrottlerResponse.toObject(message.Check, options); return object; }; @@ -125311,1500 +125163,118 @@ export const vtctldata = $root.vtctldata = (() => { return typeUrlPrefix + "/vtctldata.CheckThrottlerResponse"; }; - CheckThrottlerResponse.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof vtctldata.CheckThrottlerResponse - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {number|null} [status_code] Metric status_code - * @property {number|null} [value] Metric value - * @property {number|null} [threshold] Metric threshold - * @property {string|null} [error] Metric error - * @property {string|null} [message] Metric message - * @property {string|null} [scope] Metric scope - */ + return CheckThrottlerResponse; + })(); - /** - * Constructs a new Metric. - * @memberof vtctldata.CheckThrottlerResponse - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {vtctldata.CheckThrottlerResponse.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + vtctldata.CleanupSchemaMigrationRequest = (function() { - /** - * Metric name. - * @member {string} name - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.name = ""; + /** + * Properties of a CleanupSchemaMigrationRequest. + * @memberof vtctldata + * @interface ICleanupSchemaMigrationRequest + * @property {string|null} [keyspace] CleanupSchemaMigrationRequest keyspace + * @property {string|null} [uuid] CleanupSchemaMigrationRequest uuid + */ - /** - * Metric status_code. - * @member {number} status_code - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.status_code = 0; - - /** - * Metric value. - * @member {number} value - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.value = 0; - - /** - * Metric threshold. - * @member {number} threshold - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.threshold = 0; - - /** - * Metric error. - * @member {string} error - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.error = ""; - - /** - * Metric message. - * @member {string} message - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.message = ""; - - /** - * Metric scope. - * @member {string} scope - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.scope = ""; - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {vtctldata.CheckThrottlerResponse.IMetric=} [properties] Properties to set - * @returns {vtctldata.CheckThrottlerResponse.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link vtctldata.CheckThrottlerResponse.Metric.verify|verify} messages. - * @function encode - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {vtctldata.CheckThrottlerResponse.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status_code); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.value); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.threshold); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.error); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.scope); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link vtctldata.CheckThrottlerResponse.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {vtctldata.CheckThrottlerResponse.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CheckThrottlerResponse.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CheckThrottlerResponse.Metric(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.status_code = reader.int32(); - break; - } - case 3: { - message.value = reader.double(); - break; - } - case 4: { - message.threshold = reader.double(); - break; - } - case 5: { - message.error = reader.string(); - break; - } - case 6: { - message.message = reader.string(); - break; - } - case 7: { - message.scope = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CheckThrottlerResponse.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metric message. - * @function verify - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (typeof message.threshold !== "number") - return "threshold: number expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - if (!$util.isString(message.scope)) - return "scope: string expected"; - return null; - }; - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CheckThrottlerResponse.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CheckThrottlerResponse.Metric) - return object; - let message = new $root.vtctldata.CheckThrottlerResponse.Metric(); - if (object.name != null) - message.name = String(object.name); - if (object.status_code != null) - message.status_code = object.status_code | 0; - if (object.value != null) - message.value = Number(object.value); - if (object.threshold != null) - message.threshold = Number(object.threshold); - if (object.error != null) - message.error = String(object.error); - if (object.message != null) - message.message = String(object.message); - if (object.scope != null) - message.scope = String(object.scope); - return message; - }; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {vtctldata.CheckThrottlerResponse.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.status_code = 0; - object.value = 0; - object.threshold = 0; - object.error = ""; - object.message = ""; - object.scope = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = message.scope; - return object; - }; - - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof vtctldata.CheckThrottlerResponse.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.CheckThrottlerResponse.Metric"; - }; - - return Metric; - })(); - - return CheckThrottlerResponse; - })(); - - vtctldata.CleanupSchemaMigrationRequest = (function() { - - /** - * Properties of a CleanupSchemaMigrationRequest. - * @memberof vtctldata - * @interface ICleanupSchemaMigrationRequest - * @property {string|null} [keyspace] CleanupSchemaMigrationRequest keyspace - * @property {string|null} [uuid] CleanupSchemaMigrationRequest uuid - */ - - /** - * Constructs a new CleanupSchemaMigrationRequest. - * @memberof vtctldata - * @classdesc Represents a CleanupSchemaMigrationRequest. - * @implements ICleanupSchemaMigrationRequest - * @constructor - * @param {vtctldata.ICleanupSchemaMigrationRequest=} [properties] Properties to set - */ - function CleanupSchemaMigrationRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CleanupSchemaMigrationRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @instance - */ - CleanupSchemaMigrationRequest.prototype.keyspace = ""; - - /** - * CleanupSchemaMigrationRequest uuid. - * @member {string} uuid - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @instance - */ - CleanupSchemaMigrationRequest.prototype.uuid = ""; - - /** - * Creates a new CleanupSchemaMigrationRequest instance using the specified properties. - * @function create - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {vtctldata.ICleanupSchemaMigrationRequest=} [properties] Properties to set - * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest instance - */ - CleanupSchemaMigrationRequest.create = function create(properties) { - return new CleanupSchemaMigrationRequest(properties); - }; - - /** - * Encodes the specified CleanupSchemaMigrationRequest message. Does not implicitly {@link vtctldata.CleanupSchemaMigrationRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {vtctldata.ICleanupSchemaMigrationRequest} message CleanupSchemaMigrationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupSchemaMigrationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); - return writer; - }; - - /** - * Encodes the specified CleanupSchemaMigrationRequest message, length delimited. Does not implicitly {@link vtctldata.CleanupSchemaMigrationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {vtctldata.ICleanupSchemaMigrationRequest} message CleanupSchemaMigrationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupSchemaMigrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CleanupSchemaMigrationRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupSchemaMigrationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CleanupSchemaMigrationRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.uuid = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CleanupSchemaMigrationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupSchemaMigrationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CleanupSchemaMigrationRequest message. - * @function verify - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CleanupSchemaMigrationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: string expected"; - return null; - }; - - /** - * Creates a CleanupSchemaMigrationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest - */ - CleanupSchemaMigrationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CleanupSchemaMigrationRequest) - return object; - let message = new $root.vtctldata.CleanupSchemaMigrationRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.uuid != null) - message.uuid = String(object.uuid); - return message; - }; - - /** - * Creates a plain object from a CleanupSchemaMigrationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {vtctldata.CleanupSchemaMigrationRequest} message CleanupSchemaMigrationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CleanupSchemaMigrationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.keyspace = ""; - object.uuid = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; - return object; - }; - - /** - * Converts this CleanupSchemaMigrationRequest to JSON. - * @function toJSON - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @instance - * @returns {Object.} JSON object - */ - CleanupSchemaMigrationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CleanupSchemaMigrationRequest - * @function getTypeUrl - * @memberof vtctldata.CleanupSchemaMigrationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CleanupSchemaMigrationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.CleanupSchemaMigrationRequest"; - }; - - return CleanupSchemaMigrationRequest; - })(); - - vtctldata.CleanupSchemaMigrationResponse = (function() { - - /** - * Properties of a CleanupSchemaMigrationResponse. - * @memberof vtctldata - * @interface ICleanupSchemaMigrationResponse - * @property {Object.|null} [rows_affected_by_shard] CleanupSchemaMigrationResponse rows_affected_by_shard - */ - - /** - * Constructs a new CleanupSchemaMigrationResponse. - * @memberof vtctldata - * @classdesc Represents a CleanupSchemaMigrationResponse. - * @implements ICleanupSchemaMigrationResponse - * @constructor - * @param {vtctldata.ICleanupSchemaMigrationResponse=} [properties] Properties to set - */ - function CleanupSchemaMigrationResponse(properties) { - this.rows_affected_by_shard = {}; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CleanupSchemaMigrationResponse rows_affected_by_shard. - * @member {Object.} rows_affected_by_shard - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @instance - */ - CleanupSchemaMigrationResponse.prototype.rows_affected_by_shard = $util.emptyObject; - - /** - * Creates a new CleanupSchemaMigrationResponse instance using the specified properties. - * @function create - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {vtctldata.ICleanupSchemaMigrationResponse=} [properties] Properties to set - * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse instance - */ - CleanupSchemaMigrationResponse.create = function create(properties) { - return new CleanupSchemaMigrationResponse(properties); - }; - - /** - * Encodes the specified CleanupSchemaMigrationResponse message. Does not implicitly {@link vtctldata.CleanupSchemaMigrationResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {vtctldata.ICleanupSchemaMigrationResponse} message CleanupSchemaMigrationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupSchemaMigrationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rows_affected_by_shard != null && Object.hasOwnProperty.call(message, "rows_affected_by_shard")) - for (let keys = Object.keys(message.rows_affected_by_shard), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected_by_shard[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified CleanupSchemaMigrationResponse message, length delimited. Does not implicitly {@link vtctldata.CleanupSchemaMigrationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {vtctldata.ICleanupSchemaMigrationResponse} message CleanupSchemaMigrationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupSchemaMigrationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CleanupSchemaMigrationResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupSchemaMigrationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CleanupSchemaMigrationResponse(), key, value; - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.rows_affected_by_shard === $util.emptyObject) - message.rows_affected_by_shard = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.uint64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.rows_affected_by_shard[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CleanupSchemaMigrationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupSchemaMigrationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CleanupSchemaMigrationResponse message. - * @function verify - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CleanupSchemaMigrationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rows_affected_by_shard != null && message.hasOwnProperty("rows_affected_by_shard")) { - if (!$util.isObject(message.rows_affected_by_shard)) - return "rows_affected_by_shard: object expected"; - let key = Object.keys(message.rows_affected_by_shard); - for (let i = 0; i < key.length; ++i) - if (!$util.isInteger(message.rows_affected_by_shard[key[i]]) && !(message.rows_affected_by_shard[key[i]] && $util.isInteger(message.rows_affected_by_shard[key[i]].low) && $util.isInteger(message.rows_affected_by_shard[key[i]].high))) - return "rows_affected_by_shard: integer|Long{k:string} expected"; - } - return null; - }; - - /** - * Creates a CleanupSchemaMigrationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse - */ - CleanupSchemaMigrationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CleanupSchemaMigrationResponse) - return object; - let message = new $root.vtctldata.CleanupSchemaMigrationResponse(); - if (object.rows_affected_by_shard) { - if (typeof object.rows_affected_by_shard !== "object") - throw TypeError(".vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard: object expected"); - message.rows_affected_by_shard = {}; - for (let keys = Object.keys(object.rows_affected_by_shard), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.rows_affected_by_shard[keys[i]] = $util.Long.fromValue(object.rows_affected_by_shard[keys[i]])).unsigned = true; - else if (typeof object.rows_affected_by_shard[keys[i]] === "string") - message.rows_affected_by_shard[keys[i]] = parseInt(object.rows_affected_by_shard[keys[i]], 10); - else if (typeof object.rows_affected_by_shard[keys[i]] === "number") - message.rows_affected_by_shard[keys[i]] = object.rows_affected_by_shard[keys[i]]; - else if (typeof object.rows_affected_by_shard[keys[i]] === "object") - message.rows_affected_by_shard[keys[i]] = new $util.LongBits(object.rows_affected_by_shard[keys[i]].low >>> 0, object.rows_affected_by_shard[keys[i]].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a CleanupSchemaMigrationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {vtctldata.CleanupSchemaMigrationResponse} message CleanupSchemaMigrationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CleanupSchemaMigrationResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.objects || options.defaults) - object.rows_affected_by_shard = {}; - let keys2; - if (message.rows_affected_by_shard && (keys2 = Object.keys(message.rows_affected_by_shard)).length) { - object.rows_affected_by_shard = {}; - for (let j = 0; j < keys2.length; ++j) - if (typeof message.rows_affected_by_shard[keys2[j]] === "number") - object.rows_affected_by_shard[keys2[j]] = options.longs === String ? String(message.rows_affected_by_shard[keys2[j]]) : message.rows_affected_by_shard[keys2[j]]; - else - object.rows_affected_by_shard[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected_by_shard[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.rows_affected_by_shard[keys2[j]].low >>> 0, message.rows_affected_by_shard[keys2[j]].high >>> 0).toNumber(true) : message.rows_affected_by_shard[keys2[j]]; - } - return object; - }; - - /** - * Converts this CleanupSchemaMigrationResponse to JSON. - * @function toJSON - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @instance - * @returns {Object.} JSON object - */ - CleanupSchemaMigrationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CleanupSchemaMigrationResponse - * @function getTypeUrl - * @memberof vtctldata.CleanupSchemaMigrationResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CleanupSchemaMigrationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.CleanupSchemaMigrationResponse"; - }; - - return CleanupSchemaMigrationResponse; - })(); - - vtctldata.CompleteSchemaMigrationRequest = (function() { - - /** - * Properties of a CompleteSchemaMigrationRequest. - * @memberof vtctldata - * @interface ICompleteSchemaMigrationRequest - * @property {string|null} [keyspace] CompleteSchemaMigrationRequest keyspace - * @property {string|null} [uuid] CompleteSchemaMigrationRequest uuid - */ - - /** - * Constructs a new CompleteSchemaMigrationRequest. - * @memberof vtctldata - * @classdesc Represents a CompleteSchemaMigrationRequest. - * @implements ICompleteSchemaMigrationRequest - * @constructor - * @param {vtctldata.ICompleteSchemaMigrationRequest=} [properties] Properties to set - */ - function CompleteSchemaMigrationRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompleteSchemaMigrationRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @instance - */ - CompleteSchemaMigrationRequest.prototype.keyspace = ""; - - /** - * CompleteSchemaMigrationRequest uuid. - * @member {string} uuid - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @instance - */ - CompleteSchemaMigrationRequest.prototype.uuid = ""; - - /** - * Creates a new CompleteSchemaMigrationRequest instance using the specified properties. - * @function create - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {vtctldata.ICompleteSchemaMigrationRequest=} [properties] Properties to set - * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest instance - */ - CompleteSchemaMigrationRequest.create = function create(properties) { - return new CompleteSchemaMigrationRequest(properties); - }; - - /** - * Encodes the specified CompleteSchemaMigrationRequest message. Does not implicitly {@link vtctldata.CompleteSchemaMigrationRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {vtctldata.ICompleteSchemaMigrationRequest} message CompleteSchemaMigrationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteSchemaMigrationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); - return writer; - }; - - /** - * Encodes the specified CompleteSchemaMigrationRequest message, length delimited. Does not implicitly {@link vtctldata.CompleteSchemaMigrationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {vtctldata.ICompleteSchemaMigrationRequest} message CompleteSchemaMigrationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteSchemaMigrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompleteSchemaMigrationRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteSchemaMigrationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CompleteSchemaMigrationRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.uuid = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompleteSchemaMigrationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteSchemaMigrationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteSchemaMigrationRequest message. - * @function verify - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteSchemaMigrationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: string expected"; - return null; - }; - - /** - * Creates a CompleteSchemaMigrationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest - */ - CompleteSchemaMigrationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CompleteSchemaMigrationRequest) - return object; - let message = new $root.vtctldata.CompleteSchemaMigrationRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.uuid != null) - message.uuid = String(object.uuid); - return message; - }; - - /** - * Creates a plain object from a CompleteSchemaMigrationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {vtctldata.CompleteSchemaMigrationRequest} message CompleteSchemaMigrationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteSchemaMigrationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.keyspace = ""; - object.uuid = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; - return object; - }; - - /** - * Converts this CompleteSchemaMigrationRequest to JSON. - * @function toJSON - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @instance - * @returns {Object.} JSON object - */ - CompleteSchemaMigrationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompleteSchemaMigrationRequest - * @function getTypeUrl - * @memberof vtctldata.CompleteSchemaMigrationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteSchemaMigrationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.CompleteSchemaMigrationRequest"; - }; - - return CompleteSchemaMigrationRequest; - })(); - - vtctldata.CompleteSchemaMigrationResponse = (function() { - - /** - * Properties of a CompleteSchemaMigrationResponse. - * @memberof vtctldata - * @interface ICompleteSchemaMigrationResponse - * @property {Object.|null} [rows_affected_by_shard] CompleteSchemaMigrationResponse rows_affected_by_shard - */ - - /** - * Constructs a new CompleteSchemaMigrationResponse. - * @memberof vtctldata - * @classdesc Represents a CompleteSchemaMigrationResponse. - * @implements ICompleteSchemaMigrationResponse - * @constructor - * @param {vtctldata.ICompleteSchemaMigrationResponse=} [properties] Properties to set - */ - function CompleteSchemaMigrationResponse(properties) { - this.rows_affected_by_shard = {}; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompleteSchemaMigrationResponse rows_affected_by_shard. - * @member {Object.} rows_affected_by_shard - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @instance - */ - CompleteSchemaMigrationResponse.prototype.rows_affected_by_shard = $util.emptyObject; - - /** - * Creates a new CompleteSchemaMigrationResponse instance using the specified properties. - * @function create - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {vtctldata.ICompleteSchemaMigrationResponse=} [properties] Properties to set - * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse instance - */ - CompleteSchemaMigrationResponse.create = function create(properties) { - return new CompleteSchemaMigrationResponse(properties); - }; - - /** - * Encodes the specified CompleteSchemaMigrationResponse message. Does not implicitly {@link vtctldata.CompleteSchemaMigrationResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {vtctldata.ICompleteSchemaMigrationResponse} message CompleteSchemaMigrationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteSchemaMigrationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rows_affected_by_shard != null && Object.hasOwnProperty.call(message, "rows_affected_by_shard")) - for (let keys = Object.keys(message.rows_affected_by_shard), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected_by_shard[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompleteSchemaMigrationResponse message, length delimited. Does not implicitly {@link vtctldata.CompleteSchemaMigrationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {vtctldata.ICompleteSchemaMigrationResponse} message CompleteSchemaMigrationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteSchemaMigrationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompleteSchemaMigrationResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteSchemaMigrationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CompleteSchemaMigrationResponse(), key, value; - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.rows_affected_by_shard === $util.emptyObject) - message.rows_affected_by_shard = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.uint64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.rows_affected_by_shard[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompleteSchemaMigrationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteSchemaMigrationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteSchemaMigrationResponse message. - * @function verify - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteSchemaMigrationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rows_affected_by_shard != null && message.hasOwnProperty("rows_affected_by_shard")) { - if (!$util.isObject(message.rows_affected_by_shard)) - return "rows_affected_by_shard: object expected"; - let key = Object.keys(message.rows_affected_by_shard); - for (let i = 0; i < key.length; ++i) - if (!$util.isInteger(message.rows_affected_by_shard[key[i]]) && !(message.rows_affected_by_shard[key[i]] && $util.isInteger(message.rows_affected_by_shard[key[i]].low) && $util.isInteger(message.rows_affected_by_shard[key[i]].high))) - return "rows_affected_by_shard: integer|Long{k:string} expected"; - } - return null; - }; - - /** - * Creates a CompleteSchemaMigrationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse - */ - CompleteSchemaMigrationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CompleteSchemaMigrationResponse) - return object; - let message = new $root.vtctldata.CompleteSchemaMigrationResponse(); - if (object.rows_affected_by_shard) { - if (typeof object.rows_affected_by_shard !== "object") - throw TypeError(".vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard: object expected"); - message.rows_affected_by_shard = {}; - for (let keys = Object.keys(object.rows_affected_by_shard), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.rows_affected_by_shard[keys[i]] = $util.Long.fromValue(object.rows_affected_by_shard[keys[i]])).unsigned = true; - else if (typeof object.rows_affected_by_shard[keys[i]] === "string") - message.rows_affected_by_shard[keys[i]] = parseInt(object.rows_affected_by_shard[keys[i]], 10); - else if (typeof object.rows_affected_by_shard[keys[i]] === "number") - message.rows_affected_by_shard[keys[i]] = object.rows_affected_by_shard[keys[i]]; - else if (typeof object.rows_affected_by_shard[keys[i]] === "object") - message.rows_affected_by_shard[keys[i]] = new $util.LongBits(object.rows_affected_by_shard[keys[i]].low >>> 0, object.rows_affected_by_shard[keys[i]].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a CompleteSchemaMigrationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {vtctldata.CompleteSchemaMigrationResponse} message CompleteSchemaMigrationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteSchemaMigrationResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.objects || options.defaults) - object.rows_affected_by_shard = {}; - let keys2; - if (message.rows_affected_by_shard && (keys2 = Object.keys(message.rows_affected_by_shard)).length) { - object.rows_affected_by_shard = {}; - for (let j = 0; j < keys2.length; ++j) - if (typeof message.rows_affected_by_shard[keys2[j]] === "number") - object.rows_affected_by_shard[keys2[j]] = options.longs === String ? String(message.rows_affected_by_shard[keys2[j]]) : message.rows_affected_by_shard[keys2[j]]; - else - object.rows_affected_by_shard[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected_by_shard[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.rows_affected_by_shard[keys2[j]].low >>> 0, message.rows_affected_by_shard[keys2[j]].high >>> 0).toNumber(true) : message.rows_affected_by_shard[keys2[j]]; - } - return object; - }; - - /** - * Converts this CompleteSchemaMigrationResponse to JSON. - * @function toJSON - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @instance - * @returns {Object.} JSON object - */ - CompleteSchemaMigrationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompleteSchemaMigrationResponse - * @function getTypeUrl - * @memberof vtctldata.CompleteSchemaMigrationResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteSchemaMigrationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.CompleteSchemaMigrationResponse"; - }; - - return CompleteSchemaMigrationResponse; - })(); - - vtctldata.CreateKeyspaceRequest = (function() { - - /** - * Properties of a CreateKeyspaceRequest. - * @memberof vtctldata - * @interface ICreateKeyspaceRequest - * @property {string|null} [name] CreateKeyspaceRequest name - * @property {boolean|null} [force] CreateKeyspaceRequest force - * @property {boolean|null} [allow_empty_v_schema] CreateKeyspaceRequest allow_empty_v_schema - * @property {topodata.KeyspaceType|null} [type] CreateKeyspaceRequest type - * @property {string|null} [base_keyspace] CreateKeyspaceRequest base_keyspace - * @property {vttime.ITime|null} [snapshot_time] CreateKeyspaceRequest snapshot_time - * @property {string|null} [durability_policy] CreateKeyspaceRequest durability_policy - * @property {string|null} [sidecar_db_name] CreateKeyspaceRequest sidecar_db_name - */ - - /** - * Constructs a new CreateKeyspaceRequest. - * @memberof vtctldata - * @classdesc Represents a CreateKeyspaceRequest. - * @implements ICreateKeyspaceRequest - * @constructor - * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set - */ - function CreateKeyspaceRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateKeyspaceRequest name. - * @member {string} name - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.name = ""; - - /** - * CreateKeyspaceRequest force. - * @member {boolean} force - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.force = false; - - /** - * CreateKeyspaceRequest allow_empty_v_schema. - * @member {boolean} allow_empty_v_schema - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.allow_empty_v_schema = false; - - /** - * CreateKeyspaceRequest type. - * @member {topodata.KeyspaceType} type - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.type = 0; - - /** - * CreateKeyspaceRequest base_keyspace. - * @member {string} base_keyspace - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.base_keyspace = ""; - - /** - * CreateKeyspaceRequest snapshot_time. - * @member {vttime.ITime|null|undefined} snapshot_time - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.snapshot_time = null; + /** + * Constructs a new CleanupSchemaMigrationRequest. + * @memberof vtctldata + * @classdesc Represents a CleanupSchemaMigrationRequest. + * @implements ICleanupSchemaMigrationRequest + * @constructor + * @param {vtctldata.ICleanupSchemaMigrationRequest=} [properties] Properties to set + */ + function CleanupSchemaMigrationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * CreateKeyspaceRequest durability_policy. - * @member {string} durability_policy - * @memberof vtctldata.CreateKeyspaceRequest + * CleanupSchemaMigrationRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.CleanupSchemaMigrationRequest * @instance */ - CreateKeyspaceRequest.prototype.durability_policy = ""; + CleanupSchemaMigrationRequest.prototype.keyspace = ""; /** - * CreateKeyspaceRequest sidecar_db_name. - * @member {string} sidecar_db_name - * @memberof vtctldata.CreateKeyspaceRequest + * CleanupSchemaMigrationRequest uuid. + * @member {string} uuid + * @memberof vtctldata.CleanupSchemaMigrationRequest * @instance */ - CreateKeyspaceRequest.prototype.sidecar_db_name = ""; + CleanupSchemaMigrationRequest.prototype.uuid = ""; /** - * Creates a new CreateKeyspaceRequest instance using the specified properties. + * Creates a new CleanupSchemaMigrationRequest instance using the specified properties. * @function create - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static - * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest instance + * @param {vtctldata.ICleanupSchemaMigrationRequest=} [properties] Properties to set + * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest instance */ - CreateKeyspaceRequest.create = function create(properties) { - return new CreateKeyspaceRequest(properties); + CleanupSchemaMigrationRequest.create = function create(properties) { + return new CleanupSchemaMigrationRequest(properties); }; /** - * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. + * Encodes the specified CleanupSchemaMigrationRequest message. Does not implicitly {@link vtctldata.CleanupSchemaMigrationRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static - * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode + * @param {vtctldata.ICleanupSchemaMigrationRequest} message CleanupSchemaMigrationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceRequest.encode = function encode(message, writer) { + CleanupSchemaMigrationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - if (message.allow_empty_v_schema != null && Object.hasOwnProperty.call(message, "allow_empty_v_schema")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_empty_v_schema); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.base_keyspace); - if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) - $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.durability_policy != null && Object.hasOwnProperty.call(message, "durability_policy")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.durability_policy); - if (message.sidecar_db_name != null && Object.hasOwnProperty.call(message, "sidecar_db_name")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.sidecar_db_name); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); return writer; }; /** - * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. + * Encodes the specified CleanupSchemaMigrationRequest message, length delimited. Does not implicitly {@link vtctldata.CleanupSchemaMigrationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static - * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode + * @param {vtctldata.ICleanupSchemaMigrationRequest} message CleanupSchemaMigrationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + CleanupSchemaMigrationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. + * Decodes a CleanupSchemaMigrationRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest + * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceRequest.decode = function decode(reader, length) { + CleanupSchemaMigrationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CleanupSchemaMigrationRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.keyspace = reader.string(); break; } case 2: { - message.force = reader.bool(); - break; - } - case 3: { - message.allow_empty_v_schema = reader.bool(); - break; - } - case 7: { - message.type = reader.int32(); - break; - } - case 8: { - message.base_keyspace = reader.string(); - break; - } - case 9: { - message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - } - case 10: { - message.durability_policy = reader.string(); - break; - } - case 11: { - message.sidecar_db_name = reader.string(); + message.uuid = reader.string(); break; } default: @@ -126816,203 +125286,132 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a CleanupSchemaMigrationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest + * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + CleanupSchemaMigrationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateKeyspaceRequest message. + * Verifies a CleanupSchemaMigrationRequest message. * @function verify - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateKeyspaceRequest.verify = function verify(message) { + CleanupSchemaMigrationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) - if (typeof message.allow_empty_v_schema !== "boolean") - return "allow_empty_v_schema: boolean expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - if (!$util.isString(message.base_keyspace)) - return "base_keyspace: string expected"; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { - let error = $root.vttime.Time.verify(message.snapshot_time); - if (error) - return "snapshot_time." + error; - } - if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) - if (!$util.isString(message.durability_policy)) - return "durability_policy: string expected"; - if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) - if (!$util.isString(message.sidecar_db_name)) - return "sidecar_db_name: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; return null; }; /** - * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CleanupSchemaMigrationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest + * @returns {vtctldata.CleanupSchemaMigrationRequest} CleanupSchemaMigrationRequest */ - CreateKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateKeyspaceRequest) + CleanupSchemaMigrationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CleanupSchemaMigrationRequest) return object; - let message = new $root.vtctldata.CreateKeyspaceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.allow_empty_v_schema != null) - message.allow_empty_v_schema = Boolean(object.allow_empty_v_schema); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "NORMAL": - case 0: - message.type = 0; - break; - case "SNAPSHOT": - case 1: - message.type = 1; - break; - } - if (object.base_keyspace != null) - message.base_keyspace = String(object.base_keyspace); - if (object.snapshot_time != null) { - if (typeof object.snapshot_time !== "object") - throw TypeError(".vtctldata.CreateKeyspaceRequest.snapshot_time: object expected"); - message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); - } - if (object.durability_policy != null) - message.durability_policy = String(object.durability_policy); - if (object.sidecar_db_name != null) - message.sidecar_db_name = String(object.sidecar_db_name); + let message = new $root.vtctldata.CleanupSchemaMigrationRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.uuid != null) + message.uuid = String(object.uuid); return message; }; /** - * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a CleanupSchemaMigrationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static - * @param {vtctldata.CreateKeyspaceRequest} message CreateKeyspaceRequest + * @param {vtctldata.CleanupSchemaMigrationRequest} message CleanupSchemaMigrationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateKeyspaceRequest.toObject = function toObject(message, options) { + CleanupSchemaMigrationRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { - object.name = ""; - object.force = false; - object.allow_empty_v_schema = false; - object.type = options.enums === String ? "NORMAL" : 0; - object.base_keyspace = ""; - object.snapshot_time = null; - object.durability_policy = ""; - object.sidecar_db_name = ""; + object.keyspace = ""; + object.uuid = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) - object.allow_empty_v_schema = message.allow_empty_v_schema; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.topodata.KeyspaceType[message.type] === undefined ? message.type : $root.topodata.KeyspaceType[message.type] : message.type; - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - object.base_keyspace = message.base_keyspace; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) - object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); - if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) - object.durability_policy = message.durability_policy; - if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) - object.sidecar_db_name = message.sidecar_db_name; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; return object; }; /** - * Converts this CreateKeyspaceRequest to JSON. + * Converts this CleanupSchemaMigrationRequest to JSON. * @function toJSON - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @instance * @returns {Object.} JSON object */ - CreateKeyspaceRequest.prototype.toJSON = function toJSON() { + CleanupSchemaMigrationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateKeyspaceRequest + * Gets the default type url for CleanupSchemaMigrationRequest * @function getTypeUrl - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.CleanupSchemaMigrationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CleanupSchemaMigrationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.CreateKeyspaceRequest"; + return typeUrlPrefix + "/vtctldata.CleanupSchemaMigrationRequest"; }; - return CreateKeyspaceRequest; + return CleanupSchemaMigrationRequest; })(); - vtctldata.CreateKeyspaceResponse = (function() { + vtctldata.CleanupSchemaMigrationResponse = (function() { /** - * Properties of a CreateKeyspaceResponse. + * Properties of a CleanupSchemaMigrationResponse. * @memberof vtctldata - * @interface ICreateKeyspaceResponse - * @property {vtctldata.IKeyspace|null} [keyspace] CreateKeyspaceResponse keyspace + * @interface ICleanupSchemaMigrationResponse + * @property {Object.|null} [rows_affected_by_shard] CleanupSchemaMigrationResponse rows_affected_by_shard */ /** - * Constructs a new CreateKeyspaceResponse. + * Constructs a new CleanupSchemaMigrationResponse. * @memberof vtctldata - * @classdesc Represents a CreateKeyspaceResponse. - * @implements ICreateKeyspaceResponse + * @classdesc Represents a CleanupSchemaMigrationResponse. + * @implements ICleanupSchemaMigrationResponse * @constructor - * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.ICleanupSchemaMigrationResponse=} [properties] Properties to set */ - function CreateKeyspaceResponse(properties) { + function CleanupSchemaMigrationResponse(properties) { + this.rows_affected_by_shard = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127020,75 +125419,95 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * CreateKeyspaceResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.CreateKeyspaceResponse + * CleanupSchemaMigrationResponse rows_affected_by_shard. + * @member {Object.} rows_affected_by_shard + * @memberof vtctldata.CleanupSchemaMigrationResponse * @instance */ - CreateKeyspaceResponse.prototype.keyspace = null; + CleanupSchemaMigrationResponse.prototype.rows_affected_by_shard = $util.emptyObject; /** - * Creates a new CreateKeyspaceResponse instance using the specified properties. + * Creates a new CleanupSchemaMigrationResponse instance using the specified properties. * @function create - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static - * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse instance + * @param {vtctldata.ICleanupSchemaMigrationResponse=} [properties] Properties to set + * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse instance */ - CreateKeyspaceResponse.create = function create(properties) { - return new CreateKeyspaceResponse(properties); + CleanupSchemaMigrationResponse.create = function create(properties) { + return new CleanupSchemaMigrationResponse(properties); }; /** - * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. + * Encodes the specified CleanupSchemaMigrationResponse message. Does not implicitly {@link vtctldata.CleanupSchemaMigrationResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static - * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode + * @param {vtctldata.ICleanupSchemaMigrationResponse} message CleanupSchemaMigrationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceResponse.encode = function encode(message, writer) { + CleanupSchemaMigrationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rows_affected_by_shard != null && Object.hasOwnProperty.call(message, "rows_affected_by_shard")) + for (let keys = Object.keys(message.rows_affected_by_shard), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected_by_shard[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. + * Encodes the specified CleanupSchemaMigrationResponse message, length delimited. Does not implicitly {@link vtctldata.CleanupSchemaMigrationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static - * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode + * @param {vtctldata.ICleanupSchemaMigrationResponse} message CleanupSchemaMigrationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + CleanupSchemaMigrationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. + * Decodes a CleanupSchemaMigrationResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse + * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceResponse.decode = function decode(reader, length) { + CleanupSchemaMigrationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CleanupSchemaMigrationResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + if (message.rows_affected_by_shard === $util.emptyObject) + message.rows_affected_by_shard = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.uint64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.rows_affected_by_shard[key] = value; break; } default: @@ -127100,130 +125519,147 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a CleanupSchemaMigrationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse + * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + CleanupSchemaMigrationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateKeyspaceResponse message. + * Verifies a CleanupSchemaMigrationResponse message. * @function verify - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateKeyspaceResponse.verify = function verify(message) { + CleanupSchemaMigrationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - let error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; + if (message.rows_affected_by_shard != null && message.hasOwnProperty("rows_affected_by_shard")) { + if (!$util.isObject(message.rows_affected_by_shard)) + return "rows_affected_by_shard: object expected"; + let key = Object.keys(message.rows_affected_by_shard); + for (let i = 0; i < key.length; ++i) + if (!$util.isInteger(message.rows_affected_by_shard[key[i]]) && !(message.rows_affected_by_shard[key[i]] && $util.isInteger(message.rows_affected_by_shard[key[i]].low) && $util.isInteger(message.rows_affected_by_shard[key[i]].high))) + return "rows_affected_by_shard: integer|Long{k:string} expected"; } return null; }; /** - * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CleanupSchemaMigrationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse + * @returns {vtctldata.CleanupSchemaMigrationResponse} CleanupSchemaMigrationResponse */ - CreateKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateKeyspaceResponse) + CleanupSchemaMigrationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CleanupSchemaMigrationResponse) return object; - let message = new $root.vtctldata.CreateKeyspaceResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.CreateKeyspaceResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + let message = new $root.vtctldata.CleanupSchemaMigrationResponse(); + if (object.rows_affected_by_shard) { + if (typeof object.rows_affected_by_shard !== "object") + throw TypeError(".vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard: object expected"); + message.rows_affected_by_shard = {}; + for (let keys = Object.keys(object.rows_affected_by_shard), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.rows_affected_by_shard[keys[i]] = $util.Long.fromValue(object.rows_affected_by_shard[keys[i]])).unsigned = true; + else if (typeof object.rows_affected_by_shard[keys[i]] === "string") + message.rows_affected_by_shard[keys[i]] = parseInt(object.rows_affected_by_shard[keys[i]], 10); + else if (typeof object.rows_affected_by_shard[keys[i]] === "number") + message.rows_affected_by_shard[keys[i]] = object.rows_affected_by_shard[keys[i]]; + else if (typeof object.rows_affected_by_shard[keys[i]] === "object") + message.rows_affected_by_shard[keys[i]] = new $util.LongBits(object.rows_affected_by_shard[keys[i]].low >>> 0, object.rows_affected_by_shard[keys[i]].high >>> 0).toNumber(true); } return message; }; /** - * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a CleanupSchemaMigrationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static - * @param {vtctldata.CreateKeyspaceResponse} message CreateKeyspaceResponse + * @param {vtctldata.CleanupSchemaMigrationResponse} message CleanupSchemaMigrationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateKeyspaceResponse.toObject = function toObject(message, options) { + CleanupSchemaMigrationResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); + if (options.objects || options.defaults) + object.rows_affected_by_shard = {}; + let keys2; + if (message.rows_affected_by_shard && (keys2 = Object.keys(message.rows_affected_by_shard)).length) { + object.rows_affected_by_shard = {}; + for (let j = 0; j < keys2.length; ++j) + if (typeof message.rows_affected_by_shard[keys2[j]] === "number") + object.rows_affected_by_shard[keys2[j]] = options.longs === String ? String(message.rows_affected_by_shard[keys2[j]]) : message.rows_affected_by_shard[keys2[j]]; + else + object.rows_affected_by_shard[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected_by_shard[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.rows_affected_by_shard[keys2[j]].low >>> 0, message.rows_affected_by_shard[keys2[j]].high >>> 0).toNumber(true) : message.rows_affected_by_shard[keys2[j]]; + } return object; }; /** - * Converts this CreateKeyspaceResponse to JSON. + * Converts this CleanupSchemaMigrationResponse to JSON. * @function toJSON - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @instance * @returns {Object.} JSON object */ - CreateKeyspaceResponse.prototype.toJSON = function toJSON() { + CleanupSchemaMigrationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateKeyspaceResponse + * Gets the default type url for CleanupSchemaMigrationResponse * @function getTypeUrl - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.CleanupSchemaMigrationResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CleanupSchemaMigrationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.CreateKeyspaceResponse"; + return typeUrlPrefix + "/vtctldata.CleanupSchemaMigrationResponse"; }; - return CreateKeyspaceResponse; + return CleanupSchemaMigrationResponse; })(); - vtctldata.CreateShardRequest = (function() { + vtctldata.CompleteSchemaMigrationRequest = (function() { /** - * Properties of a CreateShardRequest. + * Properties of a CompleteSchemaMigrationRequest. * @memberof vtctldata - * @interface ICreateShardRequest - * @property {string|null} [keyspace] CreateShardRequest keyspace - * @property {string|null} [shard_name] CreateShardRequest shard_name - * @property {boolean|null} [force] CreateShardRequest force - * @property {boolean|null} [include_parent] CreateShardRequest include_parent + * @interface ICompleteSchemaMigrationRequest + * @property {string|null} [keyspace] CompleteSchemaMigrationRequest keyspace + * @property {string|null} [uuid] CompleteSchemaMigrationRequest uuid */ /** - * Constructs a new CreateShardRequest. + * Constructs a new CompleteSchemaMigrationRequest. * @memberof vtctldata - * @classdesc Represents a CreateShardRequest. - * @implements ICreateShardRequest + * @classdesc Represents a CompleteSchemaMigrationRequest. + * @implements ICompleteSchemaMigrationRequest * @constructor - * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set + * @param {vtctldata.ICompleteSchemaMigrationRequest=} [properties] Properties to set */ - function CreateShardRequest(properties) { + function CompleteSchemaMigrationRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127231,100 +125667,80 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * CreateShardRequest keyspace. + * CompleteSchemaMigrationRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.keyspace = ""; - - /** - * CreateShardRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.shard_name = ""; - - /** - * CreateShardRequest force. - * @member {boolean} force - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @instance */ - CreateShardRequest.prototype.force = false; + CompleteSchemaMigrationRequest.prototype.keyspace = ""; /** - * CreateShardRequest include_parent. - * @member {boolean} include_parent - * @memberof vtctldata.CreateShardRequest + * CompleteSchemaMigrationRequest uuid. + * @member {string} uuid + * @memberof vtctldata.CompleteSchemaMigrationRequest * @instance */ - CreateShardRequest.prototype.include_parent = false; + CompleteSchemaMigrationRequest.prototype.uuid = ""; /** - * Creates a new CreateShardRequest instance using the specified properties. + * Creates a new CompleteSchemaMigrationRequest instance using the specified properties. * @function create - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static - * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set - * @returns {vtctldata.CreateShardRequest} CreateShardRequest instance + * @param {vtctldata.ICompleteSchemaMigrationRequest=} [properties] Properties to set + * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest instance */ - CreateShardRequest.create = function create(properties) { - return new CreateShardRequest(properties); + CompleteSchemaMigrationRequest.create = function create(properties) { + return new CompleteSchemaMigrationRequest(properties); }; /** - * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. + * Encodes the specified CompleteSchemaMigrationRequest message. Does not implicitly {@link vtctldata.CompleteSchemaMigrationRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static - * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode + * @param {vtctldata.ICompleteSchemaMigrationRequest} message CompleteSchemaMigrationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardRequest.encode = function encode(message, writer) { + CompleteSchemaMigrationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.include_parent != null && Object.hasOwnProperty.call(message, "include_parent")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_parent); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); return writer; }; /** - * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. + * Encodes the specified CompleteSchemaMigrationRequest message, length delimited. Does not implicitly {@link vtctldata.CompleteSchemaMigrationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static - * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode + * @param {vtctldata.ICompleteSchemaMigrationRequest} message CompleteSchemaMigrationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + CompleteSchemaMigrationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateShardRequest message from the specified reader or buffer. + * Decodes a CompleteSchemaMigrationRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateShardRequest} CreateShardRequest + * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardRequest.decode = function decode(reader, length) { + CompleteSchemaMigrationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CompleteSchemaMigrationRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -127333,15 +125749,7 @@ export const vtctldata = $root.vtctldata = (() => { break; } case 2: { - message.shard_name = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } - case 4: { - message.include_parent = reader.bool(); + message.uuid = reader.string(); break; } default: @@ -127353,149 +125761,132 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. + * Decodes a CompleteSchemaMigrationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateShardRequest} CreateShardRequest + * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardRequest.decodeDelimited = function decodeDelimited(reader) { + CompleteSchemaMigrationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateShardRequest message. + * Verifies a CompleteSchemaMigrationRequest message. * @function verify - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateShardRequest.verify = function verify(message) { + CompleteSchemaMigrationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.include_parent != null && message.hasOwnProperty("include_parent")) - if (typeof message.include_parent !== "boolean") - return "include_parent: boolean expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; return null; }; /** - * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CompleteSchemaMigrationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateShardRequest} CreateShardRequest + * @returns {vtctldata.CompleteSchemaMigrationRequest} CompleteSchemaMigrationRequest */ - CreateShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateShardRequest) + CompleteSchemaMigrationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CompleteSchemaMigrationRequest) return object; - let message = new $root.vtctldata.CreateShardRequest(); + let message = new $root.vtctldata.CompleteSchemaMigrationRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.include_parent != null) - message.include_parent = Boolean(object.include_parent); + if (object.uuid != null) + message.uuid = String(object.uuid); return message; }; /** - * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a CompleteSchemaMigrationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static - * @param {vtctldata.CreateShardRequest} message CreateShardRequest + * @param {vtctldata.CompleteSchemaMigrationRequest} message CompleteSchemaMigrationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateShardRequest.toObject = function toObject(message, options) { + CompleteSchemaMigrationRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.keyspace = ""; - object.shard_name = ""; - object.force = false; - object.include_parent = false; + object.uuid = ""; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.include_parent != null && message.hasOwnProperty("include_parent")) - object.include_parent = message.include_parent; + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; return object; }; /** - * Converts this CreateShardRequest to JSON. + * Converts this CompleteSchemaMigrationRequest to JSON. * @function toJSON - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @instance * @returns {Object.} JSON object */ - CreateShardRequest.prototype.toJSON = function toJSON() { + CompleteSchemaMigrationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateShardRequest + * Gets the default type url for CompleteSchemaMigrationRequest * @function getTypeUrl - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.CompleteSchemaMigrationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateShardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompleteSchemaMigrationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.CreateShardRequest"; + return typeUrlPrefix + "/vtctldata.CompleteSchemaMigrationRequest"; }; - return CreateShardRequest; + return CompleteSchemaMigrationRequest; })(); - vtctldata.CreateShardResponse = (function() { + vtctldata.CompleteSchemaMigrationResponse = (function() { /** - * Properties of a CreateShardResponse. + * Properties of a CompleteSchemaMigrationResponse. * @memberof vtctldata - * @interface ICreateShardResponse - * @property {vtctldata.IKeyspace|null} [keyspace] CreateShardResponse keyspace - * @property {vtctldata.IShard|null} [shard] CreateShardResponse shard - * @property {boolean|null} [shard_already_exists] CreateShardResponse shard_already_exists + * @interface ICompleteSchemaMigrationResponse + * @property {Object.|null} [rows_affected_by_shard] CompleteSchemaMigrationResponse rows_affected_by_shard */ /** - * Constructs a new CreateShardResponse. + * Constructs a new CompleteSchemaMigrationResponse. * @memberof vtctldata - * @classdesc Represents a CreateShardResponse. - * @implements ICreateShardResponse + * @classdesc Represents a CompleteSchemaMigrationResponse. + * @implements ICompleteSchemaMigrationResponse * @constructor - * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set + * @param {vtctldata.ICompleteSchemaMigrationResponse=} [properties] Properties to set */ - function CreateShardResponse(properties) { + function CompleteSchemaMigrationResponse(properties) { + this.rows_affected_by_shard = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127503,103 +125894,95 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * CreateShardResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.CreateShardResponse - * @instance - */ - CreateShardResponse.prototype.keyspace = null; - - /** - * CreateShardResponse shard. - * @member {vtctldata.IShard|null|undefined} shard - * @memberof vtctldata.CreateShardResponse - * @instance - */ - CreateShardResponse.prototype.shard = null; - - /** - * CreateShardResponse shard_already_exists. - * @member {boolean} shard_already_exists - * @memberof vtctldata.CreateShardResponse + * CompleteSchemaMigrationResponse rows_affected_by_shard. + * @member {Object.} rows_affected_by_shard + * @memberof vtctldata.CompleteSchemaMigrationResponse * @instance */ - CreateShardResponse.prototype.shard_already_exists = false; + CompleteSchemaMigrationResponse.prototype.rows_affected_by_shard = $util.emptyObject; /** - * Creates a new CreateShardResponse instance using the specified properties. + * Creates a new CompleteSchemaMigrationResponse instance using the specified properties. * @function create - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static - * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set - * @returns {vtctldata.CreateShardResponse} CreateShardResponse instance + * @param {vtctldata.ICompleteSchemaMigrationResponse=} [properties] Properties to set + * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse instance */ - CreateShardResponse.create = function create(properties) { - return new CreateShardResponse(properties); + CompleteSchemaMigrationResponse.create = function create(properties) { + return new CompleteSchemaMigrationResponse(properties); }; /** - * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. + * Encodes the specified CompleteSchemaMigrationResponse message. Does not implicitly {@link vtctldata.CompleteSchemaMigrationResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static - * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode + * @param {vtctldata.ICompleteSchemaMigrationResponse} message CompleteSchemaMigrationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardResponse.encode = function encode(message, writer) { + CompleteSchemaMigrationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shard_already_exists != null && Object.hasOwnProperty.call(message, "shard_already_exists")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.shard_already_exists); + if (message.rows_affected_by_shard != null && Object.hasOwnProperty.call(message, "rows_affected_by_shard")) + for (let keys = Object.keys(message.rows_affected_by_shard), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected_by_shard[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. + * Encodes the specified CompleteSchemaMigrationResponse message, length delimited. Does not implicitly {@link vtctldata.CompleteSchemaMigrationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static - * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode + * @param {vtctldata.ICompleteSchemaMigrationResponse} message CompleteSchemaMigrationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + CompleteSchemaMigrationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateShardResponse message from the specified reader or buffer. + * Decodes a CompleteSchemaMigrationResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateShardResponse} CreateShardResponse + * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardResponse.decode = function decode(reader, length) { + CompleteSchemaMigrationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CompleteSchemaMigrationResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); - break; - } - case 2: { - message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); - break; - } - case 3: { - message.shard_already_exists = reader.bool(); + if (message.rows_affected_by_shard === $util.emptyObject) + message.rows_affected_by_shard = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.uint64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.rows_affected_by_shard[key] = value; break; } default: @@ -127611,150 +125994,153 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. + * Decodes a CompleteSchemaMigrationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateShardResponse} CreateShardResponse + * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardResponse.decodeDelimited = function decodeDelimited(reader) { + CompleteSchemaMigrationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateShardResponse message. + * Verifies a CompleteSchemaMigrationResponse message. * @function verify - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateShardResponse.verify = function verify(message) { + CompleteSchemaMigrationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - let error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } - if (message.shard != null && message.hasOwnProperty("shard")) { - let error = $root.vtctldata.Shard.verify(message.shard); - if (error) - return "shard." + error; + if (message.rows_affected_by_shard != null && message.hasOwnProperty("rows_affected_by_shard")) { + if (!$util.isObject(message.rows_affected_by_shard)) + return "rows_affected_by_shard: object expected"; + let key = Object.keys(message.rows_affected_by_shard); + for (let i = 0; i < key.length; ++i) + if (!$util.isInteger(message.rows_affected_by_shard[key[i]]) && !(message.rows_affected_by_shard[key[i]] && $util.isInteger(message.rows_affected_by_shard[key[i]].low) && $util.isInteger(message.rows_affected_by_shard[key[i]].high))) + return "rows_affected_by_shard: integer|Long{k:string} expected"; } - if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) - if (typeof message.shard_already_exists !== "boolean") - return "shard_already_exists: boolean expected"; return null; }; /** - * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CompleteSchemaMigrationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateShardResponse} CreateShardResponse + * @returns {vtctldata.CompleteSchemaMigrationResponse} CompleteSchemaMigrationResponse */ - CreateShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateShardResponse) + CompleteSchemaMigrationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CompleteSchemaMigrationResponse) return object; - let message = new $root.vtctldata.CreateShardResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.CreateShardResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); - } - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.CreateShardResponse.shard: object expected"); - message.shard = $root.vtctldata.Shard.fromObject(object.shard); + let message = new $root.vtctldata.CompleteSchemaMigrationResponse(); + if (object.rows_affected_by_shard) { + if (typeof object.rows_affected_by_shard !== "object") + throw TypeError(".vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard: object expected"); + message.rows_affected_by_shard = {}; + for (let keys = Object.keys(object.rows_affected_by_shard), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.rows_affected_by_shard[keys[i]] = $util.Long.fromValue(object.rows_affected_by_shard[keys[i]])).unsigned = true; + else if (typeof object.rows_affected_by_shard[keys[i]] === "string") + message.rows_affected_by_shard[keys[i]] = parseInt(object.rows_affected_by_shard[keys[i]], 10); + else if (typeof object.rows_affected_by_shard[keys[i]] === "number") + message.rows_affected_by_shard[keys[i]] = object.rows_affected_by_shard[keys[i]]; + else if (typeof object.rows_affected_by_shard[keys[i]] === "object") + message.rows_affected_by_shard[keys[i]] = new $util.LongBits(object.rows_affected_by_shard[keys[i]].low >>> 0, object.rows_affected_by_shard[keys[i]].high >>> 0).toNumber(true); } - if (object.shard_already_exists != null) - message.shard_already_exists = Boolean(object.shard_already_exists); return message; }; /** - * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a CompleteSchemaMigrationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static - * @param {vtctldata.CreateShardResponse} message CreateShardResponse + * @param {vtctldata.CompleteSchemaMigrationResponse} message CompleteSchemaMigrationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateShardResponse.toObject = function toObject(message, options) { + CompleteSchemaMigrationResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) { - object.keyspace = null; - object.shard = null; - object.shard_already_exists = false; + if (options.objects || options.defaults) + object.rows_affected_by_shard = {}; + let keys2; + if (message.rows_affected_by_shard && (keys2 = Object.keys(message.rows_affected_by_shard)).length) { + object.rows_affected_by_shard = {}; + for (let j = 0; j < keys2.length; ++j) + if (typeof message.rows_affected_by_shard[keys2[j]] === "number") + object.rows_affected_by_shard[keys2[j]] = options.longs === String ? String(message.rows_affected_by_shard[keys2[j]]) : message.rows_affected_by_shard[keys2[j]]; + else + object.rows_affected_by_shard[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected_by_shard[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.rows_affected_by_shard[keys2[j]].low >>> 0, message.rows_affected_by_shard[keys2[j]].high >>> 0).toNumber(true) : message.rows_affected_by_shard[keys2[j]]; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.vtctldata.Shard.toObject(message.shard, options); - if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) - object.shard_already_exists = message.shard_already_exists; return object; }; /** - * Converts this CreateShardResponse to JSON. + * Converts this CompleteSchemaMigrationResponse to JSON. * @function toJSON - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @instance * @returns {Object.} JSON object */ - CreateShardResponse.prototype.toJSON = function toJSON() { + CompleteSchemaMigrationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateShardResponse + * Gets the default type url for CompleteSchemaMigrationResponse * @function getTypeUrl - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.CompleteSchemaMigrationResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateShardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompleteSchemaMigrationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.CreateShardResponse"; + return typeUrlPrefix + "/vtctldata.CompleteSchemaMigrationResponse"; }; - return CreateShardResponse; + return CompleteSchemaMigrationResponse; })(); - vtctldata.DeleteCellInfoRequest = (function() { + vtctldata.CreateKeyspaceRequest = (function() { /** - * Properties of a DeleteCellInfoRequest. + * Properties of a CreateKeyspaceRequest. * @memberof vtctldata - * @interface IDeleteCellInfoRequest - * @property {string|null} [name] DeleteCellInfoRequest name - * @property {boolean|null} [force] DeleteCellInfoRequest force + * @interface ICreateKeyspaceRequest + * @property {string|null} [name] CreateKeyspaceRequest name + * @property {boolean|null} [force] CreateKeyspaceRequest force + * @property {boolean|null} [allow_empty_v_schema] CreateKeyspaceRequest allow_empty_v_schema + * @property {topodata.KeyspaceType|null} [type] CreateKeyspaceRequest type + * @property {string|null} [base_keyspace] CreateKeyspaceRequest base_keyspace + * @property {vttime.ITime|null} [snapshot_time] CreateKeyspaceRequest snapshot_time + * @property {string|null} [durability_policy] CreateKeyspaceRequest durability_policy + * @property {string|null} [sidecar_db_name] CreateKeyspaceRequest sidecar_db_name */ /** - * Constructs a new DeleteCellInfoRequest. + * Constructs a new CreateKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a DeleteCellInfoRequest. - * @implements IDeleteCellInfoRequest + * @classdesc Represents a CreateKeyspaceRequest. + * @implements ICreateKeyspaceRequest * @constructor - * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set + * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set */ - function DeleteCellInfoRequest(properties) { + function CreateKeyspaceRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127762,80 +126148,140 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * DeleteCellInfoRequest name. + * CreateKeyspaceRequest name. * @member {string} name - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @instance */ - DeleteCellInfoRequest.prototype.name = ""; + CreateKeyspaceRequest.prototype.name = ""; /** - * DeleteCellInfoRequest force. + * CreateKeyspaceRequest force. * @member {boolean} force - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @instance */ - DeleteCellInfoRequest.prototype.force = false; + CreateKeyspaceRequest.prototype.force = false; /** - * Creates a new DeleteCellInfoRequest instance using the specified properties. + * CreateKeyspaceRequest allow_empty_v_schema. + * @member {boolean} allow_empty_v_schema + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.allow_empty_v_schema = false; + + /** + * CreateKeyspaceRequest type. + * @member {topodata.KeyspaceType} type + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.type = 0; + + /** + * CreateKeyspaceRequest base_keyspace. + * @member {string} base_keyspace + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.base_keyspace = ""; + + /** + * CreateKeyspaceRequest snapshot_time. + * @member {vttime.ITime|null|undefined} snapshot_time + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.snapshot_time = null; + + /** + * CreateKeyspaceRequest durability_policy. + * @member {string} durability_policy + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.durability_policy = ""; + + /** + * CreateKeyspaceRequest sidecar_db_name. + * @member {string} sidecar_db_name + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.sidecar_db_name = ""; + + /** + * Creates a new CreateKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest instance + * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest instance */ - DeleteCellInfoRequest.create = function create(properties) { - return new DeleteCellInfoRequest(properties); + CreateKeyspaceRequest.create = function create(properties) { + return new CreateKeyspaceRequest(properties); }; /** - * Encodes the specified DeleteCellInfoRequest message. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. + * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode + * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoRequest.encode = function encode(message, writer) { + CreateKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.force != null && Object.hasOwnProperty.call(message, "force")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.allow_empty_v_schema != null && Object.hasOwnProperty.call(message, "allow_empty_v_schema")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_empty_v_schema); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.base_keyspace); + if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) + $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.durability_policy != null && Object.hasOwnProperty.call(message, "durability_policy")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.durability_policy); + if (message.sidecar_db_name != null && Object.hasOwnProperty.call(message, "sidecar_db_name")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.sidecar_db_name); return writer; }; /** - * Encodes the specified DeleteCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. + * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode + * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellInfoRequest message from the specified reader or buffer. + * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoRequest.decode = function decode(reader, length) { + CreateKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -127847,6 +126293,30 @@ export const vtctldata = $root.vtctldata = (() => { message.force = reader.bool(); break; } + case 3: { + message.allow_empty_v_schema = reader.bool(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 8: { + message.base_keyspace = reader.string(); + break; + } + case 9: { + message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); + break; + } + case 10: { + message.durability_policy = reader.string(); + break; + } + case 11: { + message.sidecar_db_name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -127856,30 +126326,30 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + CreateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellInfoRequest message. + * Verifies a CreateKeyspaceRequest message. * @function verify - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellInfoRequest.verify = function verify(message) { + CreateKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -127888,98 +126358,171 @@ export const vtctldata = $root.vtctldata = (() => { if (message.force != null && message.hasOwnProperty("force")) if (typeof message.force !== "boolean") return "force: boolean expected"; + if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) + if (typeof message.allow_empty_v_schema !== "boolean") + return "allow_empty_v_schema: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) + if (!$util.isString(message.base_keyspace)) + return "base_keyspace: string expected"; + if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { + let error = $root.vttime.Time.verify(message.snapshot_time); + if (error) + return "snapshot_time." + error; + } + if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) + if (!$util.isString(message.durability_policy)) + return "durability_policy: string expected"; + if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) + if (!$util.isString(message.sidecar_db_name)) + return "sidecar_db_name: string expected"; return null; }; /** - * Creates a DeleteCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest */ - DeleteCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellInfoRequest) + CreateKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateKeyspaceRequest) return object; - let message = new $root.vtctldata.DeleteCellInfoRequest(); + let message = new $root.vtctldata.CreateKeyspaceRequest(); if (object.name != null) message.name = String(object.name); if (object.force != null) message.force = Boolean(object.force); + if (object.allow_empty_v_schema != null) + message.allow_empty_v_schema = Boolean(object.allow_empty_v_schema); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "NORMAL": + case 0: + message.type = 0; + break; + case "SNAPSHOT": + case 1: + message.type = 1; + break; + } + if (object.base_keyspace != null) + message.base_keyspace = String(object.base_keyspace); + if (object.snapshot_time != null) { + if (typeof object.snapshot_time !== "object") + throw TypeError(".vtctldata.CreateKeyspaceRequest.snapshot_time: object expected"); + message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); + } + if (object.durability_policy != null) + message.durability_policy = String(object.durability_policy); + if (object.sidecar_db_name != null) + message.sidecar_db_name = String(object.sidecar_db_name); return message; }; /** - * Creates a plain object from a DeleteCellInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.DeleteCellInfoRequest} message DeleteCellInfoRequest + * @param {vtctldata.CreateKeyspaceRequest} message CreateKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellInfoRequest.toObject = function toObject(message, options) { + CreateKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.name = ""; object.force = false; + object.allow_empty_v_schema = false; + object.type = options.enums === String ? "NORMAL" : 0; + object.base_keyspace = ""; + object.snapshot_time = null; + object.durability_policy = ""; + object.sidecar_db_name = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.force != null && message.hasOwnProperty("force")) object.force = message.force; + if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) + object.allow_empty_v_schema = message.allow_empty_v_schema; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.topodata.KeyspaceType[message.type] === undefined ? message.type : $root.topodata.KeyspaceType[message.type] : message.type; + if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) + object.base_keyspace = message.base_keyspace; + if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) + object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); + if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) + object.durability_policy = message.durability_policy; + if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) + object.sidecar_db_name = message.sidecar_db_name; return object; }; /** - * Converts this DeleteCellInfoRequest to JSON. + * Converts this CreateKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @instance * @returns {Object.} JSON object */ - DeleteCellInfoRequest.prototype.toJSON = function toJSON() { + CreateKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteCellInfoRequest + * Gets the default type url for CreateKeyspaceRequest * @function getTypeUrl - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteCellInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteCellInfoRequest"; + return typeUrlPrefix + "/vtctldata.CreateKeyspaceRequest"; }; - return DeleteCellInfoRequest; + return CreateKeyspaceRequest; })(); - vtctldata.DeleteCellInfoResponse = (function() { + vtctldata.CreateKeyspaceResponse = (function() { /** - * Properties of a DeleteCellInfoResponse. + * Properties of a CreateKeyspaceResponse. * @memberof vtctldata - * @interface IDeleteCellInfoResponse + * @interface ICreateKeyspaceResponse + * @property {vtctldata.IKeyspace|null} [keyspace] CreateKeyspaceResponse keyspace */ /** - * Constructs a new DeleteCellInfoResponse. + * Constructs a new CreateKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a DeleteCellInfoResponse. - * @implements IDeleteCellInfoResponse + * @classdesc Represents a CreateKeyspaceResponse. + * @implements ICreateKeyspaceResponse * @constructor - * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set + * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set */ - function DeleteCellInfoResponse(properties) { + function CreateKeyspaceResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127987,63 +126530,77 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new DeleteCellInfoResponse instance using the specified properties. + * CreateKeyspaceResponse keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.CreateKeyspaceResponse + * @instance + */ + CreateKeyspaceResponse.prototype.keyspace = null; + + /** + * Creates a new CreateKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse instance + * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse instance */ - DeleteCellInfoResponse.create = function create(properties) { - return new DeleteCellInfoResponse(properties); + CreateKeyspaceResponse.create = function create(properties) { + return new CreateKeyspaceResponse(properties); }; /** - * Encodes the specified DeleteCellInfoResponse message. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. + * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode + * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoResponse.encode = function encode(message, writer) { + CreateKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. + * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode + * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellInfoResponse message from the specified reader or buffer. + * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoResponse.decode = function decode(reader, length) { + CreateKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -128053,109 +126610,130 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { + CreateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellInfoResponse message. + * Verifies a CreateKeyspaceResponse message. * @function verify - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellInfoResponse.verify = function verify(message) { + CreateKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + let error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; + } return null; }; /** - * Creates a DeleteCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse */ - DeleteCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellInfoResponse) + CreateKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateKeyspaceResponse) return object; - return new $root.vtctldata.DeleteCellInfoResponse(); + let message = new $root.vtctldata.CreateKeyspaceResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.CreateKeyspaceResponse.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + } + return message; }; /** - * Creates a plain object from a DeleteCellInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.DeleteCellInfoResponse} message DeleteCellInfoResponse + * @param {vtctldata.CreateKeyspaceResponse} message CreateKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellInfoResponse.toObject = function toObject() { - return {}; + CreateKeyspaceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.keyspace = null; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); + return object; }; /** - * Converts this DeleteCellInfoResponse to JSON. + * Converts this CreateKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @instance * @returns {Object.} JSON object */ - DeleteCellInfoResponse.prototype.toJSON = function toJSON() { + CreateKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteCellInfoResponse + * Gets the default type url for CreateKeyspaceResponse * @function getTypeUrl - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteCellInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteCellInfoResponse"; + return typeUrlPrefix + "/vtctldata.CreateKeyspaceResponse"; }; - return DeleteCellInfoResponse; + return CreateKeyspaceResponse; })(); - vtctldata.DeleteCellsAliasRequest = (function() { + vtctldata.CreateShardRequest = (function() { /** - * Properties of a DeleteCellsAliasRequest. + * Properties of a CreateShardRequest. * @memberof vtctldata - * @interface IDeleteCellsAliasRequest - * @property {string|null} [name] DeleteCellsAliasRequest name + * @interface ICreateShardRequest + * @property {string|null} [keyspace] CreateShardRequest keyspace + * @property {string|null} [shard_name] CreateShardRequest shard_name + * @property {boolean|null} [force] CreateShardRequest force + * @property {boolean|null} [include_parent] CreateShardRequest include_parent */ /** - * Constructs a new DeleteCellsAliasRequest. + * Constructs a new CreateShardRequest. * @memberof vtctldata - * @classdesc Represents a DeleteCellsAliasRequest. - * @implements IDeleteCellsAliasRequest + * @classdesc Represents a CreateShardRequest. + * @implements ICreateShardRequest * @constructor - * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set + * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set */ - function DeleteCellsAliasRequest(properties) { + function CreateShardRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128163,75 +126741,117 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * DeleteCellsAliasRequest name. - * @member {string} name - * @memberof vtctldata.DeleteCellsAliasRequest + * CreateShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.CreateShardRequest * @instance */ - DeleteCellsAliasRequest.prototype.name = ""; + CreateShardRequest.prototype.keyspace = ""; /** - * Creates a new DeleteCellsAliasRequest instance using the specified properties. + * CreateShardRequest shard_name. + * @member {string} shard_name + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.shard_name = ""; + + /** + * CreateShardRequest force. + * @member {boolean} force + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.force = false; + + /** + * CreateShardRequest include_parent. + * @member {boolean} include_parent + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.include_parent = false; + + /** + * Creates a new CreateShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest instance + * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set + * @returns {vtctldata.CreateShardRequest} CreateShardRequest instance */ - DeleteCellsAliasRequest.create = function create(properties) { - return new DeleteCellsAliasRequest(properties); + CreateShardRequest.create = function create(properties) { + return new CreateShardRequest(properties); }; /** - * Encodes the specified DeleteCellsAliasRequest message. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. + * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode + * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellsAliasRequest.encode = function encode(message, writer) { + CreateShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.include_parent != null && Object.hasOwnProperty.call(message, "include_parent")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_parent); return writer; }; /** - * Encodes the specified DeleteCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. + * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode + * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer. + * Decodes a CreateShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest + * @returns {vtctldata.CreateShardRequest} CreateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellsAliasRequest.decode = function decode(reader, length) { + CreateShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.keyspace = reader.string(); + break; + } + case 2: { + message.shard_name = reader.string(); + break; + } + case 3: { + message.force = reader.bool(); + break; + } + case 4: { + message.include_parent = reader.bool(); break; } default: @@ -128243,121 +126863,149 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest + * @returns {vtctldata.CreateShardRequest} CreateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { + CreateShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellsAliasRequest message. + * Verifies a CreateShardRequest message. * @function verify - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellsAliasRequest.verify = function verify(message) { + CreateShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + if (!$util.isString(message.shard_name)) + return "shard_name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.include_parent != null && message.hasOwnProperty("include_parent")) + if (typeof message.include_parent !== "boolean") + return "include_parent: boolean expected"; return null; }; /** - * Creates a DeleteCellsAliasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest + * @returns {vtctldata.CreateShardRequest} CreateShardRequest */ - DeleteCellsAliasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellsAliasRequest) + CreateShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateShardRequest) return object; - let message = new $root.vtctldata.DeleteCellsAliasRequest(); - if (object.name != null) - message.name = String(object.name); + let message = new $root.vtctldata.CreateShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard_name != null) + message.shard_name = String(object.shard_name); + if (object.force != null) + message.force = Boolean(object.force); + if (object.include_parent != null) + message.include_parent = Boolean(object.include_parent); return message; }; /** - * Creates a plain object from a DeleteCellsAliasRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.DeleteCellsAliasRequest} message DeleteCellsAliasRequest + * @param {vtctldata.CreateShardRequest} message CreateShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellsAliasRequest.toObject = function toObject(message, options) { + CreateShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.keyspace = ""; + object.shard_name = ""; + object.force = false; + object.include_parent = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + object.shard_name = message.shard_name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.include_parent != null && message.hasOwnProperty("include_parent")) + object.include_parent = message.include_parent; return object; }; /** - * Converts this DeleteCellsAliasRequest to JSON. + * Converts this CreateShardRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @instance * @returns {Object.} JSON object */ - DeleteCellsAliasRequest.prototype.toJSON = function toJSON() { + CreateShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteCellsAliasRequest + * Gets the default type url for CreateShardRequest * @function getTypeUrl - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteCellsAliasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateShardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteCellsAliasRequest"; + return typeUrlPrefix + "/vtctldata.CreateShardRequest"; }; - return DeleteCellsAliasRequest; + return CreateShardRequest; })(); - vtctldata.DeleteCellsAliasResponse = (function() { + vtctldata.CreateShardResponse = (function() { /** - * Properties of a DeleteCellsAliasResponse. + * Properties of a CreateShardResponse. * @memberof vtctldata - * @interface IDeleteCellsAliasResponse + * @interface ICreateShardResponse + * @property {vtctldata.IKeyspace|null} [keyspace] CreateShardResponse keyspace + * @property {vtctldata.IShard|null} [shard] CreateShardResponse shard + * @property {boolean|null} [shard_already_exists] CreateShardResponse shard_already_exists */ /** - * Constructs a new DeleteCellsAliasResponse. + * Constructs a new CreateShardResponse. * @memberof vtctldata - * @classdesc Represents a DeleteCellsAliasResponse. - * @implements IDeleteCellsAliasResponse + * @classdesc Represents a CreateShardResponse. + * @implements ICreateShardResponse * @constructor - * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set + * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set */ - function DeleteCellsAliasResponse(properties) { + function CreateShardResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128365,63 +127013,105 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new DeleteCellsAliasResponse instance using the specified properties. + * CreateShardResponse keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.CreateShardResponse + * @instance + */ + CreateShardResponse.prototype.keyspace = null; + + /** + * CreateShardResponse shard. + * @member {vtctldata.IShard|null|undefined} shard + * @memberof vtctldata.CreateShardResponse + * @instance + */ + CreateShardResponse.prototype.shard = null; + + /** + * CreateShardResponse shard_already_exists. + * @member {boolean} shard_already_exists + * @memberof vtctldata.CreateShardResponse + * @instance + */ + CreateShardResponse.prototype.shard_already_exists = false; + + /** + * Creates a new CreateShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse instance + * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set + * @returns {vtctldata.CreateShardResponse} CreateShardResponse instance */ - DeleteCellsAliasResponse.create = function create(properties) { - return new DeleteCellsAliasResponse(properties); + CreateShardResponse.create = function create(properties) { + return new CreateShardResponse(properties); }; /** - * Encodes the specified DeleteCellsAliasResponse message. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. + * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode + * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellsAliasResponse.encode = function encode(message, writer) { + CreateShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.shard_already_exists != null && Object.hasOwnProperty.call(message, "shard_already_exists")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.shard_already_exists); return writer; }; /** - * Encodes the specified DeleteCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. + * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode + * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer. + * Decodes a CreateShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse + * @returns {vtctldata.CreateShardResponse} CreateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellsAliasResponse.decode = function decode(reader, length) { + CreateShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + break; + } + case 2: { + message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); + break; + } + case 3: { + message.shard_already_exists = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -128431,111 +127121,150 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse + * @returns {vtctldata.CreateShardResponse} CreateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { + CreateShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellsAliasResponse message. + * Verifies a CreateShardResponse message. * @function verify - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellsAliasResponse.verify = function verify(message) { + CreateShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + let error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; + } + if (message.shard != null && message.hasOwnProperty("shard")) { + let error = $root.vtctldata.Shard.verify(message.shard); + if (error) + return "shard." + error; + } + if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) + if (typeof message.shard_already_exists !== "boolean") + return "shard_already_exists: boolean expected"; return null; }; /** - * Creates a DeleteCellsAliasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse + * @returns {vtctldata.CreateShardResponse} CreateShardResponse */ - DeleteCellsAliasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellsAliasResponse) + CreateShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateShardResponse) return object; - return new $root.vtctldata.DeleteCellsAliasResponse(); + let message = new $root.vtctldata.CreateShardResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.CreateShardResponse.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + } + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.CreateShardResponse.shard: object expected"); + message.shard = $root.vtctldata.Shard.fromObject(object.shard); + } + if (object.shard_already_exists != null) + message.shard_already_exists = Boolean(object.shard_already_exists); + return message; }; /** - * Creates a plain object from a DeleteCellsAliasResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.DeleteCellsAliasResponse} message DeleteCellsAliasResponse + * @param {vtctldata.CreateShardResponse} message CreateShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellsAliasResponse.toObject = function toObject() { - return {}; + CreateShardResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.keyspace = null; + object.shard = null; + object.shard_already_exists = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.vtctldata.Shard.toObject(message.shard, options); + if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) + object.shard_already_exists = message.shard_already_exists; + return object; }; /** - * Converts this DeleteCellsAliasResponse to JSON. + * Converts this CreateShardResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @instance * @returns {Object.} JSON object */ - DeleteCellsAliasResponse.prototype.toJSON = function toJSON() { + CreateShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteCellsAliasResponse + * Gets the default type url for CreateShardResponse * @function getTypeUrl - * @memberof vtctldata.DeleteCellsAliasResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteCellsAliasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateShardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteCellsAliasResponse"; + return typeUrlPrefix + "/vtctldata.CreateShardResponse"; }; - return DeleteCellsAliasResponse; + return CreateShardResponse; })(); - vtctldata.DeleteKeyspaceRequest = (function() { + vtctldata.DeleteCellInfoRequest = (function() { /** - * Properties of a DeleteKeyspaceRequest. + * Properties of a DeleteCellInfoRequest. * @memberof vtctldata - * @interface IDeleteKeyspaceRequest - * @property {string|null} [keyspace] DeleteKeyspaceRequest keyspace - * @property {boolean|null} [recursive] DeleteKeyspaceRequest recursive - * @property {boolean|null} [force] DeleteKeyspaceRequest force + * @interface IDeleteCellInfoRequest + * @property {string|null} [name] DeleteCellInfoRequest name + * @property {boolean|null} [force] DeleteCellInfoRequest force */ /** - * Constructs a new DeleteKeyspaceRequest. + * Constructs a new DeleteCellInfoRequest. * @memberof vtctldata - * @classdesc Represents a DeleteKeyspaceRequest. - * @implements IDeleteKeyspaceRequest + * @classdesc Represents a DeleteCellInfoRequest. + * @implements IDeleteCellInfoRequest * @constructor - * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set */ - function DeleteKeyspaceRequest(properties) { + function DeleteCellInfoRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128543,102 +127272,88 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * DeleteKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - */ - DeleteKeyspaceRequest.prototype.keyspace = ""; - - /** - * DeleteKeyspaceRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.DeleteKeyspaceRequest + * DeleteCellInfoRequest name. + * @member {string} name + * @memberof vtctldata.DeleteCellInfoRequest * @instance */ - DeleteKeyspaceRequest.prototype.recursive = false; + DeleteCellInfoRequest.prototype.name = ""; /** - * DeleteKeyspaceRequest force. + * DeleteCellInfoRequest force. * @member {boolean} force - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @instance */ - DeleteKeyspaceRequest.prototype.force = false; + DeleteCellInfoRequest.prototype.force = false; /** - * Creates a new DeleteKeyspaceRequest instance using the specified properties. + * Creates a new DeleteCellInfoRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest instance + * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest instance */ - DeleteKeyspaceRequest.create = function create(properties) { - return new DeleteKeyspaceRequest(properties); + DeleteCellInfoRequest.create = function create(properties) { + return new DeleteCellInfoRequest(properties); }; /** - * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. + * Encodes the specified DeleteCellInfoRequest message. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode + * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteKeyspaceRequest.encode = function encode(message, writer) { + DeleteCellInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. + * Encodes the specified DeleteCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode + * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. + * Decodes a DeleteCellInfoRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteKeyspaceRequest.decode = function decode(reader, length) { + DeleteCellInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); + message.name = reader.string(); break; } case 2: { - message.recursive = reader.bool(); - break; - } - case 3: { message.force = reader.bool(); break; } @@ -128651,38 +127366,35 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteKeyspaceRequest message. + * Verifies a DeleteCellInfoRequest message. * @function verify - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteKeyspaceRequest.verify = function verify(message) { + DeleteCellInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.force != null && message.hasOwnProperty("force")) if (typeof message.force !== "boolean") return "force: boolean expected"; @@ -128690,99 +127402,94 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest */ - DeleteKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteKeyspaceRequest) + DeleteCellInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellInfoRequest) return object; - let message = new $root.vtctldata.DeleteKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); + let message = new $root.vtctldata.DeleteCellInfoRequest(); + if (object.name != null) + message.name = String(object.name); if (object.force != null) message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.DeleteKeyspaceRequest} message DeleteKeyspaceRequest + * @param {vtctldata.DeleteCellInfoRequest} message DeleteCellInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteKeyspaceRequest.toObject = function toObject(message, options) { + DeleteCellInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { - object.keyspace = ""; - object.recursive = false; + object.name = ""; object.force = false; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.force != null && message.hasOwnProperty("force")) object.force = message.force; return object; }; /** - * Converts this DeleteKeyspaceRequest to JSON. + * Converts this DeleteCellInfoRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @instance * @returns {Object.} JSON object */ - DeleteKeyspaceRequest.prototype.toJSON = function toJSON() { + DeleteCellInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteKeyspaceRequest + * Gets the default type url for DeleteCellInfoRequest * @function getTypeUrl - * @memberof vtctldata.DeleteKeyspaceRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteCellInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteKeyspaceRequest"; + return typeUrlPrefix + "/vtctldata.DeleteCellInfoRequest"; }; - return DeleteKeyspaceRequest; + return DeleteCellInfoRequest; })(); - vtctldata.DeleteKeyspaceResponse = (function() { + vtctldata.DeleteCellInfoResponse = (function() { /** - * Properties of a DeleteKeyspaceResponse. + * Properties of a DeleteCellInfoResponse. * @memberof vtctldata - * @interface IDeleteKeyspaceResponse + * @interface IDeleteCellInfoResponse */ /** - * Constructs a new DeleteKeyspaceResponse. + * Constructs a new DeleteCellInfoResponse. * @memberof vtctldata - * @classdesc Represents a DeleteKeyspaceResponse. - * @implements IDeleteKeyspaceResponse + * @classdesc Represents a DeleteCellInfoResponse. + * @implements IDeleteCellInfoResponse * @constructor - * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set */ - function DeleteKeyspaceResponse(properties) { + function DeleteCellInfoResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128790,60 +127497,60 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new DeleteKeyspaceResponse instance using the specified properties. + * Creates a new DeleteCellInfoResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse instance + * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse instance */ - DeleteKeyspaceResponse.create = function create(properties) { - return new DeleteKeyspaceResponse(properties); + DeleteCellInfoResponse.create = function create(properties) { + return new DeleteCellInfoResponse(properties); }; /** - * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. + * Encodes the specified DeleteCellInfoResponse message. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode + * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteKeyspaceResponse.encode = function encode(message, writer) { + DeleteCellInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. + * Encodes the specified DeleteCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode + * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. + * Decodes a DeleteCellInfoResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteKeyspaceResponse.decode = function decode(reader, length) { + DeleteCellInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -128856,234 +127563,185 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteKeyspaceResponse message. + * Verifies a DeleteCellInfoResponse message. * @function verify - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteKeyspaceResponse.verify = function verify(message) { + DeleteCellInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse */ - DeleteKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteKeyspaceResponse) + DeleteCellInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellInfoResponse) return object; - return new $root.vtctldata.DeleteKeyspaceResponse(); + return new $root.vtctldata.DeleteCellInfoResponse(); }; /** - * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.DeleteKeyspaceResponse} message DeleteKeyspaceResponse + * @param {vtctldata.DeleteCellInfoResponse} message DeleteCellInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteKeyspaceResponse.toObject = function toObject() { + DeleteCellInfoResponse.toObject = function toObject() { return {}; }; /** - * Converts this DeleteKeyspaceResponse to JSON. + * Converts this DeleteCellInfoResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @instance * @returns {Object.} JSON object */ - DeleteKeyspaceResponse.prototype.toJSON = function toJSON() { + DeleteCellInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteKeyspaceResponse + * Gets the default type url for DeleteCellInfoResponse * @function getTypeUrl - * @memberof vtctldata.DeleteKeyspaceResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteCellInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteKeyspaceResponse"; + return typeUrlPrefix + "/vtctldata.DeleteCellInfoResponse"; }; - return DeleteKeyspaceResponse; + return DeleteCellInfoResponse; })(); - vtctldata.DeleteShardsRequest = (function() { - - /** - * Properties of a DeleteShardsRequest. - * @memberof vtctldata - * @interface IDeleteShardsRequest - * @property {Array.|null} [shards] DeleteShardsRequest shards - * @property {boolean|null} [recursive] DeleteShardsRequest recursive - * @property {boolean|null} [even_if_serving] DeleteShardsRequest even_if_serving - * @property {boolean|null} [force] DeleteShardsRequest force - */ - - /** - * Constructs a new DeleteShardsRequest. - * @memberof vtctldata - * @classdesc Represents a DeleteShardsRequest. - * @implements IDeleteShardsRequest - * @constructor - * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set - */ - function DeleteShardsRequest(properties) { - this.shards = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteShardsRequest shards. - * @member {Array.} shards - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.shards = $util.emptyArray; - + vtctldata.DeleteCellsAliasRequest = (function() { + /** - * DeleteShardsRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.DeleteShardsRequest - * @instance + * Properties of a DeleteCellsAliasRequest. + * @memberof vtctldata + * @interface IDeleteCellsAliasRequest + * @property {string|null} [name] DeleteCellsAliasRequest name */ - DeleteShardsRequest.prototype.recursive = false; /** - * DeleteShardsRequest even_if_serving. - * @member {boolean} even_if_serving - * @memberof vtctldata.DeleteShardsRequest - * @instance + * Constructs a new DeleteCellsAliasRequest. + * @memberof vtctldata + * @classdesc Represents a DeleteCellsAliasRequest. + * @implements IDeleteCellsAliasRequest + * @constructor + * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set */ - DeleteShardsRequest.prototype.even_if_serving = false; + function DeleteCellsAliasRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * DeleteShardsRequest force. - * @member {boolean} force - * @memberof vtctldata.DeleteShardsRequest + * DeleteCellsAliasRequest name. + * @member {string} name + * @memberof vtctldata.DeleteCellsAliasRequest * @instance */ - DeleteShardsRequest.prototype.force = false; + DeleteCellsAliasRequest.prototype.name = ""; /** - * Creates a new DeleteShardsRequest instance using the specified properties. + * Creates a new DeleteCellsAliasRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest instance + * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest instance */ - DeleteShardsRequest.create = function create(properties) { - return new DeleteShardsRequest(properties); + DeleteCellsAliasRequest.create = function create(properties) { + return new DeleteCellsAliasRequest(properties); }; /** - * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. + * Encodes the specified DeleteCellsAliasRequest message. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteShardsRequest.encode = function encode(message, writer) { + DeleteCellsAliasRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shards != null && message.shards.length) - for (let i = 0; i < message.shards.length; ++i) - $root.vtctldata.Shard.encode(message.shards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); - if (message.even_if_serving != null && Object.hasOwnProperty.call(message, "even_if_serving")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.even_if_serving); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. + * Encodes the specified DeleteCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteShardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer. + * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteShardsRequest.decode = function decode(reader, length) { + DeleteCellsAliasRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.shards && message.shards.length)) - message.shards = []; - message.shards.push($root.vtctldata.Shard.decode(reader, reader.uint32())); - break; - } - case 2: { - message.recursive = reader.bool(); - break; - } - case 4: { - message.even_if_serving = reader.bool(); - break; - } - case 5: { - message.force = reader.bool(); + message.name = reader.string(); break; } default: @@ -129095,164 +127753,121 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteShardsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteShardsRequest message. + * Verifies a DeleteCellsAliasRequest message. * @function verify - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteShardsRequest.verify = function verify(message) { + DeleteCellsAliasRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (let i = 0; i < message.shards.length; ++i) { - let error = $root.vtctldata.Shard.verify(message.shards[i]); - if (error) - return "shards." + error; - } - } - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) - if (typeof message.even_if_serving !== "boolean") - return "even_if_serving: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest */ - DeleteShardsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteShardsRequest) + DeleteCellsAliasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellsAliasRequest) return object; - let message = new $root.vtctldata.DeleteShardsRequest(); - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".vtctldata.DeleteShardsRequest.shards: array expected"); - message.shards = []; - for (let i = 0; i < object.shards.length; ++i) { - if (typeof object.shards[i] !== "object") - throw TypeError(".vtctldata.DeleteShardsRequest.shards: object expected"); - message.shards[i] = $root.vtctldata.Shard.fromObject(object.shards[i]); - } - } - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - if (object.even_if_serving != null) - message.even_if_serving = Boolean(object.even_if_serving); - if (object.force != null) - message.force = Boolean(object.force); + let message = new $root.vtctldata.DeleteCellsAliasRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellsAliasRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.DeleteShardsRequest} message DeleteShardsRequest + * @param {vtctldata.DeleteCellsAliasRequest} message DeleteCellsAliasRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteShardsRequest.toObject = function toObject(message, options) { + DeleteCellsAliasRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.shards = []; - if (options.defaults) { - object.recursive = false; - object.even_if_serving = false; - object.force = false; - } - if (message.shards && message.shards.length) { - object.shards = []; - for (let j = 0; j < message.shards.length; ++j) - object.shards[j] = $root.vtctldata.Shard.toObject(message.shards[j], options); - } - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) - object.even_if_serving = message.even_if_serving; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DeleteShardsRequest to JSON. + * Converts this DeleteCellsAliasRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @instance * @returns {Object.} JSON object */ - DeleteShardsRequest.prototype.toJSON = function toJSON() { + DeleteCellsAliasRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteShardsRequest + * Gets the default type url for DeleteCellsAliasRequest * @function getTypeUrl - * @memberof vtctldata.DeleteShardsRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteShardsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteCellsAliasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteShardsRequest"; + return typeUrlPrefix + "/vtctldata.DeleteCellsAliasRequest"; }; - return DeleteShardsRequest; + return DeleteCellsAliasRequest; })(); - vtctldata.DeleteShardsResponse = (function() { + vtctldata.DeleteCellsAliasResponse = (function() { /** - * Properties of a DeleteShardsResponse. + * Properties of a DeleteCellsAliasResponse. * @memberof vtctldata - * @interface IDeleteShardsResponse + * @interface IDeleteCellsAliasResponse */ /** - * Constructs a new DeleteShardsResponse. + * Constructs a new DeleteCellsAliasResponse. * @memberof vtctldata - * @classdesc Represents a DeleteShardsResponse. - * @implements IDeleteShardsResponse + * @classdesc Represents a DeleteCellsAliasResponse. + * @implements IDeleteCellsAliasResponse * @constructor - * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set */ - function DeleteShardsResponse(properties) { + function DeleteCellsAliasResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129260,60 +127875,60 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new DeleteShardsResponse instance using the specified properties. + * Creates a new DeleteCellsAliasResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse instance + * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse instance */ - DeleteShardsResponse.create = function create(properties) { - return new DeleteShardsResponse(properties); + DeleteCellsAliasResponse.create = function create(properties) { + return new DeleteCellsAliasResponse(properties); }; /** - * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. + * Encodes the specified DeleteCellsAliasResponse message. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteShardsResponse.encode = function encode(message, writer) { + DeleteCellsAliasResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. + * Encodes the specified DeleteCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteShardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer. + * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteShardsResponse.decode = function decode(reader, length) { + DeleteCellsAliasResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -129326,109 +127941,111 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteShardsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteShardsResponse message. + * Verifies a DeleteCellsAliasResponse message. * @function verify - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteShardsResponse.verify = function verify(message) { + DeleteCellsAliasResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse */ - DeleteShardsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteShardsResponse) + DeleteCellsAliasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellsAliasResponse) return object; - return new $root.vtctldata.DeleteShardsResponse(); + return new $root.vtctldata.DeleteCellsAliasResponse(); }; /** - * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellsAliasResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.DeleteShardsResponse} message DeleteShardsResponse + * @param {vtctldata.DeleteCellsAliasResponse} message DeleteCellsAliasResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteShardsResponse.toObject = function toObject() { + DeleteCellsAliasResponse.toObject = function toObject() { return {}; }; /** - * Converts this DeleteShardsResponse to JSON. + * Converts this DeleteCellsAliasResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @instance * @returns {Object.} JSON object */ - DeleteShardsResponse.prototype.toJSON = function toJSON() { + DeleteCellsAliasResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteShardsResponse + * Gets the default type url for DeleteCellsAliasResponse * @function getTypeUrl - * @memberof vtctldata.DeleteShardsResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteShardsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteCellsAliasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteShardsResponse"; + return typeUrlPrefix + "/vtctldata.DeleteCellsAliasResponse"; }; - return DeleteShardsResponse; + return DeleteCellsAliasResponse; })(); - vtctldata.DeleteSrvVSchemaRequest = (function() { + vtctldata.DeleteKeyspaceRequest = (function() { /** - * Properties of a DeleteSrvVSchemaRequest. + * Properties of a DeleteKeyspaceRequest. * @memberof vtctldata - * @interface IDeleteSrvVSchemaRequest - * @property {string|null} [cell] DeleteSrvVSchemaRequest cell + * @interface IDeleteKeyspaceRequest + * @property {string|null} [keyspace] DeleteKeyspaceRequest keyspace + * @property {boolean|null} [recursive] DeleteKeyspaceRequest recursive + * @property {boolean|null} [force] DeleteKeyspaceRequest force */ /** - * Constructs a new DeleteSrvVSchemaRequest. + * Constructs a new DeleteKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a DeleteSrvVSchemaRequest. - * @implements IDeleteSrvVSchemaRequest + * @classdesc Represents a DeleteKeyspaceRequest. + * @implements IDeleteKeyspaceRequest * @constructor - * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set */ - function DeleteSrvVSchemaRequest(properties) { + function DeleteKeyspaceRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129436,75 +128053,103 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * DeleteSrvVSchemaRequest cell. - * @member {string} cell - * @memberof vtctldata.DeleteSrvVSchemaRequest + * DeleteKeyspaceRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.DeleteKeyspaceRequest * @instance */ - DeleteSrvVSchemaRequest.prototype.cell = ""; + DeleteKeyspaceRequest.prototype.keyspace = ""; /** - * Creates a new DeleteSrvVSchemaRequest instance using the specified properties. + * DeleteKeyspaceRequest recursive. + * @member {boolean} recursive + * @memberof vtctldata.DeleteKeyspaceRequest + * @instance + */ + DeleteKeyspaceRequest.prototype.recursive = false; + + /** + * DeleteKeyspaceRequest force. + * @member {boolean} force + * @memberof vtctldata.DeleteKeyspaceRequest + * @instance + */ + DeleteKeyspaceRequest.prototype.force = false; + + /** + * Creates a new DeleteKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest instance + * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest instance */ - DeleteSrvVSchemaRequest.create = function create(properties) { - return new DeleteSrvVSchemaRequest(properties); + DeleteKeyspaceRequest.create = function create(properties) { + return new DeleteKeyspaceRequest(properties); }; /** - * Encodes the specified DeleteSrvVSchemaRequest message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSrvVSchemaRequest.encode = function encode(message, writer) { + DeleteKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified DeleteSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer. + * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSrvVSchemaRequest.decode = function decode(reader, length) { + DeleteKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cell = reader.string(); + message.keyspace = reader.string(); + break; + } + case 2: { + message.recursive = reader.bool(); + break; + } + case 3: { + message.force = reader.bool(); break; } default: @@ -129516,121 +128161,138 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSrvVSchemaRequest message. + * Verifies a DeleteKeyspaceRequest message. * @function verify - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSrvVSchemaRequest.verify = function verify(message) { + DeleteKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a DeleteSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest */ - DeleteSrvVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteSrvVSchemaRequest) + DeleteKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteKeyspaceRequest) return object; - let message = new $root.vtctldata.DeleteSrvVSchemaRequest(); - if (object.cell != null) - message.cell = String(object.cell); + let message = new $root.vtctldata.DeleteKeyspaceRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteSrvVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.DeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest + * @param {vtctldata.DeleteKeyspaceRequest} message DeleteKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSrvVSchemaRequest.toObject = function toObject(message, options) { + DeleteKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (options.defaults) { + object.keyspace = ""; + object.recursive = false; + object.force = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this DeleteSrvVSchemaRequest to JSON. + * Converts this DeleteKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @instance * @returns {Object.} JSON object */ - DeleteSrvVSchemaRequest.prototype.toJSON = function toJSON() { + DeleteKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSrvVSchemaRequest + * Gets the default type url for DeleteKeyspaceRequest * @function getTypeUrl - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSrvVSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteSrvVSchemaRequest"; + return typeUrlPrefix + "/vtctldata.DeleteKeyspaceRequest"; }; - return DeleteSrvVSchemaRequest; + return DeleteKeyspaceRequest; })(); - vtctldata.DeleteSrvVSchemaResponse = (function() { + vtctldata.DeleteKeyspaceResponse = (function() { /** - * Properties of a DeleteSrvVSchemaResponse. + * Properties of a DeleteKeyspaceResponse. * @memberof vtctldata - * @interface IDeleteSrvVSchemaResponse + * @interface IDeleteKeyspaceResponse */ /** - * Constructs a new DeleteSrvVSchemaResponse. + * Constructs a new DeleteKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a DeleteSrvVSchemaResponse. - * @implements IDeleteSrvVSchemaResponse + * @classdesc Represents a DeleteKeyspaceResponse. + * @implements IDeleteKeyspaceResponse * @constructor - * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set */ - function DeleteSrvVSchemaResponse(properties) { + function DeleteKeyspaceResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129638,60 +128300,60 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new DeleteSrvVSchemaResponse instance using the specified properties. + * Creates a new DeleteKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse instance + * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse instance */ - DeleteSrvVSchemaResponse.create = function create(properties) { - return new DeleteSrvVSchemaResponse(properties); + DeleteKeyspaceResponse.create = function create(properties) { + return new DeleteKeyspaceResponse(properties); }; /** - * Encodes the specified DeleteSrvVSchemaResponse message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. + * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSrvVSchemaResponse.encode = function encode(message, writer) { + DeleteKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified DeleteSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. + * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer. + * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSrvVSchemaResponse.decode = function decode(reader, length) { + DeleteKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -129704,111 +128366,113 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSrvVSchemaResponse message. + * Verifies a DeleteKeyspaceResponse message. * @function verify - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSrvVSchemaResponse.verify = function verify(message) { + DeleteKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a DeleteSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse */ - DeleteSrvVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteSrvVSchemaResponse) + DeleteKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteKeyspaceResponse) return object; - return new $root.vtctldata.DeleteSrvVSchemaResponse(); + return new $root.vtctldata.DeleteKeyspaceResponse(); }; /** - * Creates a plain object from a DeleteSrvVSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.DeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse + * @param {vtctldata.DeleteKeyspaceResponse} message DeleteKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSrvVSchemaResponse.toObject = function toObject() { + DeleteKeyspaceResponse.toObject = function toObject() { return {}; }; /** - * Converts this DeleteSrvVSchemaResponse to JSON. + * Converts this DeleteKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @instance * @returns {Object.} JSON object */ - DeleteSrvVSchemaResponse.prototype.toJSON = function toJSON() { + DeleteKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSrvVSchemaResponse + * Gets the default type url for DeleteKeyspaceResponse * @function getTypeUrl - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSrvVSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteSrvVSchemaResponse"; + return typeUrlPrefix + "/vtctldata.DeleteKeyspaceResponse"; }; - return DeleteSrvVSchemaResponse; + return DeleteKeyspaceResponse; })(); - vtctldata.DeleteTabletsRequest = (function() { + vtctldata.DeleteShardsRequest = (function() { /** - * Properties of a DeleteTabletsRequest. + * Properties of a DeleteShardsRequest. * @memberof vtctldata - * @interface IDeleteTabletsRequest - * @property {Array.|null} [tablet_aliases] DeleteTabletsRequest tablet_aliases - * @property {boolean|null} [allow_primary] DeleteTabletsRequest allow_primary + * @interface IDeleteShardsRequest + * @property {Array.|null} [shards] DeleteShardsRequest shards + * @property {boolean|null} [recursive] DeleteShardsRequest recursive + * @property {boolean|null} [even_if_serving] DeleteShardsRequest even_if_serving + * @property {boolean|null} [force] DeleteShardsRequest force */ /** - * Constructs a new DeleteTabletsRequest. + * Constructs a new DeleteShardsRequest. * @memberof vtctldata - * @classdesc Represents a DeleteTabletsRequest. - * @implements IDeleteTabletsRequest + * @classdesc Represents a DeleteShardsRequest. + * @implements IDeleteShardsRequest * @constructor - * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set */ - function DeleteTabletsRequest(properties) { - this.tablet_aliases = []; + function DeleteShardsRequest(properties) { + this.shards = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129816,92 +128480,120 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * DeleteTabletsRequest tablet_aliases. - * @member {Array.} tablet_aliases - * @memberof vtctldata.DeleteTabletsRequest + * DeleteShardsRequest shards. + * @member {Array.} shards + * @memberof vtctldata.DeleteShardsRequest * @instance */ - DeleteTabletsRequest.prototype.tablet_aliases = $util.emptyArray; + DeleteShardsRequest.prototype.shards = $util.emptyArray; /** - * DeleteTabletsRequest allow_primary. - * @member {boolean} allow_primary - * @memberof vtctldata.DeleteTabletsRequest + * DeleteShardsRequest recursive. + * @member {boolean} recursive + * @memberof vtctldata.DeleteShardsRequest * @instance */ - DeleteTabletsRequest.prototype.allow_primary = false; + DeleteShardsRequest.prototype.recursive = false; /** - * Creates a new DeleteTabletsRequest instance using the specified properties. + * DeleteShardsRequest even_if_serving. + * @member {boolean} even_if_serving + * @memberof vtctldata.DeleteShardsRequest + * @instance + */ + DeleteShardsRequest.prototype.even_if_serving = false; + + /** + * DeleteShardsRequest force. + * @member {boolean} force + * @memberof vtctldata.DeleteShardsRequest + * @instance + */ + DeleteShardsRequest.prototype.force = false; + + /** + * Creates a new DeleteShardsRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest instance + * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest instance */ - DeleteTabletsRequest.create = function create(properties) { - return new DeleteTabletsRequest(properties); + DeleteShardsRequest.create = function create(properties) { + return new DeleteShardsRequest(properties); }; /** - * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. + * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode + * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsRequest.encode = function encode(message, writer) { + DeleteShardsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_aliases != null && message.tablet_aliases.length) - for (let i = 0; i < message.tablet_aliases.length; ++i) - $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); + if (message.shards != null && message.shards.length) + for (let i = 0; i < message.shards.length; ++i) + $root.vtctldata.Shard.encode(message.shards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); + if (message.even_if_serving != null && Object.hasOwnProperty.call(message, "even_if_serving")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.even_if_serving); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; /** - * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. + * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode + * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteShardsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer. + * Decodes a DeleteShardsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsRequest.decode = function decode(reader, length) { + DeleteShardsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.tablet_aliases && message.tablet_aliases.length)) - message.tablet_aliases = []; - message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); + if (!(message.shards && message.shards.length)) + message.shards = []; + message.shards.push($root.vtctldata.Shard.decode(reader, reader.uint32())); break; } case 2: { - message.allow_primary = reader.bool(); + message.recursive = reader.bool(); + break; + } + case 4: { + message.even_if_serving = reader.bool(); + break; + } + case 5: { + message.force = reader.bool(); break; } default: @@ -129913,147 +128605,164 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteShardsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTabletsRequest message. + * Verifies a DeleteShardsRequest message. * @function verify - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTabletsRequest.verify = function verify(message) { + DeleteShardsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { - if (!Array.isArray(message.tablet_aliases)) - return "tablet_aliases: array expected"; - for (let i = 0; i < message.tablet_aliases.length; ++i) { - let error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!Array.isArray(message.shards)) + return "shards: array expected"; + for (let i = 0; i < message.shards.length; ++i) { + let error = $root.vtctldata.Shard.verify(message.shards[i]); if (error) - return "tablet_aliases." + error; + return "shards." + error; } } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - if (typeof message.allow_primary !== "boolean") - return "allow_primary: boolean expected"; + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; + if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) + if (typeof message.even_if_serving !== "boolean") + return "even_if_serving: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest */ - DeleteTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteTabletsRequest) + DeleteShardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteShardsRequest) return object; - let message = new $root.vtctldata.DeleteTabletsRequest(); - if (object.tablet_aliases) { - if (!Array.isArray(object.tablet_aliases)) - throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: array expected"); - message.tablet_aliases = []; - for (let i = 0; i < object.tablet_aliases.length; ++i) { - if (typeof object.tablet_aliases[i] !== "object") - throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: object expected"); - message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); + let message = new $root.vtctldata.DeleteShardsRequest(); + if (object.shards) { + if (!Array.isArray(object.shards)) + throw TypeError(".vtctldata.DeleteShardsRequest.shards: array expected"); + message.shards = []; + for (let i = 0; i < object.shards.length; ++i) { + if (typeof object.shards[i] !== "object") + throw TypeError(".vtctldata.DeleteShardsRequest.shards: object expected"); + message.shards[i] = $root.vtctldata.Shard.fromObject(object.shards[i]); } } - if (object.allow_primary != null) - message.allow_primary = Boolean(object.allow_primary); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); + if (object.even_if_serving != null) + message.even_if_serving = Boolean(object.even_if_serving); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.DeleteTabletsRequest} message DeleteTabletsRequest + * @param {vtctldata.DeleteShardsRequest} message DeleteShardsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTabletsRequest.toObject = function toObject(message, options) { + DeleteShardsRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) - object.tablet_aliases = []; - if (options.defaults) - object.allow_primary = false; - if (message.tablet_aliases && message.tablet_aliases.length) { - object.tablet_aliases = []; - for (let j = 0; j < message.tablet_aliases.length; ++j) - object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); + object.shards = []; + if (options.defaults) { + object.recursive = false; + object.even_if_serving = false; + object.force = false; } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - object.allow_primary = message.allow_primary; + if (message.shards && message.shards.length) { + object.shards = []; + for (let j = 0; j < message.shards.length; ++j) + object.shards[j] = $root.vtctldata.Shard.toObject(message.shards[j], options); + } + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; + if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) + object.even_if_serving = message.even_if_serving; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this DeleteTabletsRequest to JSON. + * Converts this DeleteShardsRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @instance * @returns {Object.} JSON object */ - DeleteTabletsRequest.prototype.toJSON = function toJSON() { + DeleteShardsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTabletsRequest + * Gets the default type url for DeleteShardsRequest * @function getTypeUrl - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTabletsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteShardsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteTabletsRequest"; + return typeUrlPrefix + "/vtctldata.DeleteShardsRequest"; }; - return DeleteTabletsRequest; + return DeleteShardsRequest; })(); - vtctldata.DeleteTabletsResponse = (function() { + vtctldata.DeleteShardsResponse = (function() { /** - * Properties of a DeleteTabletsResponse. + * Properties of a DeleteShardsResponse. * @memberof vtctldata - * @interface IDeleteTabletsResponse + * @interface IDeleteShardsResponse */ /** - * Constructs a new DeleteTabletsResponse. + * Constructs a new DeleteShardsResponse. * @memberof vtctldata - * @classdesc Represents a DeleteTabletsResponse. - * @implements IDeleteTabletsResponse + * @classdesc Represents a DeleteShardsResponse. + * @implements IDeleteShardsResponse * @constructor - * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set */ - function DeleteTabletsResponse(properties) { + function DeleteShardsResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -130061,60 +128770,60 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new DeleteTabletsResponse instance using the specified properties. + * Creates a new DeleteShardsResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse instance + * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse instance */ - DeleteTabletsResponse.create = function create(properties) { - return new DeleteTabletsResponse(properties); + DeleteShardsResponse.create = function create(properties) { + return new DeleteShardsResponse(properties); }; /** - * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. + * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode + * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsResponse.encode = function encode(message, writer) { + DeleteShardsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. + * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode + * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteShardsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer. + * Decodes a DeleteShardsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsResponse.decode = function decode(reader, length) { + DeleteShardsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -130127,279 +128836,185 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteShardsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTabletsResponse message. + * Verifies a DeleteShardsResponse message. * @function verify - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTabletsResponse.verify = function verify(message) { + DeleteShardsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse */ - DeleteTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteTabletsResponse) + DeleteShardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteShardsResponse) return object; - return new $root.vtctldata.DeleteTabletsResponse(); + return new $root.vtctldata.DeleteShardsResponse(); }; /** - * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.DeleteTabletsResponse} message DeleteTabletsResponse + * @param {vtctldata.DeleteShardsResponse} message DeleteShardsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTabletsResponse.toObject = function toObject() { + DeleteShardsResponse.toObject = function toObject() { return {}; }; /** - * Converts this DeleteTabletsResponse to JSON. + * Converts this DeleteShardsResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @instance * @returns {Object.} JSON object */ - DeleteTabletsResponse.prototype.toJSON = function toJSON() { + DeleteShardsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTabletsResponse + * Gets the default type url for DeleteShardsResponse * @function getTypeUrl - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTabletsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteShardsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.DeleteTabletsResponse"; + return typeUrlPrefix + "/vtctldata.DeleteShardsResponse"; }; - return DeleteTabletsResponse; + return DeleteShardsResponse; })(); - vtctldata.EmergencyReparentShardRequest = (function() { - - /** - * Properties of an EmergencyReparentShardRequest. - * @memberof vtctldata - * @interface IEmergencyReparentShardRequest - * @property {string|null} [keyspace] EmergencyReparentShardRequest keyspace - * @property {string|null} [shard] EmergencyReparentShardRequest shard - * @property {topodata.ITabletAlias|null} [new_primary] EmergencyReparentShardRequest new_primary - * @property {Array.|null} [ignore_replicas] EmergencyReparentShardRequest ignore_replicas - * @property {vttime.IDuration|null} [wait_replicas_timeout] EmergencyReparentShardRequest wait_replicas_timeout - * @property {boolean|null} [prevent_cross_cell_promotion] EmergencyReparentShardRequest prevent_cross_cell_promotion - * @property {boolean|null} [wait_for_all_tablets] EmergencyReparentShardRequest wait_for_all_tablets - */ - - /** - * Constructs a new EmergencyReparentShardRequest. - * @memberof vtctldata - * @classdesc Represents an EmergencyReparentShardRequest. - * @implements IEmergencyReparentShardRequest - * @constructor - * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set - */ - function EmergencyReparentShardRequest(properties) { - this.ignore_replicas = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EmergencyReparentShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.keyspace = ""; - - /** - * EmergencyReparentShardRequest shard. - * @member {string} shard - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.shard = ""; - - /** - * EmergencyReparentShardRequest new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.new_primary = null; - - /** - * EmergencyReparentShardRequest ignore_replicas. - * @member {Array.} ignore_replicas - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.ignore_replicas = $util.emptyArray; + vtctldata.DeleteSrvVSchemaRequest = (function() { - /** - * EmergencyReparentShardRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance + /** + * Properties of a DeleteSrvVSchemaRequest. + * @memberof vtctldata + * @interface IDeleteSrvVSchemaRequest + * @property {string|null} [cell] DeleteSrvVSchemaRequest cell */ - EmergencyReparentShardRequest.prototype.wait_replicas_timeout = null; /** - * EmergencyReparentShardRequest prevent_cross_cell_promotion. - * @member {boolean} prevent_cross_cell_promotion - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance + * Constructs a new DeleteSrvVSchemaRequest. + * @memberof vtctldata + * @classdesc Represents a DeleteSrvVSchemaRequest. + * @implements IDeleteSrvVSchemaRequest + * @constructor + * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set */ - EmergencyReparentShardRequest.prototype.prevent_cross_cell_promotion = false; + function DeleteSrvVSchemaRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * EmergencyReparentShardRequest wait_for_all_tablets. - * @member {boolean} wait_for_all_tablets - * @memberof vtctldata.EmergencyReparentShardRequest + * DeleteSrvVSchemaRequest cell. + * @member {string} cell + * @memberof vtctldata.DeleteSrvVSchemaRequest * @instance */ - EmergencyReparentShardRequest.prototype.wait_for_all_tablets = false; + DeleteSrvVSchemaRequest.prototype.cell = ""; /** - * Creates a new EmergencyReparentShardRequest instance using the specified properties. + * Creates a new DeleteSrvVSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest instance + * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest instance */ - EmergencyReparentShardRequest.create = function create(properties) { - return new EmergencyReparentShardRequest(properties); + DeleteSrvVSchemaRequest.create = function create(properties) { + return new DeleteSrvVSchemaRequest(properties); }; /** - * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaRequest message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardRequest.encode = function encode(message, writer) { + DeleteSrvVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.ignore_replicas != null && message.ignore_replicas.length) - for (let i = 0; i < message.ignore_replicas.length; ++i) - $root.topodata.TabletAlias.encode(message.ignore_replicas[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.prevent_cross_cell_promotion != null && Object.hasOwnProperty.call(message, "prevent_cross_cell_promotion")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prevent_cross_cell_promotion); - if (message.wait_for_all_tablets != null && Object.hasOwnProperty.call(message, "wait_for_all_tablets")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.wait_for_all_tablets); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); return writer; }; /** - * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. + * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardRequest.decode = function decode(reader, length) { + DeleteSrvVSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.shard = reader.string(); - break; - } - case 3: { - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.ignore_replicas && message.ignore_replicas.length)) - message.ignore_replicas = []; - message.ignore_replicas.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - } - case 5: { - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - } - case 6: { - message.prevent_cross_cell_promotion = reader.bool(); - break; - } - case 7: { - message.wait_for_all_tablets = reader.bool(); + message.cell = reader.string(); break; } default: @@ -130411,203 +129026,121 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EmergencyReparentShardRequest message. + * Verifies a DeleteSrvVSchemaRequest message. * @function verify - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EmergencyReparentShardRequest.verify = function verify(message) { + DeleteSrvVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.new_primary != null && message.hasOwnProperty("new_primary")) { - let error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.ignore_replicas != null && message.hasOwnProperty("ignore_replicas")) { - if (!Array.isArray(message.ignore_replicas)) - return "ignore_replicas: array expected"; - for (let i = 0; i < message.ignore_replicas.length; ++i) { - let error = $root.topodata.TabletAlias.verify(message.ignore_replicas[i]); - if (error) - return "ignore_replicas." + error; - } - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - let error = $root.vttime.Duration.verify(message.wait_replicas_timeout); - if (error) - return "wait_replicas_timeout." + error; - } - if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) - if (typeof message.prevent_cross_cell_promotion !== "boolean") - return "prevent_cross_cell_promotion: boolean expected"; - if (message.wait_for_all_tablets != null && message.hasOwnProperty("wait_for_all_tablets")) - if (typeof message.wait_for_all_tablets !== "boolean") - return "wait_for_all_tablets: boolean expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest */ - EmergencyReparentShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.EmergencyReparentShardRequest) + DeleteSrvVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteSrvVSchemaRequest) return object; - let message = new $root.vtctldata.EmergencyReparentShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.ignore_replicas) { - if (!Array.isArray(object.ignore_replicas)) - throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: array expected"); - message.ignore_replicas = []; - for (let i = 0; i < object.ignore_replicas.length; ++i) { - if (typeof object.ignore_replicas[i] !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: object expected"); - message.ignore_replicas[i] = $root.topodata.TabletAlias.fromObject(object.ignore_replicas[i]); - } - } - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); - } - if (object.prevent_cross_cell_promotion != null) - message.prevent_cross_cell_promotion = Boolean(object.prevent_cross_cell_promotion); - if (object.wait_for_all_tablets != null) - message.wait_for_all_tablets = Boolean(object.wait_for_all_tablets); + let message = new $root.vtctldata.DeleteSrvVSchemaRequest(); + if (object.cell != null) + message.cell = String(object.cell); return message; }; /** - * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSrvVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.EmergencyReparentShardRequest} message EmergencyReparentShardRequest + * @param {vtctldata.DeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EmergencyReparentShardRequest.toObject = function toObject(message, options) { + DeleteSrvVSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.ignore_replicas = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.wait_replicas_timeout = null; - object.prevent_cross_cell_promotion = false; - object.wait_for_all_tablets = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.ignore_replicas && message.ignore_replicas.length) { - object.ignore_replicas = []; - for (let j = 0; j < message.ignore_replicas.length; ++j) - object.ignore_replicas[j] = $root.topodata.TabletAlias.toObject(message.ignore_replicas[j], options); - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); - if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) - object.prevent_cross_cell_promotion = message.prevent_cross_cell_promotion; - if (message.wait_for_all_tablets != null && message.hasOwnProperty("wait_for_all_tablets")) - object.wait_for_all_tablets = message.wait_for_all_tablets; + if (options.defaults) + object.cell = ""; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; return object; }; /** - * Converts this EmergencyReparentShardRequest to JSON. + * Converts this DeleteSrvVSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @instance * @returns {Object.} JSON object */ - EmergencyReparentShardRequest.prototype.toJSON = function toJSON() { + DeleteSrvVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EmergencyReparentShardRequest + * Gets the default type url for DeleteSrvVSchemaRequest * @function getTypeUrl - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EmergencyReparentShardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteSrvVSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.EmergencyReparentShardRequest"; + return typeUrlPrefix + "/vtctldata.DeleteSrvVSchemaRequest"; }; - return EmergencyReparentShardRequest; + return DeleteSrvVSchemaRequest; })(); - vtctldata.EmergencyReparentShardResponse = (function() { + vtctldata.DeleteSrvVSchemaResponse = (function() { /** - * Properties of an EmergencyReparentShardResponse. + * Properties of a DeleteSrvVSchemaResponse. * @memberof vtctldata - * @interface IEmergencyReparentShardResponse - * @property {string|null} [keyspace] EmergencyReparentShardResponse keyspace - * @property {string|null} [shard] EmergencyReparentShardResponse shard - * @property {topodata.ITabletAlias|null} [promoted_primary] EmergencyReparentShardResponse promoted_primary - * @property {Array.|null} [events] EmergencyReparentShardResponse events + * @interface IDeleteSrvVSchemaResponse */ /** - * Constructs a new EmergencyReparentShardResponse. + * Constructs a new DeleteSrvVSchemaResponse. * @memberof vtctldata - * @classdesc Represents an EmergencyReparentShardResponse. - * @implements IEmergencyReparentShardResponse + * @classdesc Represents a DeleteSrvVSchemaResponse. + * @implements IDeleteSrvVSchemaResponse * @constructor - * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set */ - function EmergencyReparentShardResponse(properties) { - this.events = []; + function DeleteSrvVSchemaResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -130615,122 +129148,63 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * EmergencyReparentShardResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.keyspace = ""; - - /** - * EmergencyReparentShardResponse shard. - * @member {string} shard - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.shard = ""; - - /** - * EmergencyReparentShardResponse promoted_primary. - * @member {topodata.ITabletAlias|null|undefined} promoted_primary - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.promoted_primary = null; - - /** - * EmergencyReparentShardResponse events. - * @member {Array.} events - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.events = $util.emptyArray; - - /** - * Creates a new EmergencyReparentShardResponse instance using the specified properties. + * Creates a new DeleteSrvVSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse instance + * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse instance */ - EmergencyReparentShardResponse.create = function create(properties) { - return new EmergencyReparentShardResponse(properties); + DeleteSrvVSchemaResponse.create = function create(properties) { + return new DeleteSrvVSchemaResponse(properties); }; /** - * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaResponse message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardResponse.encode = function encode(message, writer) { + DeleteSrvVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) - $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.events != null && message.events.length) - for (let i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. + * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardResponse.decode = function decode(reader, length) { + DeleteSrvVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.shard = reader.string(); - break; - } - case 3: { - message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -130740,173 +129214,111 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EmergencyReparentShardResponse message. + * Verifies a DeleteSrvVSchemaResponse message. * @function verify - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EmergencyReparentShardResponse.verify = function verify(message) { + DeleteSrvVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { - let error = $root.topodata.TabletAlias.verify(message.promoted_primary); - if (error) - return "promoted_primary." + error; - } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (let i = 0; i < message.events.length; ++i) { - let error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } return null; }; /** - * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse */ - EmergencyReparentShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.EmergencyReparentShardResponse) + DeleteSrvVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteSrvVSchemaResponse) return object; - let message = new $root.vtctldata.EmergencyReparentShardResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.promoted_primary != null) { - if (typeof object.promoted_primary !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardResponse.promoted_primary: object expected"); - message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: array expected"); - message.events = []; - for (let i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } - } - return message; + return new $root.vtctldata.DeleteSrvVSchemaResponse(); }; /** - * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSrvVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.EmergencyReparentShardResponse} message EmergencyReparentShardResponse + * @param {vtctldata.DeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EmergencyReparentShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.promoted_primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) - object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); - if (message.events && message.events.length) { - object.events = []; - for (let j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); - } - return object; + DeleteSrvVSchemaResponse.toObject = function toObject() { + return {}; }; /** - * Converts this EmergencyReparentShardResponse to JSON. + * Converts this DeleteSrvVSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @instance * @returns {Object.} JSON object */ - EmergencyReparentShardResponse.prototype.toJSON = function toJSON() { + DeleteSrvVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EmergencyReparentShardResponse + * Gets the default type url for DeleteSrvVSchemaResponse * @function getTypeUrl - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EmergencyReparentShardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteSrvVSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.EmergencyReparentShardResponse"; + return typeUrlPrefix + "/vtctldata.DeleteSrvVSchemaResponse"; }; - return EmergencyReparentShardResponse; + return DeleteSrvVSchemaResponse; })(); - vtctldata.ExecuteFetchAsAppRequest = (function() { + vtctldata.DeleteTabletsRequest = (function() { /** - * Properties of an ExecuteFetchAsAppRequest. + * Properties of a DeleteTabletsRequest. * @memberof vtctldata - * @interface IExecuteFetchAsAppRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsAppRequest tablet_alias - * @property {string|null} [query] ExecuteFetchAsAppRequest query - * @property {number|Long|null} [max_rows] ExecuteFetchAsAppRequest max_rows - * @property {boolean|null} [use_pool] ExecuteFetchAsAppRequest use_pool + * @interface IDeleteTabletsRequest + * @property {Array.|null} [tablet_aliases] DeleteTabletsRequest tablet_aliases + * @property {boolean|null} [allow_primary] DeleteTabletsRequest allow_primary */ /** - * Constructs a new ExecuteFetchAsAppRequest. + * Constructs a new DeleteTabletsRequest. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsAppRequest. - * @implements IExecuteFetchAsAppRequest + * @classdesc Represents a DeleteTabletsRequest. + * @implements IDeleteTabletsRequest * @constructor - * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set */ - function ExecuteFetchAsAppRequest(properties) { + function DeleteTabletsRequest(properties) { + this.tablet_aliases = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -130914,117 +129326,92 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteFetchAsAppRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.tablet_alias = null; - - /** - * ExecuteFetchAsAppRequest query. - * @member {string} query - * @memberof vtctldata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.query = ""; - - /** - * ExecuteFetchAsAppRequest max_rows. - * @member {number|Long} max_rows - * @memberof vtctldata.ExecuteFetchAsAppRequest + * DeleteTabletsRequest tablet_aliases. + * @member {Array.} tablet_aliases + * @memberof vtctldata.DeleteTabletsRequest * @instance */ - ExecuteFetchAsAppRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DeleteTabletsRequest.prototype.tablet_aliases = $util.emptyArray; /** - * ExecuteFetchAsAppRequest use_pool. - * @member {boolean} use_pool - * @memberof vtctldata.ExecuteFetchAsAppRequest + * DeleteTabletsRequest allow_primary. + * @member {boolean} allow_primary + * @memberof vtctldata.DeleteTabletsRequest * @instance */ - ExecuteFetchAsAppRequest.prototype.use_pool = false; + DeleteTabletsRequest.prototype.allow_primary = false; /** - * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. + * Creates a new DeleteTabletsRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest instance + * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest instance */ - ExecuteFetchAsAppRequest.create = function create(properties) { - return new ExecuteFetchAsAppRequest(properties); + DeleteTabletsRequest.create = function create(properties) { + return new DeleteTabletsRequest(properties); }; /** - * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. + * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode + * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppRequest.encode = function encode(message, writer) { + DeleteTabletsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); - if (message.use_pool != null && Object.hasOwnProperty.call(message, "use_pool")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.use_pool); + if (message.tablet_aliases != null && message.tablet_aliases.length) + for (let i = 0; i < message.tablet_aliases.length; ++i) + $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); return writer; }; /** - * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. + * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode + * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. + * Decodes a DeleteTabletsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppRequest.decode = function decode(reader, length) { + DeleteTabletsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + if (!(message.tablet_aliases && message.tablet_aliases.length)) + message.tablet_aliases = []; + message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); break; } case 2: { - message.query = reader.string(); - break; - } - case 3: { - message.max_rows = reader.int64(); - break; - } - case 4: { - message.use_pool = reader.bool(); + message.allow_primary = reader.bool(); break; } default: @@ -131036,244 +129423,211 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTabletsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsAppRequest message. + * Verifies a DeleteTabletsRequest message. * @function verify - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsAppRequest.verify = function verify(message) { + DeleteTabletsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; + if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { + if (!Array.isArray(message.tablet_aliases)) + return "tablet_aliases: array expected"; + for (let i = 0; i < message.tablet_aliases.length; ++i) { + let error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); + if (error) + return "tablet_aliases." + error; + } } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - if (message.use_pool != null && message.hasOwnProperty("use_pool")) - if (typeof message.use_pool !== "boolean") - return "use_pool: boolean expected"; + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + if (typeof message.allow_primary !== "boolean") + return "allow_primary: boolean expected"; return null; }; /** - * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest */ - ExecuteFetchAsAppRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsAppRequest) + DeleteTabletsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteTabletsRequest) return object; - let message = new $root.vtctldata.ExecuteFetchAsAppRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsAppRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + let message = new $root.vtctldata.DeleteTabletsRequest(); + if (object.tablet_aliases) { + if (!Array.isArray(object.tablet_aliases)) + throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: array expected"); + message.tablet_aliases = []; + for (let i = 0; i < object.tablet_aliases.length; ++i) { + if (typeof object.tablet_aliases[i] !== "object") + throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: object expected"); + message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); + } } - if (object.query != null) - message.query = String(object.query); - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); - if (object.use_pool != null) - message.use_pool = Boolean(object.use_pool); + if (object.allow_primary != null) + message.allow_primary = Boolean(object.allow_primary); return message; }; /** - * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.ExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest + * @param {vtctldata.DeleteTabletsRequest} message DeleteTabletsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsAppRequest.toObject = function toObject(message, options) { + DeleteTabletsRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.query = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - object.use_pool = false; + if (options.arrays || options.defaults) + object.tablet_aliases = []; + if (options.defaults) + object.allow_primary = false; + if (message.tablet_aliases && message.tablet_aliases.length) { + object.tablet_aliases = []; + for (let j = 0; j < message.tablet_aliases.length; ++j) + object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; - if (message.use_pool != null && message.hasOwnProperty("use_pool")) - object.use_pool = message.use_pool; + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + object.allow_primary = message.allow_primary; return object; }; /** - * Converts this ExecuteFetchAsAppRequest to JSON. + * Converts this DeleteTabletsRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsAppRequest.prototype.toJSON = function toJSON() { + DeleteTabletsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteFetchAsAppRequest + * Gets the default type url for DeleteTabletsRequest * @function getTypeUrl - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteFetchAsAppRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteTabletsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteFetchAsAppRequest"; + return typeUrlPrefix + "/vtctldata.DeleteTabletsRequest"; }; - return ExecuteFetchAsAppRequest; + return DeleteTabletsRequest; })(); - vtctldata.ExecuteFetchAsAppResponse = (function() { + vtctldata.DeleteTabletsResponse = (function() { /** - * Properties of an ExecuteFetchAsAppResponse. + * Properties of a DeleteTabletsResponse. * @memberof vtctldata - * @interface IExecuteFetchAsAppResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsAppResponse result + * @interface IDeleteTabletsResponse */ /** - * Constructs a new ExecuteFetchAsAppResponse. + * Constructs a new DeleteTabletsResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsAppResponse. - * @implements IExecuteFetchAsAppResponse + * @classdesc Represents a DeleteTabletsResponse. + * @implements IDeleteTabletsResponse * @constructor - * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set */ - function ExecuteFetchAsAppResponse(properties) { + function DeleteTabletsResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsAppResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof vtctldata.ExecuteFetchAsAppResponse - * @instance - */ - ExecuteFetchAsAppResponse.prototype.result = null; + } /** - * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. + * Creates a new DeleteTabletsResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse instance + * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse instance */ - ExecuteFetchAsAppResponse.create = function create(properties) { - return new ExecuteFetchAsAppResponse(properties); + DeleteTabletsResponse.create = function create(properties) { + return new DeleteTabletsResponse(properties); }; /** - * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. + * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode + * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppResponse.encode = function encode(message, writer) { + DeleteTabletsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. + * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode + * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. + * Decodes a DeleteTabletsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppResponse.decode = function decode(reader, length) { + DeleteTabletsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -131283,131 +129637,116 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteTabletsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsAppResponse message. + * Verifies a DeleteTabletsResponse message. * @function verify - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsAppResponse.verify = function verify(message) { + DeleteTabletsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - let error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } return null; }; /** - * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse */ - ExecuteFetchAsAppResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsAppResponse) + DeleteTabletsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteTabletsResponse) return object; - let message = new $root.vtctldata.ExecuteFetchAsAppResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsAppResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; + return new $root.vtctldata.DeleteTabletsResponse(); }; /** - * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.ExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse + * @param {vtctldata.DeleteTabletsResponse} message DeleteTabletsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsAppResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; + DeleteTabletsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ExecuteFetchAsAppResponse to JSON. + * Converts this DeleteTabletsResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsAppResponse.prototype.toJSON = function toJSON() { + DeleteTabletsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteFetchAsAppResponse + * Gets the default type url for DeleteTabletsResponse * @function getTypeUrl - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteFetchAsAppResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteTabletsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteFetchAsAppResponse"; + return typeUrlPrefix + "/vtctldata.DeleteTabletsResponse"; }; - return ExecuteFetchAsAppResponse; + return DeleteTabletsResponse; })(); - vtctldata.ExecuteFetchAsDBARequest = (function() { + vtctldata.EmergencyReparentShardRequest = (function() { /** - * Properties of an ExecuteFetchAsDBARequest. + * Properties of an EmergencyReparentShardRequest. * @memberof vtctldata - * @interface IExecuteFetchAsDBARequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsDBARequest tablet_alias - * @property {string|null} [query] ExecuteFetchAsDBARequest query - * @property {number|Long|null} [max_rows] ExecuteFetchAsDBARequest max_rows - * @property {boolean|null} [disable_binlogs] ExecuteFetchAsDBARequest disable_binlogs - * @property {boolean|null} [reload_schema] ExecuteFetchAsDBARequest reload_schema + * @interface IEmergencyReparentShardRequest + * @property {string|null} [keyspace] EmergencyReparentShardRequest keyspace + * @property {string|null} [shard] EmergencyReparentShardRequest shard + * @property {topodata.ITabletAlias|null} [new_primary] EmergencyReparentShardRequest new_primary + * @property {Array.|null} [ignore_replicas] EmergencyReparentShardRequest ignore_replicas + * @property {vttime.IDuration|null} [wait_replicas_timeout] EmergencyReparentShardRequest wait_replicas_timeout + * @property {boolean|null} [prevent_cross_cell_promotion] EmergencyReparentShardRequest prevent_cross_cell_promotion + * @property {boolean|null} [wait_for_all_tablets] EmergencyReparentShardRequest wait_for_all_tablets */ /** - * Constructs a new ExecuteFetchAsDBARequest. + * Constructs a new EmergencyReparentShardRequest. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsDBARequest. - * @implements IExecuteFetchAsDBARequest + * @classdesc Represents an EmergencyReparentShardRequest. + * @implements IEmergencyReparentShardRequest * @constructor - * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set + * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set */ - function ExecuteFetchAsDBARequest(properties) { + function EmergencyReparentShardRequest(properties) { + this.ignore_replicas = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -131415,131 +129754,162 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteFetchAsDBARequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteFetchAsDBARequest + * EmergencyReparentShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - ExecuteFetchAsDBARequest.prototype.tablet_alias = null; + EmergencyReparentShardRequest.prototype.keyspace = ""; /** - * ExecuteFetchAsDBARequest query. - * @member {string} query - * @memberof vtctldata.ExecuteFetchAsDBARequest + * EmergencyReparentShardRequest shard. + * @member {string} shard + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - ExecuteFetchAsDBARequest.prototype.query = ""; + EmergencyReparentShardRequest.prototype.shard = ""; /** - * ExecuteFetchAsDBARequest max_rows. - * @member {number|Long} max_rows - * @memberof vtctldata.ExecuteFetchAsDBARequest + * EmergencyReparentShardRequest new_primary. + * @member {topodata.ITabletAlias|null|undefined} new_primary + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - ExecuteFetchAsDBARequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EmergencyReparentShardRequest.prototype.new_primary = null; /** - * ExecuteFetchAsDBARequest disable_binlogs. - * @member {boolean} disable_binlogs - * @memberof vtctldata.ExecuteFetchAsDBARequest + * EmergencyReparentShardRequest ignore_replicas. + * @member {Array.} ignore_replicas + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - ExecuteFetchAsDBARequest.prototype.disable_binlogs = false; + EmergencyReparentShardRequest.prototype.ignore_replicas = $util.emptyArray; /** - * ExecuteFetchAsDBARequest reload_schema. - * @member {boolean} reload_schema - * @memberof vtctldata.ExecuteFetchAsDBARequest + * EmergencyReparentShardRequest wait_replicas_timeout. + * @member {vttime.IDuration|null|undefined} wait_replicas_timeout + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - ExecuteFetchAsDBARequest.prototype.reload_schema = false; + EmergencyReparentShardRequest.prototype.wait_replicas_timeout = null; /** - * Creates a new ExecuteFetchAsDBARequest instance using the specified properties. + * EmergencyReparentShardRequest prevent_cross_cell_promotion. + * @member {boolean} prevent_cross_cell_promotion + * @memberof vtctldata.EmergencyReparentShardRequest + * @instance + */ + EmergencyReparentShardRequest.prototype.prevent_cross_cell_promotion = false; + + /** + * EmergencyReparentShardRequest wait_for_all_tablets. + * @member {boolean} wait_for_all_tablets + * @memberof vtctldata.EmergencyReparentShardRequest + * @instance + */ + EmergencyReparentShardRequest.prototype.wait_for_all_tablets = false; + + /** + * Creates a new EmergencyReparentShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest instance + * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest instance */ - ExecuteFetchAsDBARequest.create = function create(properties) { - return new ExecuteFetchAsDBARequest(properties); + EmergencyReparentShardRequest.create = function create(properties) { + return new EmergencyReparentShardRequest(properties); }; /** - * Encodes the specified ExecuteFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. + * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBARequest.encode = function encode(message, writer) { + EmergencyReparentShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); - if (message.disable_binlogs != null && Object.hasOwnProperty.call(message, "disable_binlogs")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disable_binlogs); - if (message.reload_schema != null && Object.hasOwnProperty.call(message, "reload_schema")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reload_schema); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) + $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.ignore_replicas != null && message.ignore_replicas.length) + for (let i = 0; i < message.ignore_replicas.length; ++i) + $root.topodata.TabletAlias.encode(message.ignore_replicas[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) + $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.prevent_cross_cell_promotion != null && Object.hasOwnProperty.call(message, "prevent_cross_cell_promotion")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prevent_cross_cell_promotion); + if (message.wait_for_all_tablets != null && Object.hasOwnProperty.call(message, "wait_for_all_tablets")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.wait_for_all_tablets); return writer; }; /** - * Encodes the specified ExecuteFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. + * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBARequest.encodeDelimited = function encodeDelimited(message, writer) { + EmergencyReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer. + * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBARequest.decode = function decode(reader, length) { + EmergencyReparentShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBARequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; } case 2: { - message.query = reader.string(); + message.shard = reader.string(); break; } case 3: { - message.max_rows = reader.int64(); + message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; } case 4: { - message.disable_binlogs = reader.bool(); + if (!(message.ignore_replicas && message.ignore_replicas.length)) + message.ignore_replicas = []; + message.ignore_replicas.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); break; } case 5: { - message.reload_schema = reader.bool(); + message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.prevent_cross_cell_promotion = reader.bool(); + break; + } + case 7: { + message.wait_for_all_tablets = reader.bool(); break; } default: @@ -131551,174 +129921,203 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer, length delimited. + * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBARequest.decodeDelimited = function decodeDelimited(reader) { + EmergencyReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsDBARequest message. + * Verifies an EmergencyReparentShardRequest message. * @function verify - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsDBARequest.verify = function verify(message) { + EmergencyReparentShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + 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.new_primary != null && message.hasOwnProperty("new_primary")) { + let error = $root.topodata.TabletAlias.verify(message.new_primary); if (error) - return "tablet_alias." + error; + return "new_primary." + error; } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) - if (typeof message.disable_binlogs !== "boolean") - return "disable_binlogs: boolean expected"; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - if (typeof message.reload_schema !== "boolean") - return "reload_schema: boolean expected"; + if (message.ignore_replicas != null && message.hasOwnProperty("ignore_replicas")) { + if (!Array.isArray(message.ignore_replicas)) + return "ignore_replicas: array expected"; + for (let i = 0; i < message.ignore_replicas.length; ++i) { + let error = $root.topodata.TabletAlias.verify(message.ignore_replicas[i]); + if (error) + return "ignore_replicas." + error; + } + } + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { + let error = $root.vttime.Duration.verify(message.wait_replicas_timeout); + if (error) + return "wait_replicas_timeout." + error; + } + if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) + if (typeof message.prevent_cross_cell_promotion !== "boolean") + return "prevent_cross_cell_promotion: boolean expected"; + if (message.wait_for_all_tablets != null && message.hasOwnProperty("wait_for_all_tablets")) + if (typeof message.wait_for_all_tablets !== "boolean") + return "wait_for_all_tablets: boolean expected"; return null; }; /** - * Creates an ExecuteFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. + * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest */ - ExecuteFetchAsDBARequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsDBARequest) + EmergencyReparentShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.EmergencyReparentShardRequest) return object; - let message = new $root.vtctldata.ExecuteFetchAsDBARequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsDBARequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + let message = new $root.vtctldata.EmergencyReparentShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.new_primary != null) { + if (typeof object.new_primary !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardRequest.new_primary: object expected"); + message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); } - if (object.query != null) - message.query = String(object.query); - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); - if (object.disable_binlogs != null) - message.disable_binlogs = Boolean(object.disable_binlogs); - if (object.reload_schema != null) - message.reload_schema = Boolean(object.reload_schema); + if (object.ignore_replicas) { + if (!Array.isArray(object.ignore_replicas)) + throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: array expected"); + message.ignore_replicas = []; + for (let i = 0; i < object.ignore_replicas.length; ++i) { + if (typeof object.ignore_replicas[i] !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: object expected"); + message.ignore_replicas[i] = $root.topodata.TabletAlias.fromObject(object.ignore_replicas[i]); + } + } + if (object.wait_replicas_timeout != null) { + if (typeof object.wait_replicas_timeout !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout: object expected"); + message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); + } + if (object.prevent_cross_cell_promotion != null) + message.prevent_cross_cell_promotion = Boolean(object.prevent_cross_cell_promotion); + if (object.wait_for_all_tablets != null) + message.wait_for_all_tablets = Boolean(object.wait_for_all_tablets); return message; }; /** - * Creates a plain object from an ExecuteFetchAsDBARequest message. Also converts values to other types if specified. + * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.ExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest + * @param {vtctldata.EmergencyReparentShardRequest} message EmergencyReparentShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsDBARequest.toObject = function toObject(message, options) { + EmergencyReparentShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; + if (options.arrays || options.defaults) + object.ignore_replicas = []; if (options.defaults) { - object.tablet_alias = null; - object.query = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - object.disable_binlogs = false; - object.reload_schema = false; + object.keyspace = ""; + object.shard = ""; + object.new_primary = null; + object.wait_replicas_timeout = null; + object.prevent_cross_cell_promotion = false; + object.wait_for_all_tablets = false; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; - if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) - object.disable_binlogs = message.disable_binlogs; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - object.reload_schema = message.reload_schema; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.new_primary != null && message.hasOwnProperty("new_primary")) + object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); + if (message.ignore_replicas && message.ignore_replicas.length) { + object.ignore_replicas = []; + for (let j = 0; j < message.ignore_replicas.length; ++j) + object.ignore_replicas[j] = $root.topodata.TabletAlias.toObject(message.ignore_replicas[j], options); + } + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) + object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); + if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) + object.prevent_cross_cell_promotion = message.prevent_cross_cell_promotion; + if (message.wait_for_all_tablets != null && message.hasOwnProperty("wait_for_all_tablets")) + object.wait_for_all_tablets = message.wait_for_all_tablets; return object; }; /** - * Converts this ExecuteFetchAsDBARequest to JSON. + * Converts this EmergencyReparentShardRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsDBARequest.prototype.toJSON = function toJSON() { + EmergencyReparentShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteFetchAsDBARequest + * Gets the default type url for EmergencyReparentShardRequest * @function getTypeUrl - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteFetchAsDBARequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EmergencyReparentShardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteFetchAsDBARequest"; + return typeUrlPrefix + "/vtctldata.EmergencyReparentShardRequest"; }; - return ExecuteFetchAsDBARequest; + return EmergencyReparentShardRequest; })(); - vtctldata.ExecuteFetchAsDBAResponse = (function() { + vtctldata.EmergencyReparentShardResponse = (function() { /** - * Properties of an ExecuteFetchAsDBAResponse. + * Properties of an EmergencyReparentShardResponse. * @memberof vtctldata - * @interface IExecuteFetchAsDBAResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsDBAResponse result + * @interface IEmergencyReparentShardResponse + * @property {string|null} [keyspace] EmergencyReparentShardResponse keyspace + * @property {string|null} [shard] EmergencyReparentShardResponse shard + * @property {topodata.ITabletAlias|null} [promoted_primary] EmergencyReparentShardResponse promoted_primary + * @property {Array.|null} [events] EmergencyReparentShardResponse events */ /** - * Constructs a new ExecuteFetchAsDBAResponse. + * Constructs a new EmergencyReparentShardResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsDBAResponse. - * @implements IExecuteFetchAsDBAResponse + * @classdesc Represents an EmergencyReparentShardResponse. + * @implements IEmergencyReparentShardResponse * @constructor - * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set + * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set */ - function ExecuteFetchAsDBAResponse(properties) { + function EmergencyReparentShardResponse(properties) { + this.events = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -131726,75 +130125,120 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteFetchAsDBAResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * EmergencyReparentShardResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.EmergencyReparentShardResponse + * @instance + */ + EmergencyReparentShardResponse.prototype.keyspace = ""; + + /** + * EmergencyReparentShardResponse shard. + * @member {string} shard + * @memberof vtctldata.EmergencyReparentShardResponse + * @instance + */ + EmergencyReparentShardResponse.prototype.shard = ""; + + /** + * EmergencyReparentShardResponse promoted_primary. + * @member {topodata.ITabletAlias|null|undefined} promoted_primary + * @memberof vtctldata.EmergencyReparentShardResponse + * @instance + */ + EmergencyReparentShardResponse.prototype.promoted_primary = null; + + /** + * EmergencyReparentShardResponse events. + * @member {Array.} events + * @memberof vtctldata.EmergencyReparentShardResponse * @instance */ - ExecuteFetchAsDBAResponse.prototype.result = null; + EmergencyReparentShardResponse.prototype.events = $util.emptyArray; /** - * Creates a new ExecuteFetchAsDBAResponse instance using the specified properties. + * Creates a new EmergencyReparentShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse instance + * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse instance */ - ExecuteFetchAsDBAResponse.create = function create(properties) { - return new ExecuteFetchAsDBAResponse(properties); + EmergencyReparentShardResponse.create = function create(properties) { + return new EmergencyReparentShardResponse(properties); }; /** - * Encodes the specified ExecuteFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. + * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBAResponse.encode = function encode(message, writer) { + EmergencyReparentShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) + $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecuteFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. + * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBAResponse.encodeDelimited = function encodeDelimited(message, writer) { + EmergencyReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer. + * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBAResponse.decode = function decode(reader, length) { + EmergencyReparentShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + } + case 2: { + message.shard = reader.string(); + break; + } + case 3: { + message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.logutil.Event.decode(reader, reader.uint32())); break; } default: @@ -131806,128 +130250,173 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer, length delimited. + * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBAResponse.decodeDelimited = function decodeDelimited(reader) { + EmergencyReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsDBAResponse message. + * Verifies an EmergencyReparentShardResponse message. * @function verify - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsDBAResponse.verify = function verify(message) { + EmergencyReparentShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - let error = $root.query.QueryResult.verify(message.result); + 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.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { + let error = $root.topodata.TabletAlias.verify(message.promoted_primary); if (error) - return "result." + error; + return "promoted_primary." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.logutil.Event.verify(message.events[i]); + if (error) + return "events." + error; + } } return null; }; /** - * Creates an ExecuteFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse */ - ExecuteFetchAsDBAResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsDBAResponse) + EmergencyReparentShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.EmergencyReparentShardResponse) return object; - let message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsDBAResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + let message = new $root.vtctldata.EmergencyReparentShardResponse(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.promoted_primary != null) { + if (typeof object.promoted_primary !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardResponse.promoted_primary: object expected"); + message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: object expected"); + message.events[i] = $root.logutil.Event.fromObject(object.events[i]); + } } return message; }; /** - * Creates a plain object from an ExecuteFetchAsDBAResponse message. Also converts values to other types if specified. + * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.ExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse + * @param {vtctldata.EmergencyReparentShardResponse} message EmergencyReparentShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsDBAResponse.toObject = function toObject(message, options) { + EmergencyReparentShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.promoted_primary = null; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) + object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + } return object; }; /** - * Converts this ExecuteFetchAsDBAResponse to JSON. + * Converts this EmergencyReparentShardResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsDBAResponse.prototype.toJSON = function toJSON() { + EmergencyReparentShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteFetchAsDBAResponse + * Gets the default type url for EmergencyReparentShardResponse * @function getTypeUrl - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteFetchAsDBAResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EmergencyReparentShardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteFetchAsDBAResponse"; + return typeUrlPrefix + "/vtctldata.EmergencyReparentShardResponse"; }; - return ExecuteFetchAsDBAResponse; + return EmergencyReparentShardResponse; })(); - vtctldata.ExecuteHookRequest = (function() { + vtctldata.ExecuteFetchAsAppRequest = (function() { /** - * Properties of an ExecuteHookRequest. + * Properties of an ExecuteFetchAsAppRequest. * @memberof vtctldata - * @interface IExecuteHookRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteHookRequest tablet_alias - * @property {tabletmanagerdata.IExecuteHookRequest|null} [tablet_hook_request] ExecuteHookRequest tablet_hook_request + * @interface IExecuteFetchAsAppRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsAppRequest tablet_alias + * @property {string|null} [query] ExecuteFetchAsAppRequest query + * @property {number|Long|null} [max_rows] ExecuteFetchAsAppRequest max_rows + * @property {boolean|null} [use_pool] ExecuteFetchAsAppRequest use_pool */ /** - * Constructs a new ExecuteHookRequest. + * Constructs a new ExecuteFetchAsAppRequest. * @memberof vtctldata - * @classdesc Represents an ExecuteHookRequest. - * @implements IExecuteHookRequest + * @classdesc Represents an ExecuteFetchAsAppRequest. + * @implements IExecuteFetchAsAppRequest * @constructor - * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set */ - function ExecuteHookRequest(properties) { + function ExecuteFetchAsAppRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -131935,80 +130424,100 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteHookRequest tablet_alias. + * ExecuteFetchAsAppRequest tablet_alias. * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @instance */ - ExecuteHookRequest.prototype.tablet_alias = null; + ExecuteFetchAsAppRequest.prototype.tablet_alias = null; /** - * ExecuteHookRequest tablet_hook_request. - * @member {tabletmanagerdata.IExecuteHookRequest|null|undefined} tablet_hook_request - * @memberof vtctldata.ExecuteHookRequest + * ExecuteFetchAsAppRequest query. + * @member {string} query + * @memberof vtctldata.ExecuteFetchAsAppRequest * @instance */ - ExecuteHookRequest.prototype.tablet_hook_request = null; + ExecuteFetchAsAppRequest.prototype.query = ""; /** - * Creates a new ExecuteHookRequest instance using the specified properties. + * ExecuteFetchAsAppRequest max_rows. + * @member {number|Long} max_rows + * @memberof vtctldata.ExecuteFetchAsAppRequest + * @instance + */ + ExecuteFetchAsAppRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ExecuteFetchAsAppRequest use_pool. + * @member {boolean} use_pool + * @memberof vtctldata.ExecuteFetchAsAppRequest + * @instance + */ + ExecuteFetchAsAppRequest.prototype.use_pool = false; + + /** + * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest instance + * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest instance */ - ExecuteHookRequest.create = function create(properties) { - return new ExecuteHookRequest(properties); + ExecuteFetchAsAppRequest.create = function create(properties) { + return new ExecuteFetchAsAppRequest(properties); }; /** - * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookRequest.encode = function encode(message, writer) { + ExecuteFetchAsAppRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tablet_hook_request != null && Object.hasOwnProperty.call(message, "tablet_hook_request")) - $root.tabletmanagerdata.ExecuteHookRequest.encode(message.tablet_hook_request, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); + if (message.use_pool != null && Object.hasOwnProperty.call(message, "use_pool")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.use_pool); return writer; }; /** - * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsAppRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer. + * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookRequest.decode = function decode(reader, length) { + ExecuteFetchAsAppRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -132017,7 +130526,15 @@ export const vtctldata = $root.vtctldata = (() => { break; } case 2: { - message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.decode(reader, reader.uint32()); + message.query = reader.string(); + break; + } + case 3: { + message.max_rows = reader.int64(); + break; + } + case 4: { + message.use_pool = reader.bool(); break; } default: @@ -132029,30 +130546,30 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsAppRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteHookRequest message. + * Verifies an ExecuteFetchAsAppRequest message. * @function verify - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteHookRequest.verify = function verify(message) { + ExecuteFetchAsAppRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { @@ -132060,110 +130577,135 @@ export const vtctldata = $root.vtctldata = (() => { if (error) return "tablet_alias." + error; } - if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) { - let error = $root.tabletmanagerdata.ExecuteHookRequest.verify(message.tablet_hook_request); - if (error) - return "tablet_hook_request." + error; - } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) + return "max_rows: integer|Long expected"; + if (message.use_pool != null && message.hasOwnProperty("use_pool")) + if (typeof message.use_pool !== "boolean") + return "use_pool: boolean expected"; return null; }; /** - * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest */ - ExecuteHookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteHookRequest) + ExecuteFetchAsAppRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsAppRequest) return object; - let message = new $root.vtctldata.ExecuteHookRequest(); + let message = new $root.vtctldata.ExecuteFetchAsAppRequest(); if (object.tablet_alias != null) { if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteHookRequest.tablet_alias: object expected"); + throw TypeError(".vtctldata.ExecuteFetchAsAppRequest.tablet_alias: object expected"); message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } - if (object.tablet_hook_request != null) { - if (typeof object.tablet_hook_request !== "object") - throw TypeError(".vtctldata.ExecuteHookRequest.tablet_hook_request: object expected"); - message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.fromObject(object.tablet_hook_request); - } + if (object.query != null) + message.query = String(object.query); + if (object.max_rows != null) + if ($util.Long) + (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; + else if (typeof object.max_rows === "string") + message.max_rows = parseInt(object.max_rows, 10); + else if (typeof object.max_rows === "number") + message.max_rows = object.max_rows; + else if (typeof object.max_rows === "object") + message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); + if (object.use_pool != null) + message.use_pool = Boolean(object.use_pool); return message; }; /** - * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.ExecuteHookRequest} message ExecuteHookRequest + * @param {vtctldata.ExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteHookRequest.toObject = function toObject(message, options) { + ExecuteFetchAsAppRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.tablet_alias = null; - object.tablet_hook_request = null; + object.query = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max_rows = options.longs === String ? "0" : 0; + object.use_pool = false; } if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) - object.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.toObject(message.tablet_hook_request, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (typeof message.max_rows === "number") + object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; + else + object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; + if (message.use_pool != null && message.hasOwnProperty("use_pool")) + object.use_pool = message.use_pool; return object; }; /** - * Converts this ExecuteHookRequest to JSON. + * Converts this ExecuteFetchAsAppRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @instance * @returns {Object.} JSON object */ - ExecuteHookRequest.prototype.toJSON = function toJSON() { + ExecuteFetchAsAppRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteHookRequest + * Gets the default type url for ExecuteFetchAsAppRequest * @function getTypeUrl - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteHookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteFetchAsAppRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteHookRequest"; + return typeUrlPrefix + "/vtctldata.ExecuteFetchAsAppRequest"; }; - return ExecuteHookRequest; + return ExecuteFetchAsAppRequest; })(); - vtctldata.ExecuteHookResponse = (function() { + vtctldata.ExecuteFetchAsAppResponse = (function() { /** - * Properties of an ExecuteHookResponse. + * Properties of an ExecuteFetchAsAppResponse. * @memberof vtctldata - * @interface IExecuteHookResponse - * @property {tabletmanagerdata.IExecuteHookResponse|null} [hook_result] ExecuteHookResponse hook_result + * @interface IExecuteFetchAsAppResponse + * @property {query.IQueryResult|null} [result] ExecuteFetchAsAppResponse result */ /** - * Constructs a new ExecuteHookResponse. + * Constructs a new ExecuteFetchAsAppResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteHookResponse. - * @implements IExecuteHookResponse + * @classdesc Represents an ExecuteFetchAsAppResponse. + * @implements IExecuteFetchAsAppResponse * @constructor - * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set */ - function ExecuteHookResponse(properties) { + function ExecuteFetchAsAppResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132171,75 +130713,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteHookResponse hook_result. - * @member {tabletmanagerdata.IExecuteHookResponse|null|undefined} hook_result - * @memberof vtctldata.ExecuteHookResponse + * ExecuteFetchAsAppResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof vtctldata.ExecuteFetchAsAppResponse * @instance */ - ExecuteHookResponse.prototype.hook_result = null; + ExecuteFetchAsAppResponse.prototype.result = null; /** - * Creates a new ExecuteHookResponse instance using the specified properties. + * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse instance + * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse instance */ - ExecuteHookResponse.create = function create(properties) { - return new ExecuteHookResponse(properties); + ExecuteFetchAsAppResponse.create = function create(properties) { + return new ExecuteFetchAsAppResponse(properties); }; /** - * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookResponse.encode = function encode(message, writer) { + ExecuteFetchAsAppResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hook_result != null && Object.hasOwnProperty.call(message, "hook_result")) - $root.tabletmanagerdata.ExecuteHookResponse.encode(message.hook_result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsAppResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer. + * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookResponse.decode = function decode(reader, length) { + ExecuteFetchAsAppResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.decode(reader, reader.uint32()); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; } default: @@ -132251,131 +130793,131 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsAppResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteHookResponse message. + * Verifies an ExecuteFetchAsAppResponse message. * @function verify - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteHookResponse.verify = function verify(message) { + ExecuteFetchAsAppResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hook_result != null && message.hasOwnProperty("hook_result")) { - let error = $root.tabletmanagerdata.ExecuteHookResponse.verify(message.hook_result); + if (message.result != null && message.hasOwnProperty("result")) { + let error = $root.query.QueryResult.verify(message.result); if (error) - return "hook_result." + error; + return "result." + error; } return null; }; /** - * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse */ - ExecuteHookResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteHookResponse) + ExecuteFetchAsAppResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsAppResponse) return object; - let message = new $root.vtctldata.ExecuteHookResponse(); - if (object.hook_result != null) { - if (typeof object.hook_result !== "object") - throw TypeError(".vtctldata.ExecuteHookResponse.hook_result: object expected"); - message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.fromObject(object.hook_result); + let message = new $root.vtctldata.ExecuteFetchAsAppResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".vtctldata.ExecuteFetchAsAppResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.ExecuteHookResponse} message ExecuteHookResponse + * @param {vtctldata.ExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteHookResponse.toObject = function toObject(message, options) { + ExecuteFetchAsAppResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.hook_result = null; - if (message.hook_result != null && message.hasOwnProperty("hook_result")) - object.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.toObject(message.hook_result, options); + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this ExecuteHookResponse to JSON. + * Converts this ExecuteFetchAsAppResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @instance * @returns {Object.} JSON object */ - ExecuteHookResponse.prototype.toJSON = function toJSON() { + ExecuteFetchAsAppResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteHookResponse + * Gets the default type url for ExecuteFetchAsAppResponse * @function getTypeUrl - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteHookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteFetchAsAppResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteHookResponse"; + return typeUrlPrefix + "/vtctldata.ExecuteFetchAsAppResponse"; }; - return ExecuteHookResponse; + return ExecuteFetchAsAppResponse; })(); - vtctldata.ExecuteMultiFetchAsDBARequest = (function() { + vtctldata.ExecuteFetchAsDBARequest = (function() { /** - * Properties of an ExecuteMultiFetchAsDBARequest. + * Properties of an ExecuteFetchAsDBARequest. * @memberof vtctldata - * @interface IExecuteMultiFetchAsDBARequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteMultiFetchAsDBARequest tablet_alias - * @property {string|null} [sql] ExecuteMultiFetchAsDBARequest sql - * @property {number|Long|null} [max_rows] ExecuteMultiFetchAsDBARequest max_rows - * @property {boolean|null} [disable_binlogs] ExecuteMultiFetchAsDBARequest disable_binlogs - * @property {boolean|null} [reload_schema] ExecuteMultiFetchAsDBARequest reload_schema + * @interface IExecuteFetchAsDBARequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsDBARequest tablet_alias + * @property {string|null} [query] ExecuteFetchAsDBARequest query + * @property {number|Long|null} [max_rows] ExecuteFetchAsDBARequest max_rows + * @property {boolean|null} [disable_binlogs] ExecuteFetchAsDBARequest disable_binlogs + * @property {boolean|null} [reload_schema] ExecuteFetchAsDBARequest reload_schema */ /** - * Constructs a new ExecuteMultiFetchAsDBARequest. + * Constructs a new ExecuteFetchAsDBARequest. * @memberof vtctldata - * @classdesc Represents an ExecuteMultiFetchAsDBARequest. - * @implements IExecuteMultiFetchAsDBARequest + * @classdesc Represents an ExecuteFetchAsDBARequest. + * @implements IExecuteFetchAsDBARequest * @constructor - * @param {vtctldata.IExecuteMultiFetchAsDBARequest=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set */ - function ExecuteMultiFetchAsDBARequest(properties) { + function ExecuteFetchAsDBARequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132383,73 +130925,73 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteMultiFetchAsDBARequest tablet_alias. + * ExecuteFetchAsDBARequest tablet_alias. * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance */ - ExecuteMultiFetchAsDBARequest.prototype.tablet_alias = null; + ExecuteFetchAsDBARequest.prototype.tablet_alias = null; /** - * ExecuteMultiFetchAsDBARequest sql. - * @member {string} sql - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * ExecuteFetchAsDBARequest query. + * @member {string} query + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance */ - ExecuteMultiFetchAsDBARequest.prototype.sql = ""; + ExecuteFetchAsDBARequest.prototype.query = ""; /** - * ExecuteMultiFetchAsDBARequest max_rows. + * ExecuteFetchAsDBARequest max_rows. * @member {number|Long} max_rows - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance */ - ExecuteMultiFetchAsDBARequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExecuteFetchAsDBARequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ExecuteMultiFetchAsDBARequest disable_binlogs. + * ExecuteFetchAsDBARequest disable_binlogs. * @member {boolean} disable_binlogs - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance */ - ExecuteMultiFetchAsDBARequest.prototype.disable_binlogs = false; + ExecuteFetchAsDBARequest.prototype.disable_binlogs = false; /** - * ExecuteMultiFetchAsDBARequest reload_schema. + * ExecuteFetchAsDBARequest reload_schema. * @member {boolean} reload_schema - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance */ - ExecuteMultiFetchAsDBARequest.prototype.reload_schema = false; + ExecuteFetchAsDBARequest.prototype.reload_schema = false; /** - * Creates a new ExecuteMultiFetchAsDBARequest instance using the specified properties. + * Creates a new ExecuteFetchAsDBARequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.IExecuteMultiFetchAsDBARequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest instance + * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest instance */ - ExecuteMultiFetchAsDBARequest.create = function create(properties) { - return new ExecuteMultiFetchAsDBARequest(properties); + ExecuteFetchAsDBARequest.create = function create(properties) { + return new ExecuteFetchAsDBARequest(properties); }; /** - * Encodes the specified ExecuteMultiFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBARequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.IExecuteMultiFetchAsDBARequest} message ExecuteMultiFetchAsDBARequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteMultiFetchAsDBARequest.encode = function encode(message, writer) { + ExecuteFetchAsDBARequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sql); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); if (message.disable_binlogs != null && Object.hasOwnProperty.call(message, "disable_binlogs")) @@ -132460,33 +131002,33 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Encodes the specified ExecuteMultiFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBARequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.IExecuteMultiFetchAsDBARequest} message ExecuteMultiFetchAsDBARequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteMultiFetchAsDBARequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsDBARequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteMultiFetchAsDBARequest message from the specified reader or buffer. + * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteMultiFetchAsDBARequest.decode = function decode(reader, length) { + ExecuteFetchAsDBARequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteMultiFetchAsDBARequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBARequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -132495,7 +131037,7 @@ export const vtctldata = $root.vtctldata = (() => { break; } case 2: { - message.sql = reader.string(); + message.query = reader.string(); break; } case 3: { @@ -132519,30 +131061,30 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteMultiFetchAsDBARequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteMultiFetchAsDBARequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsDBARequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteMultiFetchAsDBARequest message. + * Verifies an ExecuteFetchAsDBARequest message. * @function verify - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteMultiFetchAsDBARequest.verify = function verify(message) { + ExecuteFetchAsDBARequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { @@ -132550,9 +131092,9 @@ export const vtctldata = $root.vtctldata = (() => { if (error) return "tablet_alias." + error; } - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; if (message.max_rows != null && message.hasOwnProperty("max_rows")) if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) return "max_rows: integer|Long expected"; @@ -132566,24 +131108,24 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Creates an ExecuteMultiFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest */ - ExecuteMultiFetchAsDBARequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteMultiFetchAsDBARequest) + ExecuteFetchAsDBARequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsDBARequest) return object; - let message = new $root.vtctldata.ExecuteMultiFetchAsDBARequest(); + let message = new $root.vtctldata.ExecuteFetchAsDBARequest(); if (object.tablet_alias != null) { if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias: object expected"); + throw TypeError(".vtctldata.ExecuteFetchAsDBARequest.tablet_alias: object expected"); message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } - if (object.sql != null) - message.sql = String(object.sql); + if (object.query != null) + message.query = String(object.query); if (object.max_rows != null) if ($util.Long) (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; @@ -132601,21 +131143,21 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Creates a plain object from an ExecuteMultiFetchAsDBARequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsDBARequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.ExecuteMultiFetchAsDBARequest} message ExecuteMultiFetchAsDBARequest + * @param {vtctldata.ExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteMultiFetchAsDBARequest.toObject = function toObject(message, options) { + ExecuteFetchAsDBARequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.tablet_alias = null; - object.sql = ""; + object.query = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; @@ -132626,8 +131168,8 @@ export const vtctldata = $root.vtctldata = (() => { } if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; if (message.max_rows != null && message.hasOwnProperty("max_rows")) if (typeof message.max_rows === "number") object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; @@ -132641,53 +131183,52 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Converts this ExecuteMultiFetchAsDBARequest to JSON. + * Converts this ExecuteFetchAsDBARequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance * @returns {Object.} JSON object */ - ExecuteMultiFetchAsDBARequest.prototype.toJSON = function toJSON() { + ExecuteFetchAsDBARequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteMultiFetchAsDBARequest + * Gets the default type url for ExecuteFetchAsDBARequest * @function getTypeUrl - * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteMultiFetchAsDBARequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteFetchAsDBARequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteMultiFetchAsDBARequest"; + return typeUrlPrefix + "/vtctldata.ExecuteFetchAsDBARequest"; }; - return ExecuteMultiFetchAsDBARequest; + return ExecuteFetchAsDBARequest; })(); - vtctldata.ExecuteMultiFetchAsDBAResponse = (function() { + vtctldata.ExecuteFetchAsDBAResponse = (function() { /** - * Properties of an ExecuteMultiFetchAsDBAResponse. + * Properties of an ExecuteFetchAsDBAResponse. * @memberof vtctldata - * @interface IExecuteMultiFetchAsDBAResponse - * @property {Array.|null} [results] ExecuteMultiFetchAsDBAResponse results + * @interface IExecuteFetchAsDBAResponse + * @property {query.IQueryResult|null} [result] ExecuteFetchAsDBAResponse result */ /** - * Constructs a new ExecuteMultiFetchAsDBAResponse. + * Constructs a new ExecuteFetchAsDBAResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteMultiFetchAsDBAResponse. - * @implements IExecuteMultiFetchAsDBAResponse + * @classdesc Represents an ExecuteFetchAsDBAResponse. + * @implements IExecuteFetchAsDBAResponse * @constructor - * @param {vtctldata.IExecuteMultiFetchAsDBAResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set */ - function ExecuteMultiFetchAsDBAResponse(properties) { - this.results = []; + function ExecuteFetchAsDBAResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132695,78 +131236,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ExecuteMultiFetchAsDBAResponse results. - * @member {Array.} results - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * ExecuteFetchAsDBAResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @instance */ - ExecuteMultiFetchAsDBAResponse.prototype.results = $util.emptyArray; + ExecuteFetchAsDBAResponse.prototype.result = null; /** - * Creates a new ExecuteMultiFetchAsDBAResponse instance using the specified properties. + * Creates a new ExecuteFetchAsDBAResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.IExecuteMultiFetchAsDBAResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse instance + * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse instance */ - ExecuteMultiFetchAsDBAResponse.create = function create(properties) { - return new ExecuteMultiFetchAsDBAResponse(properties); + ExecuteFetchAsDBAResponse.create = function create(properties) { + return new ExecuteFetchAsDBAResponse(properties); }; /** - * Encodes the specified ExecuteMultiFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBAResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.IExecuteMultiFetchAsDBAResponse} message ExecuteMultiFetchAsDBAResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteMultiFetchAsDBAResponse.encode = function encode(message, writer) { + ExecuteFetchAsDBAResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (let i = 0; i < message.results.length; ++i) - $root.query.QueryResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecuteMultiFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBAResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.IExecuteMultiFetchAsDBAResponse} message ExecuteMultiFetchAsDBAResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteMultiFetchAsDBAResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsDBAResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteMultiFetchAsDBAResponse message from the specified reader or buffer. + * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteMultiFetchAsDBAResponse.decode = function decode(reader, length) { + ExecuteFetchAsDBAResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteMultiFetchAsDBAResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.query.QueryResult.decode(reader, reader.uint32())); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; } default: @@ -132778,139 +131316,128 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an ExecuteMultiFetchAsDBAResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteMultiFetchAsDBAResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsDBAResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteMultiFetchAsDBAResponse message. + * Verifies an ExecuteFetchAsDBAResponse message. * @function verify - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteMultiFetchAsDBAResponse.verify = function verify(message) { + ExecuteFetchAsDBAResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (let i = 0; i < message.results.length; ++i) { - let error = $root.query.QueryResult.verify(message.results[i]); - if (error) - return "results." + error; - } + if (message.result != null && message.hasOwnProperty("result")) { + let error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; } return null; }; /** - * Creates an ExecuteMultiFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse */ - ExecuteMultiFetchAsDBAResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteMultiFetchAsDBAResponse) + ExecuteFetchAsDBAResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsDBAResponse) return object; - let message = new $root.vtctldata.ExecuteMultiFetchAsDBAResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ExecuteMultiFetchAsDBAResponse.results: array expected"); - message.results = []; - for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".vtctldata.ExecuteMultiFetchAsDBAResponse.results: object expected"); - message.results[i] = $root.query.QueryResult.fromObject(object.results[i]); - } + let message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".vtctldata.ExecuteFetchAsDBAResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from an ExecuteMultiFetchAsDBAResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsDBAResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.ExecuteMultiFetchAsDBAResponse} message ExecuteMultiFetchAsDBAResponse + * @param {vtctldata.ExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteMultiFetchAsDBAResponse.toObject = function toObject(message, options) { + ExecuteFetchAsDBAResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (message.results && message.results.length) { - object.results = []; - for (let j = 0; j < message.results.length; ++j) - object.results[j] = $root.query.QueryResult.toObject(message.results[j], options); - } + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this ExecuteMultiFetchAsDBAResponse to JSON. + * Converts this ExecuteFetchAsDBAResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @instance * @returns {Object.} JSON object */ - ExecuteMultiFetchAsDBAResponse.prototype.toJSON = function toJSON() { + ExecuteFetchAsDBAResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecuteMultiFetchAsDBAResponse + * Gets the default type url for ExecuteFetchAsDBAResponse * @function getTypeUrl - * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecuteMultiFetchAsDBAResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteFetchAsDBAResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ExecuteMultiFetchAsDBAResponse"; + return typeUrlPrefix + "/vtctldata.ExecuteFetchAsDBAResponse"; }; - return ExecuteMultiFetchAsDBAResponse; + return ExecuteFetchAsDBAResponse; })(); - vtctldata.FindAllShardsInKeyspaceRequest = (function() { + vtctldata.ExecuteHookRequest = (function() { /** - * Properties of a FindAllShardsInKeyspaceRequest. + * Properties of an ExecuteHookRequest. * @memberof vtctldata - * @interface IFindAllShardsInKeyspaceRequest - * @property {string|null} [keyspace] FindAllShardsInKeyspaceRequest keyspace + * @interface IExecuteHookRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteHookRequest tablet_alias + * @property {tabletmanagerdata.IExecuteHookRequest|null} [tablet_hook_request] ExecuteHookRequest tablet_hook_request */ /** - * Constructs a new FindAllShardsInKeyspaceRequest. + * Constructs a new ExecuteHookRequest. * @memberof vtctldata - * @classdesc Represents a FindAllShardsInKeyspaceRequest. - * @implements IFindAllShardsInKeyspaceRequest + * @classdesc Represents an ExecuteHookRequest. + * @implements IExecuteHookRequest * @constructor - * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set */ - function FindAllShardsInKeyspaceRequest(properties) { + function ExecuteHookRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132918,75 +131445,89 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * FindAllShardsInKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * ExecuteHookRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ExecuteHookRequest * @instance */ - FindAllShardsInKeyspaceRequest.prototype.keyspace = ""; + ExecuteHookRequest.prototype.tablet_alias = null; /** - * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. + * ExecuteHookRequest tablet_hook_request. + * @member {tabletmanagerdata.IExecuteHookRequest|null|undefined} tablet_hook_request + * @memberof vtctldata.ExecuteHookRequest + * @instance + */ + ExecuteHookRequest.prototype.tablet_hook_request = null; + + /** + * Creates a new ExecuteHookRequest instance using the specified properties. * @function create - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest instance + * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest instance */ - FindAllShardsInKeyspaceRequest.create = function create(properties) { - return new FindAllShardsInKeyspaceRequest(properties); + ExecuteHookRequest.create = function create(properties) { + return new ExecuteHookRequest(properties); }; /** - * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. + * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode + * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceRequest.encode = function encode(message, writer) { + ExecuteHookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_hook_request != null && Object.hasOwnProperty.call(message, "tablet_hook_request")) + $root.tabletmanagerdata.ExecuteHookRequest.encode(message.tablet_hook_request, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. + * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode + * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteHookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. + * Decodes an ExecuteHookRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceRequest.decode = function decode(reader, length) { + ExecuteHookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.decode(reader, reader.uint32()); break; } default: @@ -132998,123 +131539,141 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteHookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FindAllShardsInKeyspaceRequest message. + * Verifies an ExecuteHookRequest message. * @function verify - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FindAllShardsInKeyspaceRequest.verify = function verify(message) { + ExecuteHookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) { + let error = $root.tabletmanagerdata.ExecuteHookRequest.verify(message.tablet_hook_request); + if (error) + return "tablet_hook_request." + error; + } return null; }; /** - * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest */ - FindAllShardsInKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceRequest) + ExecuteHookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteHookRequest) return object; - let message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); + let message = new $root.vtctldata.ExecuteHookRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ExecuteHookRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.tablet_hook_request != null) { + if (typeof object.tablet_hook_request !== "object") + throw TypeError(".vtctldata.ExecuteHookRequest.tablet_hook_request: object expected"); + message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.fromObject(object.tablet_hook_request); + } return message; }; /** - * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.FindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest + * @param {vtctldata.ExecuteHookRequest} message ExecuteHookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FindAllShardsInKeyspaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; + ExecuteHookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tablet_alias = null; + object.tablet_hook_request = null; + } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) + object.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.toObject(message.tablet_hook_request, options); return object; }; /** - * Converts this FindAllShardsInKeyspaceRequest to JSON. + * Converts this ExecuteHookRequest to JSON. * @function toJSON - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @instance * @returns {Object.} JSON object */ - FindAllShardsInKeyspaceRequest.prototype.toJSON = function toJSON() { + ExecuteHookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FindAllShardsInKeyspaceRequest + * Gets the default type url for ExecuteHookRequest * @function getTypeUrl - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FindAllShardsInKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteHookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.FindAllShardsInKeyspaceRequest"; + return typeUrlPrefix + "/vtctldata.ExecuteHookRequest"; }; - return FindAllShardsInKeyspaceRequest; + return ExecuteHookRequest; })(); - vtctldata.FindAllShardsInKeyspaceResponse = (function() { + vtctldata.ExecuteHookResponse = (function() { /** - * Properties of a FindAllShardsInKeyspaceResponse. + * Properties of an ExecuteHookResponse. * @memberof vtctldata - * @interface IFindAllShardsInKeyspaceResponse - * @property {Object.|null} [shards] FindAllShardsInKeyspaceResponse shards + * @interface IExecuteHookResponse + * @property {tabletmanagerdata.IExecuteHookResponse|null} [hook_result] ExecuteHookResponse hook_result */ /** - * Constructs a new FindAllShardsInKeyspaceResponse. + * Constructs a new ExecuteHookResponse. * @memberof vtctldata - * @classdesc Represents a FindAllShardsInKeyspaceResponse. - * @implements IFindAllShardsInKeyspaceResponse + * @classdesc Represents an ExecuteHookResponse. + * @implements IExecuteHookResponse * @constructor - * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set */ - function FindAllShardsInKeyspaceResponse(properties) { - this.shards = {}; + function ExecuteHookResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133122,97 +131681,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * FindAllShardsInKeyspaceResponse shards. - * @member {Object.} shards - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * ExecuteHookResponse hook_result. + * @member {tabletmanagerdata.IExecuteHookResponse|null|undefined} hook_result + * @memberof vtctldata.ExecuteHookResponse * @instance */ - FindAllShardsInKeyspaceResponse.prototype.shards = $util.emptyObject; + ExecuteHookResponse.prototype.hook_result = null; /** - * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. + * Creates a new ExecuteHookResponse instance using the specified properties. * @function create - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse instance + * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse instance */ - FindAllShardsInKeyspaceResponse.create = function create(properties) { - return new FindAllShardsInKeyspaceResponse(properties); + ExecuteHookResponse.create = function create(properties) { + return new ExecuteHookResponse(properties); }; /** - * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. + * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode + * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceResponse.encode = function encode(message, writer) { + ExecuteHookResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shards != null && Object.hasOwnProperty.call(message, "shards")) - for (let keys = Object.keys(message.shards), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.Shard.encode(message.shards[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.hook_result != null && Object.hasOwnProperty.call(message, "hook_result")) + $root.tabletmanagerdata.ExecuteHookResponse.encode(message.hook_result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. + * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode + * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteHookResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. + * Decodes an ExecuteHookResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceResponse.decode = function decode(reader, length) { + ExecuteHookResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.shards === $util.emptyObject) - message.shards = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.Shard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.shards[key] = value; + message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.decode(reader, reader.uint32()); break; } default: @@ -133224,232 +131761,263 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteHookResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FindAllShardsInKeyspaceResponse message. + * Verifies an ExecuteHookResponse message. * @function verify - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FindAllShardsInKeyspaceResponse.verify = function verify(message) { + ExecuteHookResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!$util.isObject(message.shards)) - return "shards: object expected"; - let key = Object.keys(message.shards); - for (let i = 0; i < key.length; ++i) { - let error = $root.vtctldata.Shard.verify(message.shards[key[i]]); - if (error) - return "shards." + error; - } + if (message.hook_result != null && message.hasOwnProperty("hook_result")) { + let error = $root.tabletmanagerdata.ExecuteHookResponse.verify(message.hook_result); + if (error) + return "hook_result." + error; } return null; }; /** - * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse */ - FindAllShardsInKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceResponse) + ExecuteHookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteHookResponse) return object; - let message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(); - if (object.shards) { - if (typeof object.shards !== "object") - throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); - message.shards = {}; - for (let keys = Object.keys(object.shards), i = 0; i < keys.length; ++i) { - if (typeof object.shards[keys[i]] !== "object") - throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); - message.shards[keys[i]] = $root.vtctldata.Shard.fromObject(object.shards[keys[i]]); - } + let message = new $root.vtctldata.ExecuteHookResponse(); + if (object.hook_result != null) { + if (typeof object.hook_result !== "object") + throw TypeError(".vtctldata.ExecuteHookResponse.hook_result: object expected"); + message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.fromObject(object.hook_result); } return message; }; /** - * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.FindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse + * @param {vtctldata.ExecuteHookResponse} message ExecuteHookResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FindAllShardsInKeyspaceResponse.toObject = function toObject(message, options) { + ExecuteHookResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.shards = {}; - let keys2; - if (message.shards && (keys2 = Object.keys(message.shards)).length) { - object.shards = {}; - for (let j = 0; j < keys2.length; ++j) - object.shards[keys2[j]] = $root.vtctldata.Shard.toObject(message.shards[keys2[j]], options); - } + if (options.defaults) + object.hook_result = null; + if (message.hook_result != null && message.hasOwnProperty("hook_result")) + object.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.toObject(message.hook_result, options); return object; }; /** - * Converts this FindAllShardsInKeyspaceResponse to JSON. + * Converts this ExecuteHookResponse to JSON. * @function toJSON - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @instance * @returns {Object.} JSON object */ - FindAllShardsInKeyspaceResponse.prototype.toJSON = function toJSON() { + ExecuteHookResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FindAllShardsInKeyspaceResponse + * Gets the default type url for ExecuteHookResponse * @function getTypeUrl - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FindAllShardsInKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteHookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.FindAllShardsInKeyspaceResponse"; + return typeUrlPrefix + "/vtctldata.ExecuteHookResponse"; }; - return FindAllShardsInKeyspaceResponse; + return ExecuteHookResponse; })(); - vtctldata.ForceCutOverSchemaMigrationRequest = (function() { + vtctldata.ExecuteMultiFetchAsDBARequest = (function() { /** - * Properties of a ForceCutOverSchemaMigrationRequest. + * Properties of an ExecuteMultiFetchAsDBARequest. * @memberof vtctldata - * @interface IForceCutOverSchemaMigrationRequest - * @property {string|null} [keyspace] ForceCutOverSchemaMigrationRequest keyspace - * @property {string|null} [uuid] ForceCutOverSchemaMigrationRequest uuid + * @interface IExecuteMultiFetchAsDBARequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteMultiFetchAsDBARequest tablet_alias + * @property {string|null} [sql] ExecuteMultiFetchAsDBARequest sql + * @property {number|Long|null} [max_rows] ExecuteMultiFetchAsDBARequest max_rows + * @property {boolean|null} [disable_binlogs] ExecuteMultiFetchAsDBARequest disable_binlogs + * @property {boolean|null} [reload_schema] ExecuteMultiFetchAsDBARequest reload_schema */ /** - * Constructs a new ForceCutOverSchemaMigrationRequest. + * Constructs a new ExecuteMultiFetchAsDBARequest. * @memberof vtctldata - * @classdesc Represents a ForceCutOverSchemaMigrationRequest. - * @implements IForceCutOverSchemaMigrationRequest + * @classdesc Represents an ExecuteMultiFetchAsDBARequest. + * @implements IExecuteMultiFetchAsDBARequest * @constructor - * @param {vtctldata.IForceCutOverSchemaMigrationRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteMultiFetchAsDBARequest=} [properties] Properties to set + */ + function ExecuteMultiFetchAsDBARequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteMultiFetchAsDBARequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @instance + */ + ExecuteMultiFetchAsDBARequest.prototype.tablet_alias = null; + + /** + * ExecuteMultiFetchAsDBARequest sql. + * @member {string} sql + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @instance + */ + ExecuteMultiFetchAsDBARequest.prototype.sql = ""; + + /** + * ExecuteMultiFetchAsDBARequest max_rows. + * @member {number|Long} max_rows + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest + * @instance */ - function ForceCutOverSchemaMigrationRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ExecuteMultiFetchAsDBARequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ForceCutOverSchemaMigrationRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * ExecuteMultiFetchAsDBARequest disable_binlogs. + * @member {boolean} disable_binlogs + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @instance */ - ForceCutOverSchemaMigrationRequest.prototype.keyspace = ""; + ExecuteMultiFetchAsDBARequest.prototype.disable_binlogs = false; /** - * ForceCutOverSchemaMigrationRequest uuid. - * @member {string} uuid - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * ExecuteMultiFetchAsDBARequest reload_schema. + * @member {boolean} reload_schema + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @instance */ - ForceCutOverSchemaMigrationRequest.prototype.uuid = ""; + ExecuteMultiFetchAsDBARequest.prototype.reload_schema = false; /** - * Creates a new ForceCutOverSchemaMigrationRequest instance using the specified properties. + * Creates a new ExecuteMultiFetchAsDBARequest instance using the specified properties. * @function create - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static - * @param {vtctldata.IForceCutOverSchemaMigrationRequest=} [properties] Properties to set - * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest instance + * @param {vtctldata.IExecuteMultiFetchAsDBARequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest instance */ - ForceCutOverSchemaMigrationRequest.create = function create(properties) { - return new ForceCutOverSchemaMigrationRequest(properties); + ExecuteMultiFetchAsDBARequest.create = function create(properties) { + return new ExecuteMultiFetchAsDBARequest(properties); }; /** - * Encodes the specified ForceCutOverSchemaMigrationRequest message. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationRequest.verify|verify} messages. + * Encodes the specified ExecuteMultiFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBARequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static - * @param {vtctldata.IForceCutOverSchemaMigrationRequest} message ForceCutOverSchemaMigrationRequest message or plain object to encode + * @param {vtctldata.IExecuteMultiFetchAsDBARequest} message ExecuteMultiFetchAsDBARequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ForceCutOverSchemaMigrationRequest.encode = function encode(message, writer) { + ExecuteMultiFetchAsDBARequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sql); + if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); + if (message.disable_binlogs != null && Object.hasOwnProperty.call(message, "disable_binlogs")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disable_binlogs); + if (message.reload_schema != null && Object.hasOwnProperty.call(message, "reload_schema")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reload_schema); return writer; }; /** - * Encodes the specified ForceCutOverSchemaMigrationRequest message, length delimited. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationRequest.verify|verify} messages. + * Encodes the specified ExecuteMultiFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBARequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static - * @param {vtctldata.IForceCutOverSchemaMigrationRequest} message ForceCutOverSchemaMigrationRequest message or plain object to encode + * @param {vtctldata.IExecuteMultiFetchAsDBARequest} message ExecuteMultiFetchAsDBARequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ForceCutOverSchemaMigrationRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteMultiFetchAsDBARequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ForceCutOverSchemaMigrationRequest message from the specified reader or buffer. + * Decodes an ExecuteMultiFetchAsDBARequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest + * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ForceCutOverSchemaMigrationRequest.decode = function decode(reader, length) { + ExecuteMultiFetchAsDBARequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ForceCutOverSchemaMigrationRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteMultiFetchAsDBARequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; } case 2: { - message.uuid = reader.string(); + message.sql = reader.string(); + break; + } + case 3: { + message.max_rows = reader.int64(); + break; + } + case 4: { + message.disable_binlogs = reader.bool(); + break; + } + case 5: { + message.reload_schema = reader.bool(); break; } default: @@ -133461,132 +132029,175 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a ForceCutOverSchemaMigrationRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteMultiFetchAsDBARequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest + * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ForceCutOverSchemaMigrationRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteMultiFetchAsDBARequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ForceCutOverSchemaMigrationRequest message. + * Verifies an ExecuteMultiFetchAsDBARequest message. * @function verify - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ForceCutOverSchemaMigrationRequest.verify = function verify(message) { + ExecuteMultiFetchAsDBARequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.sql != null && message.hasOwnProperty("sql")) + if (!$util.isString(message.sql)) + return "sql: string expected"; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) + return "max_rows: integer|Long expected"; + if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) + if (typeof message.disable_binlogs !== "boolean") + return "disable_binlogs: boolean expected"; + if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) + if (typeof message.reload_schema !== "boolean") + return "reload_schema: boolean expected"; return null; }; /** - * Creates a ForceCutOverSchemaMigrationRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteMultiFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest + * @returns {vtctldata.ExecuteMultiFetchAsDBARequest} ExecuteMultiFetchAsDBARequest */ - ForceCutOverSchemaMigrationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ForceCutOverSchemaMigrationRequest) + ExecuteMultiFetchAsDBARequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteMultiFetchAsDBARequest) return object; - let message = new $root.vtctldata.ForceCutOverSchemaMigrationRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.uuid != null) - message.uuid = String(object.uuid); + let message = new $root.vtctldata.ExecuteMultiFetchAsDBARequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.sql != null) + message.sql = String(object.sql); + if (object.max_rows != null) + if ($util.Long) + (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; + else if (typeof object.max_rows === "string") + message.max_rows = parseInt(object.max_rows, 10); + else if (typeof object.max_rows === "number") + message.max_rows = object.max_rows; + else if (typeof object.max_rows === "object") + message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); + if (object.disable_binlogs != null) + message.disable_binlogs = Boolean(object.disable_binlogs); + if (object.reload_schema != null) + message.reload_schema = Boolean(object.reload_schema); return message; }; /** - * Creates a plain object from a ForceCutOverSchemaMigrationRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteMultiFetchAsDBARequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static - * @param {vtctldata.ForceCutOverSchemaMigrationRequest} message ForceCutOverSchemaMigrationRequest + * @param {vtctldata.ExecuteMultiFetchAsDBARequest} message ExecuteMultiFetchAsDBARequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ForceCutOverSchemaMigrationRequest.toObject = function toObject(message, options) { + ExecuteMultiFetchAsDBARequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { - object.keyspace = ""; - object.uuid = ""; + object.tablet_alias = null; + object.sql = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max_rows = options.longs === String ? "0" : 0; + object.disable_binlogs = false; + object.reload_schema = false; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = message.sql; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (typeof message.max_rows === "number") + object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; + else + object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; + if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) + object.disable_binlogs = message.disable_binlogs; + if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) + object.reload_schema = message.reload_schema; return object; }; /** - * Converts this ForceCutOverSchemaMigrationRequest to JSON. + * Converts this ExecuteMultiFetchAsDBARequest to JSON. * @function toJSON - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @instance * @returns {Object.} JSON object */ - ForceCutOverSchemaMigrationRequest.prototype.toJSON = function toJSON() { + ExecuteMultiFetchAsDBARequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ForceCutOverSchemaMigrationRequest + * Gets the default type url for ExecuteMultiFetchAsDBARequest * @function getTypeUrl - * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @memberof vtctldata.ExecuteMultiFetchAsDBARequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ForceCutOverSchemaMigrationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteMultiFetchAsDBARequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ForceCutOverSchemaMigrationRequest"; + return typeUrlPrefix + "/vtctldata.ExecuteMultiFetchAsDBARequest"; }; - return ForceCutOverSchemaMigrationRequest; + return ExecuteMultiFetchAsDBARequest; })(); - vtctldata.ForceCutOverSchemaMigrationResponse = (function() { + vtctldata.ExecuteMultiFetchAsDBAResponse = (function() { /** - * Properties of a ForceCutOverSchemaMigrationResponse. + * Properties of an ExecuteMultiFetchAsDBAResponse. * @memberof vtctldata - * @interface IForceCutOverSchemaMigrationResponse - * @property {Object.|null} [rows_affected_by_shard] ForceCutOverSchemaMigrationResponse rows_affected_by_shard + * @interface IExecuteMultiFetchAsDBAResponse + * @property {Array.|null} [results] ExecuteMultiFetchAsDBAResponse results */ /** - * Constructs a new ForceCutOverSchemaMigrationResponse. + * Constructs a new ExecuteMultiFetchAsDBAResponse. * @memberof vtctldata - * @classdesc Represents a ForceCutOverSchemaMigrationResponse. - * @implements IForceCutOverSchemaMigrationResponse + * @classdesc Represents an ExecuteMultiFetchAsDBAResponse. + * @implements IExecuteMultiFetchAsDBAResponse * @constructor - * @param {vtctldata.IForceCutOverSchemaMigrationResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteMultiFetchAsDBAResponse=} [properties] Properties to set */ - function ForceCutOverSchemaMigrationResponse(properties) { - this.rows_affected_by_shard = {}; + function ExecuteMultiFetchAsDBAResponse(properties) { + this.results = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133594,95 +132205,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * ForceCutOverSchemaMigrationResponse rows_affected_by_shard. - * @member {Object.} rows_affected_by_shard - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * ExecuteMultiFetchAsDBAResponse results. + * @member {Array.} results + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @instance */ - ForceCutOverSchemaMigrationResponse.prototype.rows_affected_by_shard = $util.emptyObject; + ExecuteMultiFetchAsDBAResponse.prototype.results = $util.emptyArray; /** - * Creates a new ForceCutOverSchemaMigrationResponse instance using the specified properties. + * Creates a new ExecuteMultiFetchAsDBAResponse instance using the specified properties. * @function create - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static - * @param {vtctldata.IForceCutOverSchemaMigrationResponse=} [properties] Properties to set - * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse instance + * @param {vtctldata.IExecuteMultiFetchAsDBAResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse instance */ - ForceCutOverSchemaMigrationResponse.create = function create(properties) { - return new ForceCutOverSchemaMigrationResponse(properties); + ExecuteMultiFetchAsDBAResponse.create = function create(properties) { + return new ExecuteMultiFetchAsDBAResponse(properties); }; /** - * Encodes the specified ForceCutOverSchemaMigrationResponse message. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationResponse.verify|verify} messages. + * Encodes the specified ExecuteMultiFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBAResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static - * @param {vtctldata.IForceCutOverSchemaMigrationResponse} message ForceCutOverSchemaMigrationResponse message or plain object to encode + * @param {vtctldata.IExecuteMultiFetchAsDBAResponse} message ExecuteMultiFetchAsDBAResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ForceCutOverSchemaMigrationResponse.encode = function encode(message, writer) { + ExecuteMultiFetchAsDBAResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rows_affected_by_shard != null && Object.hasOwnProperty.call(message, "rows_affected_by_shard")) - for (let keys = Object.keys(message.rows_affected_by_shard), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected_by_shard[keys[i]]).ldelim(); + if (message.results != null && message.results.length) + for (let i = 0; i < message.results.length; ++i) + $root.query.QueryResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ForceCutOverSchemaMigrationResponse message, length delimited. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationResponse.verify|verify} messages. + * Encodes the specified ExecuteMultiFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteMultiFetchAsDBAResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static - * @param {vtctldata.IForceCutOverSchemaMigrationResponse} message ForceCutOverSchemaMigrationResponse message or plain object to encode + * @param {vtctldata.IExecuteMultiFetchAsDBAResponse} message ExecuteMultiFetchAsDBAResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ForceCutOverSchemaMigrationResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteMultiFetchAsDBAResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ForceCutOverSchemaMigrationResponse message from the specified reader or buffer. + * Decodes an ExecuteMultiFetchAsDBAResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse + * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ForceCutOverSchemaMigrationResponse.decode = function decode(reader, length) { + ExecuteMultiFetchAsDBAResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ForceCutOverSchemaMigrationResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteMultiFetchAsDBAResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.rows_affected_by_shard === $util.emptyObject) - message.rows_affected_by_shard = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.uint64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.rows_affected_by_shard[key] = value; + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.query.QueryResult.decode(reader, reader.uint32())); break; } default: @@ -133694,150 +132288,139 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a ForceCutOverSchemaMigrationResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteMultiFetchAsDBAResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse + * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ForceCutOverSchemaMigrationResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteMultiFetchAsDBAResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ForceCutOverSchemaMigrationResponse message. + * Verifies an ExecuteMultiFetchAsDBAResponse message. * @function verify - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ForceCutOverSchemaMigrationResponse.verify = function verify(message) { + ExecuteMultiFetchAsDBAResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rows_affected_by_shard != null && message.hasOwnProperty("rows_affected_by_shard")) { - if (!$util.isObject(message.rows_affected_by_shard)) - return "rows_affected_by_shard: object expected"; - let key = Object.keys(message.rows_affected_by_shard); - for (let i = 0; i < key.length; ++i) - if (!$util.isInteger(message.rows_affected_by_shard[key[i]]) && !(message.rows_affected_by_shard[key[i]] && $util.isInteger(message.rows_affected_by_shard[key[i]].low) && $util.isInteger(message.rows_affected_by_shard[key[i]].high))) - return "rows_affected_by_shard: integer|Long{k:string} expected"; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (let i = 0; i < message.results.length; ++i) { + let error = $root.query.QueryResult.verify(message.results[i]); + if (error) + return "results." + error; + } } return null; }; /** - * Creates a ForceCutOverSchemaMigrationResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteMultiFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse + * @returns {vtctldata.ExecuteMultiFetchAsDBAResponse} ExecuteMultiFetchAsDBAResponse */ - ForceCutOverSchemaMigrationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ForceCutOverSchemaMigrationResponse) + ExecuteMultiFetchAsDBAResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteMultiFetchAsDBAResponse) return object; - let message = new $root.vtctldata.ForceCutOverSchemaMigrationResponse(); - if (object.rows_affected_by_shard) { - if (typeof object.rows_affected_by_shard !== "object") - throw TypeError(".vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard: object expected"); - message.rows_affected_by_shard = {}; - for (let keys = Object.keys(object.rows_affected_by_shard), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.rows_affected_by_shard[keys[i]] = $util.Long.fromValue(object.rows_affected_by_shard[keys[i]])).unsigned = true; - else if (typeof object.rows_affected_by_shard[keys[i]] === "string") - message.rows_affected_by_shard[keys[i]] = parseInt(object.rows_affected_by_shard[keys[i]], 10); - else if (typeof object.rows_affected_by_shard[keys[i]] === "number") - message.rows_affected_by_shard[keys[i]] = object.rows_affected_by_shard[keys[i]]; - else if (typeof object.rows_affected_by_shard[keys[i]] === "object") - message.rows_affected_by_shard[keys[i]] = new $util.LongBits(object.rows_affected_by_shard[keys[i]].low >>> 0, object.rows_affected_by_shard[keys[i]].high >>> 0).toNumber(true); + let message = new $root.vtctldata.ExecuteMultiFetchAsDBAResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ExecuteMultiFetchAsDBAResponse.results: array expected"); + message.results = []; + for (let i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".vtctldata.ExecuteMultiFetchAsDBAResponse.results: object expected"); + message.results[i] = $root.query.QueryResult.fromObject(object.results[i]); + } } return message; }; /** - * Creates a plain object from a ForceCutOverSchemaMigrationResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteMultiFetchAsDBAResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static - * @param {vtctldata.ForceCutOverSchemaMigrationResponse} message ForceCutOverSchemaMigrationResponse + * @param {vtctldata.ExecuteMultiFetchAsDBAResponse} message ExecuteMultiFetchAsDBAResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ForceCutOverSchemaMigrationResponse.toObject = function toObject(message, options) { + ExecuteMultiFetchAsDBAResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.rows_affected_by_shard = {}; - let keys2; - if (message.rows_affected_by_shard && (keys2 = Object.keys(message.rows_affected_by_shard)).length) { - object.rows_affected_by_shard = {}; - for (let j = 0; j < keys2.length; ++j) - if (typeof message.rows_affected_by_shard[keys2[j]] === "number") - object.rows_affected_by_shard[keys2[j]] = options.longs === String ? String(message.rows_affected_by_shard[keys2[j]]) : message.rows_affected_by_shard[keys2[j]]; - else - object.rows_affected_by_shard[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected_by_shard[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.rows_affected_by_shard[keys2[j]].low >>> 0, message.rows_affected_by_shard[keys2[j]].high >>> 0).toNumber(true) : message.rows_affected_by_shard[keys2[j]]; + if (options.arrays || options.defaults) + object.results = []; + if (message.results && message.results.length) { + object.results = []; + for (let j = 0; j < message.results.length; ++j) + object.results[j] = $root.query.QueryResult.toObject(message.results[j], options); } return object; }; /** - * Converts this ForceCutOverSchemaMigrationResponse to JSON. + * Converts this ExecuteMultiFetchAsDBAResponse to JSON. * @function toJSON - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @instance * @returns {Object.} JSON object */ - ForceCutOverSchemaMigrationResponse.prototype.toJSON = function toJSON() { + ExecuteMultiFetchAsDBAResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ForceCutOverSchemaMigrationResponse + * Gets the default type url for ExecuteMultiFetchAsDBAResponse * @function getTypeUrl - * @memberof vtctldata.ForceCutOverSchemaMigrationResponse + * @memberof vtctldata.ExecuteMultiFetchAsDBAResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ForceCutOverSchemaMigrationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteMultiFetchAsDBAResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.ForceCutOverSchemaMigrationResponse"; + return typeUrlPrefix + "/vtctldata.ExecuteMultiFetchAsDBAResponse"; }; - return ForceCutOverSchemaMigrationResponse; + return ExecuteMultiFetchAsDBAResponse; })(); - vtctldata.GetBackupsRequest = (function() { + vtctldata.FindAllShardsInKeyspaceRequest = (function() { /** - * Properties of a GetBackupsRequest. + * Properties of a FindAllShardsInKeyspaceRequest. * @memberof vtctldata - * @interface IGetBackupsRequest - * @property {string|null} [keyspace] GetBackupsRequest keyspace - * @property {string|null} [shard] GetBackupsRequest shard - * @property {number|null} [limit] GetBackupsRequest limit - * @property {boolean|null} [detailed] GetBackupsRequest detailed - * @property {number|null} [detailed_limit] GetBackupsRequest detailed_limit + * @interface IFindAllShardsInKeyspaceRequest + * @property {string|null} [keyspace] FindAllShardsInKeyspaceRequest keyspace */ /** - * Constructs a new GetBackupsRequest. + * Constructs a new FindAllShardsInKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a GetBackupsRequest. - * @implements IGetBackupsRequest + * @classdesc Represents a FindAllShardsInKeyspaceRequest. + * @implements IFindAllShardsInKeyspaceRequest * @constructor - * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set + * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set */ - function GetBackupsRequest(properties) { + function FindAllShardsInKeyspaceRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133845,110 +132428,70 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetBackupsRequest keyspace. + * FindAllShardsInKeyspaceRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.keyspace = ""; - - /** - * GetBackupsRequest shard. - * @member {string} shard - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.shard = ""; - - /** - * GetBackupsRequest limit. - * @member {number} limit - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.limit = 0; - - /** - * GetBackupsRequest detailed. - * @member {boolean} detailed - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.detailed = false; - - /** - * GetBackupsRequest detailed_limit. - * @member {number} detailed_limit - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @instance */ - GetBackupsRequest.prototype.detailed_limit = 0; + FindAllShardsInKeyspaceRequest.prototype.keyspace = ""; /** - * Creates a new GetBackupsRequest instance using the specified properties. + * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest instance + * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest instance */ - GetBackupsRequest.create = function create(properties) { - return new GetBackupsRequest(properties); + FindAllShardsInKeyspaceRequest.create = function create(properties) { + return new FindAllShardsInKeyspaceRequest(properties); }; /** - * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsRequest.encode = function encode(message, writer) { + FindAllShardsInKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.limit); - if (message.detailed != null && Object.hasOwnProperty.call(message, "detailed")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.detailed); - if (message.detailed_limit != null && Object.hasOwnProperty.call(message, "detailed_limit")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.detailed_limit); return writer; }; /** - * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + FindAllShardsInKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupsRequest message from the specified reader or buffer. + * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsRequest.decode = function decode(reader, length) { + FindAllShardsInKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -133956,22 +132499,6 @@ export const vtctldata = $root.vtctldata = (() => { message.keyspace = reader.string(); break; } - case 2: { - message.shard = reader.string(); - break; - } - case 3: { - message.limit = reader.uint32(); - break; - } - case 4: { - message.detailed = reader.bool(); - break; - } - case 5: { - message.detailed_limit = reader.uint32(); - break; - } default: reader.skipType(tag & 7); break; @@ -133981,156 +132508,123 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + FindAllShardsInKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupsRequest message. + * Verifies a FindAllShardsInKeyspaceRequest message. * @function verify - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupsRequest.verify = function verify(message) { + FindAllShardsInKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit)) - return "limit: integer expected"; - if (message.detailed != null && message.hasOwnProperty("detailed")) - if (typeof message.detailed !== "boolean") - return "detailed: boolean expected"; - if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) - if (!$util.isInteger(message.detailed_limit)) - return "detailed_limit: integer expected"; return null; }; /** - * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest */ - GetBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetBackupsRequest) + FindAllShardsInKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceRequest) return object; - let message = new $root.vtctldata.GetBackupsRequest(); + let message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.limit != null) - message.limit = object.limit >>> 0; - if (object.detailed != null) - message.detailed = Boolean(object.detailed); - if (object.detailed_limit != null) - message.detailed_limit = object.detailed_limit >>> 0; return message; }; /** - * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.GetBackupsRequest} message GetBackupsRequest + * @param {vtctldata.FindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupsRequest.toObject = function toObject(message, options) { + FindAllShardsInKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) { + if (options.defaults) object.keyspace = ""; - object.shard = ""; - object.limit = 0; - object.detailed = false; - object.detailed_limit = 0; - } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.limit != null && message.hasOwnProperty("limit")) - object.limit = message.limit; - if (message.detailed != null && message.hasOwnProperty("detailed")) - object.detailed = message.detailed; - if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) - object.detailed_limit = message.detailed_limit; return object; }; /** - * Converts this GetBackupsRequest to JSON. + * Converts this FindAllShardsInKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @instance * @returns {Object.} JSON object */ - GetBackupsRequest.prototype.toJSON = function toJSON() { + FindAllShardsInKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupsRequest + * Gets the default type url for FindAllShardsInKeyspaceRequest * @function getTypeUrl - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FindAllShardsInKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetBackupsRequest"; + return typeUrlPrefix + "/vtctldata.FindAllShardsInKeyspaceRequest"; }; - return GetBackupsRequest; + return FindAllShardsInKeyspaceRequest; })(); - vtctldata.GetBackupsResponse = (function() { + vtctldata.FindAllShardsInKeyspaceResponse = (function() { /** - * Properties of a GetBackupsResponse. + * Properties of a FindAllShardsInKeyspaceResponse. * @memberof vtctldata - * @interface IGetBackupsResponse - * @property {Array.|null} [backups] GetBackupsResponse backups + * @interface IFindAllShardsInKeyspaceResponse + * @property {Object.|null} [shards] FindAllShardsInKeyspaceResponse shards */ /** - * Constructs a new GetBackupsResponse. + * Constructs a new FindAllShardsInKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a GetBackupsResponse. - * @implements IGetBackupsResponse + * @classdesc Represents a FindAllShardsInKeyspaceResponse. + * @implements IFindAllShardsInKeyspaceResponse * @constructor - * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set + * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set */ - function GetBackupsResponse(properties) { - this.backups = []; + function FindAllShardsInKeyspaceResponse(properties) { + this.shards = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -134138,78 +132632,97 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetBackupsResponse backups. - * @member {Array.} backups - * @memberof vtctldata.GetBackupsResponse + * FindAllShardsInKeyspaceResponse shards. + * @member {Object.} shards + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @instance */ - GetBackupsResponse.prototype.backups = $util.emptyArray; + FindAllShardsInKeyspaceResponse.prototype.shards = $util.emptyObject; /** - * Creates a new GetBackupsResponse instance using the specified properties. + * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse instance + * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse instance */ - GetBackupsResponse.create = function create(properties) { - return new GetBackupsResponse(properties); + FindAllShardsInKeyspaceResponse.create = function create(properties) { + return new FindAllShardsInKeyspaceResponse(properties); }; /** - * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsResponse.encode = function encode(message, writer) { + FindAllShardsInKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (let i = 0; i < message.backups.length; ++i) - $root.mysqlctl.BackupInfo.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shards != null && Object.hasOwnProperty.call(message, "shards")) + for (let keys = Object.keys(message.shards), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.Shard.encode(message.shards[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + FindAllShardsInKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupsResponse message from the specified reader or buffer. + * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsResponse.decode = function decode(reader, length) { + FindAllShardsInKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.mysqlctl.BackupInfo.decode(reader, reader.uint32())); + if (message.shards === $util.emptyObject) + message.shards = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.Shard.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.shards[key] = value; break; } default: @@ -134221,139 +132734,142 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + FindAllShardsInKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupsResponse message. + * Verifies a FindAllShardsInKeyspaceResponse message. * @function verify - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupsResponse.verify = function verify(message) { + FindAllShardsInKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (let i = 0; i < message.backups.length; ++i) { - let error = $root.mysqlctl.BackupInfo.verify(message.backups[i]); + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!$util.isObject(message.shards)) + return "shards: object expected"; + let key = Object.keys(message.shards); + for (let i = 0; i < key.length; ++i) { + let error = $root.vtctldata.Shard.verify(message.shards[key[i]]); if (error) - return "backups." + error; + return "shards." + error; } } return null; }; /** - * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse */ - GetBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetBackupsResponse) + FindAllShardsInKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceResponse) return object; - let message = new $root.vtctldata.GetBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".vtctldata.GetBackupsResponse.backups: array expected"); - message.backups = []; - for (let i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".vtctldata.GetBackupsResponse.backups: object expected"); - message.backups[i] = $root.mysqlctl.BackupInfo.fromObject(object.backups[i]); + let message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(); + if (object.shards) { + if (typeof object.shards !== "object") + throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); + message.shards = {}; + for (let keys = Object.keys(object.shards), i = 0; i < keys.length; ++i) { + if (typeof object.shards[keys[i]] !== "object") + throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); + message.shards[keys[i]] = $root.vtctldata.Shard.fromObject(object.shards[keys[i]]); } } return message; }; /** - * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.GetBackupsResponse} message GetBackupsResponse + * @param {vtctldata.FindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupsResponse.toObject = function toObject(message, options) { + FindAllShardsInKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.backups = []; - if (message.backups && message.backups.length) { - object.backups = []; - for (let j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.mysqlctl.BackupInfo.toObject(message.backups[j], options); + if (options.objects || options.defaults) + object.shards = {}; + let keys2; + if (message.shards && (keys2 = Object.keys(message.shards)).length) { + object.shards = {}; + for (let j = 0; j < keys2.length; ++j) + object.shards[keys2[j]] = $root.vtctldata.Shard.toObject(message.shards[keys2[j]], options); } return object; }; /** - * Converts this GetBackupsResponse to JSON. + * Converts this FindAllShardsInKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @instance * @returns {Object.} JSON object */ - GetBackupsResponse.prototype.toJSON = function toJSON() { + FindAllShardsInKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupsResponse + * Gets the default type url for FindAllShardsInKeyspaceResponse * @function getTypeUrl - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FindAllShardsInKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetBackupsResponse"; + return typeUrlPrefix + "/vtctldata.FindAllShardsInKeyspaceResponse"; }; - return GetBackupsResponse; + return FindAllShardsInKeyspaceResponse; })(); - vtctldata.GetCellInfoRequest = (function() { + vtctldata.ForceCutOverSchemaMigrationRequest = (function() { /** - * Properties of a GetCellInfoRequest. + * Properties of a ForceCutOverSchemaMigrationRequest. * @memberof vtctldata - * @interface IGetCellInfoRequest - * @property {string|null} [cell] GetCellInfoRequest cell + * @interface IForceCutOverSchemaMigrationRequest + * @property {string|null} [keyspace] ForceCutOverSchemaMigrationRequest keyspace + * @property {string|null} [uuid] ForceCutOverSchemaMigrationRequest uuid */ /** - * Constructs a new GetCellInfoRequest. + * Constructs a new ForceCutOverSchemaMigrationRequest. * @memberof vtctldata - * @classdesc Represents a GetCellInfoRequest. - * @implements IGetCellInfoRequest + * @classdesc Represents a ForceCutOverSchemaMigrationRequest. + * @implements IForceCutOverSchemaMigrationRequest * @constructor - * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set + * @param {vtctldata.IForceCutOverSchemaMigrationRequest=} [properties] Properties to set */ - function GetCellInfoRequest(properties) { + function ForceCutOverSchemaMigrationRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -134361,75 +132877,89 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetCellInfoRequest cell. - * @member {string} cell - * @memberof vtctldata.GetCellInfoRequest + * ForceCutOverSchemaMigrationRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @instance */ - GetCellInfoRequest.prototype.cell = ""; + ForceCutOverSchemaMigrationRequest.prototype.keyspace = ""; /** - * Creates a new GetCellInfoRequest instance using the specified properties. + * ForceCutOverSchemaMigrationRequest uuid. + * @member {string} uuid + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest + * @instance + */ + ForceCutOverSchemaMigrationRequest.prototype.uuid = ""; + + /** + * Creates a new ForceCutOverSchemaMigrationRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static - * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest instance + * @param {vtctldata.IForceCutOverSchemaMigrationRequest=} [properties] Properties to set + * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest instance */ - GetCellInfoRequest.create = function create(properties) { - return new GetCellInfoRequest(properties); + ForceCutOverSchemaMigrationRequest.create = function create(properties) { + return new ForceCutOverSchemaMigrationRequest(properties); }; /** - * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. + * Encodes the specified ForceCutOverSchemaMigrationRequest message. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static - * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode + * @param {vtctldata.IForceCutOverSchemaMigrationRequest} message ForceCutOverSchemaMigrationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoRequest.encode = function encode(message, writer) { + ForceCutOverSchemaMigrationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); return writer; }; /** - * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. + * Encodes the specified ForceCutOverSchemaMigrationRequest message, length delimited. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static - * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode + * @param {vtctldata.IForceCutOverSchemaMigrationRequest} message ForceCutOverSchemaMigrationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + ForceCutOverSchemaMigrationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer. + * Decodes a ForceCutOverSchemaMigrationRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest + * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoRequest.decode = function decode(reader, length) { + ForceCutOverSchemaMigrationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ForceCutOverSchemaMigrationRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cell = reader.string(); + message.keyspace = reader.string(); + break; + } + case 2: { + message.uuid = reader.string(); break; } default: @@ -134441,122 +132971,132 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a ForceCutOverSchemaMigrationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest + * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + ForceCutOverSchemaMigrationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoRequest message. + * Verifies a ForceCutOverSchemaMigrationRequest message. * @function verify - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoRequest.verify = function verify(message) { + ForceCutOverSchemaMigrationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; return null; }; /** - * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ForceCutOverSchemaMigrationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest + * @returns {vtctldata.ForceCutOverSchemaMigrationRequest} ForceCutOverSchemaMigrationRequest */ - GetCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoRequest) + ForceCutOverSchemaMigrationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ForceCutOverSchemaMigrationRequest) return object; - let message = new $root.vtctldata.GetCellInfoRequest(); - if (object.cell != null) - message.cell = String(object.cell); + let message = new $root.vtctldata.ForceCutOverSchemaMigrationRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.uuid != null) + message.uuid = String(object.uuid); return message; }; /** - * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a ForceCutOverSchemaMigrationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static - * @param {vtctldata.GetCellInfoRequest} message GetCellInfoRequest + * @param {vtctldata.ForceCutOverSchemaMigrationRequest} message ForceCutOverSchemaMigrationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoRequest.toObject = function toObject(message, options) { + ForceCutOverSchemaMigrationRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (options.defaults) { + object.keyspace = ""; + object.uuid = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; return object; }; /** - * Converts this GetCellInfoRequest to JSON. + * Converts this ForceCutOverSchemaMigrationRequest to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @instance * @returns {Object.} JSON object */ - GetCellInfoRequest.prototype.toJSON = function toJSON() { + ForceCutOverSchemaMigrationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCellInfoRequest + * Gets the default type url for ForceCutOverSchemaMigrationRequest * @function getTypeUrl - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ForceCutOverSchemaMigrationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCellInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ForceCutOverSchemaMigrationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetCellInfoRequest"; + return typeUrlPrefix + "/vtctldata.ForceCutOverSchemaMigrationRequest"; }; - return GetCellInfoRequest; + return ForceCutOverSchemaMigrationRequest; })(); - vtctldata.GetCellInfoResponse = (function() { + vtctldata.ForceCutOverSchemaMigrationResponse = (function() { /** - * Properties of a GetCellInfoResponse. + * Properties of a ForceCutOverSchemaMigrationResponse. * @memberof vtctldata - * @interface IGetCellInfoResponse - * @property {topodata.ICellInfo|null} [cell_info] GetCellInfoResponse cell_info + * @interface IForceCutOverSchemaMigrationResponse + * @property {Object.|null} [rows_affected_by_shard] ForceCutOverSchemaMigrationResponse rows_affected_by_shard */ /** - * Constructs a new GetCellInfoResponse. + * Constructs a new ForceCutOverSchemaMigrationResponse. * @memberof vtctldata - * @classdesc Represents a GetCellInfoResponse. - * @implements IGetCellInfoResponse + * @classdesc Represents a ForceCutOverSchemaMigrationResponse. + * @implements IForceCutOverSchemaMigrationResponse * @constructor - * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set + * @param {vtctldata.IForceCutOverSchemaMigrationResponse=} [properties] Properties to set */ - function GetCellInfoResponse(properties) { + function ForceCutOverSchemaMigrationResponse(properties) { + this.rows_affected_by_shard = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -134564,75 +133104,95 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetCellInfoResponse cell_info. - * @member {topodata.ICellInfo|null|undefined} cell_info - * @memberof vtctldata.GetCellInfoResponse + * ForceCutOverSchemaMigrationResponse rows_affected_by_shard. + * @member {Object.} rows_affected_by_shard + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @instance */ - GetCellInfoResponse.prototype.cell_info = null; + ForceCutOverSchemaMigrationResponse.prototype.rows_affected_by_shard = $util.emptyObject; /** - * Creates a new GetCellInfoResponse instance using the specified properties. + * Creates a new ForceCutOverSchemaMigrationResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static - * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse instance + * @param {vtctldata.IForceCutOverSchemaMigrationResponse=} [properties] Properties to set + * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse instance */ - GetCellInfoResponse.create = function create(properties) { - return new GetCellInfoResponse(properties); + ForceCutOverSchemaMigrationResponse.create = function create(properties) { + return new ForceCutOverSchemaMigrationResponse(properties); }; /** - * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. + * Encodes the specified ForceCutOverSchemaMigrationResponse message. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static - * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode + * @param {vtctldata.IForceCutOverSchemaMigrationResponse} message ForceCutOverSchemaMigrationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoResponse.encode = function encode(message, writer) { + ForceCutOverSchemaMigrationResponse.encode = function encode(message, writer) { if (!writer) - writer = $Writer.create(); - if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) - $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer = $Writer.create(); + if (message.rows_affected_by_shard != null && Object.hasOwnProperty.call(message, "rows_affected_by_shard")) + for (let keys = Object.keys(message.rows_affected_by_shard), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected_by_shard[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. + * Encodes the specified ForceCutOverSchemaMigrationResponse message, length delimited. Does not implicitly {@link vtctldata.ForceCutOverSchemaMigrationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static - * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode + * @param {vtctldata.IForceCutOverSchemaMigrationResponse} message ForceCutOverSchemaMigrationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + ForceCutOverSchemaMigrationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer. + * Decodes a ForceCutOverSchemaMigrationResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoResponse.decode = function decode(reader, length) { + ForceCutOverSchemaMigrationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ForceCutOverSchemaMigrationResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); + if (message.rows_affected_by_shard === $util.emptyObject) + message.rows_affected_by_shard = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.uint64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.rows_affected_by_shard[key] = value; break; } default: @@ -134644,126 +133204,150 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a ForceCutOverSchemaMigrationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { + ForceCutOverSchemaMigrationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoResponse message. + * Verifies a ForceCutOverSchemaMigrationResponse message. * @function verify - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoResponse.verify = function verify(message) { + ForceCutOverSchemaMigrationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) { - let error = $root.topodata.CellInfo.verify(message.cell_info); - if (error) - return "cell_info." + error; + if (message.rows_affected_by_shard != null && message.hasOwnProperty("rows_affected_by_shard")) { + if (!$util.isObject(message.rows_affected_by_shard)) + return "rows_affected_by_shard: object expected"; + let key = Object.keys(message.rows_affected_by_shard); + for (let i = 0; i < key.length; ++i) + if (!$util.isInteger(message.rows_affected_by_shard[key[i]]) && !(message.rows_affected_by_shard[key[i]] && $util.isInteger(message.rows_affected_by_shard[key[i]].low) && $util.isInteger(message.rows_affected_by_shard[key[i]].high))) + return "rows_affected_by_shard: integer|Long{k:string} expected"; } return null; }; /** - * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ForceCutOverSchemaMigrationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @returns {vtctldata.ForceCutOverSchemaMigrationResponse} ForceCutOverSchemaMigrationResponse */ - GetCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoResponse) + ForceCutOverSchemaMigrationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ForceCutOverSchemaMigrationResponse) return object; - let message = new $root.vtctldata.GetCellInfoResponse(); - if (object.cell_info != null) { - if (typeof object.cell_info !== "object") - throw TypeError(".vtctldata.GetCellInfoResponse.cell_info: object expected"); - message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); + let message = new $root.vtctldata.ForceCutOverSchemaMigrationResponse(); + if (object.rows_affected_by_shard) { + if (typeof object.rows_affected_by_shard !== "object") + throw TypeError(".vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard: object expected"); + message.rows_affected_by_shard = {}; + for (let keys = Object.keys(object.rows_affected_by_shard), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.rows_affected_by_shard[keys[i]] = $util.Long.fromValue(object.rows_affected_by_shard[keys[i]])).unsigned = true; + else if (typeof object.rows_affected_by_shard[keys[i]] === "string") + message.rows_affected_by_shard[keys[i]] = parseInt(object.rows_affected_by_shard[keys[i]], 10); + else if (typeof object.rows_affected_by_shard[keys[i]] === "number") + message.rows_affected_by_shard[keys[i]] = object.rows_affected_by_shard[keys[i]]; + else if (typeof object.rows_affected_by_shard[keys[i]] === "object") + message.rows_affected_by_shard[keys[i]] = new $util.LongBits(object.rows_affected_by_shard[keys[i]].low >>> 0, object.rows_affected_by_shard[keys[i]].high >>> 0).toNumber(true); } return message; }; /** - * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a ForceCutOverSchemaMigrationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static - * @param {vtctldata.GetCellInfoResponse} message GetCellInfoResponse + * @param {vtctldata.ForceCutOverSchemaMigrationResponse} message ForceCutOverSchemaMigrationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoResponse.toObject = function toObject(message, options) { + ForceCutOverSchemaMigrationResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.cell_info = null; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) - object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); + if (options.objects || options.defaults) + object.rows_affected_by_shard = {}; + let keys2; + if (message.rows_affected_by_shard && (keys2 = Object.keys(message.rows_affected_by_shard)).length) { + object.rows_affected_by_shard = {}; + for (let j = 0; j < keys2.length; ++j) + if (typeof message.rows_affected_by_shard[keys2[j]] === "number") + object.rows_affected_by_shard[keys2[j]] = options.longs === String ? String(message.rows_affected_by_shard[keys2[j]]) : message.rows_affected_by_shard[keys2[j]]; + else + object.rows_affected_by_shard[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected_by_shard[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.rows_affected_by_shard[keys2[j]].low >>> 0, message.rows_affected_by_shard[keys2[j]].high >>> 0).toNumber(true) : message.rows_affected_by_shard[keys2[j]]; + } return object; }; /** - * Converts this GetCellInfoResponse to JSON. + * Converts this ForceCutOverSchemaMigrationResponse to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @instance * @returns {Object.} JSON object */ - GetCellInfoResponse.prototype.toJSON = function toJSON() { + ForceCutOverSchemaMigrationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCellInfoResponse + * Gets the default type url for ForceCutOverSchemaMigrationResponse * @function getTypeUrl - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ForceCutOverSchemaMigrationResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCellInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ForceCutOverSchemaMigrationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetCellInfoResponse"; + return typeUrlPrefix + "/vtctldata.ForceCutOverSchemaMigrationResponse"; }; - return GetCellInfoResponse; + return ForceCutOverSchemaMigrationResponse; })(); - vtctldata.GetCellInfoNamesRequest = (function() { + vtctldata.GetBackupsRequest = (function() { /** - * Properties of a GetCellInfoNamesRequest. + * Properties of a GetBackupsRequest. * @memberof vtctldata - * @interface IGetCellInfoNamesRequest + * @interface IGetBackupsRequest + * @property {string|null} [keyspace] GetBackupsRequest keyspace + * @property {string|null} [shard] GetBackupsRequest shard + * @property {number|null} [limit] GetBackupsRequest limit + * @property {boolean|null} [detailed] GetBackupsRequest detailed + * @property {number|null} [detailed_limit] GetBackupsRequest detailed_limit */ /** - * Constructs a new GetCellInfoNamesRequest. + * Constructs a new GetBackupsRequest. * @memberof vtctldata - * @classdesc Represents a GetCellInfoNamesRequest. - * @implements IGetCellInfoNamesRequest + * @classdesc Represents a GetBackupsRequest. + * @implements IGetBackupsRequest * @constructor - * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set + * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set */ - function GetCellInfoNamesRequest(properties) { + function GetBackupsRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -134771,63 +133355,133 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new GetCellInfoNamesRequest instance using the specified properties. + * GetBackupsRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.keyspace = ""; + + /** + * GetBackupsRequest shard. + * @member {string} shard + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.shard = ""; + + /** + * GetBackupsRequest limit. + * @member {number} limit + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.limit = 0; + + /** + * GetBackupsRequest detailed. + * @member {boolean} detailed + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.detailed = false; + + /** + * GetBackupsRequest detailed_limit. + * @member {number} detailed_limit + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.detailed_limit = 0; + + /** + * Creates a new GetBackupsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest instance + * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest instance */ - GetCellInfoNamesRequest.create = function create(properties) { - return new GetCellInfoNamesRequest(properties); + GetBackupsRequest.create = function create(properties) { + return new GetBackupsRequest(properties); }; /** - * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. + * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode + * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesRequest.encode = function encode(message, writer) { + GetBackupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.limit); + if (message.detailed != null && Object.hasOwnProperty.call(message, "detailed")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.detailed); + if (message.detailed_limit != null && Object.hasOwnProperty.call(message, "detailed_limit")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.detailed_limit); return writer; }; /** - * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. + * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode + * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. + * Decodes a GetBackupsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesRequest.decode = function decode(reader, length) { + GetBackupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.keyspace = reader.string(); + break; + } + case 2: { + message.shard = reader.string(); + break; + } + case 3: { + message.limit = reader.uint32(); + break; + } + case 4: { + message.detailed = reader.bool(); + break; + } + case 5: { + message.detailed_limit = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -134837,110 +133491,156 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesRequest.decodeDelimited = function decodeDelimited(reader) { + GetBackupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoNamesRequest message. + * Verifies a GetBackupsRequest message. * @function verify - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoNamesRequest.verify = function verify(message) { + GetBackupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + if (message.detailed != null && message.hasOwnProperty("detailed")) + if (typeof message.detailed !== "boolean") + return "detailed: boolean expected"; + if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) + if (!$util.isInteger(message.detailed_limit)) + return "detailed_limit: integer expected"; return null; }; /** - * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest */ - GetCellInfoNamesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoNamesRequest) + GetBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetBackupsRequest) return object; - return new $root.vtctldata.GetCellInfoNamesRequest(); + let message = new $root.vtctldata.GetBackupsRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.limit != null) + message.limit = object.limit >>> 0; + if (object.detailed != null) + message.detailed = Boolean(object.detailed); + if (object.detailed_limit != null) + message.detailed_limit = object.detailed_limit >>> 0; + return message; }; /** - * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.GetCellInfoNamesRequest} message GetCellInfoNamesRequest + * @param {vtctldata.GetBackupsRequest} message GetBackupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoNamesRequest.toObject = function toObject() { - return {}; + GetBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.limit = 0; + object.detailed = false; + object.detailed_limit = 0; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.limit != null && message.hasOwnProperty("limit")) + object.limit = message.limit; + if (message.detailed != null && message.hasOwnProperty("detailed")) + object.detailed = message.detailed; + if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) + object.detailed_limit = message.detailed_limit; + return object; }; /** - * Converts this GetCellInfoNamesRequest to JSON. + * Converts this GetBackupsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @instance * @returns {Object.} JSON object */ - GetCellInfoNamesRequest.prototype.toJSON = function toJSON() { + GetBackupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCellInfoNamesRequest + * Gets the default type url for GetBackupsRequest * @function getTypeUrl - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCellInfoNamesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetCellInfoNamesRequest"; + return typeUrlPrefix + "/vtctldata.GetBackupsRequest"; }; - return GetCellInfoNamesRequest; + return GetBackupsRequest; })(); - vtctldata.GetCellInfoNamesResponse = (function() { + vtctldata.GetBackupsResponse = (function() { /** - * Properties of a GetCellInfoNamesResponse. + * Properties of a GetBackupsResponse. * @memberof vtctldata - * @interface IGetCellInfoNamesResponse - * @property {Array.|null} [names] GetCellInfoNamesResponse names + * @interface IGetBackupsResponse + * @property {Array.|null} [backups] GetBackupsResponse backups */ /** - * Constructs a new GetCellInfoNamesResponse. + * Constructs a new GetBackupsResponse. * @memberof vtctldata - * @classdesc Represents a GetCellInfoNamesResponse. - * @implements IGetCellInfoNamesResponse + * @classdesc Represents a GetBackupsResponse. + * @implements IGetBackupsResponse * @constructor - * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set + * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set */ - function GetCellInfoNamesResponse(properties) { - this.names = []; + function GetBackupsResponse(properties) { + this.backups = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -134948,78 +133648,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetCellInfoNamesResponse names. - * @member {Array.} names - * @memberof vtctldata.GetCellInfoNamesResponse + * GetBackupsResponse backups. + * @member {Array.} backups + * @memberof vtctldata.GetBackupsResponse * @instance */ - GetCellInfoNamesResponse.prototype.names = $util.emptyArray; + GetBackupsResponse.prototype.backups = $util.emptyArray; /** - * Creates a new GetCellInfoNamesResponse instance using the specified properties. + * Creates a new GetBackupsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse instance + * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse instance */ - GetCellInfoNamesResponse.create = function create(properties) { - return new GetCellInfoNamesResponse(properties); + GetBackupsResponse.create = function create(properties) { + return new GetBackupsResponse(properties); }; /** - * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. + * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode + * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesResponse.encode = function encode(message, writer) { + GetBackupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.names != null && message.names.length) - for (let i = 0; i < message.names.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); + if (message.backups != null && message.backups.length) + for (let i = 0; i < message.backups.length; ++i) + $root.mysqlctl.BackupInfo.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. + * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode + * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. + * Decodes a GetBackupsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesResponse.decode = function decode(reader, length) { + GetBackupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.mysqlctl.BackupInfo.decode(reader, reader.uint32())); break; } default: @@ -135031,133 +133731,139 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesResponse.decodeDelimited = function decodeDelimited(reader) { + GetBackupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoNamesResponse message. + * Verifies a GetBackupsResponse message. * @function verify - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoNamesResponse.verify = function verify(message) { + GetBackupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (let i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (let i = 0; i < message.backups.length; ++i) { + let error = $root.mysqlctl.BackupInfo.verify(message.backups[i]); + if (error) + return "backups." + error; + } } return null; }; /** - * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse */ - GetCellInfoNamesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoNamesResponse) + GetBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetBackupsResponse) return object; - let message = new $root.vtctldata.GetCellInfoNamesResponse(); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".vtctldata.GetCellInfoNamesResponse.names: array expected"); - message.names = []; - for (let i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); + let message = new $root.vtctldata.GetBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".vtctldata.GetBackupsResponse.backups: array expected"); + message.backups = []; + for (let i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".vtctldata.GetBackupsResponse.backups: object expected"); + message.backups[i] = $root.mysqlctl.BackupInfo.fromObject(object.backups[i]); + } } return message; }; /** - * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.GetCellInfoNamesResponse} message GetCellInfoNamesResponse + * @param {vtctldata.GetBackupsResponse} message GetBackupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoNamesResponse.toObject = function toObject(message, options) { + GetBackupsResponse.toObject = function toObject(message, options) { if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (message.names && message.names.length) { - object.names = []; - for (let j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.backups = []; + if (message.backups && message.backups.length) { + object.backups = []; + for (let j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.mysqlctl.BackupInfo.toObject(message.backups[j], options); } return object; }; /** - * Converts this GetCellInfoNamesResponse to JSON. + * Converts this GetBackupsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @instance * @returns {Object.} JSON object */ - GetCellInfoNamesResponse.prototype.toJSON = function toJSON() { + GetBackupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCellInfoNamesResponse + * Gets the default type url for GetBackupsResponse * @function getTypeUrl - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCellInfoNamesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetCellInfoNamesResponse"; + return typeUrlPrefix + "/vtctldata.GetBackupsResponse"; }; - return GetCellInfoNamesResponse; + return GetBackupsResponse; })(); - vtctldata.GetCellsAliasesRequest = (function() { + vtctldata.GetCellInfoRequest = (function() { /** - * Properties of a GetCellsAliasesRequest. + * Properties of a GetCellInfoRequest. * @memberof vtctldata - * @interface IGetCellsAliasesRequest + * @interface IGetCellInfoRequest + * @property {string|null} [cell] GetCellInfoRequest cell */ /** - * Constructs a new GetCellsAliasesRequest. + * Constructs a new GetCellInfoRequest. * @memberof vtctldata - * @classdesc Represents a GetCellsAliasesRequest. - * @implements IGetCellsAliasesRequest + * @classdesc Represents a GetCellInfoRequest. + * @implements IGetCellInfoRequest * @constructor - * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set */ - function GetCellsAliasesRequest(properties) { + function GetCellInfoRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135165,63 +133871,77 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new GetCellsAliasesRequest instance using the specified properties. + * GetCellInfoRequest cell. + * @member {string} cell + * @memberof vtctldata.GetCellInfoRequest + * @instance + */ + GetCellInfoRequest.prototype.cell = ""; + + /** + * Creates a new GetCellInfoRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest instance + * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest instance */ - GetCellsAliasesRequest.create = function create(properties) { - return new GetCellsAliasesRequest(properties); + GetCellInfoRequest.create = function create(properties) { + return new GetCellInfoRequest(properties); }; /** - * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. + * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesRequest.encode = function encode(message, writer) { + GetCellInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); return writer; }; /** - * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. + * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. + * Decodes a GetCellInfoRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesRequest.decode = function decode(reader, length) { + GetCellInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.cell = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -135231,110 +133951,122 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesRequest.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellsAliasesRequest message. + * Verifies a GetCellInfoRequest message. * @function verify - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellsAliasesRequest.verify = function verify(message) { + GetCellInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest */ - GetCellsAliasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellsAliasesRequest) + GetCellInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoRequest) return object; - return new $root.vtctldata.GetCellsAliasesRequest(); + let message = new $root.vtctldata.GetCellInfoRequest(); + if (object.cell != null) + message.cell = String(object.cell); + return message; }; /** - * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.GetCellsAliasesRequest} message GetCellsAliasesRequest + * @param {vtctldata.GetCellInfoRequest} message GetCellInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellsAliasesRequest.toObject = function toObject() { - return {}; + GetCellInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.cell = ""; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + return object; }; /** - * Converts this GetCellsAliasesRequest to JSON. + * Converts this GetCellInfoRequest to JSON. * @function toJSON - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @instance * @returns {Object.} JSON object */ - GetCellsAliasesRequest.prototype.toJSON = function toJSON() { + GetCellInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCellsAliasesRequest + * Gets the default type url for GetCellInfoRequest * @function getTypeUrl - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCellsAliasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCellInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetCellsAliasesRequest"; + return typeUrlPrefix + "/vtctldata.GetCellInfoRequest"; }; - return GetCellsAliasesRequest; + return GetCellInfoRequest; })(); - vtctldata.GetCellsAliasesResponse = (function() { + vtctldata.GetCellInfoResponse = (function() { /** - * Properties of a GetCellsAliasesResponse. + * Properties of a GetCellInfoResponse. * @memberof vtctldata - * @interface IGetCellsAliasesResponse - * @property {Object.|null} [aliases] GetCellsAliasesResponse aliases + * @interface IGetCellInfoResponse + * @property {topodata.ICellInfo|null} [cell_info] GetCellInfoResponse cell_info */ /** - * Constructs a new GetCellsAliasesResponse. + * Constructs a new GetCellInfoResponse. * @memberof vtctldata - * @classdesc Represents a GetCellsAliasesResponse. - * @implements IGetCellsAliasesResponse + * @classdesc Represents a GetCellInfoResponse. + * @implements IGetCellInfoResponse * @constructor - * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set */ - function GetCellsAliasesResponse(properties) { - this.aliases = {}; + function GetCellInfoResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135342,97 +134074,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetCellsAliasesResponse aliases. - * @member {Object.} aliases - * @memberof vtctldata.GetCellsAliasesResponse + * GetCellInfoResponse cell_info. + * @member {topodata.ICellInfo|null|undefined} cell_info + * @memberof vtctldata.GetCellInfoResponse * @instance */ - GetCellsAliasesResponse.prototype.aliases = $util.emptyObject; + GetCellInfoResponse.prototype.cell_info = null; /** - * Creates a new GetCellsAliasesResponse instance using the specified properties. + * Creates a new GetCellInfoResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse instance + * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse instance */ - GetCellsAliasesResponse.create = function create(properties) { - return new GetCellsAliasesResponse(properties); + GetCellInfoResponse.create = function create(properties) { + return new GetCellInfoResponse(properties); }; /** - * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. + * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesResponse.encode = function encode(message, writer) { + GetCellInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.aliases != null && Object.hasOwnProperty.call(message, "aliases")) - for (let keys = Object.keys(message.aliases), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.CellsAlias.encode(message.aliases[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) + $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. + * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. + * Decodes a GetCellInfoResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellsAliasesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesResponse(), key, value; - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.aliases === $util.emptyObject) - message.aliases = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.CellsAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.aliases[key] = value; + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCellInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); break; } default: @@ -135444,141 +134154,126 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesResponse.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellsAliasesResponse message. + * Verifies a GetCellInfoResponse message. * @function verify - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellsAliasesResponse.verify = function verify(message) { + GetCellInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.aliases != null && message.hasOwnProperty("aliases")) { - if (!$util.isObject(message.aliases)) - return "aliases: object expected"; - let key = Object.keys(message.aliases); - for (let i = 0; i < key.length; ++i) { - let error = $root.topodata.CellsAlias.verify(message.aliases[key[i]]); - if (error) - return "aliases." + error; - } + if (message.cell_info != null && message.hasOwnProperty("cell_info")) { + let error = $root.topodata.CellInfo.verify(message.cell_info); + if (error) + return "cell_info." + error; } return null; }; /** - * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse */ - GetCellsAliasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellsAliasesResponse) + GetCellInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoResponse) return object; - let message = new $root.vtctldata.GetCellsAliasesResponse(); - if (object.aliases) { - if (typeof object.aliases !== "object") - throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); - message.aliases = {}; - for (let keys = Object.keys(object.aliases), i = 0; i < keys.length; ++i) { - if (typeof object.aliases[keys[i]] !== "object") - throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); - message.aliases[keys[i]] = $root.topodata.CellsAlias.fromObject(object.aliases[keys[i]]); - } + let message = new $root.vtctldata.GetCellInfoResponse(); + if (object.cell_info != null) { + if (typeof object.cell_info !== "object") + throw TypeError(".vtctldata.GetCellInfoResponse.cell_info: object expected"); + message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); } return message; }; /** - * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.GetCellsAliasesResponse} message GetCellsAliasesResponse + * @param {vtctldata.GetCellInfoResponse} message GetCellInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellsAliasesResponse.toObject = function toObject(message, options) { + GetCellInfoResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.aliases = {}; - let keys2; - if (message.aliases && (keys2 = Object.keys(message.aliases)).length) { - object.aliases = {}; - for (let j = 0; j < keys2.length; ++j) - object.aliases[keys2[j]] = $root.topodata.CellsAlias.toObject(message.aliases[keys2[j]], options); - } + if (options.defaults) + object.cell_info = null; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) + object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); return object; }; /** - * Converts this GetCellsAliasesResponse to JSON. + * Converts this GetCellInfoResponse to JSON. * @function toJSON - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @instance * @returns {Object.} JSON object */ - GetCellsAliasesResponse.prototype.toJSON = function toJSON() { + GetCellInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCellsAliasesResponse + * Gets the default type url for GetCellInfoResponse * @function getTypeUrl - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCellsAliasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCellInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetCellsAliasesResponse"; + return typeUrlPrefix + "/vtctldata.GetCellInfoResponse"; }; - return GetCellsAliasesResponse; + return GetCellInfoResponse; })(); - vtctldata.GetFullStatusRequest = (function() { + vtctldata.GetCellInfoNamesRequest = (function() { /** - * Properties of a GetFullStatusRequest. + * Properties of a GetCellInfoNamesRequest. * @memberof vtctldata - * @interface IGetFullStatusRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetFullStatusRequest tablet_alias + * @interface IGetCellInfoNamesRequest */ /** - * Constructs a new GetFullStatusRequest. + * Constructs a new GetCellInfoNamesRequest. * @memberof vtctldata - * @classdesc Represents a GetFullStatusRequest. - * @implements IGetFullStatusRequest + * @classdesc Represents a GetCellInfoNamesRequest. + * @implements IGetCellInfoNamesRequest * @constructor - * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set */ - function GetFullStatusRequest(properties) { + function GetCellInfoNamesRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135586,77 +134281,63 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetFullStatusRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetFullStatusRequest - * @instance - */ - GetFullStatusRequest.prototype.tablet_alias = null; - - /** - * Creates a new GetFullStatusRequest instance using the specified properties. + * Creates a new GetCellInfoNamesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest instance + * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest instance */ - GetFullStatusRequest.create = function create(properties) { - return new GetFullStatusRequest(properties); + GetCellInfoNamesRequest.create = function create(properties) { + return new GetCellInfoNamesRequest(properties); }; /** - * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. + * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusRequest.encode = function encode(message, writer) { + GetCellInfoNamesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. + * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFullStatusRequest message from the specified reader or buffer. + * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest * @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) { + GetCellInfoNamesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -135666,127 +134347,110 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest * @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) { + GetCellInfoNamesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFullStatusRequest message. + * Verifies a GetCellInfoNamesRequest message. * @function verify - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @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) { + GetCellInfoNamesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } return null; }; /** - * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest */ - GetFullStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetFullStatusRequest) + GetCellInfoNamesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoNamesRequest) return object; - let message = new $root.vtctldata.GetFullStatusRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetFullStatusRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; + return new $root.vtctldata.GetCellInfoNamesRequest(); }; /** - * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.GetFullStatusRequest} message GetFullStatusRequest + * @param {vtctldata.GetCellInfoNamesRequest} message GetCellInfoNamesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFullStatusRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; + GetCellInfoNamesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetFullStatusRequest to JSON. + * Converts this GetCellInfoNamesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @instance * @returns {Object.} JSON object */ - GetFullStatusRequest.prototype.toJSON = function toJSON() { + GetCellInfoNamesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFullStatusRequest + * Gets the default type url for GetCellInfoNamesRequest * @function getTypeUrl - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFullStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCellInfoNamesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetFullStatusRequest"; + return typeUrlPrefix + "/vtctldata.GetCellInfoNamesRequest"; }; - return GetFullStatusRequest; + return GetCellInfoNamesRequest; })(); - vtctldata.GetFullStatusResponse = (function() { + vtctldata.GetCellInfoNamesResponse = (function() { /** - * Properties of a GetFullStatusResponse. + * Properties of a GetCellInfoNamesResponse. * @memberof vtctldata - * @interface IGetFullStatusResponse - * @property {replicationdata.IFullStatus|null} [status] GetFullStatusResponse status + * @interface IGetCellInfoNamesResponse + * @property {Array.|null} [names] GetCellInfoNamesResponse names */ /** - * Constructs a new GetFullStatusResponse. + * Constructs a new GetCellInfoNamesResponse. * @memberof vtctldata - * @classdesc Represents a GetFullStatusResponse. - * @implements IGetFullStatusResponse + * @classdesc Represents a GetCellInfoNamesResponse. + * @implements IGetCellInfoNamesResponse * @constructor - * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set */ - function GetFullStatusResponse(properties) { + function GetCellInfoNamesResponse(properties) { + this.names = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135794,75 +134458,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetFullStatusResponse status. - * @member {replicationdata.IFullStatus|null|undefined} status - * @memberof vtctldata.GetFullStatusResponse + * GetCellInfoNamesResponse names. + * @member {Array.} names + * @memberof vtctldata.GetCellInfoNamesResponse * @instance */ - GetFullStatusResponse.prototype.status = null; + GetCellInfoNamesResponse.prototype.names = $util.emptyArray; /** - * Creates a new GetFullStatusResponse instance using the specified properties. + * Creates a new GetCellInfoNamesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse instance + * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse instance */ - GetFullStatusResponse.create = function create(properties) { - return new GetFullStatusResponse(properties); + GetCellInfoNamesResponse.create = function create(properties) { + return new GetCellInfoNamesResponse(properties); }; /** - * Encodes the specified GetFullStatusResponse message. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. + * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusResponse.encode = function encode(message, writer) { + GetCellInfoNamesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.replicationdata.FullStatus.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.names != null && message.names.length) + for (let i = 0; i < message.names.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); return writer; }; /** - * Encodes the specified GetFullStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. + * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFullStatusResponse message from the specified reader or buffer. + * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFullStatusResponse.decode = function decode(reader, length) { + GetCellInfoNamesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.status = $root.replicationdata.FullStatus.decode(reader, reader.uint32()); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -135874,126 +134541,133 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetFullStatusResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFullStatusResponse.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoNamesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFullStatusResponse message. + * Verifies a GetCellInfoNamesResponse message. * @function verify - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFullStatusResponse.verify = function verify(message) { + GetCellInfoNamesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - let error = $root.replicationdata.FullStatus.verify(message.status); - if (error) - return "status." + error; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (let i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a GetFullStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse */ - GetFullStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetFullStatusResponse) + GetCellInfoNamesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoNamesResponse) return object; - let message = new $root.vtctldata.GetFullStatusResponse(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".vtctldata.GetFullStatusResponse.status: object expected"); - message.status = $root.replicationdata.FullStatus.fromObject(object.status); + let message = new $root.vtctldata.GetCellInfoNamesResponse(); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".vtctldata.GetCellInfoNamesResponse.names: array expected"); + message.names = []; + for (let i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from a GetFullStatusResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.GetFullStatusResponse} message GetFullStatusResponse + * @param {vtctldata.GetCellInfoNamesResponse} message GetCellInfoNamesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFullStatusResponse.toObject = function toObject(message, options) { + GetCellInfoNamesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.replicationdata.FullStatus.toObject(message.status, options); + if (options.arrays || options.defaults) + object.names = []; + if (message.names && message.names.length) { + object.names = []; + for (let j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } return object; }; /** - * Converts this GetFullStatusResponse to JSON. + * Converts this GetCellInfoNamesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @instance * @returns {Object.} JSON object */ - GetFullStatusResponse.prototype.toJSON = function toJSON() { + GetCellInfoNamesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFullStatusResponse + * Gets the default type url for GetCellInfoNamesResponse * @function getTypeUrl - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFullStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCellInfoNamesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetFullStatusResponse"; + return typeUrlPrefix + "/vtctldata.GetCellInfoNamesResponse"; }; - return GetFullStatusResponse; + return GetCellInfoNamesResponse; })(); - vtctldata.GetKeyspacesRequest = (function() { + vtctldata.GetCellsAliasesRequest = (function() { /** - * Properties of a GetKeyspacesRequest. + * Properties of a GetCellsAliasesRequest. * @memberof vtctldata - * @interface IGetKeyspacesRequest + * @interface IGetCellsAliasesRequest */ /** - * Constructs a new GetKeyspacesRequest. + * Constructs a new GetCellsAliasesRequest. * @memberof vtctldata - * @classdesc Represents a GetKeyspacesRequest. - * @implements IGetKeyspacesRequest + * @classdesc Represents a GetCellsAliasesRequest. + * @implements IGetCellsAliasesRequest * @constructor - * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set + * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set */ - function GetKeyspacesRequest(properties) { + function GetCellsAliasesRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136001,60 +134675,60 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new GetKeyspacesRequest instance using the specified properties. + * Creates a new GetCellsAliasesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest instance + * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest instance */ - GetKeyspacesRequest.create = function create(properties) { - return new GetKeyspacesRequest(properties); + GetCellsAliasesRequest.create = function create(properties) { + return new GetCellsAliasesRequest(properties); }; /** - * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. + * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode + * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesRequest.encode = function encode(message, writer) { + GetCellsAliasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. + * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode + * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCellsAliasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer. + * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesRequest.decode = function decode(reader, length) { + GetCellsAliasesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -136067,110 +134741,110 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { + GetCellsAliasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspacesRequest message. + * Verifies a GetCellsAliasesRequest message. * @function verify - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspacesRequest.verify = function verify(message) { + GetCellsAliasesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest */ - GetKeyspacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspacesRequest) + GetCellsAliasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellsAliasesRequest) return object; - return new $root.vtctldata.GetKeyspacesRequest(); + return new $root.vtctldata.GetCellsAliasesRequest(); }; /** - * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.GetKeyspacesRequest} message GetKeyspacesRequest + * @param {vtctldata.GetCellsAliasesRequest} message GetCellsAliasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspacesRequest.toObject = function toObject() { + GetCellsAliasesRequest.toObject = function toObject() { return {}; }; /** - * Converts this GetKeyspacesRequest to JSON. + * Converts this GetCellsAliasesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @instance * @returns {Object.} JSON object */ - GetKeyspacesRequest.prototype.toJSON = function toJSON() { + GetCellsAliasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetKeyspacesRequest + * Gets the default type url for GetCellsAliasesRequest * @function getTypeUrl - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetKeyspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCellsAliasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetKeyspacesRequest"; + return typeUrlPrefix + "/vtctldata.GetCellsAliasesRequest"; }; - return GetKeyspacesRequest; + return GetCellsAliasesRequest; })(); - vtctldata.GetKeyspacesResponse = (function() { + vtctldata.GetCellsAliasesResponse = (function() { /** - * Properties of a GetKeyspacesResponse. + * Properties of a GetCellsAliasesResponse. * @memberof vtctldata - * @interface IGetKeyspacesResponse - * @property {Array.|null} [keyspaces] GetKeyspacesResponse keyspaces + * @interface IGetCellsAliasesResponse + * @property {Object.|null} [aliases] GetCellsAliasesResponse aliases */ /** - * Constructs a new GetKeyspacesResponse. + * Constructs a new GetCellsAliasesResponse. * @memberof vtctldata - * @classdesc Represents a GetKeyspacesResponse. - * @implements IGetKeyspacesResponse + * @classdesc Represents a GetCellsAliasesResponse. + * @implements IGetCellsAliasesResponse * @constructor - * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set + * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set */ - function GetKeyspacesResponse(properties) { - this.keyspaces = []; + function GetCellsAliasesResponse(properties) { + this.aliases = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136178,78 +134852,97 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetKeyspacesResponse keyspaces. - * @member {Array.} keyspaces - * @memberof vtctldata.GetKeyspacesResponse + * GetCellsAliasesResponse aliases. + * @member {Object.} aliases + * @memberof vtctldata.GetCellsAliasesResponse * @instance */ - GetKeyspacesResponse.prototype.keyspaces = $util.emptyArray; + GetCellsAliasesResponse.prototype.aliases = $util.emptyObject; /** - * Creates a new GetKeyspacesResponse instance using the specified properties. + * Creates a new GetCellsAliasesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse instance + * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse instance */ - GetKeyspacesResponse.create = function create(properties) { - return new GetKeyspacesResponse(properties); + GetCellsAliasesResponse.create = function create(properties) { + return new GetCellsAliasesResponse(properties); }; /** - * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. + * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode + * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesResponse.encode = function encode(message, writer) { + GetCellsAliasesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspaces != null && message.keyspaces.length) - for (let i = 0; i < message.keyspaces.length; ++i) - $root.vtctldata.Keyspace.encode(message.keyspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aliases != null && Object.hasOwnProperty.call(message, "aliases")) + for (let keys = Object.keys(message.aliases), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.topodata.CellsAlias.encode(message.aliases[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. + * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode + * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCellsAliasesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer. + * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesResponse.decode = function decode(reader, length) { + GetCellsAliasesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.keyspaces && message.keyspaces.length)) - message.keyspaces = []; - message.keyspaces.push($root.vtctldata.Keyspace.decode(reader, reader.uint32())); + if (message.aliases === $util.emptyObject) + message.aliases = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.topodata.CellsAlias.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.aliases[key] = value; break; } default: @@ -136261,139 +134954,141 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { + GetCellsAliasesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspacesResponse message. + * Verifies a GetCellsAliasesResponse message. * @function verify - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspacesResponse.verify = function verify(message) { + GetCellsAliasesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { - if (!Array.isArray(message.keyspaces)) - return "keyspaces: array expected"; - for (let i = 0; i < message.keyspaces.length; ++i) { - let error = $root.vtctldata.Keyspace.verify(message.keyspaces[i]); + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!$util.isObject(message.aliases)) + return "aliases: object expected"; + let key = Object.keys(message.aliases); + for (let i = 0; i < key.length; ++i) { + let error = $root.topodata.CellsAlias.verify(message.aliases[key[i]]); if (error) - return "keyspaces." + error; + return "aliases." + error; } } return null; }; /** - * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse */ - GetKeyspacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspacesResponse) + GetCellsAliasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellsAliasesResponse) return object; - let message = new $root.vtctldata.GetKeyspacesResponse(); - if (object.keyspaces) { - if (!Array.isArray(object.keyspaces)) - throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: array expected"); - message.keyspaces = []; - for (let i = 0; i < object.keyspaces.length; ++i) { - if (typeof object.keyspaces[i] !== "object") - throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: object expected"); - message.keyspaces[i] = $root.vtctldata.Keyspace.fromObject(object.keyspaces[i]); + let message = new $root.vtctldata.GetCellsAliasesResponse(); + if (object.aliases) { + if (typeof object.aliases !== "object") + throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); + message.aliases = {}; + for (let keys = Object.keys(object.aliases), i = 0; i < keys.length; ++i) { + if (typeof object.aliases[keys[i]] !== "object") + throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); + message.aliases[keys[i]] = $root.topodata.CellsAlias.fromObject(object.aliases[keys[i]]); } } return message; }; /** - * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.GetKeyspacesResponse} message GetKeyspacesResponse + * @param {vtctldata.GetCellsAliasesResponse} message GetCellsAliasesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspacesResponse.toObject = function toObject(message, options) { + GetCellsAliasesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.keyspaces = []; - if (message.keyspaces && message.keyspaces.length) { - object.keyspaces = []; - for (let j = 0; j < message.keyspaces.length; ++j) - object.keyspaces[j] = $root.vtctldata.Keyspace.toObject(message.keyspaces[j], options); + if (options.objects || options.defaults) + object.aliases = {}; + let keys2; + if (message.aliases && (keys2 = Object.keys(message.aliases)).length) { + object.aliases = {}; + for (let j = 0; j < keys2.length; ++j) + object.aliases[keys2[j]] = $root.topodata.CellsAlias.toObject(message.aliases[keys2[j]], options); } return object; }; /** - * Converts this GetKeyspacesResponse to JSON. + * Converts this GetCellsAliasesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @instance * @returns {Object.} JSON object */ - GetKeyspacesResponse.prototype.toJSON = function toJSON() { + GetCellsAliasesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetKeyspacesResponse + * Gets the default type url for GetCellsAliasesResponse * @function getTypeUrl - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetKeyspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCellsAliasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetKeyspacesResponse"; + return typeUrlPrefix + "/vtctldata.GetCellsAliasesResponse"; }; - return GetKeyspacesResponse; + return GetCellsAliasesResponse; })(); - vtctldata.GetKeyspaceRequest = (function() { + vtctldata.GetFullStatusRequest = (function() { /** - * Properties of a GetKeyspaceRequest. + * Properties of a GetFullStatusRequest. * @memberof vtctldata - * @interface IGetKeyspaceRequest - * @property {string|null} [keyspace] GetKeyspaceRequest keyspace + * @interface IGetFullStatusRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetFullStatusRequest tablet_alias */ /** - * Constructs a new GetKeyspaceRequest. + * Constructs a new GetFullStatusRequest. * @memberof vtctldata - * @classdesc Represents a GetKeyspaceRequest. - * @implements IGetKeyspaceRequest + * @classdesc Represents a GetFullStatusRequest. + * @implements IGetFullStatusRequest * @constructor - * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set */ - function GetKeyspaceRequest(properties) { + function GetFullStatusRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136401,75 +135096,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetKeyspaceRequest + * GetFullStatusRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetFullStatusRequest * @instance */ - GetKeyspaceRequest.prototype.keyspace = ""; + GetFullStatusRequest.prototype.tablet_alias = null; /** - * Creates a new GetKeyspaceRequest instance using the specified properties. + * Creates a new GetFullStatusRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest instance + * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest instance */ - GetKeyspaceRequest.create = function create(properties) { - return new GetKeyspaceRequest(properties); + GetFullStatusRequest.create = function create(properties) { + return new GetFullStatusRequest(properties); }; /** - * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. + * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode + * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRequest.encode = function encode(message, writer) { + GetFullStatusRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. + * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode + * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetFullStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer. + * Decodes a GetFullStatusRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRequest.decode = function decode(reader, length) { + GetFullStatusRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; } default: @@ -136481,122 +135176,127 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + GetFullStatusRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspaceRequest message. + * Verifies a GetFullStatusRequest message. * @function verify - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspaceRequest.verify = function verify(message) { + GetFullStatusRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest */ - GetKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceRequest) + GetFullStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetFullStatusRequest) return object; - let message = new $root.vtctldata.GetKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); + let message = new $root.vtctldata.GetFullStatusRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetFullStatusRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } return message; }; /** - * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.GetKeyspaceRequest} message GetKeyspaceRequest + * @param {vtctldata.GetFullStatusRequest} message GetFullStatusRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspaceRequest.toObject = function toObject(message, options) { + GetFullStatusRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this GetKeyspaceRequest to JSON. + * Converts this GetFullStatusRequest to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @instance * @returns {Object.} JSON object */ - GetKeyspaceRequest.prototype.toJSON = function toJSON() { + GetFullStatusRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetKeyspaceRequest + * Gets the default type url for GetFullStatusRequest * @function getTypeUrl - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFullStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetKeyspaceRequest"; + return typeUrlPrefix + "/vtctldata.GetFullStatusRequest"; }; - return GetKeyspaceRequest; + return GetFullStatusRequest; })(); - vtctldata.GetKeyspaceResponse = (function() { + vtctldata.GetFullStatusResponse = (function() { /** - * Properties of a GetKeyspaceResponse. + * Properties of a GetFullStatusResponse. * @memberof vtctldata - * @interface IGetKeyspaceResponse - * @property {vtctldata.IKeyspace|null} [keyspace] GetKeyspaceResponse keyspace + * @interface IGetFullStatusResponse + * @property {replicationdata.IFullStatus|null} [status] GetFullStatusResponse status */ /** - * Constructs a new GetKeyspaceResponse. + * Constructs a new GetFullStatusResponse. * @memberof vtctldata - * @classdesc Represents a GetKeyspaceResponse. - * @implements IGetKeyspaceResponse + * @classdesc Represents a GetFullStatusResponse. + * @implements IGetFullStatusResponse * @constructor - * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set */ - function GetKeyspaceResponse(properties) { + function GetFullStatusResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136604,75 +135304,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetKeyspaceResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.GetKeyspaceResponse + * GetFullStatusResponse status. + * @member {replicationdata.IFullStatus|null|undefined} status + * @memberof vtctldata.GetFullStatusResponse * @instance */ - GetKeyspaceResponse.prototype.keyspace = null; + GetFullStatusResponse.prototype.status = null; /** - * Creates a new GetKeyspaceResponse instance using the specified properties. + * Creates a new GetFullStatusResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse instance + * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse instance */ - GetKeyspaceResponse.create = function create(properties) { - return new GetKeyspaceResponse(properties); + GetFullStatusResponse.create = function create(properties) { + return new GetFullStatusResponse(properties); }; /** - * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. + * Encodes the specified GetFullStatusResponse message. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode + * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceResponse.encode = function encode(message, writer) { + GetFullStatusResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.replicationdata.FullStatus.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. + * Encodes the specified GetFullStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode + * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetFullStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer. + * Decodes a GetFullStatusResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceResponse.decode = function decode(reader, length) { + GetFullStatusResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + message.status = $root.replicationdata.FullStatus.decode(reader, reader.uint32()); break; } default: @@ -136684,127 +135384,126 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFullStatusResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + GetFullStatusResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspaceResponse message. + * Verifies a GetFullStatusResponse message. * @function verify - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspaceResponse.verify = function verify(message) { + GetFullStatusResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - let error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (message.status != null && message.hasOwnProperty("status")) { + let error = $root.replicationdata.FullStatus.verify(message.status); if (error) - return "keyspace." + error; + return "status." + error; } return null; }; /** - * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFullStatusResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse */ - GetKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceResponse) + GetFullStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetFullStatusResponse) return object; - let message = new $root.vtctldata.GetKeyspaceResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.GetKeyspaceResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + let message = new $root.vtctldata.GetFullStatusResponse(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".vtctldata.GetFullStatusResponse.status: object expected"); + message.status = $root.replicationdata.FullStatus.fromObject(object.status); } return message; }; /** - * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetFullStatusResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.GetKeyspaceResponse} message GetKeyspaceResponse + * @param {vtctldata.GetFullStatusResponse} message GetFullStatusResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspaceResponse.toObject = function toObject(message, options) { + GetFullStatusResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); + object.status = null; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.replicationdata.FullStatus.toObject(message.status, options); return object; }; /** - * Converts this GetKeyspaceResponse to JSON. + * Converts this GetFullStatusResponse to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @instance * @returns {Object.} JSON object */ - GetKeyspaceResponse.prototype.toJSON = function toJSON() { + GetFullStatusResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetKeyspaceResponse + * Gets the default type url for GetFullStatusResponse * @function getTypeUrl - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFullStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetKeyspaceResponse"; + return typeUrlPrefix + "/vtctldata.GetFullStatusResponse"; }; - return GetKeyspaceResponse; + return GetFullStatusResponse; })(); - vtctldata.GetPermissionsRequest = (function() { + vtctldata.GetKeyspacesRequest = (function() { /** - * Properties of a GetPermissionsRequest. + * Properties of a GetKeyspacesRequest. * @memberof vtctldata - * @interface IGetPermissionsRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetPermissionsRequest tablet_alias + * @interface IGetKeyspacesRequest */ /** - * Constructs a new GetPermissionsRequest. + * Constructs a new GetKeyspacesRequest. * @memberof vtctldata - * @classdesc Represents a GetPermissionsRequest. - * @implements IGetPermissionsRequest + * @classdesc Represents a GetKeyspacesRequest. + * @implements IGetKeyspacesRequest * @constructor - * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set + * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set */ - function GetPermissionsRequest(properties) { + function GetKeyspacesRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136812,77 +135511,63 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetPermissionsRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetPermissionsRequest - * @instance - */ - GetPermissionsRequest.prototype.tablet_alias = null; - - /** - * Creates a new GetPermissionsRequest instance using the specified properties. + * Creates a new GetKeyspacesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest instance + * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest instance */ - GetPermissionsRequest.create = function create(properties) { - return new GetPermissionsRequest(properties); + GetKeyspacesRequest.create = function create(properties) { + return new GetKeyspacesRequest(properties); }; /** - * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. + * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode + * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsRequest.encode = function encode(message, writer) { + GetKeyspacesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. + * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode + * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsRequest.decode = function decode(reader, length) { + GetKeyspacesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -136892,127 +135577,110 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + GetKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPermissionsRequest message. + * Verifies a GetKeyspacesRequest message. * @function verify - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPermissionsRequest.verify = function verify(message) { + GetKeyspacesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } return null; }; /** - * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest */ - GetPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetPermissionsRequest) + GetKeyspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspacesRequest) return object; - let message = new $root.vtctldata.GetPermissionsRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetPermissionsRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; + return new $root.vtctldata.GetKeyspacesRequest(); }; /** - * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.GetPermissionsRequest} message GetPermissionsRequest + * @param {vtctldata.GetKeyspacesRequest} message GetKeyspacesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPermissionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; + GetKeyspacesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetPermissionsRequest to JSON. + * Converts this GetKeyspacesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @instance * @returns {Object.} JSON object */ - GetPermissionsRequest.prototype.toJSON = function toJSON() { + GetKeyspacesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPermissionsRequest + * Gets the default type url for GetKeyspacesRequest * @function getTypeUrl - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetKeyspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetPermissionsRequest"; + return typeUrlPrefix + "/vtctldata.GetKeyspacesRequest"; }; - return GetPermissionsRequest; + return GetKeyspacesRequest; })(); - vtctldata.GetPermissionsResponse = (function() { + vtctldata.GetKeyspacesResponse = (function() { /** - * Properties of a GetPermissionsResponse. + * Properties of a GetKeyspacesResponse. * @memberof vtctldata - * @interface IGetPermissionsResponse - * @property {tabletmanagerdata.IPermissions|null} [permissions] GetPermissionsResponse permissions + * @interface IGetKeyspacesResponse + * @property {Array.|null} [keyspaces] GetKeyspacesResponse keyspaces */ /** - * Constructs a new GetPermissionsResponse. + * Constructs a new GetKeyspacesResponse. * @memberof vtctldata - * @classdesc Represents a GetPermissionsResponse. - * @implements IGetPermissionsResponse + * @classdesc Represents a GetKeyspacesResponse. + * @implements IGetKeyspacesResponse * @constructor - * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set + * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set */ - function GetPermissionsResponse(properties) { + function GetKeyspacesResponse(properties) { + this.keyspaces = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137020,75 +135688,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetPermissionsResponse permissions. - * @member {tabletmanagerdata.IPermissions|null|undefined} permissions - * @memberof vtctldata.GetPermissionsResponse + * GetKeyspacesResponse keyspaces. + * @member {Array.} keyspaces + * @memberof vtctldata.GetKeyspacesResponse * @instance */ - GetPermissionsResponse.prototype.permissions = null; + GetKeyspacesResponse.prototype.keyspaces = $util.emptyArray; /** - * Creates a new GetPermissionsResponse instance using the specified properties. + * Creates a new GetKeyspacesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse instance + * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse instance */ - GetPermissionsResponse.create = function create(properties) { - return new GetPermissionsResponse(properties); + GetKeyspacesResponse.create = function create(properties) { + return new GetKeyspacesResponse(properties); }; /** - * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. + * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode + * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsResponse.encode = function encode(message, writer) { + GetKeyspacesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.tabletmanagerdata.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspaces != null && message.keyspaces.length) + for (let i = 0; i < message.keyspaces.length; ++i) + $root.vtctldata.Keyspace.encode(message.keyspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. + * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode + * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsResponse.decode = function decode(reader, length) { + GetKeyspacesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.permissions = $root.tabletmanagerdata.Permissions.decode(reader, reader.uint32()); + if (!(message.keyspaces && message.keyspaces.length)) + message.keyspaces = []; + message.keyspaces.push($root.vtctldata.Keyspace.decode(reader, reader.uint32())); break; } default: @@ -137100,126 +135771,139 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + GetKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPermissionsResponse message. + * Verifies a GetKeyspacesResponse message. * @function verify - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPermissionsResponse.verify = function verify(message) { + GetKeyspacesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - let error = $root.tabletmanagerdata.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; + if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { + if (!Array.isArray(message.keyspaces)) + return "keyspaces: array expected"; + for (let i = 0; i < message.keyspaces.length; ++i) { + let error = $root.vtctldata.Keyspace.verify(message.keyspaces[i]); + if (error) + return "keyspaces." + error; + } } return null; }; /** - * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse */ - GetPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetPermissionsResponse) + GetKeyspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspacesResponse) return object; - let message = new $root.vtctldata.GetPermissionsResponse(); - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".vtctldata.GetPermissionsResponse.permissions: object expected"); - message.permissions = $root.tabletmanagerdata.Permissions.fromObject(object.permissions); + let message = new $root.vtctldata.GetKeyspacesResponse(); + if (object.keyspaces) { + if (!Array.isArray(object.keyspaces)) + throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: array expected"); + message.keyspaces = []; + for (let i = 0; i < object.keyspaces.length; ++i) { + if (typeof object.keyspaces[i] !== "object") + throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: object expected"); + message.keyspaces[i] = $root.vtctldata.Keyspace.fromObject(object.keyspaces[i]); + } } return message; }; /** - * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.GetPermissionsResponse} message GetPermissionsResponse + * @param {vtctldata.GetKeyspacesResponse} message GetKeyspacesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPermissionsResponse.toObject = function toObject(message, options) { + GetKeyspacesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.permissions = null; - if (message.permissions != null && message.hasOwnProperty("permissions")) - object.permissions = $root.tabletmanagerdata.Permissions.toObject(message.permissions, options); + if (options.arrays || options.defaults) + object.keyspaces = []; + if (message.keyspaces && message.keyspaces.length) { + object.keyspaces = []; + for (let j = 0; j < message.keyspaces.length; ++j) + object.keyspaces[j] = $root.vtctldata.Keyspace.toObject(message.keyspaces[j], options); + } return object; }; /** - * Converts this GetPermissionsResponse to JSON. + * Converts this GetKeyspacesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @instance * @returns {Object.} JSON object */ - GetPermissionsResponse.prototype.toJSON = function toJSON() { + GetKeyspacesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPermissionsResponse + * Gets the default type url for GetKeyspacesResponse * @function getTypeUrl - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetKeyspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetPermissionsResponse"; + return typeUrlPrefix + "/vtctldata.GetKeyspacesResponse"; }; - return GetPermissionsResponse; + return GetKeyspacesResponse; })(); - vtctldata.GetKeyspaceRoutingRulesRequest = (function() { + vtctldata.GetKeyspaceRequest = (function() { /** - * Properties of a GetKeyspaceRoutingRulesRequest. + * Properties of a GetKeyspaceRequest. * @memberof vtctldata - * @interface IGetKeyspaceRoutingRulesRequest + * @interface IGetKeyspaceRequest + * @property {string|null} [keyspace] GetKeyspaceRequest keyspace */ /** - * Constructs a new GetKeyspaceRoutingRulesRequest. + * Constructs a new GetKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a GetKeyspaceRoutingRulesRequest. - * @implements IGetKeyspaceRoutingRulesRequest + * @classdesc Represents a GetKeyspaceRequest. + * @implements IGetKeyspaceRequest * @constructor - * @param {vtctldata.IGetKeyspaceRoutingRulesRequest=} [properties] Properties to set + * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set */ - function GetKeyspaceRoutingRulesRequest(properties) { + function GetKeyspaceRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137227,63 +135911,77 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new GetKeyspaceRoutingRulesRequest instance using the specified properties. + * GetKeyspaceRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetKeyspaceRequest + * @instance + */ + GetKeyspaceRequest.prototype.keyspace = ""; + + /** + * Creates a new GetKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.IGetKeyspaceRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest instance + * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest instance */ - GetKeyspaceRoutingRulesRequest.create = function create(properties) { - return new GetKeyspaceRoutingRulesRequest(properties); + GetKeyspaceRequest.create = function create(properties) { + return new GetKeyspaceRequest(properties); }; /** - * Encodes the specified GetKeyspaceRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesRequest.verify|verify} messages. + * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.IGetKeyspaceRoutingRulesRequest} message GetKeyspaceRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRoutingRulesRequest.encode = function encode(message, writer) { + GetKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); return writer; }; /** - * Encodes the specified GetKeyspaceRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesRequest.verify|verify} messages. + * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.IGetKeyspaceRoutingRulesRequest} message GetKeyspaceRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspaceRoutingRulesRequest message from the specified reader or buffer. + * Decodes a GetKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRoutingRulesRequest.decode = function decode(reader, length) { + GetKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRoutingRulesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.keyspace = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -137293,109 +135991,122 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetKeyspaceRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + GetKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspaceRoutingRulesRequest message. + * Verifies a GetKeyspaceRequest message. * @function verify - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspaceRoutingRulesRequest.verify = function verify(message) { + GetKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; return null; }; /** - * Creates a GetKeyspaceRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest */ - GetKeyspaceRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceRoutingRulesRequest) + GetKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspaceRequest) return object; - return new $root.vtctldata.GetKeyspaceRoutingRulesRequest(); + let message = new $root.vtctldata.GetKeyspaceRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + return message; }; /** - * Creates a plain object from a GetKeyspaceRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.GetKeyspaceRoutingRulesRequest} message GetKeyspaceRoutingRulesRequest + * @param {vtctldata.GetKeyspaceRequest} message GetKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspaceRoutingRulesRequest.toObject = function toObject() { - return {}; + GetKeyspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + return object; }; /** - * Converts this GetKeyspaceRoutingRulesRequest to JSON. + * Converts this GetKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @instance * @returns {Object.} JSON object */ - GetKeyspaceRoutingRulesRequest.prototype.toJSON = function toJSON() { + GetKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetKeyspaceRoutingRulesRequest + * Gets the default type url for GetKeyspaceRequest * @function getTypeUrl - * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetKeyspaceRoutingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetKeyspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetKeyspaceRoutingRulesRequest"; + return typeUrlPrefix + "/vtctldata.GetKeyspaceRequest"; }; - return GetKeyspaceRoutingRulesRequest; + return GetKeyspaceRequest; })(); - vtctldata.GetKeyspaceRoutingRulesResponse = (function() { + vtctldata.GetKeyspaceResponse = (function() { /** - * Properties of a GetKeyspaceRoutingRulesResponse. + * Properties of a GetKeyspaceResponse. * @memberof vtctldata - * @interface IGetKeyspaceRoutingRulesResponse - * @property {vschema.IKeyspaceRoutingRules|null} [keyspace_routing_rules] GetKeyspaceRoutingRulesResponse keyspace_routing_rules + * @interface IGetKeyspaceResponse + * @property {vtctldata.IKeyspace|null} [keyspace] GetKeyspaceResponse keyspace */ /** - * Constructs a new GetKeyspaceRoutingRulesResponse. + * Constructs a new GetKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a GetKeyspaceRoutingRulesResponse. - * @implements IGetKeyspaceRoutingRulesResponse + * @classdesc Represents a GetKeyspaceResponse. + * @implements IGetKeyspaceResponse * @constructor - * @param {vtctldata.IGetKeyspaceRoutingRulesResponse=} [properties] Properties to set + * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set */ - function GetKeyspaceRoutingRulesResponse(properties) { + function GetKeyspaceResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137403,75 +136114,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetKeyspaceRoutingRulesResponse keyspace_routing_rules. - * @member {vschema.IKeyspaceRoutingRules|null|undefined} keyspace_routing_rules - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * GetKeyspaceResponse keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.GetKeyspaceResponse * @instance */ - GetKeyspaceRoutingRulesResponse.prototype.keyspace_routing_rules = null; + GetKeyspaceResponse.prototype.keyspace = null; /** - * Creates a new GetKeyspaceRoutingRulesResponse instance using the specified properties. + * Creates a new GetKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.IGetKeyspaceRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse instance + * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse instance */ - GetKeyspaceRoutingRulesResponse.create = function create(properties) { - return new GetKeyspaceRoutingRulesResponse(properties); + GetKeyspaceResponse.create = function create(properties) { + return new GetKeyspaceResponse(properties); }; /** - * Encodes the specified GetKeyspaceRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesResponse.verify|verify} messages. + * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.IGetKeyspaceRoutingRulesResponse} message GetKeyspaceRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRoutingRulesResponse.encode = function encode(message, writer) { + GetKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace_routing_rules != null && Object.hasOwnProperty.call(message, "keyspace_routing_rules")) - $root.vschema.KeyspaceRoutingRules.encode(message.keyspace_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetKeyspaceRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesResponse.verify|verify} messages. + * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.IGetKeyspaceRoutingRulesResponse} message GetKeyspaceRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspaceRoutingRulesResponse message from the specified reader or buffer. + * Decodes a GetKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRoutingRulesResponse.decode = function decode(reader, length) { + GetKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRoutingRulesResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.decode(reader, reader.uint32()); + message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); break; } default: @@ -137483,126 +136194,127 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetKeyspaceRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + GetKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspaceRoutingRulesResponse message. + * Verifies a GetKeyspaceResponse message. * @function verify - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspaceRoutingRulesResponse.verify = function verify(message) { + GetKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace_routing_rules != null && message.hasOwnProperty("keyspace_routing_rules")) { - let error = $root.vschema.KeyspaceRoutingRules.verify(message.keyspace_routing_rules); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + let error = $root.vtctldata.Keyspace.verify(message.keyspace); if (error) - return "keyspace_routing_rules." + error; + return "keyspace." + error; } return null; }; /** - * Creates a GetKeyspaceRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse */ - GetKeyspaceRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceRoutingRulesResponse) + GetKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspaceResponse) return object; - let message = new $root.vtctldata.GetKeyspaceRoutingRulesResponse(); - if (object.keyspace_routing_rules != null) { - if (typeof object.keyspace_routing_rules !== "object") - throw TypeError(".vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules: object expected"); - message.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.fromObject(object.keyspace_routing_rules); + let message = new $root.vtctldata.GetKeyspaceResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.GetKeyspaceResponse.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); } return message; }; /** - * Creates a plain object from a GetKeyspaceRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.GetKeyspaceRoutingRulesResponse} message GetKeyspaceRoutingRulesResponse + * @param {vtctldata.GetKeyspaceResponse} message GetKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspaceRoutingRulesResponse.toObject = function toObject(message, options) { + GetKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.keyspace_routing_rules = null; - if (message.keyspace_routing_rules != null && message.hasOwnProperty("keyspace_routing_rules")) - object.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.toObject(message.keyspace_routing_rules, options); + object.keyspace = null; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this GetKeyspaceRoutingRulesResponse to JSON. + * Converts this GetKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @instance * @returns {Object.} JSON object */ - GetKeyspaceRoutingRulesResponse.prototype.toJSON = function toJSON() { + GetKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetKeyspaceRoutingRulesResponse + * Gets the default type url for GetKeyspaceResponse * @function getTypeUrl - * @memberof vtctldata.GetKeyspaceRoutingRulesResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetKeyspaceRoutingRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetKeyspaceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetKeyspaceRoutingRulesResponse"; + return typeUrlPrefix + "/vtctldata.GetKeyspaceResponse"; }; - return GetKeyspaceRoutingRulesResponse; + return GetKeyspaceResponse; })(); - vtctldata.GetRoutingRulesRequest = (function() { + vtctldata.GetPermissionsRequest = (function() { /** - * Properties of a GetRoutingRulesRequest. + * Properties of a GetPermissionsRequest. * @memberof vtctldata - * @interface IGetRoutingRulesRequest + * @interface IGetPermissionsRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetPermissionsRequest tablet_alias */ /** - * Constructs a new GetRoutingRulesRequest. + * Constructs a new GetPermissionsRequest. * @memberof vtctldata - * @classdesc Represents a GetRoutingRulesRequest. - * @implements IGetRoutingRulesRequest + * @classdesc Represents a GetPermissionsRequest. + * @implements IGetPermissionsRequest * @constructor - * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set + * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set */ - function GetRoutingRulesRequest(properties) { + function GetPermissionsRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137610,63 +136322,77 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new GetRoutingRulesRequest instance using the specified properties. + * GetPermissionsRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetPermissionsRequest + * @instance + */ + GetPermissionsRequest.prototype.tablet_alias = null; + + /** + * Creates a new GetPermissionsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest instance + * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest instance */ - GetRoutingRulesRequest.create = function create(properties) { - return new GetRoutingRulesRequest(properties); + GetPermissionsRequest.create = function create(properties) { + return new GetPermissionsRequest(properties); }; /** - * Encodes the specified GetRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. + * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesRequest.encode = function encode(message, writer) { + GetPermissionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. + * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRoutingRulesRequest message from the specified reader or buffer. + * Decodes a GetPermissionsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesRequest.decode = function decode(reader, length) { + GetPermissionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -137676,109 +136402,127 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + GetPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRoutingRulesRequest message. + * Verifies a GetPermissionsRequest message. * @function verify - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRoutingRulesRequest.verify = function verify(message) { + GetPermissionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a GetRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest */ - GetRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetRoutingRulesRequest) + GetPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetPermissionsRequest) return object; - return new $root.vtctldata.GetRoutingRulesRequest(); + let message = new $root.vtctldata.GetPermissionsRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetPermissionsRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + return message; }; /** - * Creates a plain object from a GetRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.GetRoutingRulesRequest} message GetRoutingRulesRequest + * @param {vtctldata.GetPermissionsRequest} message GetPermissionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRoutingRulesRequest.toObject = function toObject() { - return {}; + GetPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + return object; }; /** - * Converts this GetRoutingRulesRequest to JSON. + * Converts this GetPermissionsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @instance * @returns {Object.} JSON object */ - GetRoutingRulesRequest.prototype.toJSON = function toJSON() { + GetPermissionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetRoutingRulesRequest + * Gets the default type url for GetPermissionsRequest * @function getTypeUrl - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.GetPermissionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetRoutingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetRoutingRulesRequest"; + return typeUrlPrefix + "/vtctldata.GetPermissionsRequest"; }; - return GetRoutingRulesRequest; + return GetPermissionsRequest; })(); - vtctldata.GetRoutingRulesResponse = (function() { + vtctldata.GetPermissionsResponse = (function() { /** - * Properties of a GetRoutingRulesResponse. + * Properties of a GetPermissionsResponse. * @memberof vtctldata - * @interface IGetRoutingRulesResponse - * @property {vschema.IRoutingRules|null} [routing_rules] GetRoutingRulesResponse routing_rules + * @interface IGetPermissionsResponse + * @property {tabletmanagerdata.IPermissions|null} [permissions] GetPermissionsResponse permissions */ /** - * Constructs a new GetRoutingRulesResponse. + * Constructs a new GetPermissionsResponse. * @memberof vtctldata - * @classdesc Represents a GetRoutingRulesResponse. - * @implements IGetRoutingRulesResponse + * @classdesc Represents a GetPermissionsResponse. + * @implements IGetPermissionsResponse * @constructor - * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set + * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set */ - function GetRoutingRulesResponse(properties) { + function GetPermissionsResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137786,75 +136530,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetRoutingRulesResponse routing_rules. - * @member {vschema.IRoutingRules|null|undefined} routing_rules - * @memberof vtctldata.GetRoutingRulesResponse + * GetPermissionsResponse permissions. + * @member {tabletmanagerdata.IPermissions|null|undefined} permissions + * @memberof vtctldata.GetPermissionsResponse * @instance */ - GetRoutingRulesResponse.prototype.routing_rules = null; + GetPermissionsResponse.prototype.permissions = null; /** - * Creates a new GetRoutingRulesResponse instance using the specified properties. + * Creates a new GetPermissionsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse instance + * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse instance */ - GetRoutingRulesResponse.create = function create(properties) { - return new GetRoutingRulesResponse(properties); + GetPermissionsResponse.create = function create(properties) { + return new GetPermissionsResponse(properties); }; /** - * Encodes the specified GetRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. + * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesResponse.encode = function encode(message, writer) { + GetPermissionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) - $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + $root.tabletmanagerdata.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. + * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRoutingRulesResponse message from the specified reader or buffer. + * Decodes a GetPermissionsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesResponse.decode = function decode(reader, length) { + GetPermissionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); + message.permissions = $root.tabletmanagerdata.Permissions.decode(reader, reader.uint32()); break; } default: @@ -137866,135 +136610,126 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + GetPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRoutingRulesResponse message. + * Verifies a GetPermissionsResponse message. * @function verify - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRoutingRulesResponse.verify = function verify(message) { + GetPermissionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { - let error = $root.vschema.RoutingRules.verify(message.routing_rules); + if (message.permissions != null && message.hasOwnProperty("permissions")) { + let error = $root.tabletmanagerdata.Permissions.verify(message.permissions); if (error) - return "routing_rules." + error; + return "permissions." + error; } return null; }; /** - * Creates a GetRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse */ - GetRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetRoutingRulesResponse) + GetPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetPermissionsResponse) return object; - let message = new $root.vtctldata.GetRoutingRulesResponse(); - if (object.routing_rules != null) { - if (typeof object.routing_rules !== "object") - throw TypeError(".vtctldata.GetRoutingRulesResponse.routing_rules: object expected"); - message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); + let message = new $root.vtctldata.GetPermissionsResponse(); + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError(".vtctldata.GetPermissionsResponse.permissions: object expected"); + message.permissions = $root.tabletmanagerdata.Permissions.fromObject(object.permissions); } return message; }; /** - * Creates a plain object from a GetRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.GetRoutingRulesResponse} message GetRoutingRulesResponse + * @param {vtctldata.GetPermissionsResponse} message GetPermissionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRoutingRulesResponse.toObject = function toObject(message, options) { + GetPermissionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.routing_rules = null; - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) - object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); + object.permissions = null; + if (message.permissions != null && message.hasOwnProperty("permissions")) + object.permissions = $root.tabletmanagerdata.Permissions.toObject(message.permissions, options); return object; }; /** - * Converts this GetRoutingRulesResponse to JSON. + * Converts this GetPermissionsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @instance * @returns {Object.} JSON object */ - GetRoutingRulesResponse.prototype.toJSON = function toJSON() { + GetPermissionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetRoutingRulesResponse + * Gets the default type url for GetPermissionsResponse * @function getTypeUrl - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.GetPermissionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetRoutingRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetRoutingRulesResponse"; + return typeUrlPrefix + "/vtctldata.GetPermissionsResponse"; }; - return GetRoutingRulesResponse; + return GetPermissionsResponse; })(); - vtctldata.GetSchemaRequest = (function() { + vtctldata.GetKeyspaceRoutingRulesRequest = (function() { /** - * Properties of a GetSchemaRequest. + * Properties of a GetKeyspaceRoutingRulesRequest. * @memberof vtctldata - * @interface IGetSchemaRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetSchemaRequest tablet_alias - * @property {Array.|null} [tables] GetSchemaRequest tables - * @property {Array.|null} [exclude_tables] GetSchemaRequest exclude_tables - * @property {boolean|null} [include_views] GetSchemaRequest include_views - * @property {boolean|null} [table_names_only] GetSchemaRequest table_names_only - * @property {boolean|null} [table_sizes_only] GetSchemaRequest table_sizes_only - * @property {boolean|null} [table_schema_only] GetSchemaRequest table_schema_only + * @interface IGetKeyspaceRoutingRulesRequest */ /** - * Constructs a new GetSchemaRequest. + * Constructs a new GetKeyspaceRoutingRulesRequest. * @memberof vtctldata - * @classdesc Represents a GetSchemaRequest. - * @implements IGetSchemaRequest + * @classdesc Represents a GetKeyspaceRoutingRulesRequest. + * @implements IGetKeyspaceRoutingRulesRequest * @constructor - * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IGetKeyspaceRoutingRulesRequest=} [properties] Properties to set */ - function GetSchemaRequest(properties) { - this.tables = []; - this.exclude_tables = []; + function GetKeyspaceRoutingRulesRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -138002,372 +136737,175 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSchemaRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tablet_alias = null; - - /** - * GetSchemaRequest tables. - * @member {Array.} tables - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tables = $util.emptyArray; - - /** - * GetSchemaRequest exclude_tables. - * @member {Array.} exclude_tables - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.exclude_tables = $util.emptyArray; - - /** - * GetSchemaRequest include_views. - * @member {boolean} include_views - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.include_views = false; - - /** - * GetSchemaRequest table_names_only. - * @member {boolean} table_names_only - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_names_only = false; - - /** - * GetSchemaRequest table_sizes_only. - * @member {boolean} table_sizes_only - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_sizes_only = false; - - /** - * GetSchemaRequest table_schema_only. - * @member {boolean} table_schema_only - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_schema_only = false; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. + * Creates a new GetKeyspaceRoutingRulesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static - * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest instance + * @param {vtctldata.IGetKeyspaceRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest instance */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); + GetKeyspaceRoutingRulesRequest.create = function create(properties) { + return new GetKeyspaceRoutingRulesRequest(properties); }; /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. + * Encodes the specified GetKeyspaceRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static - * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {vtctldata.IGetKeyspaceRoutingRulesRequest} message GetKeyspaceRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaRequest.encode = function encode(message, writer) { + GetKeyspaceRoutingRulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (let i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); - if (message.exclude_tables != null && message.exclude_tables.length) - for (let i = 0; i < message.exclude_tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); - if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); - if (message.table_names_only != null && Object.hasOwnProperty.call(message, "table_names_only")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.table_names_only); - if (message.table_sizes_only != null && Object.hasOwnProperty.call(message, "table_sizes_only")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.table_sizes_only); - if (message.table_schema_only != null && Object.hasOwnProperty.call(message, "table_schema_only")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.table_schema_only); return writer; }; /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. + * Encodes the specified GetKeyspaceRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static - * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {vtctldata.IGetKeyspaceRoutingRulesRequest} message GetKeyspaceRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspaceRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. + * Decodes a GetKeyspaceRoutingRulesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest + * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaRequest.decode = function decode(reader, length) { + GetKeyspaceRoutingRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRoutingRulesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - } - case 3: { - if (!(message.exclude_tables && message.exclude_tables.length)) - message.exclude_tables = []; - message.exclude_tables.push(reader.string()); - break; - } - case 4: { - message.include_views = reader.bool(); - break; - } - case 5: { - message.table_names_only = reader.bool(); - break; - } - case 6: { - message.table_sizes_only = reader.bool(); - break; - } - case 7: { - message.table_schema_only = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; } } return message; - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaRequest message. - * @function verify - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (let i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { - if (!Array.isArray(message.exclude_tables)) - return "exclude_tables: array expected"; - for (let i = 0; i < message.exclude_tables.length; ++i) - if (!$util.isString(message.exclude_tables[i])) - return "exclude_tables: string[] expected"; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - if (typeof message.include_views !== "boolean") - return "include_views: boolean expected"; - if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) - if (typeof message.table_names_only !== "boolean") - return "table_names_only: boolean expected"; - if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) - if (typeof message.table_sizes_only !== "boolean") - return "table_sizes_only: boolean expected"; - if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) - if (typeof message.table_schema_only !== "boolean") - return "table_schema_only: boolean expected"; + }; + + /** + * Decodes a GetKeyspaceRoutingRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetKeyspaceRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetKeyspaceRoutingRulesRequest message. + * @function verify + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetKeyspaceRoutingRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest + * @returns {vtctldata.GetKeyspaceRoutingRulesRequest} GetKeyspaceRoutingRulesRequest */ - GetSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaRequest) + GetKeyspaceRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspaceRoutingRulesRequest) return object; - let message = new $root.vtctldata.GetSchemaRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetSchemaRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".vtctldata.GetSchemaRequest.tables: array expected"); - message.tables = []; - for (let i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.exclude_tables) { - if (!Array.isArray(object.exclude_tables)) - throw TypeError(".vtctldata.GetSchemaRequest.exclude_tables: array expected"); - message.exclude_tables = []; - for (let i = 0; i < object.exclude_tables.length; ++i) - message.exclude_tables[i] = String(object.exclude_tables[i]); - } - if (object.include_views != null) - message.include_views = Boolean(object.include_views); - if (object.table_names_only != null) - message.table_names_only = Boolean(object.table_names_only); - if (object.table_sizes_only != null) - message.table_sizes_only = Boolean(object.table_sizes_only); - if (object.table_schema_only != null) - message.table_schema_only = Boolean(object.table_schema_only); - return message; + return new $root.vtctldata.GetKeyspaceRoutingRulesRequest(); }; /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspaceRoutingRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static - * @param {vtctldata.GetSchemaRequest} message GetSchemaRequest + * @param {vtctldata.GetKeyspaceRoutingRulesRequest} message GetKeyspaceRoutingRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.tables = []; - object.exclude_tables = []; - } - if (options.defaults) { - object.tablet_alias = null; - object.include_views = false; - object.table_names_only = false; - object.table_sizes_only = false; - object.table_schema_only = false; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (let j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.exclude_tables && message.exclude_tables.length) { - object.exclude_tables = []; - for (let j = 0; j < message.exclude_tables.length; ++j) - object.exclude_tables[j] = message.exclude_tables[j]; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - object.include_views = message.include_views; - if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) - object.table_names_only = message.table_names_only; - if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) - object.table_sizes_only = message.table_sizes_only; - if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) - object.table_schema_only = message.table_schema_only; - return object; + GetKeyspaceRoutingRulesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetSchemaRequest to JSON. + * Converts this GetKeyspaceRoutingRulesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @instance * @returns {Object.} JSON object */ - GetSchemaRequest.prototype.toJSON = function toJSON() { + GetKeyspaceRoutingRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSchemaRequest + * Gets the default type url for GetKeyspaceRoutingRulesRequest * @function getTypeUrl - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.GetKeyspaceRoutingRulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetKeyspaceRoutingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSchemaRequest"; + return typeUrlPrefix + "/vtctldata.GetKeyspaceRoutingRulesRequest"; }; - return GetSchemaRequest; + return GetKeyspaceRoutingRulesRequest; })(); - vtctldata.GetSchemaResponse = (function() { + vtctldata.GetKeyspaceRoutingRulesResponse = (function() { /** - * Properties of a GetSchemaResponse. + * Properties of a GetKeyspaceRoutingRulesResponse. * @memberof vtctldata - * @interface IGetSchemaResponse - * @property {tabletmanagerdata.ISchemaDefinition|null} [schema] GetSchemaResponse schema + * @interface IGetKeyspaceRoutingRulesResponse + * @property {vschema.IKeyspaceRoutingRules|null} [keyspace_routing_rules] GetKeyspaceRoutingRulesResponse keyspace_routing_rules */ /** - * Constructs a new GetSchemaResponse. + * Constructs a new GetKeyspaceRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents a GetSchemaResponse. - * @implements IGetSchemaResponse + * @classdesc Represents a GetKeyspaceRoutingRulesResponse. + * @implements IGetKeyspaceRoutingRulesResponse * @constructor - * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IGetKeyspaceRoutingRulesResponse=} [properties] Properties to set */ - function GetSchemaResponse(properties) { + function GetKeyspaceRoutingRulesResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -138375,75 +136913,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSchemaResponse schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} schema - * @memberof vtctldata.GetSchemaResponse + * GetKeyspaceRoutingRulesResponse keyspace_routing_rules. + * @member {vschema.IKeyspaceRoutingRules|null|undefined} keyspace_routing_rules + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @instance */ - GetSchemaResponse.prototype.schema = null; + GetKeyspaceRoutingRulesResponse.prototype.keyspace_routing_rules = null; /** - * Creates a new GetSchemaResponse instance using the specified properties. + * Creates a new GetKeyspaceRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static - * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse instance + * @param {vtctldata.IGetKeyspaceRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse instance */ - GetSchemaResponse.create = function create(properties) { - return new GetSchemaResponse(properties); + GetKeyspaceRoutingRulesResponse.create = function create(properties) { + return new GetKeyspaceRoutingRulesResponse(properties); }; /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. + * Encodes the specified GetKeyspaceRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static - * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode + * @param {vtctldata.IGetKeyspaceRoutingRulesResponse} message GetKeyspaceRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaResponse.encode = function encode(message, writer) { + GetKeyspaceRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace_routing_rules != null && Object.hasOwnProperty.call(message, "keyspace_routing_rules")) + $root.vschema.KeyspaceRoutingRules.encode(message.keyspace_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. + * Encodes the specified GetKeyspaceRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static - * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode + * @param {vtctldata.IGetKeyspaceRoutingRulesResponse} message GetKeyspaceRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspaceRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. + * Decodes a GetKeyspaceRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse + * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaResponse.decode = function decode(reader, length) { + GetKeyspaceRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRoutingRulesResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); + message.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.decode(reader, reader.uint32()); break; } default: @@ -138455,134 +136993,126 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse + * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + GetKeyspaceRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSchemaResponse message. + * Verifies a GetKeyspaceRoutingRulesResponse message. * @function verify - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSchemaResponse.verify = function verify(message) { + GetKeyspaceRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - let error = $root.tabletmanagerdata.SchemaDefinition.verify(message.schema); + if (message.keyspace_routing_rules != null && message.hasOwnProperty("keyspace_routing_rules")) { + let error = $root.vschema.KeyspaceRoutingRules.verify(message.keyspace_routing_rules); if (error) - return "schema." + error; + return "keyspace_routing_rules." + error; } return null; }; /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse + * @returns {vtctldata.GetKeyspaceRoutingRulesResponse} GetKeyspaceRoutingRulesResponse */ - GetSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaResponse) + GetKeyspaceRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspaceRoutingRulesResponse) return object; - let message = new $root.vtctldata.GetSchemaResponse(); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".vtctldata.GetSchemaResponse.schema: object expected"); - message.schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.schema); + let message = new $root.vtctldata.GetKeyspaceRoutingRulesResponse(); + if (object.keyspace_routing_rules != null) { + if (typeof object.keyspace_routing_rules !== "object") + throw TypeError(".vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules: object expected"); + message.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.fromObject(object.keyspace_routing_rules); } return message; }; /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspaceRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static - * @param {vtctldata.GetSchemaResponse} message GetSchemaResponse + * @param {vtctldata.GetKeyspaceRoutingRulesResponse} message GetKeyspaceRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaResponse.toObject = function toObject(message, options) { + GetKeyspaceRoutingRulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.schema = null; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.schema, options); + object.keyspace_routing_rules = null; + if (message.keyspace_routing_rules != null && message.hasOwnProperty("keyspace_routing_rules")) + object.keyspace_routing_rules = $root.vschema.KeyspaceRoutingRules.toObject(message.keyspace_routing_rules, options); return object; }; /** - * Converts this GetSchemaResponse to JSON. + * Converts this GetKeyspaceRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - GetSchemaResponse.prototype.toJSON = function toJSON() { + GetKeyspaceRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSchemaResponse + * Gets the default type url for GetKeyspaceRoutingRulesResponse * @function getTypeUrl - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.GetKeyspaceRoutingRulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetKeyspaceRoutingRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSchemaResponse"; + return typeUrlPrefix + "/vtctldata.GetKeyspaceRoutingRulesResponse"; }; - return GetSchemaResponse; + return GetKeyspaceRoutingRulesResponse; })(); - vtctldata.GetSchemaMigrationsRequest = (function() { + vtctldata.GetRoutingRulesRequest = (function() { /** - * Properties of a GetSchemaMigrationsRequest. + * Properties of a GetRoutingRulesRequest. * @memberof vtctldata - * @interface IGetSchemaMigrationsRequest - * @property {string|null} [keyspace] GetSchemaMigrationsRequest keyspace - * @property {string|null} [uuid] GetSchemaMigrationsRequest uuid - * @property {string|null} [migration_context] GetSchemaMigrationsRequest migration_context - * @property {vtctldata.SchemaMigration.Status|null} [status] GetSchemaMigrationsRequest status - * @property {vttime.IDuration|null} [recent] GetSchemaMigrationsRequest recent - * @property {vtctldata.QueryOrdering|null} [order] GetSchemaMigrationsRequest order - * @property {number|Long|null} [limit] GetSchemaMigrationsRequest limit - * @property {number|Long|null} [skip] GetSchemaMigrationsRequest skip + * @interface IGetRoutingRulesRequest */ /** - * Constructs a new GetSchemaMigrationsRequest. + * Constructs a new GetRoutingRulesRequest. * @memberof vtctldata - * @classdesc Represents a GetSchemaMigrationsRequest. - * @implements IGetSchemaMigrationsRequest + * @classdesc Represents a GetRoutingRulesRequest. + * @implements IGetRoutingRulesRequest * @constructor - * @param {vtctldata.IGetSchemaMigrationsRequest=} [properties] Properties to set + * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set */ - function GetSchemaMigrationsRequest(properties) { + function GetRoutingRulesRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -138590,175 +137120,63 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSchemaMigrationsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.keyspace = ""; - - /** - * GetSchemaMigrationsRequest uuid. - * @member {string} uuid - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.uuid = ""; - - /** - * GetSchemaMigrationsRequest migration_context. - * @member {string} migration_context - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.migration_context = ""; - - /** - * GetSchemaMigrationsRequest status. - * @member {vtctldata.SchemaMigration.Status} status - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.status = 0; - - /** - * GetSchemaMigrationsRequest recent. - * @member {vttime.IDuration|null|undefined} recent - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.recent = null; - - /** - * GetSchemaMigrationsRequest order. - * @member {vtctldata.QueryOrdering} order - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.order = 0; - - /** - * GetSchemaMigrationsRequest limit. - * @member {number|Long} limit - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * GetSchemaMigrationsRequest skip. - * @member {number|Long} skip - * @memberof vtctldata.GetSchemaMigrationsRequest - * @instance - */ - GetSchemaMigrationsRequest.prototype.skip = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new GetSchemaMigrationsRequest instance using the specified properties. + * Creates a new GetRoutingRulesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.IGetSchemaMigrationsRequest=} [properties] Properties to set - * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest instance + * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest instance */ - GetSchemaMigrationsRequest.create = function create(properties) { - return new GetSchemaMigrationsRequest(properties); + GetRoutingRulesRequest.create = function create(properties) { + return new GetRoutingRulesRequest(properties); }; /** - * Encodes the specified GetSchemaMigrationsRequest message. Does not implicitly {@link vtctldata.GetSchemaMigrationsRequest.verify|verify} messages. + * Encodes the specified GetRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.IGetSchemaMigrationsRequest} message GetSchemaMigrationsRequest message or plain object to encode + * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaMigrationsRequest.encode = function encode(message, writer) { + GetRoutingRulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); - if (message.migration_context != null && Object.hasOwnProperty.call(message, "migration_context")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.migration_context); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.recent != null && Object.hasOwnProperty.call(message, "recent")) - $root.vttime.Duration.encode(message.recent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.order != null && Object.hasOwnProperty.call(message, "order")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.order); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.limit); - if (message.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.skip); return writer; }; /** - * Encodes the specified GetSchemaMigrationsRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaMigrationsRequest.verify|verify} messages. + * Encodes the specified GetRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.IGetSchemaMigrationsRequest} message GetSchemaMigrationsRequest message or plain object to encode + * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaMigrationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaMigrationsRequest message from the specified reader or buffer. + * Decodes a GetRoutingRulesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaMigrationsRequest.decode = function decode(reader, length) { + GetRoutingRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaMigrationsRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.uuid = reader.string(); - break; - } - case 3: { - message.migration_context = reader.string(); - break; - } - case 4: { - message.status = reader.int32(); - break; - } - case 5: { - message.recent = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - } - case 6: { - message.order = reader.int32(); - break; - } - case 7: { - message.limit = reader.uint64(); - break; - } - case 8: { - message.skip = reader.uint64(); - break; - } default: reader.skipType(tag & 7); break; @@ -138768,286 +137186,109 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSchemaMigrationsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetRoutingRulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaMigrationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaMigrationsRequest message. - * @function verify - * @memberof vtctldata.GetSchemaMigrationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaMigrationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: string expected"; - if (message.migration_context != null && message.hasOwnProperty("migration_context")) - if (!$util.isString(message.migration_context)) - return "migration_context: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.recent != null && message.hasOwnProperty("recent")) { - let error = $root.vttime.Duration.verify(message.recent); - if (error) - return "recent." + error; - } - if (message.order != null && message.hasOwnProperty("order")) - switch (message.order) { - default: - return "order: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip) && !(message.skip && $util.isInteger(message.skip.low) && $util.isInteger(message.skip.high))) - return "skip: integer|Long expected"; + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRoutingRulesRequest message. + * @function verify + * @memberof vtctldata.GetRoutingRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRoutingRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates a GetSchemaMigrationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest */ - GetSchemaMigrationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaMigrationsRequest) + GetRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetRoutingRulesRequest) return object; - let message = new $root.vtctldata.GetSchemaMigrationsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.uuid != null) - message.uuid = String(object.uuid); - if (object.migration_context != null) - message.migration_context = String(object.migration_context); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "UNKNOWN": - case 0: - message.status = 0; - break; - case "REQUESTED": - case 1: - message.status = 1; - break; - case "CANCELLED": - case 2: - message.status = 2; - break; - case "QUEUED": - case 3: - message.status = 3; - break; - case "READY": - case 4: - message.status = 4; - break; - case "RUNNING": - case 5: - message.status = 5; - break; - case "COMPLETE": - case 6: - message.status = 6; - break; - case "FAILED": - case 7: - message.status = 7; - break; - } - if (object.recent != null) { - if (typeof object.recent !== "object") - throw TypeError(".vtctldata.GetSchemaMigrationsRequest.recent: object expected"); - message.recent = $root.vttime.Duration.fromObject(object.recent); - } - switch (object.order) { - default: - if (typeof object.order === "number") { - message.order = object.order; - break; - } - break; - case "NONE": - case 0: - message.order = 0; - break; - case "ASCENDING": - case 1: - message.order = 1; - break; - case "DESCENDING": - case 2: - message.order = 2; - break; - } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - if (object.skip != null) - if ($util.Long) - (message.skip = $util.Long.fromValue(object.skip)).unsigned = true; - else if (typeof object.skip === "string") - message.skip = parseInt(object.skip, 10); - else if (typeof object.skip === "number") - message.skip = object.skip; - else if (typeof object.skip === "object") - message.skip = new $util.LongBits(object.skip.low >>> 0, object.skip.high >>> 0).toNumber(true); - return message; + return new $root.vtctldata.GetRoutingRulesRequest(); }; /** - * Creates a plain object from a GetSchemaMigrationsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetRoutingRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.GetSchemaMigrationsRequest} message GetSchemaMigrationsRequest + * @param {vtctldata.GetRoutingRulesRequest} message GetRoutingRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaMigrationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.keyspace = ""; - object.uuid = ""; - object.migration_context = ""; - object.status = options.enums === String ? "UNKNOWN" : 0; - object.recent = null; - object.order = options.enums === String ? "NONE" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.skip = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.skip = options.longs === String ? "0" : 0; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; - if (message.migration_context != null && message.hasOwnProperty("migration_context")) - object.migration_context = message.migration_context; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.vtctldata.SchemaMigration.Status[message.status] === undefined ? message.status : $root.vtctldata.SchemaMigration.Status[message.status] : message.status; - if (message.recent != null && message.hasOwnProperty("recent")) - object.recent = $root.vttime.Duration.toObject(message.recent, options); - if (message.order != null && message.hasOwnProperty("order")) - object.order = options.enums === String ? $root.vtctldata.QueryOrdering[message.order] === undefined ? message.order : $root.vtctldata.QueryOrdering[message.order] : message.order; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - if (message.skip != null && message.hasOwnProperty("skip")) - if (typeof message.skip === "number") - object.skip = options.longs === String ? String(message.skip) : message.skip; - else - object.skip = options.longs === String ? $util.Long.prototype.toString.call(message.skip) : options.longs === Number ? new $util.LongBits(message.skip.low >>> 0, message.skip.high >>> 0).toNumber(true) : message.skip; - return object; + GetRoutingRulesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetSchemaMigrationsRequest to JSON. + * Converts this GetRoutingRulesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @instance * @returns {Object.} JSON object */ - GetSchemaMigrationsRequest.prototype.toJSON = function toJSON() { + GetRoutingRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSchemaMigrationsRequest + * Gets the default type url for GetRoutingRulesRequest * @function getTypeUrl - * @memberof vtctldata.GetSchemaMigrationsRequest + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSchemaMigrationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetRoutingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSchemaMigrationsRequest"; + return typeUrlPrefix + "/vtctldata.GetRoutingRulesRequest"; }; - return GetSchemaMigrationsRequest; + return GetRoutingRulesRequest; })(); - vtctldata.GetSchemaMigrationsResponse = (function() { + vtctldata.GetRoutingRulesResponse = (function() { /** - * Properties of a GetSchemaMigrationsResponse. + * Properties of a GetRoutingRulesResponse. * @memberof vtctldata - * @interface IGetSchemaMigrationsResponse - * @property {Array.|null} [migrations] GetSchemaMigrationsResponse migrations + * @interface IGetRoutingRulesResponse + * @property {vschema.IRoutingRules|null} [routing_rules] GetRoutingRulesResponse routing_rules */ /** - * Constructs a new GetSchemaMigrationsResponse. + * Constructs a new GetRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents a GetSchemaMigrationsResponse. - * @implements IGetSchemaMigrationsResponse + * @classdesc Represents a GetRoutingRulesResponse. + * @implements IGetRoutingRulesResponse * @constructor - * @param {vtctldata.IGetSchemaMigrationsResponse=} [properties] Properties to set + * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set */ - function GetSchemaMigrationsResponse(properties) { - this.migrations = []; + function GetRoutingRulesResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -139055,78 +137296,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSchemaMigrationsResponse migrations. - * @member {Array.} migrations - * @memberof vtctldata.GetSchemaMigrationsResponse + * GetRoutingRulesResponse routing_rules. + * @member {vschema.IRoutingRules|null|undefined} routing_rules + * @memberof vtctldata.GetRoutingRulesResponse * @instance */ - GetSchemaMigrationsResponse.prototype.migrations = $util.emptyArray; + GetRoutingRulesResponse.prototype.routing_rules = null; /** - * Creates a new GetSchemaMigrationsResponse instance using the specified properties. + * Creates a new GetRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.IGetSchemaMigrationsResponse=} [properties] Properties to set - * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse instance + * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse instance */ - GetSchemaMigrationsResponse.create = function create(properties) { - return new GetSchemaMigrationsResponse(properties); + GetRoutingRulesResponse.create = function create(properties) { + return new GetRoutingRulesResponse(properties); }; /** - * Encodes the specified GetSchemaMigrationsResponse message. Does not implicitly {@link vtctldata.GetSchemaMigrationsResponse.verify|verify} messages. + * Encodes the specified GetRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.IGetSchemaMigrationsResponse} message GetSchemaMigrationsResponse message or plain object to encode + * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaMigrationsResponse.encode = function encode(message, writer) { + GetRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.migrations != null && message.migrations.length) - for (let i = 0; i < message.migrations.length; ++i) - $root.vtctldata.SchemaMigration.encode(message.migrations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) + $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSchemaMigrationsResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaMigrationsResponse.verify|verify} messages. + * Encodes the specified GetRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.IGetSchemaMigrationsResponse} message GetSchemaMigrationsResponse message or plain object to encode + * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaMigrationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaMigrationsResponse message from the specified reader or buffer. + * Decodes a GetRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaMigrationsResponse.decode = function decode(reader, length) { + GetRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaMigrationsResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.migrations && message.migrations.length)) - message.migrations = []; - message.migrations.push($root.vtctldata.SchemaMigration.decode(reader, reader.uint32())); + message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); break; } default: @@ -139138,142 +137376,135 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSchemaMigrationsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaMigrationsResponse.decodeDelimited = function decodeDelimited(reader) { + GetRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSchemaMigrationsResponse message. + * Verifies a GetRoutingRulesResponse message. * @function verify - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSchemaMigrationsResponse.verify = function verify(message) { + GetRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.migrations != null && message.hasOwnProperty("migrations")) { - if (!Array.isArray(message.migrations)) - return "migrations: array expected"; - for (let i = 0; i < message.migrations.length; ++i) { - let error = $root.vtctldata.SchemaMigration.verify(message.migrations[i]); - if (error) - return "migrations." + error; - } + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { + let error = $root.vschema.RoutingRules.verify(message.routing_rules); + if (error) + return "routing_rules." + error; } return null; }; /** - * Creates a GetSchemaMigrationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse */ - GetSchemaMigrationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaMigrationsResponse) + GetRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetRoutingRulesResponse) return object; - let message = new $root.vtctldata.GetSchemaMigrationsResponse(); - if (object.migrations) { - if (!Array.isArray(object.migrations)) - throw TypeError(".vtctldata.GetSchemaMigrationsResponse.migrations: array expected"); - message.migrations = []; - for (let i = 0; i < object.migrations.length; ++i) { - if (typeof object.migrations[i] !== "object") - throw TypeError(".vtctldata.GetSchemaMigrationsResponse.migrations: object expected"); - message.migrations[i] = $root.vtctldata.SchemaMigration.fromObject(object.migrations[i]); - } + let message = new $root.vtctldata.GetRoutingRulesResponse(); + if (object.routing_rules != null) { + if (typeof object.routing_rules !== "object") + throw TypeError(".vtctldata.GetRoutingRulesResponse.routing_rules: object expected"); + message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); } return message; }; /** - * Creates a plain object from a GetSchemaMigrationsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.GetSchemaMigrationsResponse} message GetSchemaMigrationsResponse + * @param {vtctldata.GetRoutingRulesResponse} message GetRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaMigrationsResponse.toObject = function toObject(message, options) { + GetRoutingRulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.migrations = []; - if (message.migrations && message.migrations.length) { - object.migrations = []; - for (let j = 0; j < message.migrations.length; ++j) - object.migrations[j] = $root.vtctldata.SchemaMigration.toObject(message.migrations[j], options); - } + if (options.defaults) + object.routing_rules = null; + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) + object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); return object; }; /** - * Converts this GetSchemaMigrationsResponse to JSON. + * Converts this GetRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - GetSchemaMigrationsResponse.prototype.toJSON = function toJSON() { + GetRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSchemaMigrationsResponse + * Gets the default type url for GetRoutingRulesResponse * @function getTypeUrl - * @memberof vtctldata.GetSchemaMigrationsResponse + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSchemaMigrationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetRoutingRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSchemaMigrationsResponse"; + return typeUrlPrefix + "/vtctldata.GetRoutingRulesResponse"; }; - return GetSchemaMigrationsResponse; + return GetRoutingRulesResponse; })(); - vtctldata.GetShardReplicationRequest = (function() { + vtctldata.GetSchemaRequest = (function() { /** - * Properties of a GetShardReplicationRequest. + * Properties of a GetSchemaRequest. * @memberof vtctldata - * @interface IGetShardReplicationRequest - * @property {string|null} [keyspace] GetShardReplicationRequest keyspace - * @property {string|null} [shard] GetShardReplicationRequest shard - * @property {Array.|null} [cells] GetShardReplicationRequest cells + * @interface IGetSchemaRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetSchemaRequest tablet_alias + * @property {Array.|null} [tables] GetSchemaRequest tables + * @property {Array.|null} [exclude_tables] GetSchemaRequest exclude_tables + * @property {boolean|null} [include_views] GetSchemaRequest include_views + * @property {boolean|null} [table_names_only] GetSchemaRequest table_names_only + * @property {boolean|null} [table_sizes_only] GetSchemaRequest table_sizes_only + * @property {boolean|null} [table_schema_only] GetSchemaRequest table_schema_only */ /** - * Constructs a new GetShardReplicationRequest. + * Constructs a new GetSchemaRequest. * @memberof vtctldata - * @classdesc Represents a GetShardReplicationRequest. - * @implements IGetShardReplicationRequest + * @classdesc Represents a GetSchemaRequest. + * @implements IGetSchemaRequest * @constructor - * @param {vtctldata.IGetShardReplicationRequest=} [properties] Properties to set + * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set */ - function GetShardReplicationRequest(properties) { - this.cells = []; + function GetSchemaRequest(properties) { + this.tables = []; + this.exclude_tables = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -139281,106 +137512,165 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetShardReplicationRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetShardReplicationRequest + * GetSchemaRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetSchemaRequest * @instance */ - GetShardReplicationRequest.prototype.keyspace = ""; + GetSchemaRequest.prototype.tablet_alias = null; /** - * GetShardReplicationRequest shard. - * @member {string} shard - * @memberof vtctldata.GetShardReplicationRequest + * GetSchemaRequest tables. + * @member {Array.} tables + * @memberof vtctldata.GetSchemaRequest * @instance */ - GetShardReplicationRequest.prototype.shard = ""; + GetSchemaRequest.prototype.tables = $util.emptyArray; /** - * GetShardReplicationRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetShardReplicationRequest + * GetSchemaRequest exclude_tables. + * @member {Array.} exclude_tables + * @memberof vtctldata.GetSchemaRequest * @instance */ - GetShardReplicationRequest.prototype.cells = $util.emptyArray; + GetSchemaRequest.prototype.exclude_tables = $util.emptyArray; /** - * Creates a new GetShardReplicationRequest instance using the specified properties. + * GetSchemaRequest include_views. + * @member {boolean} include_views + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.include_views = false; + + /** + * GetSchemaRequest table_names_only. + * @member {boolean} table_names_only + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_names_only = false; + + /** + * GetSchemaRequest table_sizes_only. + * @member {boolean} table_sizes_only + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_sizes_only = false; + + /** + * GetSchemaRequest table_schema_only. + * @member {boolean} table_schema_only + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_schema_only = false; + + /** + * Creates a new GetSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.IGetShardReplicationRequest=} [properties] Properties to set - * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest instance + * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest instance */ - GetShardReplicationRequest.create = function create(properties) { - return new GetShardReplicationRequest(properties); + GetSchemaRequest.create = function create(properties) { + return new GetSchemaRequest(properties); }; /** - * Encodes the specified GetShardReplicationRequest message. Does not implicitly {@link vtctldata.GetShardReplicationRequest.verify|verify} messages. + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.IGetShardReplicationRequest} message GetShardReplicationRequest message or plain object to encode + * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardReplicationRequest.encode = function encode(message, writer) { + GetSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.cells != null && message.cells.length) - for (let i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tables != null && message.tables.length) + for (let i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); + if (message.exclude_tables != null && message.exclude_tables.length) + for (let i = 0; i < message.exclude_tables.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); + if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); + if (message.table_names_only != null && Object.hasOwnProperty.call(message, "table_names_only")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.table_names_only); + if (message.table_sizes_only != null && Object.hasOwnProperty.call(message, "table_sizes_only")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.table_sizes_only); + if (message.table_schema_only != null && Object.hasOwnProperty.call(message, "table_schema_only")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.table_schema_only); return writer; }; /** - * Encodes the specified GetShardReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardReplicationRequest.verify|verify} messages. + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.IGetShardReplicationRequest} message GetShardReplicationRequest message or plain object to encode + * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardReplicationRequest message from the specified reader or buffer. + * Decodes a GetSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardReplicationRequest.decode = function decode(reader, length) { + GetSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardReplicationRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); + break; + } + case 3: { + if (!(message.exclude_tables && message.exclude_tables.length)) + message.exclude_tables = []; + message.exclude_tables.push(reader.string()); + break; + } + case 4: { + message.include_views = reader.bool(); break; } - case 2: { - message.shard = reader.string(); + case 5: { + message.table_names_only = reader.bool(); break; } - case 3: { - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + case 6: { + message.table_sizes_only = reader.bool(); + break; + } + case 7: { + message.table_schema_only = reader.bool(); break; } default: @@ -139392,153 +137682,202 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetShardReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardReplicationRequest message. + * Verifies a GetSchemaRequest message. * @function verify - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardReplicationRequest.verify = function verify(message) { + GetSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (let i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (let i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; + } + if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { + if (!Array.isArray(message.exclude_tables)) + return "exclude_tables: array expected"; + for (let i = 0; i < message.exclude_tables.length; ++i) + if (!$util.isString(message.exclude_tables[i])) + return "exclude_tables: string[] expected"; } + if (message.include_views != null && message.hasOwnProperty("include_views")) + if (typeof message.include_views !== "boolean") + return "include_views: boolean expected"; + if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) + if (typeof message.table_names_only !== "boolean") + return "table_names_only: boolean expected"; + if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) + if (typeof message.table_sizes_only !== "boolean") + return "table_sizes_only: boolean expected"; + if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) + if (typeof message.table_schema_only !== "boolean") + return "table_schema_only: boolean expected"; return null; }; /** - * Creates a GetShardReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest */ - GetShardReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardReplicationRequest) + GetSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSchemaRequest) return object; - let message = new $root.vtctldata.GetShardReplicationRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetShardReplicationRequest.cells: array expected"); - message.cells = []; - for (let i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + let message = new $root.vtctldata.GetSchemaRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetSchemaRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".vtctldata.GetSchemaRequest.tables: array expected"); + message.tables = []; + for (let i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); + } + if (object.exclude_tables) { + if (!Array.isArray(object.exclude_tables)) + throw TypeError(".vtctldata.GetSchemaRequest.exclude_tables: array expected"); + message.exclude_tables = []; + for (let i = 0; i < object.exclude_tables.length; ++i) + message.exclude_tables[i] = String(object.exclude_tables[i]); } + if (object.include_views != null) + message.include_views = Boolean(object.include_views); + if (object.table_names_only != null) + message.table_names_only = Boolean(object.table_names_only); + if (object.table_sizes_only != null) + message.table_sizes_only = Boolean(object.table_sizes_only); + if (object.table_schema_only != null) + message.table_schema_only = Boolean(object.table_schema_only); return message; }; /** - * Creates a plain object from a GetShardReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.GetShardReplicationRequest} message GetShardReplicationRequest + * @param {vtctldata.GetSchemaRequest} message GetSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardReplicationRequest.toObject = function toObject(message, options) { + GetSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.cells = []; + if (options.arrays || options.defaults) { + object.tables = []; + object.exclude_tables = []; + } if (options.defaults) { - object.keyspace = ""; - object.shard = ""; + object.tablet_alias = null; + object.include_views = false; + object.table_names_only = false; + object.table_sizes_only = false; + object.table_schema_only = false; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.cells && message.cells.length) { - object.cells = []; - for (let j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.tables && message.tables.length) { + object.tables = []; + for (let j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; + } + if (message.exclude_tables && message.exclude_tables.length) { + object.exclude_tables = []; + for (let j = 0; j < message.exclude_tables.length; ++j) + object.exclude_tables[j] = message.exclude_tables[j]; } + if (message.include_views != null && message.hasOwnProperty("include_views")) + object.include_views = message.include_views; + if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) + object.table_names_only = message.table_names_only; + if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) + object.table_sizes_only = message.table_sizes_only; + if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) + object.table_schema_only = message.table_schema_only; return object; }; /** - * Converts this GetShardReplicationRequest to JSON. + * Converts this GetSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @instance * @returns {Object.} JSON object */ - GetShardReplicationRequest.prototype.toJSON = function toJSON() { + GetSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetShardReplicationRequest + * Gets the default type url for GetSchemaRequest * @function getTypeUrl - * @memberof vtctldata.GetShardReplicationRequest + * @memberof vtctldata.GetSchemaRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetShardReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetShardReplicationRequest"; + return typeUrlPrefix + "/vtctldata.GetSchemaRequest"; }; - return GetShardReplicationRequest; + return GetSchemaRequest; })(); - vtctldata.GetShardReplicationResponse = (function() { + vtctldata.GetSchemaResponse = (function() { /** - * Properties of a GetShardReplicationResponse. + * Properties of a GetSchemaResponse. * @memberof vtctldata - * @interface IGetShardReplicationResponse - * @property {Object.|null} [shard_replication_by_cell] GetShardReplicationResponse shard_replication_by_cell + * @interface IGetSchemaResponse + * @property {tabletmanagerdata.ISchemaDefinition|null} [schema] GetSchemaResponse schema */ /** - * Constructs a new GetShardReplicationResponse. + * Constructs a new GetSchemaResponse. * @memberof vtctldata - * @classdesc Represents a GetShardReplicationResponse. - * @implements IGetShardReplicationResponse + * @classdesc Represents a GetSchemaResponse. + * @implements IGetSchemaResponse * @constructor - * @param {vtctldata.IGetShardReplicationResponse=} [properties] Properties to set + * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set */ - function GetShardReplicationResponse(properties) { - this.shard_replication_by_cell = {}; + function GetSchemaResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -139546,97 +137885,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetShardReplicationResponse shard_replication_by_cell. - * @member {Object.} shard_replication_by_cell - * @memberof vtctldata.GetShardReplicationResponse + * GetSchemaResponse schema. + * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} schema + * @memberof vtctldata.GetSchemaResponse * @instance */ - GetShardReplicationResponse.prototype.shard_replication_by_cell = $util.emptyObject; + GetSchemaResponse.prototype.schema = null; /** - * Creates a new GetShardReplicationResponse instance using the specified properties. + * Creates a new GetSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.IGetShardReplicationResponse=} [properties] Properties to set - * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse instance + * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse instance */ - GetShardReplicationResponse.create = function create(properties) { - return new GetShardReplicationResponse(properties); + GetSchemaResponse.create = function create(properties) { + return new GetSchemaResponse(properties); }; /** - * Encodes the specified GetShardReplicationResponse message. Does not implicitly {@link vtctldata.GetShardReplicationResponse.verify|verify} messages. + * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.IGetShardReplicationResponse} message GetShardReplicationResponse message or plain object to encode + * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardReplicationResponse.encode = function encode(message, writer) { + GetSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard_replication_by_cell != null && Object.hasOwnProperty.call(message, "shard_replication_by_cell")) - for (let keys = Object.keys(message.shard_replication_by_cell), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.ShardReplication.encode(message.shard_replication_by_cell[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.tabletmanagerdata.SchemaDefinition.encode(message.schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetShardReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardReplicationResponse.verify|verify} messages. + * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.IGetShardReplicationResponse} message GetShardReplicationResponse message or plain object to encode + * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardReplicationResponse message from the specified reader or buffer. + * Decodes a GetSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardReplicationResponse.decode = function decode(reader, length) { + GetSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardReplicationResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.shard_replication_by_cell === $util.emptyObject) - message.shard_replication_by_cell = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.ShardReplication.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.shard_replication_by_cell[key] = value; + message.schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); break; } default: @@ -139648,142 +137965,134 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetShardReplicationResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardReplicationResponse.decodeDelimited = function decodeDelimited(reader) { + GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardReplicationResponse message. + * Verifies a GetSchemaResponse message. * @function verify - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardReplicationResponse.verify = function verify(message) { + GetSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard_replication_by_cell != null && message.hasOwnProperty("shard_replication_by_cell")) { - if (!$util.isObject(message.shard_replication_by_cell)) - return "shard_replication_by_cell: object expected"; - let key = Object.keys(message.shard_replication_by_cell); - for (let i = 0; i < key.length; ++i) { - let error = $root.topodata.ShardReplication.verify(message.shard_replication_by_cell[key[i]]); - if (error) - return "shard_replication_by_cell." + error; - } + if (message.schema != null && message.hasOwnProperty("schema")) { + let error = $root.tabletmanagerdata.SchemaDefinition.verify(message.schema); + if (error) + return "schema." + error; } return null; }; /** - * Creates a GetShardReplicationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse */ - GetShardReplicationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardReplicationResponse) + GetSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSchemaResponse) return object; - let message = new $root.vtctldata.GetShardReplicationResponse(); - if (object.shard_replication_by_cell) { - if (typeof object.shard_replication_by_cell !== "object") - throw TypeError(".vtctldata.GetShardReplicationResponse.shard_replication_by_cell: object expected"); - message.shard_replication_by_cell = {}; - for (let keys = Object.keys(object.shard_replication_by_cell), i = 0; i < keys.length; ++i) { - if (typeof object.shard_replication_by_cell[keys[i]] !== "object") - throw TypeError(".vtctldata.GetShardReplicationResponse.shard_replication_by_cell: object expected"); - message.shard_replication_by_cell[keys[i]] = $root.topodata.ShardReplication.fromObject(object.shard_replication_by_cell[keys[i]]); - } + let message = new $root.vtctldata.GetSchemaResponse(); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".vtctldata.GetSchemaResponse.schema: object expected"); + message.schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.schema); } return message; }; /** - * Creates a plain object from a GetShardReplicationResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.GetShardReplicationResponse} message GetShardReplicationResponse + * @param {vtctldata.GetSchemaResponse} message GetSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardReplicationResponse.toObject = function toObject(message, options) { + GetSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.shard_replication_by_cell = {}; - let keys2; - if (message.shard_replication_by_cell && (keys2 = Object.keys(message.shard_replication_by_cell)).length) { - object.shard_replication_by_cell = {}; - for (let j = 0; j < keys2.length; ++j) - object.shard_replication_by_cell[keys2[j]] = $root.topodata.ShardReplication.toObject(message.shard_replication_by_cell[keys2[j]], options); - } + if (options.defaults) + object.schema = null; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.schema, options); return object; }; /** - * Converts this GetShardReplicationResponse to JSON. + * Converts this GetSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @instance * @returns {Object.} JSON object */ - GetShardReplicationResponse.prototype.toJSON = function toJSON() { + GetSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetShardReplicationResponse + * Gets the default type url for GetSchemaResponse * @function getTypeUrl - * @memberof vtctldata.GetShardReplicationResponse + * @memberof vtctldata.GetSchemaResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetShardReplicationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetShardReplicationResponse"; + return typeUrlPrefix + "/vtctldata.GetSchemaResponse"; }; - return GetShardReplicationResponse; + return GetSchemaResponse; })(); - vtctldata.GetShardRequest = (function() { + vtctldata.GetSchemaMigrationsRequest = (function() { /** - * Properties of a GetShardRequest. + * Properties of a GetSchemaMigrationsRequest. * @memberof vtctldata - * @interface IGetShardRequest - * @property {string|null} [keyspace] GetShardRequest keyspace - * @property {string|null} [shard_name] GetShardRequest shard_name + * @interface IGetSchemaMigrationsRequest + * @property {string|null} [keyspace] GetSchemaMigrationsRequest keyspace + * @property {string|null} [uuid] GetSchemaMigrationsRequest uuid + * @property {string|null} [migration_context] GetSchemaMigrationsRequest migration_context + * @property {vtctldata.SchemaMigration.Status|null} [status] GetSchemaMigrationsRequest status + * @property {vttime.IDuration|null} [recent] GetSchemaMigrationsRequest recent + * @property {vtctldata.QueryOrdering|null} [order] GetSchemaMigrationsRequest order + * @property {number|Long|null} [limit] GetSchemaMigrationsRequest limit + * @property {number|Long|null} [skip] GetSchemaMigrationsRequest skip */ /** - * Constructs a new GetShardRequest. + * Constructs a new GetSchemaMigrationsRequest. * @memberof vtctldata - * @classdesc Represents a GetShardRequest. - * @implements IGetShardRequest + * @classdesc Represents a GetSchemaMigrationsRequest. + * @implements IGetSchemaMigrationsRequest * @constructor - * @param {vtctldata.IGetShardRequest=} [properties] Properties to set + * @param {vtctldata.IGetSchemaMigrationsRequest=} [properties] Properties to set */ - function GetShardRequest(properties) { + function GetSchemaMigrationsRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -139791,80 +138100,140 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetShardRequest keyspace. + * GetSchemaMigrationsRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @instance */ - GetShardRequest.prototype.keyspace = ""; + GetSchemaMigrationsRequest.prototype.keyspace = ""; /** - * GetShardRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.GetShardRequest + * GetSchemaMigrationsRequest uuid. + * @member {string} uuid + * @memberof vtctldata.GetSchemaMigrationsRequest * @instance */ - GetShardRequest.prototype.shard_name = ""; + GetSchemaMigrationsRequest.prototype.uuid = ""; /** - * Creates a new GetShardRequest instance using the specified properties. + * GetSchemaMigrationsRequest migration_context. + * @member {string} migration_context + * @memberof vtctldata.GetSchemaMigrationsRequest + * @instance + */ + GetSchemaMigrationsRequest.prototype.migration_context = ""; + + /** + * GetSchemaMigrationsRequest status. + * @member {vtctldata.SchemaMigration.Status} status + * @memberof vtctldata.GetSchemaMigrationsRequest + * @instance + */ + GetSchemaMigrationsRequest.prototype.status = 0; + + /** + * GetSchemaMigrationsRequest recent. + * @member {vttime.IDuration|null|undefined} recent + * @memberof vtctldata.GetSchemaMigrationsRequest + * @instance + */ + GetSchemaMigrationsRequest.prototype.recent = null; + + /** + * GetSchemaMigrationsRequest order. + * @member {vtctldata.QueryOrdering} order + * @memberof vtctldata.GetSchemaMigrationsRequest + * @instance + */ + GetSchemaMigrationsRequest.prototype.order = 0; + + /** + * GetSchemaMigrationsRequest limit. + * @member {number|Long} limit + * @memberof vtctldata.GetSchemaMigrationsRequest + * @instance + */ + GetSchemaMigrationsRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetSchemaMigrationsRequest skip. + * @member {number|Long} skip + * @memberof vtctldata.GetSchemaMigrationsRequest + * @instance + */ + GetSchemaMigrationsRequest.prototype.skip = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GetSchemaMigrationsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static - * @param {vtctldata.IGetShardRequest=} [properties] Properties to set - * @returns {vtctldata.GetShardRequest} GetShardRequest instance + * @param {vtctldata.IGetSchemaMigrationsRequest=} [properties] Properties to set + * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest instance */ - GetShardRequest.create = function create(properties) { - return new GetShardRequest(properties); + GetSchemaMigrationsRequest.create = function create(properties) { + return new GetSchemaMigrationsRequest(properties); }; /** - * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. + * Encodes the specified GetSchemaMigrationsRequest message. Does not implicitly {@link vtctldata.GetSchemaMigrationsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static - * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode + * @param {vtctldata.IGetSchemaMigrationsRequest} message GetSchemaMigrationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRequest.encode = function encode(message, writer) { + GetSchemaMigrationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uuid); + if (message.migration_context != null && Object.hasOwnProperty.call(message, "migration_context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.migration_context); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.recent != null && Object.hasOwnProperty.call(message, "recent")) + $root.vttime.Duration.encode(message.recent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.order != null && Object.hasOwnProperty.call(message, "order")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.order); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.limit); + if (message.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.skip); return writer; }; /** - * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. + * Encodes the specified GetSchemaMigrationsRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaMigrationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static - * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode + * @param {vtctldata.IGetSchemaMigrationsRequest} message GetSchemaMigrationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaMigrationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardRequest message from the specified reader or buffer. + * Decodes a GetSchemaMigrationsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRequest} GetShardRequest + * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRequest.decode = function decode(reader, length) { + GetSchemaMigrationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaMigrationsRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -139872,8 +138241,32 @@ export const vtctldata = $root.vtctldata = (() => { message.keyspace = reader.string(); break; } - case 2: { - message.shard_name = reader.string(); + case 2: { + message.uuid = reader.string(); + break; + } + case 3: { + message.migration_context = reader.string(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.recent = $root.vttime.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.order = reader.int32(); + break; + } + case 7: { + message.limit = reader.uint64(); + break; + } + case 8: { + message.skip = reader.uint64(); break; } default: @@ -139885,131 +138278,286 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaMigrationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRequest} GetShardRequest + * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRequest.decodeDelimited = function decodeDelimited(reader) { + GetSchemaMigrationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardRequest message. + * Verifies a GetSchemaMigrationsRequest message. * @function verify - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardRequest.verify = function verify(message) { + GetSchemaMigrationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.migration_context != null && message.hasOwnProperty("migration_context")) + if (!$util.isString(message.migration_context)) + return "migration_context: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.recent != null && message.hasOwnProperty("recent")) { + let error = $root.vttime.Duration.verify(message.recent); + if (error) + return "recent." + error; + } + if (message.order != null && message.hasOwnProperty("order")) + switch (message.order) { + default: + return "order: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip) && !(message.skip && $util.isInteger(message.skip.low) && $util.isInteger(message.skip.high))) + return "skip: integer|Long expected"; return null; }; /** - * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaMigrationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRequest} GetShardRequest + * @returns {vtctldata.GetSchemaMigrationsRequest} GetSchemaMigrationsRequest */ - GetShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRequest) + GetSchemaMigrationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSchemaMigrationsRequest) return object; - let message = new $root.vtctldata.GetShardRequest(); + let message = new $root.vtctldata.GetSchemaMigrationsRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); + if (object.uuid != null) + message.uuid = String(object.uuid); + if (object.migration_context != null) + message.migration_context = String(object.migration_context); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "UNKNOWN": + case 0: + message.status = 0; + break; + case "REQUESTED": + case 1: + message.status = 1; + break; + case "CANCELLED": + case 2: + message.status = 2; + break; + case "QUEUED": + case 3: + message.status = 3; + break; + case "READY": + case 4: + message.status = 4; + break; + case "RUNNING": + case 5: + message.status = 5; + break; + case "COMPLETE": + case 6: + message.status = 6; + break; + case "FAILED": + case 7: + message.status = 7; + break; + } + if (object.recent != null) { + if (typeof object.recent !== "object") + throw TypeError(".vtctldata.GetSchemaMigrationsRequest.recent: object expected"); + message.recent = $root.vttime.Duration.fromObject(object.recent); + } + switch (object.order) { + default: + if (typeof object.order === "number") { + message.order = object.order; + break; + } + break; + case "NONE": + case 0: + message.order = 0; + break; + case "ASCENDING": + case 1: + message.order = 1; + break; + case "DESCENDING": + case 2: + message.order = 2; + break; + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); + if (object.skip != null) + if ($util.Long) + (message.skip = $util.Long.fromValue(object.skip)).unsigned = true; + else if (typeof object.skip === "string") + message.skip = parseInt(object.skip, 10); + else if (typeof object.skip === "number") + message.skip = object.skip; + else if (typeof object.skip === "object") + message.skip = new $util.LongBits(object.skip.low >>> 0, object.skip.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaMigrationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static - * @param {vtctldata.GetShardRequest} message GetShardRequest + * @param {vtctldata.GetSchemaMigrationsRequest} message GetSchemaMigrationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardRequest.toObject = function toObject(message, options) { + GetSchemaMigrationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.keyspace = ""; - object.shard_name = ""; + object.uuid = ""; + object.migration_context = ""; + object.status = options.enums === String ? "UNKNOWN" : 0; + object.recent = null; + object.order = options.enums === String ? "NONE" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.skip = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.skip = options.longs === String ? "0" : 0; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.migration_context != null && message.hasOwnProperty("migration_context")) + object.migration_context = message.migration_context; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.vtctldata.SchemaMigration.Status[message.status] === undefined ? message.status : $root.vtctldata.SchemaMigration.Status[message.status] : message.status; + if (message.recent != null && message.hasOwnProperty("recent")) + object.recent = $root.vttime.Duration.toObject(message.recent, options); + if (message.order != null && message.hasOwnProperty("order")) + object.order = options.enums === String ? $root.vtctldata.QueryOrdering[message.order] === undefined ? message.order : $root.vtctldata.QueryOrdering[message.order] : message.order; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; + if (message.skip != null && message.hasOwnProperty("skip")) + if (typeof message.skip === "number") + object.skip = options.longs === String ? String(message.skip) : message.skip; + else + object.skip = options.longs === String ? $util.Long.prototype.toString.call(message.skip) : options.longs === Number ? new $util.LongBits(message.skip.low >>> 0, message.skip.high >>> 0).toNumber(true) : message.skip; return object; }; /** - * Converts this GetShardRequest to JSON. + * Converts this GetSchemaMigrationsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @instance * @returns {Object.} JSON object */ - GetShardRequest.prototype.toJSON = function toJSON() { + GetSchemaMigrationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetShardRequest + * Gets the default type url for GetSchemaMigrationsRequest * @function getTypeUrl - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.GetSchemaMigrationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetShardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSchemaMigrationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetShardRequest"; + return typeUrlPrefix + "/vtctldata.GetSchemaMigrationsRequest"; }; - return GetShardRequest; + return GetSchemaMigrationsRequest; })(); - vtctldata.GetShardResponse = (function() { + vtctldata.GetSchemaMigrationsResponse = (function() { /** - * Properties of a GetShardResponse. + * Properties of a GetSchemaMigrationsResponse. * @memberof vtctldata - * @interface IGetShardResponse - * @property {vtctldata.IShard|null} [shard] GetShardResponse shard + * @interface IGetSchemaMigrationsResponse + * @property {Array.|null} [migrations] GetSchemaMigrationsResponse migrations */ /** - * Constructs a new GetShardResponse. + * Constructs a new GetSchemaMigrationsResponse. * @memberof vtctldata - * @classdesc Represents a GetShardResponse. - * @implements IGetShardResponse + * @classdesc Represents a GetSchemaMigrationsResponse. + * @implements IGetSchemaMigrationsResponse * @constructor - * @param {vtctldata.IGetShardResponse=} [properties] Properties to set + * @param {vtctldata.IGetSchemaMigrationsResponse=} [properties] Properties to set */ - function GetShardResponse(properties) { + function GetSchemaMigrationsResponse(properties) { + this.migrations = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -140017,75 +138565,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetShardResponse shard. - * @member {vtctldata.IShard|null|undefined} shard - * @memberof vtctldata.GetShardResponse + * GetSchemaMigrationsResponse migrations. + * @member {Array.} migrations + * @memberof vtctldata.GetSchemaMigrationsResponse * @instance */ - GetShardResponse.prototype.shard = null; + GetSchemaMigrationsResponse.prototype.migrations = $util.emptyArray; /** - * Creates a new GetShardResponse instance using the specified properties. + * Creates a new GetSchemaMigrationsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static - * @param {vtctldata.IGetShardResponse=} [properties] Properties to set - * @returns {vtctldata.GetShardResponse} GetShardResponse instance + * @param {vtctldata.IGetSchemaMigrationsResponse=} [properties] Properties to set + * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse instance */ - GetShardResponse.create = function create(properties) { - return new GetShardResponse(properties); + GetSchemaMigrationsResponse.create = function create(properties) { + return new GetSchemaMigrationsResponse(properties); }; /** - * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. + * Encodes the specified GetSchemaMigrationsResponse message. Does not implicitly {@link vtctldata.GetSchemaMigrationsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static - * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode + * @param {vtctldata.IGetSchemaMigrationsResponse} message GetSchemaMigrationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardResponse.encode = function encode(message, writer) { + GetSchemaMigrationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.migrations != null && message.migrations.length) + for (let i = 0; i < message.migrations.length; ++i) + $root.vtctldata.SchemaMigration.encode(message.migrations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. + * Encodes the specified GetSchemaMigrationsResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaMigrationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static - * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode + * @param {vtctldata.IGetSchemaMigrationsResponse} message GetSchemaMigrationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaMigrationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardResponse message from the specified reader or buffer. + * Decodes a GetSchemaMigrationsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardResponse} GetShardResponse + * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardResponse.decode = function decode(reader, length) { + GetSchemaMigrationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaMigrationsResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); + if (!(message.migrations && message.migrations.length)) + message.migrations = []; + message.migrations.push($root.vtctldata.SchemaMigration.decode(reader, reader.uint32())); break; } default: @@ -140097,126 +138648,142 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaMigrationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardResponse} GetShardResponse + * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardResponse.decodeDelimited = function decodeDelimited(reader) { + GetSchemaMigrationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardResponse message. + * Verifies a GetSchemaMigrationsResponse message. * @function verify - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardResponse.verify = function verify(message) { + GetSchemaMigrationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - let error = $root.vtctldata.Shard.verify(message.shard); - if (error) - return "shard." + error; + if (message.migrations != null && message.hasOwnProperty("migrations")) { + if (!Array.isArray(message.migrations)) + return "migrations: array expected"; + for (let i = 0; i < message.migrations.length; ++i) { + let error = $root.vtctldata.SchemaMigration.verify(message.migrations[i]); + if (error) + return "migrations." + error; + } } return null; }; /** - * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaMigrationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardResponse} GetShardResponse + * @returns {vtctldata.GetSchemaMigrationsResponse} GetSchemaMigrationsResponse */ - GetShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardResponse) + GetSchemaMigrationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSchemaMigrationsResponse) return object; - let message = new $root.vtctldata.GetShardResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.GetShardResponse.shard: object expected"); - message.shard = $root.vtctldata.Shard.fromObject(object.shard); + let message = new $root.vtctldata.GetSchemaMigrationsResponse(); + if (object.migrations) { + if (!Array.isArray(object.migrations)) + throw TypeError(".vtctldata.GetSchemaMigrationsResponse.migrations: array expected"); + message.migrations = []; + for (let i = 0; i < object.migrations.length; ++i) { + if (typeof object.migrations[i] !== "object") + throw TypeError(".vtctldata.GetSchemaMigrationsResponse.migrations: object expected"); + message.migrations[i] = $root.vtctldata.SchemaMigration.fromObject(object.migrations[i]); + } } return message; }; /** - * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaMigrationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static - * @param {vtctldata.GetShardResponse} message GetShardResponse + * @param {vtctldata.GetSchemaMigrationsResponse} message GetSchemaMigrationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardResponse.toObject = function toObject(message, options) { + GetSchemaMigrationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.shard = null; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.vtctldata.Shard.toObject(message.shard, options); + if (options.arrays || options.defaults) + object.migrations = []; + if (message.migrations && message.migrations.length) { + object.migrations = []; + for (let j = 0; j < message.migrations.length; ++j) + object.migrations[j] = $root.vtctldata.SchemaMigration.toObject(message.migrations[j], options); + } return object; }; /** - * Converts this GetShardResponse to JSON. + * Converts this GetSchemaMigrationsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @instance * @returns {Object.} JSON object */ - GetShardResponse.prototype.toJSON = function toJSON() { + GetSchemaMigrationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetShardResponse + * Gets the default type url for GetSchemaMigrationsResponse * @function getTypeUrl - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.GetSchemaMigrationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetShardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSchemaMigrationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetShardResponse"; + return typeUrlPrefix + "/vtctldata.GetSchemaMigrationsResponse"; }; - return GetShardResponse; + return GetSchemaMigrationsResponse; })(); - vtctldata.GetShardRoutingRulesRequest = (function() { + vtctldata.GetShardReplicationRequest = (function() { /** - * Properties of a GetShardRoutingRulesRequest. + * Properties of a GetShardReplicationRequest. * @memberof vtctldata - * @interface IGetShardRoutingRulesRequest + * @interface IGetShardReplicationRequest + * @property {string|null} [keyspace] GetShardReplicationRequest keyspace + * @property {string|null} [shard] GetShardReplicationRequest shard + * @property {Array.|null} [cells] GetShardReplicationRequest cells */ /** - * Constructs a new GetShardRoutingRulesRequest. + * Constructs a new GetShardReplicationRequest. * @memberof vtctldata - * @classdesc Represents a GetShardRoutingRulesRequest. - * @implements IGetShardRoutingRulesRequest + * @classdesc Represents a GetShardReplicationRequest. + * @implements IGetShardReplicationRequest * @constructor - * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set + * @param {vtctldata.IGetShardReplicationRequest=} [properties] Properties to set */ - function GetShardRoutingRulesRequest(properties) { + function GetShardReplicationRequest(properties) { + this.cells = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -140224,63 +138791,108 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new GetShardRoutingRulesRequest instance using the specified properties. + * GetShardReplicationRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetShardReplicationRequest + * @instance + */ + GetShardReplicationRequest.prototype.keyspace = ""; + + /** + * GetShardReplicationRequest shard. + * @member {string} shard + * @memberof vtctldata.GetShardReplicationRequest + * @instance + */ + GetShardReplicationRequest.prototype.shard = ""; + + /** + * GetShardReplicationRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetShardReplicationRequest + * @instance + */ + GetShardReplicationRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new GetShardReplicationRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static - * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest instance + * @param {vtctldata.IGetShardReplicationRequest=} [properties] Properties to set + * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest instance */ - GetShardRoutingRulesRequest.create = function create(properties) { - return new GetShardRoutingRulesRequest(properties); + GetShardReplicationRequest.create = function create(properties) { + return new GetShardReplicationRequest(properties); }; /** - * Encodes the specified GetShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * Encodes the specified GetShardReplicationRequest message. Does not implicitly {@link vtctldata.GetShardReplicationRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static - * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IGetShardReplicationRequest} message GetShardReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesRequest.encode = function encode(message, writer) { + GetShardReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.cells != null && message.cells.length) + for (let i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); return writer; }; /** - * Encodes the specified GetShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * Encodes the specified GetShardReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static - * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IGetShardReplicationRequest} message GetShardReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetShardReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer. + * Decodes a GetShardReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesRequest.decode = function decode(reader, length) { + GetShardReplicationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardReplicationRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.keyspace = reader.string(); + break; + } + case 2: { + message.shard = reader.string(); + break; + } + case 3: { + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -140290,109 +138902,153 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + GetShardReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardRoutingRulesRequest message. + * Verifies a GetShardReplicationRequest message. * @function verify - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardRoutingRulesRequest.verify = function verify(message) { + GetShardReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (let i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a GetShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @returns {vtctldata.GetShardReplicationRequest} GetShardReplicationRequest */ - GetShardRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRoutingRulesRequest) + GetShardReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardReplicationRequest) return object; - return new $root.vtctldata.GetShardRoutingRulesRequest(); + let message = new $root.vtctldata.GetShardReplicationRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetShardReplicationRequest.cells: array expected"); + message.cells = []; + for (let i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + return message; }; /** - * Creates a plain object from a GetShardRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetShardReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static - * @param {vtctldata.GetShardRoutingRulesRequest} message GetShardRoutingRulesRequest + * @param {vtctldata.GetShardReplicationRequest} message GetShardReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardRoutingRulesRequest.toObject = function toObject() { - return {}; + GetShardReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.cells && message.cells.length) { + object.cells = []; + for (let j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + return object; }; /** - * Converts this GetShardRoutingRulesRequest to JSON. + * Converts this GetShardReplicationRequest to JSON. * @function toJSON - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @instance * @returns {Object.} JSON object */ - GetShardRoutingRulesRequest.prototype.toJSON = function toJSON() { + GetShardReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetShardRoutingRulesRequest + * Gets the default type url for GetShardReplicationRequest * @function getTypeUrl - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.GetShardReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetShardRoutingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetShardReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetShardRoutingRulesRequest"; + return typeUrlPrefix + "/vtctldata.GetShardReplicationRequest"; }; - return GetShardRoutingRulesRequest; + return GetShardReplicationRequest; })(); - vtctldata.GetShardRoutingRulesResponse = (function() { + vtctldata.GetShardReplicationResponse = (function() { /** - * Properties of a GetShardRoutingRulesResponse. + * Properties of a GetShardReplicationResponse. * @memberof vtctldata - * @interface IGetShardRoutingRulesResponse - * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] GetShardRoutingRulesResponse shard_routing_rules + * @interface IGetShardReplicationResponse + * @property {Object.|null} [shard_replication_by_cell] GetShardReplicationResponse shard_replication_by_cell */ /** - * Constructs a new GetShardRoutingRulesResponse. + * Constructs a new GetShardReplicationResponse. * @memberof vtctldata - * @classdesc Represents a GetShardRoutingRulesResponse. - * @implements IGetShardRoutingRulesResponse + * @classdesc Represents a GetShardReplicationResponse. + * @implements IGetShardReplicationResponse * @constructor - * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set + * @param {vtctldata.IGetShardReplicationResponse=} [properties] Properties to set */ - function GetShardRoutingRulesResponse(properties) { + function GetShardReplicationResponse(properties) { + this.shard_replication_by_cell = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -140400,75 +139056,97 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetShardRoutingRulesResponse shard_routing_rules. - * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules - * @memberof vtctldata.GetShardRoutingRulesResponse + * GetShardReplicationResponse shard_replication_by_cell. + * @member {Object.} shard_replication_by_cell + * @memberof vtctldata.GetShardReplicationResponse * @instance */ - GetShardRoutingRulesResponse.prototype.shard_routing_rules = null; + GetShardReplicationResponse.prototype.shard_replication_by_cell = $util.emptyObject; /** - * Creates a new GetShardRoutingRulesResponse instance using the specified properties. + * Creates a new GetShardReplicationResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static - * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse instance + * @param {vtctldata.IGetShardReplicationResponse=} [properties] Properties to set + * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse instance */ - GetShardRoutingRulesResponse.create = function create(properties) { - return new GetShardRoutingRulesResponse(properties); + GetShardReplicationResponse.create = function create(properties) { + return new GetShardReplicationResponse(properties); }; /** - * Encodes the specified GetShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. + * Encodes the specified GetShardReplicationResponse message. Does not implicitly {@link vtctldata.GetShardReplicationResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static - * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IGetShardReplicationResponse} message GetShardReplicationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesResponse.encode = function encode(message, writer) { + GetShardReplicationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) - $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shard_replication_by_cell != null && Object.hasOwnProperty.call(message, "shard_replication_by_cell")) + for (let keys = Object.keys(message.shard_replication_by_cell), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.topodata.ShardReplication.encode(message.shard_replication_by_cell[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. + * Encodes the specified GetShardReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardReplicationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static - * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IGetShardReplicationResponse} message GetShardReplicationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetShardReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer. + * Decodes a GetShardReplicationResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse + * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesResponse.decode = function decode(reader, length) { + GetShardReplicationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardReplicationResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); + if (message.shard_replication_by_cell === $util.emptyObject) + message.shard_replication_by_cell = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.topodata.ShardReplication.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.shard_replication_by_cell[key] = value; break; } default: @@ -140480,128 +139158,142 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetShardReplicationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse + * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + GetShardReplicationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardRoutingRulesResponse message. + * Verifies a GetShardReplicationResponse message. * @function verify - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardRoutingRulesResponse.verify = function verify(message) { + GetShardReplicationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { - let error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); - if (error) - return "shard_routing_rules." + error; + if (message.shard_replication_by_cell != null && message.hasOwnProperty("shard_replication_by_cell")) { + if (!$util.isObject(message.shard_replication_by_cell)) + return "shard_replication_by_cell: object expected"; + let key = Object.keys(message.shard_replication_by_cell); + for (let i = 0; i < key.length; ++i) { + let error = $root.topodata.ShardReplication.verify(message.shard_replication_by_cell[key[i]]); + if (error) + return "shard_replication_by_cell." + error; + } } return null; }; /** - * Creates a GetShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardReplicationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse + * @returns {vtctldata.GetShardReplicationResponse} GetShardReplicationResponse */ - GetShardRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRoutingRulesResponse) + GetShardReplicationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardReplicationResponse) return object; - let message = new $root.vtctldata.GetShardRoutingRulesResponse(); - if (object.shard_routing_rules != null) { - if (typeof object.shard_routing_rules !== "object") - throw TypeError(".vtctldata.GetShardRoutingRulesResponse.shard_routing_rules: object expected"); - message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); + let message = new $root.vtctldata.GetShardReplicationResponse(); + if (object.shard_replication_by_cell) { + if (typeof object.shard_replication_by_cell !== "object") + throw TypeError(".vtctldata.GetShardReplicationResponse.shard_replication_by_cell: object expected"); + message.shard_replication_by_cell = {}; + for (let keys = Object.keys(object.shard_replication_by_cell), i = 0; i < keys.length; ++i) { + if (typeof object.shard_replication_by_cell[keys[i]] !== "object") + throw TypeError(".vtctldata.GetShardReplicationResponse.shard_replication_by_cell: object expected"); + message.shard_replication_by_cell[keys[i]] = $root.topodata.ShardReplication.fromObject(object.shard_replication_by_cell[keys[i]]); + } } return message; }; /** - * Creates a plain object from a GetShardRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetShardReplicationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static - * @param {vtctldata.GetShardRoutingRulesResponse} message GetShardRoutingRulesResponse + * @param {vtctldata.GetShardReplicationResponse} message GetShardReplicationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardRoutingRulesResponse.toObject = function toObject(message, options) { + GetShardReplicationResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.shard_routing_rules = null; - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) - object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); + if (options.objects || options.defaults) + object.shard_replication_by_cell = {}; + let keys2; + if (message.shard_replication_by_cell && (keys2 = Object.keys(message.shard_replication_by_cell)).length) { + object.shard_replication_by_cell = {}; + for (let j = 0; j < keys2.length; ++j) + object.shard_replication_by_cell[keys2[j]] = $root.topodata.ShardReplication.toObject(message.shard_replication_by_cell[keys2[j]], options); + } return object; }; /** - * Converts this GetShardRoutingRulesResponse to JSON. + * Converts this GetShardReplicationResponse to JSON. * @function toJSON - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @instance * @returns {Object.} JSON object */ - GetShardRoutingRulesResponse.prototype.toJSON = function toJSON() { + GetShardReplicationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetShardRoutingRulesResponse + * Gets the default type url for GetShardReplicationResponse * @function getTypeUrl - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.GetShardReplicationResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetShardRoutingRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetShardReplicationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetShardRoutingRulesResponse"; + return typeUrlPrefix + "/vtctldata.GetShardReplicationResponse"; }; - return GetShardRoutingRulesResponse; + return GetShardReplicationResponse; })(); - vtctldata.GetSrvKeyspaceNamesRequest = (function() { + vtctldata.GetShardRequest = (function() { /** - * Properties of a GetSrvKeyspaceNamesRequest. + * Properties of a GetShardRequest. * @memberof vtctldata - * @interface IGetSrvKeyspaceNamesRequest - * @property {Array.|null} [cells] GetSrvKeyspaceNamesRequest cells + * @interface IGetShardRequest + * @property {string|null} [keyspace] GetShardRequest keyspace + * @property {string|null} [shard_name] GetShardRequest shard_name */ /** - * Constructs a new GetSrvKeyspaceNamesRequest. + * Constructs a new GetShardRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspaceNamesRequest. - * @implements IGetSrvKeyspaceNamesRequest + * @classdesc Represents a GetShardRequest. + * @implements IGetShardRequest * @constructor - * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set + * @param {vtctldata.IGetShardRequest=} [properties] Properties to set */ - function GetSrvKeyspaceNamesRequest(properties) { - this.cells = []; + function GetShardRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -140609,78 +139301,89 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvKeyspaceNamesRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * GetShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetShardRequest * @instance */ - GetSrvKeyspaceNamesRequest.prototype.cells = $util.emptyArray; + GetShardRequest.prototype.keyspace = ""; /** - * Creates a new GetSrvKeyspaceNamesRequest instance using the specified properties. + * GetShardRequest shard_name. + * @member {string} shard_name + * @memberof vtctldata.GetShardRequest + * @instance + */ + GetShardRequest.prototype.shard_name = ""; + + /** + * Creates a new GetShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest instance + * @param {vtctldata.IGetShardRequest=} [properties] Properties to set + * @returns {vtctldata.GetShardRequest} GetShardRequest instance */ - GetSrvKeyspaceNamesRequest.create = function create(properties) { - return new GetSrvKeyspaceNamesRequest(properties); + GetShardRequest.create = function create(properties) { + return new GetShardRequest(properties); }; /** - * Encodes the specified GetSrvKeyspaceNamesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. + * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode + * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesRequest.encode = function encode(message, writer) { + GetShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (let i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cells[i]); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); return writer; }; /** - * Encodes the specified GetSrvKeyspaceNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. + * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode + * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer. + * Decodes a GetShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest + * @returns {vtctldata.GetShardRequest} GetShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesRequest.decode = function decode(reader, length) { + GetShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + message.keyspace = reader.string(); + break; + } + case 2: { + message.shard_name = reader.string(); break; } default: @@ -140692,135 +139395,131 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest + * @returns {vtctldata.GetShardRequest} GetShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesRequest.decodeDelimited = function decodeDelimited(reader) { + GetShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspaceNamesRequest message. + * Verifies a GetShardRequest message. * @function verify - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspaceNamesRequest.verify = function verify(message) { + GetShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (let i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + if (!$util.isString(message.shard_name)) + return "shard_name: string expected"; return null; }; /** - * Creates a GetSrvKeyspaceNamesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest + * @returns {vtctldata.GetShardRequest} GetShardRequest */ - GetSrvKeyspaceNamesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesRequest) + GetShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardRequest) return object; - let message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvKeyspaceNamesRequest.cells: array expected"); - message.cells = []; - for (let i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } + let message = new $root.vtctldata.GetShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard_name != null) + message.shard_name = String(object.shard_name); return message; }; /** - * Creates a plain object from a GetSrvKeyspaceNamesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.GetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest + * @param {vtctldata.GetShardRequest} message GetShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspaceNamesRequest.toObject = function toObject(message, options) { + GetShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (let j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (options.defaults) { + object.keyspace = ""; + object.shard_name = ""; } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + object.shard_name = message.shard_name; return object; }; /** - * Converts this GetSrvKeyspaceNamesRequest to JSON. + * Converts this GetShardRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @instance * @returns {Object.} JSON object */ - GetSrvKeyspaceNamesRequest.prototype.toJSON = function toJSON() { + GetShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvKeyspaceNamesRequest + * Gets the default type url for GetShardRequest * @function getTypeUrl - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.GetShardRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvKeyspaceNamesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetShardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvKeyspaceNamesRequest"; + return typeUrlPrefix + "/vtctldata.GetShardRequest"; }; - return GetSrvKeyspaceNamesRequest; + return GetShardRequest; })(); - vtctldata.GetSrvKeyspaceNamesResponse = (function() { + vtctldata.GetShardResponse = (function() { /** - * Properties of a GetSrvKeyspaceNamesResponse. + * Properties of a GetShardResponse. * @memberof vtctldata - * @interface IGetSrvKeyspaceNamesResponse - * @property {Object.|null} [names] GetSrvKeyspaceNamesResponse names + * @interface IGetShardResponse + * @property {vtctldata.IShard|null} [shard] GetShardResponse shard */ /** - * Constructs a new GetSrvKeyspaceNamesResponse. + * Constructs a new GetShardResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspaceNamesResponse. - * @implements IGetSrvKeyspaceNamesResponse + * @classdesc Represents a GetShardResponse. + * @implements IGetShardResponse * @constructor - * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set + * @param {vtctldata.IGetShardResponse=} [properties] Properties to set */ - function GetSrvKeyspaceNamesResponse(properties) { - this.names = {}; + function GetShardResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -140828,97 +139527,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvKeyspaceNamesResponse names. - * @member {Object.} names - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * GetShardResponse shard. + * @member {vtctldata.IShard|null|undefined} shard + * @memberof vtctldata.GetShardResponse * @instance */ - GetSrvKeyspaceNamesResponse.prototype.names = $util.emptyObject; + GetShardResponse.prototype.shard = null; /** - * Creates a new GetSrvKeyspaceNamesResponse instance using the specified properties. + * Creates a new GetShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse instance + * @param {vtctldata.IGetShardResponse=} [properties] Properties to set + * @returns {vtctldata.GetShardResponse} GetShardResponse instance */ - GetSrvKeyspaceNamesResponse.create = function create(properties) { - return new GetSrvKeyspaceNamesResponse(properties); + GetShardResponse.create = function create(properties) { + return new GetShardResponse(properties); }; /** - * Encodes the specified GetSrvKeyspaceNamesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. + * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode + * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesResponse.encode = function encode(message, writer) { + GetShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.names != null && Object.hasOwnProperty.call(message, "names")) - for (let keys = Object.keys(message.names), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.encode(message.names[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvKeyspaceNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. + * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode + * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer. + * Decodes a GetShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse + * @returns {vtctldata.GetShardResponse} GetShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesResponse.decode = function decode(reader, length) { + GetShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.names === $util.emptyObject) - message.names = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.names[key] = value; + message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); break; } default: @@ -140930,455 +139607,378 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse + * @returns {vtctldata.GetShardResponse} GetShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesResponse.decodeDelimited = function decodeDelimited(reader) { + GetShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspaceNamesResponse message. + * Verifies a GetShardResponse message. * @function verify - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspaceNamesResponse.verify = function verify(message) { + GetShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!$util.isObject(message.names)) - return "names: object expected"; - let key = Object.keys(message.names); - for (let i = 0; i < key.length; ++i) { - let error = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify(message.names[key[i]]); - if (error) - return "names." + error; - } + if (message.shard != null && message.hasOwnProperty("shard")) { + let error = $root.vtctldata.Shard.verify(message.shard); + if (error) + return "shard." + error; } return null; }; /** - * Creates a GetSrvKeyspaceNamesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse + * @returns {vtctldata.GetShardResponse} GetShardResponse */ - GetSrvKeyspaceNamesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse) + GetShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardResponse) return object; - let message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(); - if (object.names) { - if (typeof object.names !== "object") - throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); - message.names = {}; - for (let keys = Object.keys(object.names), i = 0; i < keys.length; ++i) { - if (typeof object.names[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); - message.names[keys[i]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.fromObject(object.names[keys[i]]); - } + let message = new $root.vtctldata.GetShardResponse(); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.GetShardResponse.shard: object expected"); + message.shard = $root.vtctldata.Shard.fromObject(object.shard); } return message; }; /** - * Creates a plain object from a GetSrvKeyspaceNamesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse + * @param {vtctldata.GetShardResponse} message GetShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspaceNamesResponse.toObject = function toObject(message, options) { + GetShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.names = {}; - let keys2; - if (message.names && (keys2 = Object.keys(message.names)).length) { - object.names = {}; - for (let j = 0; j < keys2.length; ++j) - object.names[keys2[j]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.toObject(message.names[keys2[j]], options); - } + if (options.defaults) + object.shard = null; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.vtctldata.Shard.toObject(message.shard, options); return object; }; /** - * Converts this GetSrvKeyspaceNamesResponse to JSON. + * Converts this GetShardResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @instance * @returns {Object.} JSON object */ - GetSrvKeyspaceNamesResponse.prototype.toJSON = function toJSON() { + GetShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvKeyspaceNamesResponse + * Gets the default type url for GetShardResponse * @function getTypeUrl - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.GetShardResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvKeyspaceNamesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetShardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvKeyspaceNamesResponse"; + return typeUrlPrefix + "/vtctldata.GetShardResponse"; }; - GetSrvKeyspaceNamesResponse.NameList = (function() { - - /** - * Properties of a NameList. - * @memberof vtctldata.GetSrvKeyspaceNamesResponse - * @interface INameList - * @property {Array.|null} [names] NameList names - */ - - /** - * Constructs a new NameList. - * @memberof vtctldata.GetSrvKeyspaceNamesResponse - * @classdesc Represents a NameList. - * @implements INameList - * @constructor - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set - */ - function NameList(properties) { - this.names = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return GetShardResponse; + })(); - /** - * NameList names. - * @member {Array.} names - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @instance - */ - NameList.prototype.names = $util.emptyArray; + vtctldata.GetShardRoutingRulesRequest = (function() { - /** - * Creates a new NameList instance using the specified properties. - * @function create - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList instance - */ - NameList.create = function create(properties) { - return new NameList(properties); - }; + /** + * Properties of a GetShardRoutingRulesRequest. + * @memberof vtctldata + * @interface IGetShardRoutingRulesRequest + */ - /** - * Encodes the specified NameList message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NameList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.names != null && message.names.length) - for (let i = 0; i < message.names.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); - return writer; - }; + /** + * Constructs a new GetShardRoutingRulesRequest. + * @memberof vtctldata + * @classdesc Represents a GetShardRoutingRulesRequest. + * @implements IGetShardRoutingRulesRequest + * @constructor + * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set + */ + function GetShardRoutingRulesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified NameList message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NameList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new GetShardRoutingRulesRequest instance using the specified properties. + * @function create + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest instance + */ + GetShardRoutingRulesRequest.create = function create(properties) { + return new GetShardRoutingRulesRequest(properties); + }; - /** - * Decodes a NameList message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NameList.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified GetShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetShardRoutingRulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Decodes a NameList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NameList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified GetShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetShardRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a NameList message. - * @function verify - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NameList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (let i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; + /** + * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetShardRoutingRulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a NameList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList - */ - NameList.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList) - return object; - let message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.NameList.names: array expected"); - message.names = []; - for (let i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); - } - return message; - }; + /** + * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetShardRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a NameList message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.NameList} message NameList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NameList.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (message.names && message.names.length) { - object.names = []; - for (let j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; - } + /** + * Verifies a GetShardRoutingRulesRequest message. + * @function verify + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetShardRoutingRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GetShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + */ + GetShardRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardRoutingRulesRequest) return object; - }; + return new $root.vtctldata.GetShardRoutingRulesRequest(); + }; - /** - * Converts this NameList to JSON. - * @function toJSON - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @instance - * @returns {Object.} JSON object - */ - NameList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetShardRoutingRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {vtctldata.GetShardRoutingRulesRequest} message GetShardRoutingRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetShardRoutingRulesRequest.toObject = function toObject() { + return {}; + }; - /** - * Gets the default type url for NameList - * @function getTypeUrl - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NameList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.GetSrvKeyspaceNamesResponse.NameList"; - }; + /** + * Converts this GetShardRoutingRulesRequest to JSON. + * @function toJSON + * @memberof vtctldata.GetShardRoutingRulesRequest + * @instance + * @returns {Object.} JSON object + */ + GetShardRoutingRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return NameList; - })(); + /** + * Gets the default type url for GetShardRoutingRulesRequest + * @function getTypeUrl + * @memberof vtctldata.GetShardRoutingRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetShardRoutingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.GetShardRoutingRulesRequest"; + }; - return GetSrvKeyspaceNamesResponse; + return GetShardRoutingRulesRequest; })(); - vtctldata.GetSrvKeyspacesRequest = (function() { + vtctldata.GetShardRoutingRulesResponse = (function() { /** - * Properties of a GetSrvKeyspacesRequest. + * Properties of a GetShardRoutingRulesResponse. * @memberof vtctldata - * @interface IGetSrvKeyspacesRequest - * @property {string|null} [keyspace] GetSrvKeyspacesRequest keyspace - * @property {Array.|null} [cells] GetSrvKeyspacesRequest cells + * @interface IGetShardRoutingRulesResponse + * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] GetShardRoutingRulesResponse shard_routing_rules */ /** - * Constructs a new GetSrvKeyspacesRequest. + * Constructs a new GetShardRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspacesRequest. - * @implements IGetSrvKeyspacesRequest + * @classdesc Represents a GetShardRoutingRulesResponse. + * @implements IGetShardRoutingRulesResponse * @constructor - * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set + * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set */ - function GetSrvKeyspacesRequest(properties) { - this.cells = []; + function GetShardRoutingRulesResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - /** - * GetSrvKeyspacesRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetSrvKeyspacesRequest - * @instance - */ - GetSrvKeyspacesRequest.prototype.keyspace = ""; - - /** - * GetSrvKeyspacesRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvKeyspacesRequest + /** + * GetShardRoutingRulesResponse shard_routing_rules. + * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules + * @memberof vtctldata.GetShardRoutingRulesResponse * @instance */ - GetSrvKeyspacesRequest.prototype.cells = $util.emptyArray; + GetShardRoutingRulesResponse.prototype.shard_routing_rules = null; /** - * Creates a new GetSrvKeyspacesRequest instance using the specified properties. + * Creates a new GetShardRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest instance + * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse instance */ - GetSrvKeyspacesRequest.create = function create(properties) { - return new GetSrvKeyspacesRequest(properties); + GetShardRoutingRulesResponse.create = function create(properties) { + return new GetShardRoutingRulesResponse(properties); }; /** - * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. + * Encodes the specified GetShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode + * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesRequest.encode = function encode(message, writer) { + GetShardRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.cells != null && message.cells.length) - for (let i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) + $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. + * Encodes the specified GetShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode + * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetShardRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. + * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesRequest.decode = function decode(reader, length) { + GetShardRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); break; } default: @@ -141390,144 +139990,128 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { + GetShardRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspacesRequest message. + * Verifies a GetShardRoutingRulesResponse message. * @function verify - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspacesRequest.verify = function verify(message) { + GetShardRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (let i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { + let error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); + if (error) + return "shard_routing_rules." + error; } return null; }; /** - * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse */ - GetSrvKeyspacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspacesRequest) + GetShardRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardRoutingRulesResponse) return object; - let message = new $root.vtctldata.GetSrvKeyspacesRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvKeyspacesRequest.cells: array expected"); - message.cells = []; - for (let i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + let message = new $root.vtctldata.GetShardRoutingRulesResponse(); + if (object.shard_routing_rules != null) { + if (typeof object.shard_routing_rules !== "object") + throw TypeError(".vtctldata.GetShardRoutingRulesResponse.shard_routing_rules: object expected"); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); } return message; }; /** - * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetShardRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.GetSrvKeyspacesRequest} message GetSrvKeyspacesRequest + * @param {vtctldata.GetShardRoutingRulesResponse} message GetShardRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspacesRequest.toObject = function toObject(message, options) { + GetShardRoutingRulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.cells = []; if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.cells && message.cells.length) { - object.cells = []; - for (let j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } + object.shard_routing_rules = null; + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) + object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); return object; }; /** - * Converts this GetSrvKeyspacesRequest to JSON. + * Converts this GetShardRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - GetSrvKeyspacesRequest.prototype.toJSON = function toJSON() { + GetShardRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvKeyspacesRequest + * Gets the default type url for GetShardRoutingRulesResponse * @function getTypeUrl - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvKeyspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetShardRoutingRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvKeyspacesRequest"; + return typeUrlPrefix + "/vtctldata.GetShardRoutingRulesResponse"; }; - return GetSrvKeyspacesRequest; + return GetShardRoutingRulesResponse; })(); - vtctldata.GetSrvKeyspacesResponse = (function() { + vtctldata.GetSrvKeyspaceNamesRequest = (function() { /** - * Properties of a GetSrvKeyspacesResponse. + * Properties of a GetSrvKeyspaceNamesRequest. * @memberof vtctldata - * @interface IGetSrvKeyspacesResponse - * @property {Object.|null} [srv_keyspaces] GetSrvKeyspacesResponse srv_keyspaces + * @interface IGetSrvKeyspaceNamesRequest + * @property {Array.|null} [cells] GetSrvKeyspaceNamesRequest cells */ /** - * Constructs a new GetSrvKeyspacesResponse. + * Constructs a new GetSrvKeyspaceNamesRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspacesResponse. - * @implements IGetSrvKeyspacesResponse + * @classdesc Represents a GetSrvKeyspaceNamesRequest. + * @implements IGetSrvKeyspaceNamesRequest * @constructor - * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set */ - function GetSrvKeyspacesResponse(properties) { - this.srv_keyspaces = {}; + function GetSrvKeyspaceNamesRequest(properties) { + this.cells = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -141535,97 +140119,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvKeyspacesResponse srv_keyspaces. - * @member {Object.} srv_keyspaces - * @memberof vtctldata.GetSrvKeyspacesResponse + * GetSrvKeyspaceNamesRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @instance */ - GetSrvKeyspacesResponse.prototype.srv_keyspaces = $util.emptyObject; + GetSrvKeyspaceNamesRequest.prototype.cells = $util.emptyArray; /** - * Creates a new GetSrvKeyspacesResponse instance using the specified properties. + * Creates a new GetSrvKeyspaceNamesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse instance + * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest instance */ - GetSrvKeyspacesResponse.create = function create(properties) { - return new GetSrvKeyspacesResponse(properties); + GetSrvKeyspaceNamesRequest.create = function create(properties) { + return new GetSrvKeyspaceNamesRequest(properties); }; /** - * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesResponse.encode = function encode(message, writer) { + GetSrvKeyspaceNamesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.srv_keyspaces != null && Object.hasOwnProperty.call(message, "srv_keyspaces")) - for (let keys = Object.keys(message.srv_keyspaces), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.SrvKeyspace.encode(message.srv_keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.cells != null && message.cells.length) + for (let i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cells[i]); return writer; }; /** - * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspaceNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. + * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesResponse.decode = function decode(reader, length) { + GetSrvKeyspaceNamesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.srv_keyspaces === $util.emptyObject) - message.srv_keyspaces = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.SrvKeyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.srv_keyspaces[key] = value; + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); break; } default: @@ -141637,153 +140202,135 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspaceNamesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspacesResponse message. + * Verifies a GetSrvKeyspaceNamesRequest message. * @function verify - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspacesResponse.verify = function verify(message) { + GetSrvKeyspaceNamesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.srv_keyspaces != null && message.hasOwnProperty("srv_keyspaces")) { - if (!$util.isObject(message.srv_keyspaces)) - return "srv_keyspaces: object expected"; - let key = Object.keys(message.srv_keyspaces); - for (let i = 0; i < key.length; ++i) { - let error = $root.topodata.SrvKeyspace.verify(message.srv_keyspaces[key[i]]); - if (error) - return "srv_keyspaces." + error; - } + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (let i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } return null; }; /** - * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspaceNamesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest */ - GetSrvKeyspacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspacesResponse) + GetSrvKeyspaceNamesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesRequest) return object; - let message = new $root.vtctldata.GetSrvKeyspacesResponse(); - if (object.srv_keyspaces) { - if (typeof object.srv_keyspaces !== "object") - throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); - message.srv_keyspaces = {}; - for (let keys = Object.keys(object.srv_keyspaces), i = 0; i < keys.length; ++i) { - if (typeof object.srv_keyspaces[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); - message.srv_keyspaces[keys[i]] = $root.topodata.SrvKeyspace.fromObject(object.srv_keyspaces[keys[i]]); - } + let message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetSrvKeyspaceNamesRequest.cells: array expected"); + message.cells = []; + for (let i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } return message; }; /** - * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspaceNamesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.GetSrvKeyspacesResponse} message GetSrvKeyspacesResponse + * @param {vtctldata.GetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspacesResponse.toObject = function toObject(message, options) { + GetSrvKeyspaceNamesRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.srv_keyspaces = {}; - let keys2; - if (message.srv_keyspaces && (keys2 = Object.keys(message.srv_keyspaces)).length) { - object.srv_keyspaces = {}; - for (let j = 0; j < keys2.length; ++j) - object.srv_keyspaces[keys2[j]] = $root.topodata.SrvKeyspace.toObject(message.srv_keyspaces[keys2[j]], options); + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (let j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } return object; }; /** - * Converts this GetSrvKeyspacesResponse to JSON. + * Converts this GetSrvKeyspaceNamesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @instance * @returns {Object.} JSON object */ - GetSrvKeyspacesResponse.prototype.toJSON = function toJSON() { + GetSrvKeyspaceNamesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvKeyspacesResponse + * Gets the default type url for GetSrvKeyspaceNamesRequest * @function getTypeUrl - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvKeyspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvKeyspaceNamesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvKeyspacesResponse"; + return typeUrlPrefix + "/vtctldata.GetSrvKeyspaceNamesRequest"; }; - return GetSrvKeyspacesResponse; + return GetSrvKeyspaceNamesRequest; })(); - vtctldata.UpdateThrottlerConfigRequest = (function() { + vtctldata.GetSrvKeyspaceNamesResponse = (function() { /** - * Properties of an UpdateThrottlerConfigRequest. + * Properties of a GetSrvKeyspaceNamesResponse. * @memberof vtctldata - * @interface IUpdateThrottlerConfigRequest - * @property {string|null} [keyspace] UpdateThrottlerConfigRequest keyspace - * @property {boolean|null} [enable] UpdateThrottlerConfigRequest enable - * @property {boolean|null} [disable] UpdateThrottlerConfigRequest disable - * @property {number|null} [threshold] UpdateThrottlerConfigRequest threshold - * @property {string|null} [custom_query] UpdateThrottlerConfigRequest custom_query - * @property {boolean|null} [custom_query_set] UpdateThrottlerConfigRequest custom_query_set - * @property {boolean|null} [check_as_check_self] UpdateThrottlerConfigRequest check_as_check_self - * @property {boolean|null} [check_as_check_shard] UpdateThrottlerConfigRequest check_as_check_shard - * @property {topodata.IThrottledAppRule|null} [throttled_app] UpdateThrottlerConfigRequest throttled_app - * @property {string|null} [metric_name] UpdateThrottlerConfigRequest metric_name - * @property {string|null} [app_name] UpdateThrottlerConfigRequest app_name - * @property {Array.|null} [app_checked_metrics] UpdateThrottlerConfigRequest app_checked_metrics + * @interface IGetSrvKeyspaceNamesResponse + * @property {Object.|null} [names] GetSrvKeyspaceNamesResponse names */ /** - * Constructs a new UpdateThrottlerConfigRequest. + * Constructs a new GetSrvKeyspaceNamesResponse. * @memberof vtctldata - * @classdesc Represents an UpdateThrottlerConfigRequest. - * @implements IUpdateThrottlerConfigRequest + * @classdesc Represents a GetSrvKeyspaceNamesResponse. + * @implements IGetSrvKeyspaceNamesResponse * @constructor - * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set */ - function UpdateThrottlerConfigRequest(properties) { - this.app_checked_metrics = []; + function GetSrvKeyspaceNamesResponse(properties) { + this.names = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -141791,232 +140338,97 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * UpdateThrottlerConfigRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.keyspace = ""; - - /** - * UpdateThrottlerConfigRequest enable. - * @member {boolean} enable - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.enable = false; - - /** - * UpdateThrottlerConfigRequest disable. - * @member {boolean} disable - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.disable = false; - - /** - * UpdateThrottlerConfigRequest threshold. - * @member {number} threshold - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.threshold = 0; - - /** - * UpdateThrottlerConfigRequest custom_query. - * @member {string} custom_query - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.custom_query = ""; - - /** - * UpdateThrottlerConfigRequest custom_query_set. - * @member {boolean} custom_query_set - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.custom_query_set = false; - - /** - * UpdateThrottlerConfigRequest check_as_check_self. - * @member {boolean} check_as_check_self - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.check_as_check_self = false; - - /** - * UpdateThrottlerConfigRequest check_as_check_shard. - * @member {boolean} check_as_check_shard - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.check_as_check_shard = false; - - /** - * UpdateThrottlerConfigRequest throttled_app. - * @member {topodata.IThrottledAppRule|null|undefined} throttled_app - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.throttled_app = null; - - /** - * UpdateThrottlerConfigRequest metric_name. - * @member {string} metric_name - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.metric_name = ""; - - /** - * UpdateThrottlerConfigRequest app_name. - * @member {string} app_name - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.app_name = ""; - - /** - * UpdateThrottlerConfigRequest app_checked_metrics. - * @member {Array.} app_checked_metrics - * @memberof vtctldata.UpdateThrottlerConfigRequest + * GetSrvKeyspaceNamesResponse names. + * @member {Object.} names + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @instance */ - UpdateThrottlerConfigRequest.prototype.app_checked_metrics = $util.emptyArray; + GetSrvKeyspaceNamesResponse.prototype.names = $util.emptyObject; /** - * Creates a new UpdateThrottlerConfigRequest instance using the specified properties. + * Creates a new GetSrvKeyspaceNamesResponse instance using the specified properties. * @function create - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest instance + * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse instance */ - UpdateThrottlerConfigRequest.create = function create(properties) { - return new UpdateThrottlerConfigRequest(properties); + GetSrvKeyspaceNamesResponse.create = function create(properties) { + return new GetSrvKeyspaceNamesResponse(properties); }; /** - * Encodes the specified UpdateThrottlerConfigRequest message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigRequest.encode = function encode(message, writer) { + GetSrvKeyspaceNamesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.enable != null && Object.hasOwnProperty.call(message, "enable")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enable); - if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.disable); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.threshold); - if (message.custom_query != null && Object.hasOwnProperty.call(message, "custom_query")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.custom_query); - if (message.custom_query_set != null && Object.hasOwnProperty.call(message, "custom_query_set")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.custom_query_set); - if (message.check_as_check_self != null && Object.hasOwnProperty.call(message, "check_as_check_self")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.check_as_check_self); - if (message.check_as_check_shard != null && Object.hasOwnProperty.call(message, "check_as_check_shard")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.check_as_check_shard); - if (message.throttled_app != null && Object.hasOwnProperty.call(message, "throttled_app")) - $root.topodata.ThrottledAppRule.encode(message.throttled_app, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.metric_name != null && Object.hasOwnProperty.call(message, "metric_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.metric_name); - if (message.app_name != null && Object.hasOwnProperty.call(message, "app_name")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.app_name); - if (message.app_checked_metrics != null && message.app_checked_metrics.length) - for (let i = 0; i < message.app_checked_metrics.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.app_checked_metrics[i]); + if (message.names != null && Object.hasOwnProperty.call(message, "names")) + for (let keys = Object.keys(message.names), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.encode(message.names[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified UpdateThrottlerConfigRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspaceNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer. + * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigRequest.decode = function decode(reader, length) { + GetSrvKeyspaceNamesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.enable = reader.bool(); - break; - } - case 3: { - message.disable = reader.bool(); - break; - } - case 4: { - message.threshold = reader.double(); - break; - } - case 5: { - message.custom_query = reader.string(); - break; - } - case 6: { - message.custom_query_set = reader.bool(); - break; - } - case 7: { - message.check_as_check_self = reader.bool(); - break; - } - case 8: { - message.check_as_check_shard = reader.bool(); - break; - } - case 9: { - message.throttled_app = $root.topodata.ThrottledAppRule.decode(reader, reader.uint32()); - break; - } - case 10: { - message.metric_name = reader.string(); - break; - } - case 11: { - message.app_name = reader.string(); - break; - } - case 12: { - if (!(message.app_checked_metrics && message.app_checked_metrics.length)) - message.app_checked_metrics = []; - message.app_checked_metrics.push(reader.string()); + if (message.names === $util.emptyObject) + message.names = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.names[key] = value; break; } default: @@ -142028,228 +140440,362 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspaceNamesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateThrottlerConfigRequest message. + * Verifies a GetSrvKeyspaceNamesResponse message. * @function verify - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateThrottlerConfigRequest.verify = function verify(message) { + GetSrvKeyspaceNamesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.enable != null && message.hasOwnProperty("enable")) - if (typeof message.enable !== "boolean") - return "enable: boolean expected"; - if (message.disable != null && message.hasOwnProperty("disable")) - if (typeof message.disable !== "boolean") - return "disable: boolean expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (typeof message.threshold !== "number") - return "threshold: number expected"; - if (message.custom_query != null && message.hasOwnProperty("custom_query")) - if (!$util.isString(message.custom_query)) - return "custom_query: string expected"; - if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) - if (typeof message.custom_query_set !== "boolean") - return "custom_query_set: boolean expected"; - if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) - if (typeof message.check_as_check_self !== "boolean") - return "check_as_check_self: boolean expected"; - if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) - if (typeof message.check_as_check_shard !== "boolean") - return "check_as_check_shard: boolean expected"; - if (message.throttled_app != null && message.hasOwnProperty("throttled_app")) { - let error = $root.topodata.ThrottledAppRule.verify(message.throttled_app); - if (error) - return "throttled_app." + error; - } - if (message.metric_name != null && message.hasOwnProperty("metric_name")) - if (!$util.isString(message.metric_name)) - return "metric_name: string expected"; - if (message.app_name != null && message.hasOwnProperty("app_name")) - if (!$util.isString(message.app_name)) - return "app_name: string expected"; - if (message.app_checked_metrics != null && message.hasOwnProperty("app_checked_metrics")) { - if (!Array.isArray(message.app_checked_metrics)) - return "app_checked_metrics: array expected"; - for (let i = 0; i < message.app_checked_metrics.length; ++i) - if (!$util.isString(message.app_checked_metrics[i])) - return "app_checked_metrics: string[] expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!$util.isObject(message.names)) + return "names: object expected"; + let key = Object.keys(message.names); + for (let i = 0; i < key.length; ++i) { + let error = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify(message.names[key[i]]); + if (error) + return "names." + error; + } } return null; }; /** - * Creates an UpdateThrottlerConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspaceNamesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse */ - UpdateThrottlerConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateThrottlerConfigRequest) + GetSrvKeyspaceNamesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse) return object; - let message = new $root.vtctldata.UpdateThrottlerConfigRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.enable != null) - message.enable = Boolean(object.enable); - if (object.disable != null) - message.disable = Boolean(object.disable); - if (object.threshold != null) - message.threshold = Number(object.threshold); - if (object.custom_query != null) - message.custom_query = String(object.custom_query); - if (object.custom_query_set != null) - message.custom_query_set = Boolean(object.custom_query_set); - if (object.check_as_check_self != null) - message.check_as_check_self = Boolean(object.check_as_check_self); - if (object.check_as_check_shard != null) - message.check_as_check_shard = Boolean(object.check_as_check_shard); - if (object.throttled_app != null) { - if (typeof object.throttled_app !== "object") - throw TypeError(".vtctldata.UpdateThrottlerConfigRequest.throttled_app: object expected"); - message.throttled_app = $root.topodata.ThrottledAppRule.fromObject(object.throttled_app); - } - if (object.metric_name != null) - message.metric_name = String(object.metric_name); - if (object.app_name != null) - message.app_name = String(object.app_name); - if (object.app_checked_metrics) { - if (!Array.isArray(object.app_checked_metrics)) - throw TypeError(".vtctldata.UpdateThrottlerConfigRequest.app_checked_metrics: array expected"); - message.app_checked_metrics = []; - for (let i = 0; i < object.app_checked_metrics.length; ++i) - message.app_checked_metrics[i] = String(object.app_checked_metrics[i]); - } - return message; - }; - - /** - * Creates a plain object from an UpdateThrottlerConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @static - * @param {vtctldata.UpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateThrottlerConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.app_checked_metrics = []; - if (options.defaults) { - object.keyspace = ""; - object.enable = false; - object.disable = false; - object.threshold = 0; - object.custom_query = ""; - object.custom_query_set = false; - object.check_as_check_self = false; - object.check_as_check_shard = false; - object.throttled_app = null; - object.metric_name = ""; - object.app_name = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.enable != null && message.hasOwnProperty("enable")) - object.enable = message.enable; - if (message.disable != null && message.hasOwnProperty("disable")) - object.disable = message.disable; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; - if (message.custom_query != null && message.hasOwnProperty("custom_query")) - object.custom_query = message.custom_query; - if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) - object.custom_query_set = message.custom_query_set; - if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) - object.check_as_check_self = message.check_as_check_self; - if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) - object.check_as_check_shard = message.check_as_check_shard; - if (message.throttled_app != null && message.hasOwnProperty("throttled_app")) - object.throttled_app = $root.topodata.ThrottledAppRule.toObject(message.throttled_app, options); - if (message.metric_name != null && message.hasOwnProperty("metric_name")) - object.metric_name = message.metric_name; - if (message.app_name != null && message.hasOwnProperty("app_name")) - object.app_name = message.app_name; - if (message.app_checked_metrics && message.app_checked_metrics.length) { - object.app_checked_metrics = []; - for (let j = 0; j < message.app_checked_metrics.length; ++j) - object.app_checked_metrics[j] = message.app_checked_metrics[j]; + let message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(); + if (object.names) { + if (typeof object.names !== "object") + throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); + message.names = {}; + for (let keys = Object.keys(object.names), i = 0; i < keys.length; ++i) { + if (typeof object.names[keys[i]] !== "object") + throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); + message.names[keys[i]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.fromObject(object.names[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a GetSrvKeyspaceNamesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSrvKeyspaceNamesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.objects || options.defaults) + object.names = {}; + let keys2; + if (message.names && (keys2 = Object.keys(message.names)).length) { + object.names = {}; + for (let j = 0; j < keys2.length; ++j) + object.names[keys2[j]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.toObject(message.names[keys2[j]], options); } return object; }; /** - * Converts this UpdateThrottlerConfigRequest to JSON. + * Converts this GetSrvKeyspaceNamesResponse to JSON. * @function toJSON - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @instance * @returns {Object.} JSON object */ - UpdateThrottlerConfigRequest.prototype.toJSON = function toJSON() { + GetSrvKeyspaceNamesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateThrottlerConfigRequest + * Gets the default type url for GetSrvKeyspaceNamesResponse * @function getTypeUrl - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateThrottlerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvKeyspaceNamesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.UpdateThrottlerConfigRequest"; + return typeUrlPrefix + "/vtctldata.GetSrvKeyspaceNamesResponse"; }; - return UpdateThrottlerConfigRequest; + GetSrvKeyspaceNamesResponse.NameList = (function() { + + /** + * Properties of a NameList. + * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @interface INameList + * @property {Array.|null} [names] NameList names + */ + + /** + * Constructs a new NameList. + * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @classdesc Represents a NameList. + * @implements INameList + * @constructor + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set + */ + function NameList(properties) { + this.names = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NameList names. + * @member {Array.} names + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @instance + */ + NameList.prototype.names = $util.emptyArray; + + /** + * Creates a new NameList instance using the specified properties. + * @function create + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList instance + */ + NameList.create = function create(properties) { + return new NameList(properties); + }; + + /** + * Encodes the specified NameList message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NameList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.names != null && message.names.length) + for (let i = 0; i < message.names.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); + return writer; + }; + + /** + * Encodes the specified NameList message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NameList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NameList message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NameList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NameList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NameList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NameList message. + * @function verify + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NameList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (let i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; + + /** + * Creates a NameList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList + */ + NameList.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList) + return object; + let message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.NameList.names: array expected"); + message.names = []; + for (let i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; + + /** + * Creates a plain object from a NameList message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.NameList} message NameList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NameList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (message.names && message.names.length) { + object.names = []; + for (let j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; + }; + + /** + * Converts this NameList to JSON. + * @function toJSON + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @instance + * @returns {Object.} JSON object + */ + NameList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NameList + * @function getTypeUrl + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NameList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.GetSrvKeyspaceNamesResponse.NameList"; + }; + + return NameList; + })(); + + return GetSrvKeyspaceNamesResponse; })(); - vtctldata.UpdateThrottlerConfigResponse = (function() { + vtctldata.GetSrvKeyspacesRequest = (function() { /** - * Properties of an UpdateThrottlerConfigResponse. + * Properties of a GetSrvKeyspacesRequest. * @memberof vtctldata - * @interface IUpdateThrottlerConfigResponse + * @interface IGetSrvKeyspacesRequest + * @property {string|null} [keyspace] GetSrvKeyspacesRequest keyspace + * @property {Array.|null} [cells] GetSrvKeyspacesRequest cells */ /** - * Constructs a new UpdateThrottlerConfigResponse. + * Constructs a new GetSrvKeyspacesRequest. * @memberof vtctldata - * @classdesc Represents an UpdateThrottlerConfigResponse. - * @implements IUpdateThrottlerConfigResponse + * @classdesc Represents a GetSrvKeyspacesRequest. + * @implements IGetSrvKeyspacesRequest * @constructor - * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set */ - function UpdateThrottlerConfigResponse(properties) { + function GetSrvKeyspacesRequest(properties) { + this.cells = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -142257,63 +140803,94 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * Creates a new UpdateThrottlerConfigResponse instance using the specified properties. + * GetSrvKeyspacesRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetSrvKeyspacesRequest + * @instance + */ + GetSrvKeyspacesRequest.prototype.keyspace = ""; + + /** + * GetSrvKeyspacesRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetSrvKeyspacesRequest + * @instance + */ + GetSrvKeyspacesRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new GetSrvKeyspacesRequest instance using the specified properties. * @function create - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse instance + * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest instance */ - UpdateThrottlerConfigResponse.create = function create(properties) { - return new UpdateThrottlerConfigResponse(properties); + GetSrvKeyspacesRequest.create = function create(properties) { + return new GetSrvKeyspacesRequest(properties); }; /** - * Encodes the specified UpdateThrottlerConfigResponse message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigResponse.encode = function encode(message, writer) { + GetSrvKeyspacesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.cells != null && message.cells.length) + for (let i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified UpdateThrottlerConfigResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer. + * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigResponse.decode = function decode(reader, length) { + GetSrvKeyspacesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.keyspace = reader.string(); + break; + } + case 2: { + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -142323,109 +140900,144 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateThrottlerConfigResponse message. + * Verifies a GetSrvKeyspacesRequest message. * @function verify - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateThrottlerConfigResponse.verify = function verify(message) { + GetSrvKeyspacesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (let i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates an UpdateThrottlerConfigResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest */ - UpdateThrottlerConfigResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateThrottlerConfigResponse) + GetSrvKeyspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspacesRequest) return object; - return new $root.vtctldata.UpdateThrottlerConfigResponse(); + let message = new $root.vtctldata.GetSrvKeyspacesRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetSrvKeyspacesRequest.cells: array expected"); + message.cells = []; + for (let i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + return message; }; /** - * Creates a plain object from an UpdateThrottlerConfigResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.UpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse + * @param {vtctldata.GetSrvKeyspacesRequest} message GetSrvKeyspacesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateThrottlerConfigResponse.toObject = function toObject() { - return {}; + GetSrvKeyspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.cells && message.cells.length) { + object.cells = []; + for (let j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + return object; }; /** - * Converts this UpdateThrottlerConfigResponse to JSON. + * Converts this GetSrvKeyspacesRequest to JSON. * @function toJSON - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @instance * @returns {Object.} JSON object */ - UpdateThrottlerConfigResponse.prototype.toJSON = function toJSON() { + GetSrvKeyspacesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateThrottlerConfigResponse + * Gets the default type url for GetSrvKeyspacesRequest * @function getTypeUrl - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateThrottlerConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvKeyspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.UpdateThrottlerConfigResponse"; + return typeUrlPrefix + "/vtctldata.GetSrvKeyspacesRequest"; }; - return UpdateThrottlerConfigResponse; + return GetSrvKeyspacesRequest; })(); - vtctldata.GetSrvVSchemaRequest = (function() { + vtctldata.GetSrvKeyspacesResponse = (function() { /** - * Properties of a GetSrvVSchemaRequest. + * Properties of a GetSrvKeyspacesResponse. * @memberof vtctldata - * @interface IGetSrvVSchemaRequest - * @property {string|null} [cell] GetSrvVSchemaRequest cell + * @interface IGetSrvKeyspacesResponse + * @property {Object.|null} [srv_keyspaces] GetSrvKeyspacesResponse srv_keyspaces */ /** - * Constructs a new GetSrvVSchemaRequest. + * Constructs a new GetSrvKeyspacesResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemaRequest. - * @implements IGetSrvVSchemaRequest + * @classdesc Represents a GetSrvKeyspacesResponse. + * @implements IGetSrvKeyspacesResponse * @constructor - * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set */ - function GetSrvVSchemaRequest(properties) { + function GetSrvKeyspacesResponse(properties) { + this.srv_keyspaces = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -142433,75 +141045,97 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvVSchemaRequest cell. - * @member {string} cell - * @memberof vtctldata.GetSrvVSchemaRequest + * GetSrvKeyspacesResponse srv_keyspaces. + * @member {Object.} srv_keyspaces + * @memberof vtctldata.GetSrvKeyspacesResponse * @instance */ - GetSrvVSchemaRequest.prototype.cell = ""; + GetSrvKeyspacesResponse.prototype.srv_keyspaces = $util.emptyObject; /** - * Creates a new GetSrvVSchemaRequest instance using the specified properties. + * Creates a new GetSrvKeyspacesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest instance + * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse instance */ - GetSrvVSchemaRequest.create = function create(properties) { - return new GetSrvVSchemaRequest(properties); + GetSrvKeyspacesResponse.create = function create(properties) { + return new GetSrvKeyspacesResponse(properties); }; /** - * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaRequest.encode = function encode(message, writer) { + GetSrvKeyspacesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.srv_keyspaces != null && Object.hasOwnProperty.call(message, "srv_keyspaces")) + for (let keys = Object.keys(message.srv_keyspaces), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.topodata.SrvKeyspace.encode(message.srv_keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. + * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaRequest.decode = function decode(reader, length) { + GetSrvKeyspacesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cell = reader.string(); + if (message.srv_keyspaces === $util.emptyObject) + message.srv_keyspaces = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.topodata.SrvKeyspace.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.srv_keyspaces[key] = value; break; } default: @@ -142513,122 +141147,153 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemaRequest message. + * Verifies a GetSrvKeyspacesResponse message. * @function verify - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemaRequest.verify = function verify(message) { + GetSrvKeyspacesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.srv_keyspaces != null && message.hasOwnProperty("srv_keyspaces")) { + if (!$util.isObject(message.srv_keyspaces)) + return "srv_keyspaces: object expected"; + let key = Object.keys(message.srv_keyspaces); + for (let i = 0; i < key.length; ++i) { + let error = $root.topodata.SrvKeyspace.verify(message.srv_keyspaces[key[i]]); + if (error) + return "srv_keyspaces." + error; + } + } return null; }; /** - * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse */ - GetSrvVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemaRequest) + GetSrvKeyspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspacesResponse) return object; - let message = new $root.vtctldata.GetSrvVSchemaRequest(); - if (object.cell != null) - message.cell = String(object.cell); + let message = new $root.vtctldata.GetSrvKeyspacesResponse(); + if (object.srv_keyspaces) { + if (typeof object.srv_keyspaces !== "object") + throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); + message.srv_keyspaces = {}; + for (let keys = Object.keys(object.srv_keyspaces), i = 0; i < keys.length; ++i) { + if (typeof object.srv_keyspaces[keys[i]] !== "object") + throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); + message.srv_keyspaces[keys[i]] = $root.topodata.SrvKeyspace.fromObject(object.srv_keyspaces[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.GetSrvVSchemaRequest} message GetSrvVSchemaRequest + * @param {vtctldata.GetSrvKeyspacesResponse} message GetSrvKeyspacesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemaRequest.toObject = function toObject(message, options) { + GetSrvKeyspacesResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (options.objects || options.defaults) + object.srv_keyspaces = {}; + let keys2; + if (message.srv_keyspaces && (keys2 = Object.keys(message.srv_keyspaces)).length) { + object.srv_keyspaces = {}; + for (let j = 0; j < keys2.length; ++j) + object.srv_keyspaces[keys2[j]] = $root.topodata.SrvKeyspace.toObject(message.srv_keyspaces[keys2[j]], options); + } return object; }; /** - * Converts this GetSrvVSchemaRequest to JSON. + * Converts this GetSrvKeyspacesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @instance * @returns {Object.} JSON object */ - GetSrvVSchemaRequest.prototype.toJSON = function toJSON() { + GetSrvKeyspacesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvVSchemaRequest + * Gets the default type url for GetSrvKeyspacesResponse * @function getTypeUrl - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvVSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvKeyspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvVSchemaRequest"; + return typeUrlPrefix + "/vtctldata.GetSrvKeyspacesResponse"; }; - return GetSrvVSchemaRequest; + return GetSrvKeyspacesResponse; })(); - vtctldata.GetSrvVSchemaResponse = (function() { + vtctldata.UpdateThrottlerConfigRequest = (function() { /** - * Properties of a GetSrvVSchemaResponse. + * Properties of an UpdateThrottlerConfigRequest. * @memberof vtctldata - * @interface IGetSrvVSchemaResponse - * @property {vschema.ISrvVSchema|null} [srv_v_schema] GetSrvVSchemaResponse srv_v_schema + * @interface IUpdateThrottlerConfigRequest + * @property {string|null} [keyspace] UpdateThrottlerConfigRequest keyspace + * @property {boolean|null} [enable] UpdateThrottlerConfigRequest enable + * @property {boolean|null} [disable] UpdateThrottlerConfigRequest disable + * @property {number|null} [threshold] UpdateThrottlerConfigRequest threshold + * @property {string|null} [custom_query] UpdateThrottlerConfigRequest custom_query + * @property {boolean|null} [custom_query_set] UpdateThrottlerConfigRequest custom_query_set + * @property {boolean|null} [check_as_check_self] UpdateThrottlerConfigRequest check_as_check_self + * @property {boolean|null} [check_as_check_shard] UpdateThrottlerConfigRequest check_as_check_shard + * @property {topodata.IThrottledAppRule|null} [throttled_app] UpdateThrottlerConfigRequest throttled_app + * @property {string|null} [metric_name] UpdateThrottlerConfigRequest metric_name + * @property {string|null} [app_name] UpdateThrottlerConfigRequest app_name + * @property {Array.|null} [app_checked_metrics] UpdateThrottlerConfigRequest app_checked_metrics */ /** - * Constructs a new GetSrvVSchemaResponse. + * Constructs a new UpdateThrottlerConfigRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemaResponse. - * @implements IGetSrvVSchemaResponse + * @classdesc Represents an UpdateThrottlerConfigRequest. + * @implements IUpdateThrottlerConfigRequest * @constructor - * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set */ - function GetSrvVSchemaResponse(properties) { + function UpdateThrottlerConfigRequest(properties) { + this.app_checked_metrics = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -142636,75 +141301,232 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvVSchemaResponse srv_v_schema. - * @member {vschema.ISrvVSchema|null|undefined} srv_v_schema - * @memberof vtctldata.GetSrvVSchemaResponse + * UpdateThrottlerConfigRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.UpdateThrottlerConfigRequest * @instance */ - GetSrvVSchemaResponse.prototype.srv_v_schema = null; + UpdateThrottlerConfigRequest.prototype.keyspace = ""; /** - * Creates a new GetSrvVSchemaResponse instance using the specified properties. + * UpdateThrottlerConfigRequest enable. + * @member {boolean} enable + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.enable = false; + + /** + * UpdateThrottlerConfigRequest disable. + * @member {boolean} disable + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.disable = false; + + /** + * UpdateThrottlerConfigRequest threshold. + * @member {number} threshold + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.threshold = 0; + + /** + * UpdateThrottlerConfigRequest custom_query. + * @member {string} custom_query + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.custom_query = ""; + + /** + * UpdateThrottlerConfigRequest custom_query_set. + * @member {boolean} custom_query_set + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.custom_query_set = false; + + /** + * UpdateThrottlerConfigRequest check_as_check_self. + * @member {boolean} check_as_check_self + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.check_as_check_self = false; + + /** + * UpdateThrottlerConfigRequest check_as_check_shard. + * @member {boolean} check_as_check_shard + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.check_as_check_shard = false; + + /** + * UpdateThrottlerConfigRequest throttled_app. + * @member {topodata.IThrottledAppRule|null|undefined} throttled_app + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.throttled_app = null; + + /** + * UpdateThrottlerConfigRequest metric_name. + * @member {string} metric_name + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.metric_name = ""; + + /** + * UpdateThrottlerConfigRequest app_name. + * @member {string} app_name + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.app_name = ""; + + /** + * UpdateThrottlerConfigRequest app_checked_metrics. + * @member {Array.} app_checked_metrics + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.app_checked_metrics = $util.emptyArray; + + /** + * Creates a new UpdateThrottlerConfigRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse instance + * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest instance */ - GetSrvVSchemaResponse.create = function create(properties) { - return new GetSrvVSchemaResponse(properties); + UpdateThrottlerConfigRequest.create = function create(properties) { + return new UpdateThrottlerConfigRequest(properties); }; /** - * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigRequest message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaResponse.encode = function encode(message, writer) { + UpdateThrottlerConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.srv_v_schema != null && Object.hasOwnProperty.call(message, "srv_v_schema")) - $root.vschema.SrvVSchema.encode(message.srv_v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.enable != null && Object.hasOwnProperty.call(message, "enable")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enable); + if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.disable); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.threshold); + if (message.custom_query != null && Object.hasOwnProperty.call(message, "custom_query")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.custom_query); + if (message.custom_query_set != null && Object.hasOwnProperty.call(message, "custom_query_set")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.custom_query_set); + if (message.check_as_check_self != null && Object.hasOwnProperty.call(message, "check_as_check_self")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.check_as_check_self); + if (message.check_as_check_shard != null && Object.hasOwnProperty.call(message, "check_as_check_shard")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.check_as_check_shard); + if (message.throttled_app != null && Object.hasOwnProperty.call(message, "throttled_app")) + $root.topodata.ThrottledAppRule.encode(message.throttled_app, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.metric_name != null && Object.hasOwnProperty.call(message, "metric_name")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.metric_name); + if (message.app_name != null && Object.hasOwnProperty.call(message, "app_name")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.app_name); + if (message.app_checked_metrics != null && message.app_checked_metrics.length) + for (let i = 0; i < message.app_checked_metrics.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.app_checked_metrics[i]); return writer; }; /** - * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateThrottlerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. + * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaResponse.decode = function decode(reader, length) { + UpdateThrottlerConfigRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.srv_v_schema = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + } + case 2: { + message.enable = reader.bool(); + break; + } + case 3: { + message.disable = reader.bool(); + break; + } + case 4: { + message.threshold = reader.double(); + break; + } + case 5: { + message.custom_query = reader.string(); + break; + } + case 6: { + message.custom_query_set = reader.bool(); + break; + } + case 7: { + message.check_as_check_self = reader.bool(); + break; + } + case 8: { + message.check_as_check_shard = reader.bool(); + break; + } + case 9: { + message.throttled_app = $root.topodata.ThrottledAppRule.decode(reader, reader.uint32()); + break; + } + case 10: { + message.metric_name = reader.string(); + break; + } + case 11: { + message.app_name = reader.string(); + break; + } + case 12: { + if (!(message.app_checked_metrics && message.app_checked_metrics.length)) + message.app_checked_metrics = []; + message.app_checked_metrics.push(reader.string()); break; } default: @@ -142716,128 +141538,228 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateThrottlerConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemaResponse message. + * Verifies an UpdateThrottlerConfigRequest message. * @function verify - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemaResponse.verify = function verify(message) { + UpdateThrottlerConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) { - let error = $root.vschema.SrvVSchema.verify(message.srv_v_schema); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.enable != null && message.hasOwnProperty("enable")) + if (typeof message.enable !== "boolean") + return "enable: boolean expected"; + if (message.disable != null && message.hasOwnProperty("disable")) + if (typeof message.disable !== "boolean") + return "disable: boolean expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (typeof message.threshold !== "number") + return "threshold: number expected"; + if (message.custom_query != null && message.hasOwnProperty("custom_query")) + if (!$util.isString(message.custom_query)) + return "custom_query: string expected"; + if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) + if (typeof message.custom_query_set !== "boolean") + return "custom_query_set: boolean expected"; + if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) + if (typeof message.check_as_check_self !== "boolean") + return "check_as_check_self: boolean expected"; + if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) + if (typeof message.check_as_check_shard !== "boolean") + return "check_as_check_shard: boolean expected"; + if (message.throttled_app != null && message.hasOwnProperty("throttled_app")) { + let error = $root.topodata.ThrottledAppRule.verify(message.throttled_app); if (error) - return "srv_v_schema." + error; + return "throttled_app." + error; + } + if (message.metric_name != null && message.hasOwnProperty("metric_name")) + if (!$util.isString(message.metric_name)) + return "metric_name: string expected"; + if (message.app_name != null && message.hasOwnProperty("app_name")) + if (!$util.isString(message.app_name)) + return "app_name: string expected"; + if (message.app_checked_metrics != null && message.hasOwnProperty("app_checked_metrics")) { + if (!Array.isArray(message.app_checked_metrics)) + return "app_checked_metrics: array expected"; + for (let i = 0; i < message.app_checked_metrics.length; ++i) + if (!$util.isString(message.app_checked_metrics[i])) + return "app_checked_metrics: string[] expected"; } return null; }; /** - * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateThrottlerConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest */ - GetSrvVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemaResponse) + UpdateThrottlerConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateThrottlerConfigRequest) return object; - let message = new $root.vtctldata.GetSrvVSchemaResponse(); - if (object.srv_v_schema != null) { - if (typeof object.srv_v_schema !== "object") - throw TypeError(".vtctldata.GetSrvVSchemaResponse.srv_v_schema: object expected"); - message.srv_v_schema = $root.vschema.SrvVSchema.fromObject(object.srv_v_schema); + let message = new $root.vtctldata.UpdateThrottlerConfigRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.enable != null) + message.enable = Boolean(object.enable); + if (object.disable != null) + message.disable = Boolean(object.disable); + if (object.threshold != null) + message.threshold = Number(object.threshold); + if (object.custom_query != null) + message.custom_query = String(object.custom_query); + if (object.custom_query_set != null) + message.custom_query_set = Boolean(object.custom_query_set); + if (object.check_as_check_self != null) + message.check_as_check_self = Boolean(object.check_as_check_self); + if (object.check_as_check_shard != null) + message.check_as_check_shard = Boolean(object.check_as_check_shard); + if (object.throttled_app != null) { + if (typeof object.throttled_app !== "object") + throw TypeError(".vtctldata.UpdateThrottlerConfigRequest.throttled_app: object expected"); + message.throttled_app = $root.topodata.ThrottledAppRule.fromObject(object.throttled_app); + } + if (object.metric_name != null) + message.metric_name = String(object.metric_name); + if (object.app_name != null) + message.app_name = String(object.app_name); + if (object.app_checked_metrics) { + if (!Array.isArray(object.app_checked_metrics)) + throw TypeError(".vtctldata.UpdateThrottlerConfigRequest.app_checked_metrics: array expected"); + message.app_checked_metrics = []; + for (let i = 0; i < object.app_checked_metrics.length; ++i) + message.app_checked_metrics[i] = String(object.app_checked_metrics[i]); } return message; }; /** - * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateThrottlerConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.GetSrvVSchemaResponse} message GetSrvVSchemaResponse + * @param {vtctldata.UpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemaResponse.toObject = function toObject(message, options) { + UpdateThrottlerConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.srv_v_schema = null; - if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) - object.srv_v_schema = $root.vschema.SrvVSchema.toObject(message.srv_v_schema, options); + if (options.arrays || options.defaults) + object.app_checked_metrics = []; + if (options.defaults) { + object.keyspace = ""; + object.enable = false; + object.disable = false; + object.threshold = 0; + object.custom_query = ""; + object.custom_query_set = false; + object.check_as_check_self = false; + object.check_as_check_shard = false; + object.throttled_app = null; + object.metric_name = ""; + object.app_name = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.enable != null && message.hasOwnProperty("enable")) + object.enable = message.enable; + if (message.disable != null && message.hasOwnProperty("disable")) + object.disable = message.disable; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; + if (message.custom_query != null && message.hasOwnProperty("custom_query")) + object.custom_query = message.custom_query; + if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) + object.custom_query_set = message.custom_query_set; + if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) + object.check_as_check_self = message.check_as_check_self; + if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) + object.check_as_check_shard = message.check_as_check_shard; + if (message.throttled_app != null && message.hasOwnProperty("throttled_app")) + object.throttled_app = $root.topodata.ThrottledAppRule.toObject(message.throttled_app, options); + if (message.metric_name != null && message.hasOwnProperty("metric_name")) + object.metric_name = message.metric_name; + if (message.app_name != null && message.hasOwnProperty("app_name")) + object.app_name = message.app_name; + if (message.app_checked_metrics && message.app_checked_metrics.length) { + object.app_checked_metrics = []; + for (let j = 0; j < message.app_checked_metrics.length; ++j) + object.app_checked_metrics[j] = message.app_checked_metrics[j]; + } return object; }; /** - * Converts this GetSrvVSchemaResponse to JSON. + * Converts this UpdateThrottlerConfigRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @instance * @returns {Object.} JSON object */ - GetSrvVSchemaResponse.prototype.toJSON = function toJSON() { + UpdateThrottlerConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvVSchemaResponse + * Gets the default type url for UpdateThrottlerConfigRequest * @function getTypeUrl - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvVSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateThrottlerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvVSchemaResponse"; + return typeUrlPrefix + "/vtctldata.UpdateThrottlerConfigRequest"; }; - return GetSrvVSchemaResponse; + return UpdateThrottlerConfigRequest; })(); - vtctldata.GetSrvVSchemasRequest = (function() { + vtctldata.UpdateThrottlerConfigResponse = (function() { /** - * Properties of a GetSrvVSchemasRequest. + * Properties of an UpdateThrottlerConfigResponse. * @memberof vtctldata - * @interface IGetSrvVSchemasRequest - * @property {Array.|null} [cells] GetSrvVSchemasRequest cells + * @interface IUpdateThrottlerConfigResponse */ /** - * Constructs a new GetSrvVSchemasRequest. + * Constructs a new UpdateThrottlerConfigResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemasRequest. - * @implements IGetSrvVSchemasRequest + * @classdesc Represents an UpdateThrottlerConfigResponse. + * @implements IUpdateThrottlerConfigResponse * @constructor - * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set + * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set */ - function GetSrvVSchemasRequest(properties) { - this.cells = []; + function UpdateThrottlerConfigResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -142845,80 +141767,63 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvVSchemasRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvVSchemasRequest - * @instance - */ - GetSrvVSchemasRequest.prototype.cells = $util.emptyArray; - - /** - * Creates a new GetSrvVSchemasRequest instance using the specified properties. + * Creates a new UpdateThrottlerConfigResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest instance + * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse instance */ - GetSrvVSchemasRequest.create = function create(properties) { - return new GetSrvVSchemasRequest(properties); + UpdateThrottlerConfigResponse.create = function create(properties) { + return new UpdateThrottlerConfigResponse(properties); }; /** - * Encodes the specified GetSrvVSchemasRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigResponse message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasRequest.encode = function encode(message, writer) { + UpdateThrottlerConfigResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (let i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified GetSrvVSchemasRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateThrottlerConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer. + * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasRequest.decode = function decode(reader, length) { + UpdateThrottlerConfigResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - } default: reader.skipType(tag & 7); break; @@ -142928,135 +141833,109 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateThrottlerConfigResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemasRequest message. + * Verifies an UpdateThrottlerConfigResponse message. * @function verify - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemasRequest.verify = function verify(message) { + UpdateThrottlerConfigResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (let i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } return null; }; /** - * Creates a GetSrvVSchemasRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateThrottlerConfigResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse */ - GetSrvVSchemasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemasRequest) + UpdateThrottlerConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateThrottlerConfigResponse) return object; - let message = new $root.vtctldata.GetSrvVSchemasRequest(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvVSchemasRequest.cells: array expected"); - message.cells = []; - for (let i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - return message; + return new $root.vtctldata.UpdateThrottlerConfigResponse(); }; /** - * Creates a plain object from a GetSrvVSchemasRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateThrottlerConfigResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.GetSrvVSchemasRequest} message GetSrvVSchemasRequest + * @param {vtctldata.UpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemasRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (let j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - return object; + UpdateThrottlerConfigResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetSrvVSchemasRequest to JSON. + * Converts this UpdateThrottlerConfigResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @instance * @returns {Object.} JSON object */ - GetSrvVSchemasRequest.prototype.toJSON = function toJSON() { + UpdateThrottlerConfigResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvVSchemasRequest + * Gets the default type url for UpdateThrottlerConfigResponse * @function getTypeUrl - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvVSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateThrottlerConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvVSchemasRequest"; + return typeUrlPrefix + "/vtctldata.UpdateThrottlerConfigResponse"; }; - return GetSrvVSchemasRequest; + return UpdateThrottlerConfigResponse; })(); - vtctldata.GetSrvVSchemasResponse = (function() { + vtctldata.GetSrvVSchemaRequest = (function() { /** - * Properties of a GetSrvVSchemasResponse. + * Properties of a GetSrvVSchemaRequest. * @memberof vtctldata - * @interface IGetSrvVSchemasResponse - * @property {Object.|null} [srv_v_schemas] GetSrvVSchemasResponse srv_v_schemas + * @interface IGetSrvVSchemaRequest + * @property {string|null} [cell] GetSrvVSchemaRequest cell */ /** - * Constructs a new GetSrvVSchemasResponse. + * Constructs a new GetSrvVSchemaRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemasResponse. - * @implements IGetSrvVSchemasResponse + * @classdesc Represents a GetSrvVSchemaRequest. + * @implements IGetSrvVSchemaRequest * @constructor - * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set */ - function GetSrvVSchemasResponse(properties) { - this.srv_v_schemas = {}; + function GetSrvVSchemaRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -143064,97 +141943,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetSrvVSchemasResponse srv_v_schemas. - * @member {Object.} srv_v_schemas - * @memberof vtctldata.GetSrvVSchemasResponse + * GetSrvVSchemaRequest cell. + * @member {string} cell + * @memberof vtctldata.GetSrvVSchemaRequest * @instance */ - GetSrvVSchemasResponse.prototype.srv_v_schemas = $util.emptyObject; + GetSrvVSchemaRequest.prototype.cell = ""; /** - * Creates a new GetSrvVSchemasResponse instance using the specified properties. + * Creates a new GetSrvVSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse instance + * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest instance */ - GetSrvVSchemasResponse.create = function create(properties) { - return new GetSrvVSchemasResponse(properties); + GetSrvVSchemaRequest.create = function create(properties) { + return new GetSrvVSchemaRequest(properties); }; /** - * Encodes the specified GetSrvVSchemasResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasResponse.encode = function encode(message, writer) { + GetSrvVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.srv_v_schemas != null && Object.hasOwnProperty.call(message, "srv_v_schemas")) - for (let keys = Object.keys(message.srv_v_schemas), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.SrvVSchema.encode(message.srv_v_schemas[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); return writer; }; /** - * Encodes the specified GetSrvVSchemasResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer. + * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvVSchemasResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasResponse(), key, value; - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.srv_v_schemas === $util.emptyObject) - message.srv_v_schemas = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.srv_v_schemas[key] = value; + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSrvVSchemaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cell = reader.string(); break; } default: @@ -143166,141 +142023,122 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemasResponse message. + * Verifies a GetSrvVSchemaRequest message. * @function verify - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemasResponse.verify = function verify(message) { + GetSrvVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.srv_v_schemas != null && message.hasOwnProperty("srv_v_schemas")) { - if (!$util.isObject(message.srv_v_schemas)) - return "srv_v_schemas: object expected"; - let key = Object.keys(message.srv_v_schemas); - for (let i = 0; i < key.length; ++i) { - let error = $root.vschema.SrvVSchema.verify(message.srv_v_schemas[key[i]]); - if (error) - return "srv_v_schemas." + error; - } - } + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a GetSrvVSchemasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest */ - GetSrvVSchemasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemasResponse) + GetSrvVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemaRequest) return object; - let message = new $root.vtctldata.GetSrvVSchemasResponse(); - if (object.srv_v_schemas) { - if (typeof object.srv_v_schemas !== "object") - throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); - message.srv_v_schemas = {}; - for (let keys = Object.keys(object.srv_v_schemas), i = 0; i < keys.length; ++i) { - if (typeof object.srv_v_schemas[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); - message.srv_v_schemas[keys[i]] = $root.vschema.SrvVSchema.fromObject(object.srv_v_schemas[keys[i]]); - } - } + let message = new $root.vtctldata.GetSrvVSchemaRequest(); + if (object.cell != null) + message.cell = String(object.cell); return message; }; /** - * Creates a plain object from a GetSrvVSchemasResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.GetSrvVSchemasResponse} message GetSrvVSchemasResponse + * @param {vtctldata.GetSrvVSchemaRequest} message GetSrvVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemasResponse.toObject = function toObject(message, options) { + GetSrvVSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) - object.srv_v_schemas = {}; - let keys2; - if (message.srv_v_schemas && (keys2 = Object.keys(message.srv_v_schemas)).length) { - object.srv_v_schemas = {}; - for (let j = 0; j < keys2.length; ++j) - object.srv_v_schemas[keys2[j]] = $root.vschema.SrvVSchema.toObject(message.srv_v_schemas[keys2[j]], options); - } + if (options.defaults) + object.cell = ""; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; return object; }; /** - * Converts this GetSrvVSchemasResponse to JSON. + * Converts this GetSrvVSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @instance * @returns {Object.} JSON object */ - GetSrvVSchemasResponse.prototype.toJSON = function toJSON() { + GetSrvVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSrvVSchemasResponse + * Gets the default type url for GetSrvVSchemaRequest * @function getTypeUrl - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSrvVSchemasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvVSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetSrvVSchemasResponse"; + return typeUrlPrefix + "/vtctldata.GetSrvVSchemaRequest"; }; - return GetSrvVSchemasResponse; + return GetSrvVSchemaRequest; })(); - vtctldata.GetTabletRequest = (function() { + vtctldata.GetSrvVSchemaResponse = (function() { /** - * Properties of a GetTabletRequest. + * Properties of a GetSrvVSchemaResponse. * @memberof vtctldata - * @interface IGetTabletRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetTabletRequest tablet_alias + * @interface IGetSrvVSchemaResponse + * @property {vschema.ISrvVSchema|null} [srv_v_schema] GetSrvVSchemaResponse srv_v_schema */ /** - * Constructs a new GetTabletRequest. + * Constructs a new GetSrvVSchemaResponse. * @memberof vtctldata - * @classdesc Represents a GetTabletRequest. - * @implements IGetTabletRequest + * @classdesc Represents a GetSrvVSchemaResponse. + * @implements IGetSrvVSchemaResponse * @constructor - * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set */ - function GetTabletRequest(properties) { + function GetSrvVSchemaResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -143308,75 +142146,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetTabletRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetTabletRequest + * GetSrvVSchemaResponse srv_v_schema. + * @member {vschema.ISrvVSchema|null|undefined} srv_v_schema + * @memberof vtctldata.GetSrvVSchemaResponse * @instance */ - GetTabletRequest.prototype.tablet_alias = null; + GetSrvVSchemaResponse.prototype.srv_v_schema = null; /** - * Creates a new GetTabletRequest instance using the specified properties. + * Creates a new GetSrvVSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set - * @returns {vtctldata.GetTabletRequest} GetTabletRequest instance + * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse instance */ - GetTabletRequest.create = function create(properties) { - return new GetTabletRequest(properties); + GetSrvVSchemaResponse.create = function create(properties) { + return new GetSrvVSchemaResponse(properties); }; /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletRequest.encode = function encode(message, writer) { + GetSrvVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.srv_v_schema != null && Object.hasOwnProperty.call(message, "srv_v_schema")) + $root.vschema.SrvVSchema.encode(message.srv_v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletRequest message from the specified reader or buffer. + * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletRequest} GetTabletRequest + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletRequest.decode = function decode(reader, length) { + GetSrvVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.srv_v_schema = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); break; } default: @@ -143388,127 +142226,128 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletRequest} GetTabletRequest + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletRequest message. + * Verifies a GetSrvVSchemaResponse message. * @function verify - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletRequest.verify = function verify(message) { + GetSrvVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) { + let error = $root.vschema.SrvVSchema.verify(message.srv_v_schema); if (error) - return "tablet_alias." + error; + return "srv_v_schema." + error; } return null; }; /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletRequest} GetTabletRequest + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse */ - GetTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletRequest) + GetSrvVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemaResponse) return object; - let message = new $root.vtctldata.GetTabletRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetTabletRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + let message = new $root.vtctldata.GetSrvVSchemaResponse(); + if (object.srv_v_schema != null) { + if (typeof object.srv_v_schema !== "object") + throw TypeError(".vtctldata.GetSrvVSchemaResponse.srv_v_schema: object expected"); + message.srv_v_schema = $root.vschema.SrvVSchema.fromObject(object.srv_v_schema); } return message; }; /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.GetTabletRequest} message GetTabletRequest + * @param {vtctldata.GetSrvVSchemaResponse} message GetSrvVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletRequest.toObject = function toObject(message, options) { + GetSrvVSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + object.srv_v_schema = null; + if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) + object.srv_v_schema = $root.vschema.SrvVSchema.toObject(message.srv_v_schema, options); return object; }; /** - * Converts this GetTabletRequest to JSON. + * Converts this GetSrvVSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @instance * @returns {Object.} JSON object */ - GetTabletRequest.prototype.toJSON = function toJSON() { + GetSrvVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTabletRequest + * Gets the default type url for GetSrvVSchemaResponse * @function getTypeUrl - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTabletRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvVSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetTabletRequest"; + return typeUrlPrefix + "/vtctldata.GetSrvVSchemaResponse"; }; - return GetTabletRequest; + return GetSrvVSchemaResponse; })(); - vtctldata.GetTabletResponse = (function() { + vtctldata.GetSrvVSchemasRequest = (function() { /** - * Properties of a GetTabletResponse. + * Properties of a GetSrvVSchemasRequest. * @memberof vtctldata - * @interface IGetTabletResponse - * @property {topodata.ITablet|null} [tablet] GetTabletResponse tablet + * @interface IGetSrvVSchemasRequest + * @property {Array.|null} [cells] GetSrvVSchemasRequest cells */ /** - * Constructs a new GetTabletResponse. + * Constructs a new GetSrvVSchemasRequest. * @memberof vtctldata - * @classdesc Represents a GetTabletResponse. - * @implements IGetTabletResponse + * @classdesc Represents a GetSrvVSchemasRequest. + * @implements IGetSrvVSchemasRequest * @constructor - * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set */ - function GetTabletResponse(properties) { + function GetSrvVSchemasRequest(properties) { + this.cells = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -143516,75 +142355,78 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetTabletResponse tablet. - * @member {topodata.ITablet|null|undefined} tablet - * @memberof vtctldata.GetTabletResponse + * GetSrvVSchemasRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetSrvVSchemasRequest * @instance */ - GetTabletResponse.prototype.tablet = null; + GetSrvVSchemasRequest.prototype.cells = $util.emptyArray; /** - * Creates a new GetTabletResponse instance using the specified properties. + * Creates a new GetSrvVSchemasRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set - * @returns {vtctldata.GetTabletResponse} GetTabletResponse instance + * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest instance */ - GetTabletResponse.create = function create(properties) { - return new GetTabletResponse(properties); + GetSrvVSchemasRequest.create = function create(properties) { + return new GetSrvVSchemasRequest(properties); }; /** - * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemasRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletResponse.encode = function encode(message, writer) { + GetSrvVSchemasRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cells != null && message.cells.length) + for (let i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemasRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletResponse message from the specified reader or buffer. + * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletResponse} GetTabletResponse + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletResponse.decode = function decode(reader, length) { + GetSrvVSchemasRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + case 2: { + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); break; } default: @@ -143596,134 +142438,135 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletResponse} GetTabletResponse + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemasRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletResponse message. + * Verifies a GetSrvVSchemasRequest message. * @function verify - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletResponse.verify = function verify(message) { + GetSrvVSchemasRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - let error = $root.topodata.Tablet.verify(message.tablet); - if (error) - return "tablet." + error; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (let i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } return null; }; /** - * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletResponse} GetTabletResponse + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest */ - GetTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletResponse) + GetSrvVSchemasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemasRequest) return object; - let message = new $root.vtctldata.GetTabletResponse(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.GetTabletResponse.tablet: object expected"); - message.tablet = $root.topodata.Tablet.fromObject(object.tablet); + let message = new $root.vtctldata.GetSrvVSchemasRequest(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetSrvVSchemasRequest.cells: array expected"); + message.cells = []; + for (let i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } return message; }; /** - * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemasRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.GetTabletResponse} message GetTabletResponse + * @param {vtctldata.GetSrvVSchemasRequest} message GetSrvVSchemasRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletResponse.toObject = function toObject(message, options) { + GetSrvVSchemasRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.Tablet.toObject(message.tablet, options); + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (let j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } return object; }; /** - * Converts this GetTabletResponse to JSON. + * Converts this GetSrvVSchemasRequest to JSON. * @function toJSON - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @instance * @returns {Object.} JSON object */ - GetTabletResponse.prototype.toJSON = function toJSON() { + GetSrvVSchemasRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTabletResponse + * Gets the default type url for GetSrvVSchemasRequest * @function getTypeUrl - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTabletResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvVSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetTabletResponse"; + return typeUrlPrefix + "/vtctldata.GetSrvVSchemasRequest"; }; - return GetTabletResponse; + return GetSrvVSchemasRequest; })(); - vtctldata.GetTabletsRequest = (function() { + vtctldata.GetSrvVSchemasResponse = (function() { /** - * Properties of a GetTabletsRequest. + * Properties of a GetSrvVSchemasResponse. * @memberof vtctldata - * @interface IGetTabletsRequest - * @property {string|null} [keyspace] GetTabletsRequest keyspace - * @property {string|null} [shard] GetTabletsRequest shard - * @property {Array.|null} [cells] GetTabletsRequest cells - * @property {boolean|null} [strict] GetTabletsRequest strict - * @property {Array.|null} [tablet_aliases] GetTabletsRequest tablet_aliases - * @property {topodata.TabletType|null} [tablet_type] GetTabletsRequest tablet_type + * @interface IGetSrvVSchemasResponse + * @property {Object.|null} [srv_v_schemas] GetSrvVSchemasResponse srv_v_schemas */ /** - * Constructs a new GetTabletsRequest. + * Constructs a new GetSrvVSchemasResponse. * @memberof vtctldata - * @classdesc Represents a GetTabletsRequest. - * @implements IGetTabletsRequest + * @classdesc Represents a GetSrvVSchemasResponse. + * @implements IGetSrvVSchemasResponse * @constructor - * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set */ - function GetTabletsRequest(properties) { - this.cells = []; - this.tablet_aliases = []; + function GetSrvVSchemasResponse(properties) { + this.srv_v_schemas = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -143731,151 +142574,97 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetTabletsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.keyspace = ""; - - /** - * GetTabletsRequest shard. - * @member {string} shard - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.shard = ""; - - /** - * GetTabletsRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.cells = $util.emptyArray; - - /** - * GetTabletsRequest strict. - * @member {boolean} strict - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.strict = false; - - /** - * GetTabletsRequest tablet_aliases. - * @member {Array.} tablet_aliases - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.tablet_aliases = $util.emptyArray; - - /** - * GetTabletsRequest tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof vtctldata.GetTabletsRequest + * GetSrvVSchemasResponse srv_v_schemas. + * @member {Object.} srv_v_schemas + * @memberof vtctldata.GetSrvVSchemasResponse * @instance */ - GetTabletsRequest.prototype.tablet_type = 0; + GetSrvVSchemasResponse.prototype.srv_v_schemas = $util.emptyObject; /** - * Creates a new GetTabletsRequest instance using the specified properties. + * Creates a new GetSrvVSchemasResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest instance + * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse instance */ - GetTabletsRequest.create = function create(properties) { - return new GetTabletsRequest(properties); + GetSrvVSchemasResponse.create = function create(properties) { + return new GetSrvVSchemasResponse(properties); }; /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemasResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsRequest.encode = function encode(message, writer) { + GetSrvVSchemasResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.cells != null && message.cells.length) - for (let i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); - if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strict); - if (message.tablet_aliases != null && message.tablet_aliases.length) - for (let i = 0; i < message.tablet_aliases.length; ++i) - $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.tablet_type); + if (message.srv_v_schemas != null && Object.hasOwnProperty.call(message, "srv_v_schemas")) + for (let keys = Object.keys(message.srv_v_schemas), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vschema.SrvVSchema.encode(message.srv_v_schemas[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemasResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. + * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsRequest.decode = function decode(reader, length) { + GetSrvVSchemasResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasResponse(), key, value; while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyspace = reader.string(); - break; - } - case 2: { - message.shard = reader.string(); - break; - } - case 3: { - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - } - case 4: { - message.strict = reader.bool(); - break; - } - case 5: { - if (!(message.tablet_aliases && message.tablet_aliases.length)) - message.tablet_aliases = []; - message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - } - case 6: { - message.tablet_type = reader.int32(); + if (message.srv_v_schemas === $util.emptyObject) + message.srv_v_schemas = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.srv_v_schemas[key] = value; break; } default: @@ -143887,259 +142676,141 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemasResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletsRequest message. + * Verifies a GetSrvVSchemasResponse message. * @function verify - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletsRequest.verify = function verify(message) { + GetSrvVSchemasResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (let i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - if (message.strict != null && message.hasOwnProperty("strict")) - if (typeof message.strict !== "boolean") - return "strict: boolean expected"; - if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { - if (!Array.isArray(message.tablet_aliases)) - return "tablet_aliases: array expected"; - for (let i = 0; i < message.tablet_aliases.length; ++i) { - let error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); + if (message.srv_v_schemas != null && message.hasOwnProperty("srv_v_schemas")) { + if (!$util.isObject(message.srv_v_schemas)) + return "srv_v_schemas: object expected"; + let key = Object.keys(message.srv_v_schemas); + for (let i = 0; i < key.length; ++i) { + let error = $root.vschema.SrvVSchema.verify(message.srv_v_schemas[key[i]]); if (error) - return "tablet_aliases." + error; + return "srv_v_schemas." + error; } } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } return null; }; /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemasResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse */ - GetTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletsRequest) + GetSrvVSchemasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemasResponse) return object; - let message = new $root.vtctldata.GetTabletsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetTabletsRequest.cells: array expected"); - message.cells = []; - for (let i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - if (object.strict != null) - message.strict = Boolean(object.strict); - if (object.tablet_aliases) { - if (!Array.isArray(object.tablet_aliases)) - throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: array expected"); - message.tablet_aliases = []; - for (let i = 0; i < object.tablet_aliases.length; ++i) { - if (typeof object.tablet_aliases[i] !== "object") - throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: object expected"); - message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); - } - } - switch (object.tablet_type) { - default: - if (typeof object.tablet_type === "number") { - message.tablet_type = object.tablet_type; - break; + let message = new $root.vtctldata.GetSrvVSchemasResponse(); + if (object.srv_v_schemas) { + if (typeof object.srv_v_schemas !== "object") + throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); + message.srv_v_schemas = {}; + for (let keys = Object.keys(object.srv_v_schemas), i = 0; i < keys.length; ++i) { + if (typeof object.srv_v_schemas[keys[i]] !== "object") + throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); + message.srv_v_schemas[keys[i]] = $root.vschema.SrvVSchema.fromObject(object.srv_v_schemas[keys[i]]); } - break; - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "PRIMARY": - case 1: - message.tablet_type = 1; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {vtctldata.GetTabletsRequest} message GetTabletsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.cells = []; - object.tablet_aliases = []; - } - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.strict = false; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.cells && message.cells.length) { - object.cells = []; - for (let j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; } - if (message.strict != null && message.hasOwnProperty("strict")) - object.strict = message.strict; - if (message.tablet_aliases && message.tablet_aliases.length) { - object.tablet_aliases = []; - for (let j = 0; j < message.tablet_aliases.length; ++j) - object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); + return message; + }; + + /** + * Creates a plain object from a GetSrvVSchemasResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetSrvVSchemasResponse + * @static + * @param {vtctldata.GetSrvVSchemasResponse} message GetSrvVSchemasResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSrvVSchemasResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.objects || options.defaults) + object.srv_v_schemas = {}; + let keys2; + if (message.srv_v_schemas && (keys2 = Object.keys(message.srv_v_schemas)).length) { + object.srv_v_schemas = {}; + for (let j = 0; j < keys2.length; ++j) + object.srv_v_schemas[keys2[j]] = $root.vschema.SrvVSchema.toObject(message.srv_v_schemas[keys2[j]], options); } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] === undefined ? message.tablet_type : $root.topodata.TabletType[message.tablet_type] : message.tablet_type; return object; }; /** - * Converts this GetTabletsRequest to JSON. + * Converts this GetSrvVSchemasResponse to JSON. * @function toJSON - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @instance * @returns {Object.} JSON object */ - GetTabletsRequest.prototype.toJSON = function toJSON() { + GetSrvVSchemasResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTabletsRequest + * Gets the default type url for GetSrvVSchemasResponse * @function getTypeUrl - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTabletsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSrvVSchemasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetTabletsRequest"; + return typeUrlPrefix + "/vtctldata.GetSrvVSchemasResponse"; }; - return GetTabletsRequest; + return GetSrvVSchemasResponse; })(); - vtctldata.GetTabletsResponse = (function() { + vtctldata.GetTabletRequest = (function() { /** - * Properties of a GetTabletsResponse. + * Properties of a GetTabletRequest. * @memberof vtctldata - * @interface IGetTabletsResponse - * @property {Array.|null} [tablets] GetTabletsResponse tablets + * @interface IGetTabletRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetTabletRequest tablet_alias */ /** - * Constructs a new GetTabletsResponse. + * Constructs a new GetTabletRequest. * @memberof vtctldata - * @classdesc Represents a GetTabletsResponse. - * @implements IGetTabletsResponse + * @classdesc Represents a GetTabletRequest. + * @implements IGetTabletRequest * @constructor - * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set + * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set */ - function GetTabletsResponse(properties) { - this.tablets = []; + function GetTabletRequest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -144147,78 +142818,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetTabletsResponse tablets. - * @member {Array.} tablets - * @memberof vtctldata.GetTabletsResponse + * GetTabletRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetTabletRequest * @instance */ - GetTabletsResponse.prototype.tablets = $util.emptyArray; + GetTabletRequest.prototype.tablet_alias = null; /** - * Creates a new GetTabletsResponse instance using the specified properties. + * Creates a new GetTabletRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse instance + * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set + * @returns {vtctldata.GetTabletRequest} GetTabletRequest instance */ - GetTabletsResponse.create = function create(properties) { - return new GetTabletsResponse(properties); + GetTabletRequest.create = function create(properties) { + return new GetTabletRequest(properties); }; /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsResponse.encode = function encode(message, writer) { + GetTabletRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablets != null && message.tablets.length) - for (let i = 0; i < message.tablets.length; ++i) - $root.topodata.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. + * Decodes a GetTabletRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @returns {vtctldata.GetTabletRequest} GetTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsResponse.decode = function decode(reader, length) { + GetTabletRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsResponse(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.tablets && message.tablets.length)) - message.tablets = []; - message.tablets.push($root.topodata.Tablet.decode(reader, reader.uint32())); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; } default: @@ -144230,139 +142898,127 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @returns {vtctldata.GetTabletRequest} GetTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { + GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletsResponse message. + * Verifies a GetTabletRequest message. * @function verify - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletsResponse.verify = function verify(message) { + GetTabletRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablets != null && message.hasOwnProperty("tablets")) { - if (!Array.isArray(message.tablets)) - return "tablets: array expected"; - for (let i = 0; i < message.tablets.length; ++i) { - let error = $root.topodata.Tablet.verify(message.tablets[i]); - if (error) - return "tablets." + error; - } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } return null; }; /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @returns {vtctldata.GetTabletRequest} GetTabletRequest */ - GetTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletsResponse) + GetTabletRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletRequest) return object; - let message = new $root.vtctldata.GetTabletsResponse(); - if (object.tablets) { - if (!Array.isArray(object.tablets)) - throw TypeError(".vtctldata.GetTabletsResponse.tablets: array expected"); - message.tablets = []; - for (let i = 0; i < object.tablets.length; ++i) { - if (typeof object.tablets[i] !== "object") - throw TypeError(".vtctldata.GetTabletsResponse.tablets: object expected"); - message.tablets[i] = $root.topodata.Tablet.fromObject(object.tablets[i]); - } + let message = new $root.vtctldata.GetTabletRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetTabletRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.GetTabletsResponse} message GetTabletsResponse + * @param {vtctldata.GetTabletRequest} message GetTabletRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletsResponse.toObject = function toObject(message, options) { + GetTabletRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) - object.tablets = []; - if (message.tablets && message.tablets.length) { - object.tablets = []; - for (let j = 0; j < message.tablets.length; ++j) - object.tablets[j] = $root.topodata.Tablet.toObject(message.tablets[j], options); - } + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this GetTabletsResponse to JSON. + * Converts this GetTabletRequest to JSON. * @function toJSON - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @instance * @returns {Object.} JSON object */ - GetTabletsResponse.prototype.toJSON = function toJSON() { + GetTabletRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTabletsResponse + * Gets the default type url for GetTabletRequest * @function getTypeUrl - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTabletsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTabletRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetTabletsResponse"; + return typeUrlPrefix + "/vtctldata.GetTabletRequest"; }; - return GetTabletsResponse; + return GetTabletRequest; })(); - vtctldata.GetThrottlerStatusRequest = (function() { + vtctldata.GetTabletResponse = (function() { /** - * Properties of a GetThrottlerStatusRequest. + * Properties of a GetTabletResponse. * @memberof vtctldata - * @interface IGetThrottlerStatusRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetThrottlerStatusRequest tablet_alias + * @interface IGetTabletResponse + * @property {topodata.ITablet|null} [tablet] GetTabletResponse tablet */ /** - * Constructs a new GetThrottlerStatusRequest. + * Constructs a new GetTabletResponse. * @memberof vtctldata - * @classdesc Represents a GetThrottlerStatusRequest. - * @implements IGetThrottlerStatusRequest + * @classdesc Represents a GetTabletResponse. + * @implements IGetTabletResponse * @constructor - * @param {vtctldata.IGetThrottlerStatusRequest=} [properties] Properties to set + * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set */ - function GetThrottlerStatusRequest(properties) { + function GetTabletResponse(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -144370,75 +143026,75 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetThrottlerStatusRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetThrottlerStatusRequest + * GetTabletResponse tablet. + * @member {topodata.ITablet|null|undefined} tablet + * @memberof vtctldata.GetTabletResponse * @instance */ - GetThrottlerStatusRequest.prototype.tablet_alias = null; + GetTabletResponse.prototype.tablet = null; /** - * Creates a new GetThrottlerStatusRequest instance using the specified properties. + * Creates a new GetTabletResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.IGetThrottlerStatusRequest=} [properties] Properties to set - * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest instance + * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set + * @returns {vtctldata.GetTabletResponse} GetTabletResponse instance */ - GetThrottlerStatusRequest.create = function create(properties) { - return new GetThrottlerStatusRequest(properties); + GetTabletResponse.create = function create(properties) { + return new GetTabletResponse(properties); }; /** - * Encodes the specified GetThrottlerStatusRequest message. Does not implicitly {@link vtctldata.GetThrottlerStatusRequest.verify|verify} messages. + * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.IGetThrottlerStatusRequest} message GetThrottlerStatusRequest message or plain object to encode + * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetThrottlerStatusRequest.encode = function encode(message, writer) { + GetTabletResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetThrottlerStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusRequest.verify|verify} messages. + * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.IGetThrottlerStatusRequest} message GetThrottlerStatusRequest message or plain object to encode + * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetThrottlerStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetThrottlerStatusRequest message from the specified reader or buffer. + * Decodes a GetTabletResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest + * @returns {vtctldata.GetTabletResponse} GetTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetThrottlerStatusRequest.decode = function decode(reader, length) { + GetTabletResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusRequest(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletResponse(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); break; } default: @@ -144450,150 +143106,134 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetThrottlerStatusRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest + * @returns {vtctldata.GetTabletResponse} GetTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetThrottlerStatusRequest.decodeDelimited = function decodeDelimited(reader) { + GetTabletResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetThrottlerStatusRequest message. + * Verifies a GetTabletResponse message. * @function verify - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetThrottlerStatusRequest.verify = function verify(message) { + GetTabletResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (message.tablet != null && message.hasOwnProperty("tablet")) { + let error = $root.topodata.Tablet.verify(message.tablet); if (error) - return "tablet_alias." + error; + return "tablet." + error; } return null; }; /** - * Creates a GetThrottlerStatusRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest + * @returns {vtctldata.GetTabletResponse} GetTabletResponse */ - GetThrottlerStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetThrottlerStatusRequest) + GetTabletResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletResponse) return object; - let message = new $root.vtctldata.GetThrottlerStatusRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + let message = new $root.vtctldata.GetTabletResponse(); + if (object.tablet != null) { + if (typeof object.tablet !== "object") + throw TypeError(".vtctldata.GetTabletResponse.tablet: object expected"); + message.tablet = $root.topodata.Tablet.fromObject(object.tablet); } return message; }; /** - * Creates a plain object from a GetThrottlerStatusRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.GetThrottlerStatusRequest} message GetThrottlerStatusRequest + * @param {vtctldata.GetTabletResponse} message GetTabletResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetThrottlerStatusRequest.toObject = function toObject(message, options) { + GetTabletResponse.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + object.tablet = null; + if (message.tablet != null && message.hasOwnProperty("tablet")) + object.tablet = $root.topodata.Tablet.toObject(message.tablet, options); return object; }; /** - * Converts this GetThrottlerStatusRequest to JSON. + * Converts this GetTabletResponse to JSON. * @function toJSON - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @instance * @returns {Object.} JSON object */ - GetThrottlerStatusRequest.prototype.toJSON = function toJSON() { + GetTabletResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetThrottlerStatusRequest + * Gets the default type url for GetTabletResponse * @function getTypeUrl - * @memberof vtctldata.GetThrottlerStatusRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetThrottlerStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTabletResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetThrottlerStatusRequest"; + return typeUrlPrefix + "/vtctldata.GetTabletResponse"; }; - return GetThrottlerStatusRequest; + return GetTabletResponse; })(); - vtctldata.GetThrottlerStatusResponse = (function() { + vtctldata.GetTabletsRequest = (function() { /** - * Properties of a GetThrottlerStatusResponse. + * Properties of a GetTabletsRequest. * @memberof vtctldata - * @interface IGetThrottlerStatusResponse - * @property {string|null} [tablet_alias] GetThrottlerStatusResponse tablet_alias - * @property {string|null} [keyspace] GetThrottlerStatusResponse keyspace - * @property {string|null} [shard] GetThrottlerStatusResponse shard - * @property {boolean|null} [is_leader] GetThrottlerStatusResponse is_leader - * @property {boolean|null} [is_open] GetThrottlerStatusResponse is_open - * @property {boolean|null} [is_enabled] GetThrottlerStatusResponse is_enabled - * @property {boolean|null} [is_dormant] GetThrottlerStatusResponse is_dormant - * @property {string|null} [lag_metric_query] GetThrottlerStatusResponse lag_metric_query - * @property {string|null} [custom_metric_query] GetThrottlerStatusResponse custom_metric_query - * @property {number|null} [default_threshold] GetThrottlerStatusResponse default_threshold - * @property {string|null} [metric_name_used_as_default] GetThrottlerStatusResponse metric_name_used_as_default - * @property {Object.|null} [aggregated_metrics] GetThrottlerStatusResponse aggregated_metrics - * @property {Object.|null} [metric_thresholds] GetThrottlerStatusResponse metric_thresholds - * @property {Object.|null} [metrics_health] GetThrottlerStatusResponse metrics_health - * @property {Object.|null} [throttled_apps] GetThrottlerStatusResponse throttled_apps - * @property {Object.|null} [app_checked_metrics] GetThrottlerStatusResponse app_checked_metrics - * @property {boolean|null} [recently_checked] GetThrottlerStatusResponse recently_checked - * @property {Object.|null} [recent_apps] GetThrottlerStatusResponse recent_apps + * @interface IGetTabletsRequest + * @property {string|null} [keyspace] GetTabletsRequest keyspace + * @property {string|null} [shard] GetTabletsRequest shard + * @property {Array.|null} [cells] GetTabletsRequest cells + * @property {boolean|null} [strict] GetTabletsRequest strict + * @property {Array.|null} [tablet_aliases] GetTabletsRequest tablet_aliases + * @property {topodata.TabletType|null} [tablet_type] GetTabletsRequest tablet_type */ /** - * Constructs a new GetThrottlerStatusResponse. + * Constructs a new GetTabletsRequest. * @memberof vtctldata - * @classdesc Represents a GetThrottlerStatusResponse. - * @implements IGetThrottlerStatusResponse + * @classdesc Represents a GetTabletsRequest. + * @implements IGetTabletsRequest * @constructor - * @param {vtctldata.IGetThrottlerStatusResponse=} [properties] Properties to set + * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set */ - function GetThrottlerStatusResponse(properties) { - this.aggregated_metrics = {}; - this.metric_thresholds = {}; - this.metrics_health = {}; - this.throttled_apps = {}; - this.app_checked_metrics = {}; - this.recent_apps = {}; + function GetTabletsRequest(properties) { + this.cells = []; + this.tablet_aliases = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -144601,441 +143241,151 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * GetThrottlerStatusResponse tablet_alias. - * @member {string} tablet_alias - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.tablet_alias = ""; - - /** - * GetThrottlerStatusResponse keyspace. + * GetTabletsRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @instance */ - GetThrottlerStatusResponse.prototype.keyspace = ""; + GetTabletsRequest.prototype.keyspace = ""; /** - * GetThrottlerStatusResponse shard. + * GetTabletsRequest shard. * @member {string} shard - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.shard = ""; - - /** - * GetThrottlerStatusResponse is_leader. - * @member {boolean} is_leader - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.is_leader = false; - - /** - * GetThrottlerStatusResponse is_open. - * @member {boolean} is_open - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.is_open = false; - - /** - * GetThrottlerStatusResponse is_enabled. - * @member {boolean} is_enabled - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.is_enabled = false; - - /** - * GetThrottlerStatusResponse is_dormant. - * @member {boolean} is_dormant - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.is_dormant = false; - - /** - * GetThrottlerStatusResponse lag_metric_query. - * @member {string} lag_metric_query - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.lag_metric_query = ""; - - /** - * GetThrottlerStatusResponse custom_metric_query. - * @member {string} custom_metric_query - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.custom_metric_query = ""; - - /** - * GetThrottlerStatusResponse default_threshold. - * @member {number} default_threshold - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.default_threshold = 0; - - /** - * GetThrottlerStatusResponse metric_name_used_as_default. - * @member {string} metric_name_used_as_default - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.metric_name_used_as_default = ""; - - /** - * GetThrottlerStatusResponse aggregated_metrics. - * @member {Object.} aggregated_metrics - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.aggregated_metrics = $util.emptyObject; - - /** - * GetThrottlerStatusResponse metric_thresholds. - * @member {Object.} metric_thresholds - * @memberof vtctldata.GetThrottlerStatusResponse - * @instance - */ - GetThrottlerStatusResponse.prototype.metric_thresholds = $util.emptyObject; - - /** - * GetThrottlerStatusResponse metrics_health. - * @member {Object.} metrics_health - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @instance */ - GetThrottlerStatusResponse.prototype.metrics_health = $util.emptyObject; + GetTabletsRequest.prototype.shard = ""; /** - * GetThrottlerStatusResponse throttled_apps. - * @member {Object.} throttled_apps - * @memberof vtctldata.GetThrottlerStatusResponse + * GetTabletsRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetTabletsRequest * @instance */ - GetThrottlerStatusResponse.prototype.throttled_apps = $util.emptyObject; + GetTabletsRequest.prototype.cells = $util.emptyArray; /** - * GetThrottlerStatusResponse app_checked_metrics. - * @member {Object.} app_checked_metrics - * @memberof vtctldata.GetThrottlerStatusResponse + * GetTabletsRequest strict. + * @member {boolean} strict + * @memberof vtctldata.GetTabletsRequest * @instance */ - GetThrottlerStatusResponse.prototype.app_checked_metrics = $util.emptyObject; + GetTabletsRequest.prototype.strict = false; /** - * GetThrottlerStatusResponse recently_checked. - * @member {boolean} recently_checked - * @memberof vtctldata.GetThrottlerStatusResponse + * GetTabletsRequest tablet_aliases. + * @member {Array.} tablet_aliases + * @memberof vtctldata.GetTabletsRequest * @instance */ - GetThrottlerStatusResponse.prototype.recently_checked = false; + GetTabletsRequest.prototype.tablet_aliases = $util.emptyArray; /** - * GetThrottlerStatusResponse recent_apps. - * @member {Object.} recent_apps - * @memberof vtctldata.GetThrottlerStatusResponse + * GetTabletsRequest tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof vtctldata.GetTabletsRequest * @instance */ - GetThrottlerStatusResponse.prototype.recent_apps = $util.emptyObject; + GetTabletsRequest.prototype.tablet_type = 0; /** - * Creates a new GetThrottlerStatusResponse instance using the specified properties. + * Creates a new GetTabletsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.IGetThrottlerStatusResponse=} [properties] Properties to set - * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse instance + * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest instance */ - GetThrottlerStatusResponse.create = function create(properties) { - return new GetThrottlerStatusResponse(properties); + GetTabletsRequest.create = function create(properties) { + return new GetTabletsRequest(properties); }; /** - * Encodes the specified GetThrottlerStatusResponse message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. + * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.IGetThrottlerStatusResponse} message GetThrottlerStatusResponse message or plain object to encode + * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetThrottlerStatusResponse.encode = function encode(message, writer) { + GetTabletsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tablet_alias); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); - if (message.is_leader != null && Object.hasOwnProperty.call(message, "is_leader")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_leader); - if (message.is_open != null && Object.hasOwnProperty.call(message, "is_open")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_open); - if (message.is_enabled != null && Object.hasOwnProperty.call(message, "is_enabled")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.is_enabled); - if (message.is_dormant != null && Object.hasOwnProperty.call(message, "is_dormant")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_dormant); - if (message.lag_metric_query != null && Object.hasOwnProperty.call(message, "lag_metric_query")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.lag_metric_query); - if (message.custom_metric_query != null && Object.hasOwnProperty.call(message, "custom_metric_query")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.custom_metric_query); - if (message.default_threshold != null && Object.hasOwnProperty.call(message, "default_threshold")) - writer.uint32(/* id 10, wireType 1 =*/81).double(message.default_threshold); - if (message.metric_name_used_as_default != null && Object.hasOwnProperty.call(message, "metric_name_used_as_default")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.metric_name_used_as_default); - if (message.aggregated_metrics != null && Object.hasOwnProperty.call(message, "aggregated_metrics")) - for (let keys = Object.keys(message.aggregated_metrics), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.GetThrottlerStatusResponse.MetricResult.encode(message.aggregated_metrics[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.metric_thresholds != null && Object.hasOwnProperty.call(message, "metric_thresholds")) - for (let keys = Object.keys(message.metric_thresholds), i = 0; i < keys.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 1 =*/17).double(message.metric_thresholds[keys[i]]).ldelim(); - if (message.metrics_health != null && Object.hasOwnProperty.call(message, "metrics_health")) - for (let keys = Object.keys(message.metrics_health), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.GetThrottlerStatusResponse.MetricHealth.encode(message.metrics_health[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.throttled_apps != null && Object.hasOwnProperty.call(message, "throttled_apps")) - for (let keys = Object.keys(message.throttled_apps), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.ThrottledAppRule.encode(message.throttled_apps[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.app_checked_metrics != null && Object.hasOwnProperty.call(message, "app_checked_metrics")) - for (let keys = Object.keys(message.app_checked_metrics), i = 0; i < keys.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.app_checked_metrics[keys[i]]).ldelim(); - if (message.recently_checked != null && Object.hasOwnProperty.call(message, "recently_checked")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.recently_checked); - if (message.recent_apps != null && Object.hasOwnProperty.call(message, "recent_apps")) - for (let keys = Object.keys(message.recent_apps), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.GetThrottlerStatusResponse.RecentApp.encode(message.recent_apps[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.cells != null && message.cells.length) + for (let i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); + if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strict); + if (message.tablet_aliases != null && message.tablet_aliases.length) + for (let i = 0; i < message.tablet_aliases.length; ++i) + $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.tablet_type); return writer; }; /** - * Encodes the specified GetThrottlerStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. + * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.IGetThrottlerStatusResponse} message GetThrottlerStatusResponse message or plain object to encode + * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetThrottlerStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer. + * Decodes a GetTabletsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetThrottlerStatusResponse.decode = function decode(reader, length) { + GetTabletsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusResponse(), key, value; + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsRequest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tablet_alias = reader.string(); - break; - } - case 2: { message.keyspace = reader.string(); break; } - case 3: { + case 2: { message.shard = reader.string(); break; } - case 4: { - message.is_leader = reader.bool(); - break; - } - case 5: { - message.is_open = reader.bool(); - break; - } - case 6: { - message.is_enabled = reader.bool(); - break; - } - case 7: { - message.is_dormant = reader.bool(); - break; - } - case 8: { - message.lag_metric_query = reader.string(); - break; - } - case 9: { - message.custom_metric_query = reader.string(); - break; - } - case 10: { - message.default_threshold = reader.double(); - break; - } - case 11: { - message.metric_name_used_as_default = reader.string(); - break; - } - case 12: { - if (message.aggregated_metrics === $util.emptyObject) - message.aggregated_metrics = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.GetThrottlerStatusResponse.MetricResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.aggregated_metrics[key] = value; - break; - } - case 13: { - if (message.metric_thresholds === $util.emptyObject) - message.metric_thresholds = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.double(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metric_thresholds[key] = value; - break; - } - case 14: { - if (message.metrics_health === $util.emptyObject) - message.metrics_health = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.GetThrottlerStatusResponse.MetricHealth.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metrics_health[key] = value; - break; - } - case 15: { - if (message.throttled_apps === $util.emptyObject) - message.throttled_apps = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.ThrottledAppRule.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.throttled_apps[key] = value; + case 3: { + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); break; } - case 16: { - if (message.app_checked_metrics === $util.emptyObject) - message.app_checked_metrics = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.app_checked_metrics[key] = value; + case 4: { + message.strict = reader.bool(); break; } - case 17: { - message.recently_checked = reader.bool(); + case 5: { + if (!(message.tablet_aliases && message.tablet_aliases.length)) + message.tablet_aliases = []; + message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); break; } - case 18: { - if (message.recent_apps === $util.emptyObject) - message.recent_apps = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.GetThrottlerStatusResponse.RecentApp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.recent_apps[key] = value; + case 6: { + message.tablet_type = reader.int32(); break; } default: @@ -145047,1043 +143397,876 @@ export const vtctldata = $root.vtctldata = (() => { }; /** - * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetThrottlerStatusResponse.decodeDelimited = function decodeDelimited(reader) { + GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetThrottlerStatusResponse message. + * Verifies a GetTabletsRequest message. * @function verify - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetThrottlerStatusResponse.verify = function verify(message) { + GetTabletsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - if (!$util.isString(message.tablet_alias)) - return "tablet_alias: 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.is_leader != null && message.hasOwnProperty("is_leader")) - if (typeof message.is_leader !== "boolean") - return "is_leader: boolean expected"; - if (message.is_open != null && message.hasOwnProperty("is_open")) - if (typeof message.is_open !== "boolean") - return "is_open: boolean expected"; - if (message.is_enabled != null && message.hasOwnProperty("is_enabled")) - if (typeof message.is_enabled !== "boolean") - return "is_enabled: boolean expected"; - if (message.is_dormant != null && message.hasOwnProperty("is_dormant")) - if (typeof message.is_dormant !== "boolean") - return "is_dormant: boolean expected"; - if (message.lag_metric_query != null && message.hasOwnProperty("lag_metric_query")) - if (!$util.isString(message.lag_metric_query)) - return "lag_metric_query: string expected"; - if (message.custom_metric_query != null && message.hasOwnProperty("custom_metric_query")) - if (!$util.isString(message.custom_metric_query)) - return "custom_metric_query: string expected"; - if (message.default_threshold != null && message.hasOwnProperty("default_threshold")) - if (typeof message.default_threshold !== "number") - return "default_threshold: number expected"; - if (message.metric_name_used_as_default != null && message.hasOwnProperty("metric_name_used_as_default")) - if (!$util.isString(message.metric_name_used_as_default)) - return "metric_name_used_as_default: string expected"; - if (message.aggregated_metrics != null && message.hasOwnProperty("aggregated_metrics")) { - if (!$util.isObject(message.aggregated_metrics)) - return "aggregated_metrics: object expected"; - let key = Object.keys(message.aggregated_metrics); - for (let i = 0; i < key.length; ++i) { - let error = $root.vtctldata.GetThrottlerStatusResponse.MetricResult.verify(message.aggregated_metrics[key[i]]); - if (error) - return "aggregated_metrics." + error; - } - } - if (message.metric_thresholds != null && message.hasOwnProperty("metric_thresholds")) { - if (!$util.isObject(message.metric_thresholds)) - return "metric_thresholds: object expected"; - let key = Object.keys(message.metric_thresholds); - for (let i = 0; i < key.length; ++i) - if (typeof message.metric_thresholds[key[i]] !== "number") - return "metric_thresholds: number{k:string} expected"; - } - if (message.metrics_health != null && message.hasOwnProperty("metrics_health")) { - if (!$util.isObject(message.metrics_health)) - return "metrics_health: object expected"; - let key = Object.keys(message.metrics_health); - for (let i = 0; i < key.length; ++i) { - let error = $root.vtctldata.GetThrottlerStatusResponse.MetricHealth.verify(message.metrics_health[key[i]]); - if (error) - return "metrics_health." + error; - } + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (let i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } - if (message.throttled_apps != null && message.hasOwnProperty("throttled_apps")) { - if (!$util.isObject(message.throttled_apps)) - return "throttled_apps: object expected"; - let key = Object.keys(message.throttled_apps); - for (let i = 0; i < key.length; ++i) { - let error = $root.topodata.ThrottledAppRule.verify(message.throttled_apps[key[i]]); + if (message.strict != null && message.hasOwnProperty("strict")) + if (typeof message.strict !== "boolean") + return "strict: boolean expected"; + if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { + if (!Array.isArray(message.tablet_aliases)) + return "tablet_aliases: array expected"; + for (let i = 0; i < message.tablet_aliases.length; ++i) { + let error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); if (error) - return "throttled_apps." + error; + return "tablet_aliases." + error; } } - if (message.app_checked_metrics != null && message.hasOwnProperty("app_checked_metrics")) { - if (!$util.isObject(message.app_checked_metrics)) - return "app_checked_metrics: object expected"; - let key = Object.keys(message.app_checked_metrics); - for (let i = 0; i < key.length; ++i) - if (!$util.isString(message.app_checked_metrics[key[i]])) - return "app_checked_metrics: string{k:string} expected"; - } - if (message.recently_checked != null && message.hasOwnProperty("recently_checked")) - if (typeof message.recently_checked !== "boolean") - return "recently_checked: boolean expected"; - if (message.recent_apps != null && message.hasOwnProperty("recent_apps")) { - if (!$util.isObject(message.recent_apps)) - return "recent_apps: object expected"; - let key = Object.keys(message.recent_apps); - for (let i = 0; i < key.length; ++i) { - let error = $root.vtctldata.GetThrottlerStatusResponse.RecentApp.verify(message.recent_apps[key[i]]); - if (error) - return "recent_apps." + error; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + switch (message.tablet_type) { + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - } return null; }; /** - * Creates a GetThrottlerStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest */ - GetThrottlerStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetThrottlerStatusResponse) + GetTabletsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletsRequest) return object; - let message = new $root.vtctldata.GetThrottlerStatusResponse(); - if (object.tablet_alias != null) - message.tablet_alias = String(object.tablet_alias); + let message = new $root.vtctldata.GetTabletsRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) message.shard = String(object.shard); - if (object.is_leader != null) - message.is_leader = Boolean(object.is_leader); - if (object.is_open != null) - message.is_open = Boolean(object.is_open); - if (object.is_enabled != null) - message.is_enabled = Boolean(object.is_enabled); - if (object.is_dormant != null) - message.is_dormant = Boolean(object.is_dormant); - if (object.lag_metric_query != null) - message.lag_metric_query = String(object.lag_metric_query); - if (object.custom_metric_query != null) - message.custom_metric_query = String(object.custom_metric_query); - if (object.default_threshold != null) - message.default_threshold = Number(object.default_threshold); - if (object.metric_name_used_as_default != null) - message.metric_name_used_as_default = String(object.metric_name_used_as_default); - if (object.aggregated_metrics) { - if (typeof object.aggregated_metrics !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.aggregated_metrics: object expected"); - message.aggregated_metrics = {}; - for (let keys = Object.keys(object.aggregated_metrics), i = 0; i < keys.length; ++i) { - if (typeof object.aggregated_metrics[keys[i]] !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.aggregated_metrics: object expected"); - message.aggregated_metrics[keys[i]] = $root.vtctldata.GetThrottlerStatusResponse.MetricResult.fromObject(object.aggregated_metrics[keys[i]]); - } - } - if (object.metric_thresholds) { - if (typeof object.metric_thresholds !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.metric_thresholds: object expected"); - message.metric_thresholds = {}; - for (let keys = Object.keys(object.metric_thresholds), i = 0; i < keys.length; ++i) - message.metric_thresholds[keys[i]] = Number(object.metric_thresholds[keys[i]]); - } - if (object.metrics_health) { - if (typeof object.metrics_health !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.metrics_health: object expected"); - message.metrics_health = {}; - for (let keys = Object.keys(object.metrics_health), i = 0; i < keys.length; ++i) { - if (typeof object.metrics_health[keys[i]] !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.metrics_health: object expected"); - message.metrics_health[keys[i]] = $root.vtctldata.GetThrottlerStatusResponse.MetricHealth.fromObject(object.metrics_health[keys[i]]); - } + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetTabletsRequest.cells: array expected"); + message.cells = []; + for (let i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } - if (object.throttled_apps) { - if (typeof object.throttled_apps !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.throttled_apps: object expected"); - message.throttled_apps = {}; - for (let keys = Object.keys(object.throttled_apps), i = 0; i < keys.length; ++i) { - if (typeof object.throttled_apps[keys[i]] !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.throttled_apps: object expected"); - message.throttled_apps[keys[i]] = $root.topodata.ThrottledAppRule.fromObject(object.throttled_apps[keys[i]]); + if (object.strict != null) + message.strict = Boolean(object.strict); + if (object.tablet_aliases) { + if (!Array.isArray(object.tablet_aliases)) + throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: array expected"); + message.tablet_aliases = []; + for (let i = 0; i < object.tablet_aliases.length; ++i) { + if (typeof object.tablet_aliases[i] !== "object") + throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: object expected"); + message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); } } - if (object.app_checked_metrics) { - if (typeof object.app_checked_metrics !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.app_checked_metrics: object expected"); - message.app_checked_metrics = {}; - for (let keys = Object.keys(object.app_checked_metrics), i = 0; i < keys.length; ++i) - message.app_checked_metrics[keys[i]] = String(object.app_checked_metrics[keys[i]]); - } - if (object.recently_checked != null) - message.recently_checked = Boolean(object.recently_checked); - if (object.recent_apps) { - if (typeof object.recent_apps !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.recent_apps: object expected"); - message.recent_apps = {}; - for (let keys = Object.keys(object.recent_apps), i = 0; i < keys.length; ++i) { - if (typeof object.recent_apps[keys[i]] !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.recent_apps: object expected"); - message.recent_apps[keys[i]] = $root.vtctldata.GetThrottlerStatusResponse.RecentApp.fromObject(object.recent_apps[keys[i]]); + switch (object.tablet_type) { + default: + if (typeof object.tablet_type === "number") { + message.tablet_type = object.tablet_type; + break; } + break; + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "PRIMARY": + case 1: + message.tablet_type = 1; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; } return message; }; /** - * Creates a plain object from a GetThrottlerStatusResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.GetThrottlerStatusResponse} message GetThrottlerStatusResponse + * @param {vtctldata.GetTabletsRequest} message GetTabletsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetThrottlerStatusResponse.toObject = function toObject(message, options) { + GetTabletsRequest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.objects || options.defaults) { - object.aggregated_metrics = {}; - object.metric_thresholds = {}; - object.metrics_health = {}; - object.throttled_apps = {}; - object.app_checked_metrics = {}; - object.recent_apps = {}; + if (options.arrays || options.defaults) { + object.cells = []; + object.tablet_aliases = []; } if (options.defaults) { - object.tablet_alias = ""; object.keyspace = ""; object.shard = ""; - object.is_leader = false; - object.is_open = false; - object.is_enabled = false; - object.is_dormant = false; - object.lag_metric_query = ""; - object.custom_metric_query = ""; - object.default_threshold = 0; - object.metric_name_used_as_default = ""; - object.recently_checked = false; + object.strict = false; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = message.tablet_alias; if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) object.shard = message.shard; - if (message.is_leader != null && message.hasOwnProperty("is_leader")) - object.is_leader = message.is_leader; - if (message.is_open != null && message.hasOwnProperty("is_open")) - object.is_open = message.is_open; - if (message.is_enabled != null && message.hasOwnProperty("is_enabled")) - object.is_enabled = message.is_enabled; - if (message.is_dormant != null && message.hasOwnProperty("is_dormant")) - object.is_dormant = message.is_dormant; - if (message.lag_metric_query != null && message.hasOwnProperty("lag_metric_query")) - object.lag_metric_query = message.lag_metric_query; - if (message.custom_metric_query != null && message.hasOwnProperty("custom_metric_query")) - object.custom_metric_query = message.custom_metric_query; - if (message.default_threshold != null && message.hasOwnProperty("default_threshold")) - object.default_threshold = options.json && !isFinite(message.default_threshold) ? String(message.default_threshold) : message.default_threshold; - if (message.metric_name_used_as_default != null && message.hasOwnProperty("metric_name_used_as_default")) - object.metric_name_used_as_default = message.metric_name_used_as_default; - let keys2; - if (message.aggregated_metrics && (keys2 = Object.keys(message.aggregated_metrics)).length) { - object.aggregated_metrics = {}; - for (let j = 0; j < keys2.length; ++j) - object.aggregated_metrics[keys2[j]] = $root.vtctldata.GetThrottlerStatusResponse.MetricResult.toObject(message.aggregated_metrics[keys2[j]], options); - } - if (message.metric_thresholds && (keys2 = Object.keys(message.metric_thresholds)).length) { - object.metric_thresholds = {}; - for (let j = 0; j < keys2.length; ++j) - object.metric_thresholds[keys2[j]] = options.json && !isFinite(message.metric_thresholds[keys2[j]]) ? String(message.metric_thresholds[keys2[j]]) : message.metric_thresholds[keys2[j]]; - } - if (message.metrics_health && (keys2 = Object.keys(message.metrics_health)).length) { - object.metrics_health = {}; - for (let j = 0; j < keys2.length; ++j) - object.metrics_health[keys2[j]] = $root.vtctldata.GetThrottlerStatusResponse.MetricHealth.toObject(message.metrics_health[keys2[j]], options); - } - if (message.throttled_apps && (keys2 = Object.keys(message.throttled_apps)).length) { - object.throttled_apps = {}; - for (let j = 0; j < keys2.length; ++j) - object.throttled_apps[keys2[j]] = $root.topodata.ThrottledAppRule.toObject(message.throttled_apps[keys2[j]], options); - } - if (message.app_checked_metrics && (keys2 = Object.keys(message.app_checked_metrics)).length) { - object.app_checked_metrics = {}; - for (let j = 0; j < keys2.length; ++j) - object.app_checked_metrics[keys2[j]] = message.app_checked_metrics[keys2[j]]; + if (message.cells && message.cells.length) { + object.cells = []; + for (let j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } - if (message.recently_checked != null && message.hasOwnProperty("recently_checked")) - object.recently_checked = message.recently_checked; - if (message.recent_apps && (keys2 = Object.keys(message.recent_apps)).length) { - object.recent_apps = {}; - for (let j = 0; j < keys2.length; ++j) - object.recent_apps[keys2[j]] = $root.vtctldata.GetThrottlerStatusResponse.RecentApp.toObject(message.recent_apps[keys2[j]], options); + if (message.strict != null && message.hasOwnProperty("strict")) + object.strict = message.strict; + if (message.tablet_aliases && message.tablet_aliases.length) { + object.tablet_aliases = []; + for (let j = 0; j < message.tablet_aliases.length; ++j) + object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); } + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] === undefined ? message.tablet_type : $root.topodata.TabletType[message.tablet_type] : message.tablet_type; return object; }; /** - * Converts this GetThrottlerStatusResponse to JSON. + * Converts this GetTabletsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @instance * @returns {Object.} JSON object */ - GetThrottlerStatusResponse.prototype.toJSON = function toJSON() { + GetTabletsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetThrottlerStatusResponse + * Gets the default type url for GetTabletsRequest * @function getTypeUrl - * @memberof vtctldata.GetThrottlerStatusResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetThrottlerStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTabletsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/vtctldata.GetThrottlerStatusResponse"; + return typeUrlPrefix + "/vtctldata.GetTabletsRequest"; }; - GetThrottlerStatusResponse.MetricResult = (function() { - - /** - * Properties of a MetricResult. - * @memberof vtctldata.GetThrottlerStatusResponse - * @interface IMetricResult - * @property {number|null} [value] MetricResult value - * @property {string|null} [error] MetricResult error - */ - - /** - * Constructs a new MetricResult. - * @memberof vtctldata.GetThrottlerStatusResponse - * @classdesc Represents a MetricResult. - * @implements IMetricResult - * @constructor - * @param {vtctldata.GetThrottlerStatusResponse.IMetricResult=} [properties] Properties to set - */ - function MetricResult(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricResult value. - * @member {number} value - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @instance - */ - MetricResult.prototype.value = 0; - - /** - * MetricResult error. - * @member {string} error - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @instance - */ - MetricResult.prototype.error = ""; - - /** - * Creates a new MetricResult instance using the specified properties. - * @function create - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IMetricResult=} [properties] Properties to set - * @returns {vtctldata.GetThrottlerStatusResponse.MetricResult} MetricResult instance - */ - MetricResult.create = function create(properties) { - return new MetricResult(properties); - }; - - /** - * Encodes the specified MetricResult message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricResult.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IMetricResult} message MetricResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); - return writer; - }; + return GetTabletsRequest; + })(); - /** - * Encodes the specified MetricResult message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricResult.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IMetricResult} message MetricResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + vtctldata.GetTabletsResponse = (function() { - /** - * Decodes a MetricResult message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetThrottlerStatusResponse.MetricResult} MetricResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusResponse.MetricResult(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - case 2: { - message.error = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a GetTabletsResponse. + * @memberof vtctldata + * @interface IGetTabletsResponse + * @property {Array.|null} [tablets] GetTabletsResponse tablets + */ - /** - * Decodes a MetricResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetThrottlerStatusResponse.MetricResult} MetricResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new GetTabletsResponse. + * @memberof vtctldata + * @classdesc Represents a GetTabletsResponse. + * @implements IGetTabletsResponse + * @constructor + * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set + */ + function GetTabletsResponse(properties) { + this.tablets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a MetricResult message. - * @function verify - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; + /** + * GetTabletsResponse tablets. + * @member {Array.} tablets + * @memberof vtctldata.GetTabletsResponse + * @instance + */ + GetTabletsResponse.prototype.tablets = $util.emptyArray; - /** - * Creates a MetricResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetThrottlerStatusResponse.MetricResult} MetricResult - */ - MetricResult.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetThrottlerStatusResponse.MetricResult) - return object; - let message = new $root.vtctldata.GetThrottlerStatusResponse.MetricResult(); - if (object.value != null) - message.value = Number(object.value); - if (object.error != null) - message.error = String(object.error); - return message; - }; + /** + * Creates a new GetTabletsResponse instance using the specified properties. + * @function create + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse instance + */ + GetTabletsResponse.create = function create(properties) { + return new GetTabletsResponse(properties); + }; - /** - * Creates a plain object from a MetricResult message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {vtctldata.GetThrottlerStatusResponse.MetricResult} message MetricResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.value = 0; - object.error = ""; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; + /** + * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTabletsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tablets != null && message.tablets.length) + for (let i = 0; i < message.tablets.length; ++i) + $root.topodata.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Converts this MetricResult to JSON. - * @function toJSON - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @instance - * @returns {Object.} JSON object - */ - MetricResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for MetricResult - * @function getTypeUrl - * @memberof vtctldata.GetThrottlerStatusResponse.MetricResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Decodes a GetTabletsResponse message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTabletsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tablets && message.tablets.length)) + message.tablets = []; + message.tablets.push($root.topodata.Tablet.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/vtctldata.GetThrottlerStatusResponse.MetricResult"; - }; + } + return message; + }; - return MetricResult; - })(); + /** + * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - GetThrottlerStatusResponse.MetricHealth = (function() { + /** + * Verifies a GetTabletsResponse message. + * @function verify + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTabletsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablets != null && message.hasOwnProperty("tablets")) { + if (!Array.isArray(message.tablets)) + return "tablets: array expected"; + for (let i = 0; i < message.tablets.length; ++i) { + let error = $root.topodata.Tablet.verify(message.tablets[i]); + if (error) + return "tablets." + error; + } + } + return null; + }; - /** - * Properties of a MetricHealth. - * @memberof vtctldata.GetThrottlerStatusResponse - * @interface IMetricHealth - * @property {vttime.ITime|null} [last_healthy_at] MetricHealth last_healthy_at - * @property {number|Long|null} [seconds_since_last_healthy] MetricHealth seconds_since_last_healthy - */ + /** + * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + */ + GetTabletsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletsResponse) + return object; + let message = new $root.vtctldata.GetTabletsResponse(); + if (object.tablets) { + if (!Array.isArray(object.tablets)) + throw TypeError(".vtctldata.GetTabletsResponse.tablets: array expected"); + message.tablets = []; + for (let i = 0; i < object.tablets.length; ++i) { + if (typeof object.tablets[i] !== "object") + throw TypeError(".vtctldata.GetTabletsResponse.tablets: object expected"); + message.tablets[i] = $root.topodata.Tablet.fromObject(object.tablets[i]); + } + } + return message; + }; - /** - * Constructs a new MetricHealth. - * @memberof vtctldata.GetThrottlerStatusResponse - * @classdesc Represents a MetricHealth. - * @implements IMetricHealth - * @constructor - * @param {vtctldata.GetThrottlerStatusResponse.IMetricHealth=} [properties] Properties to set - */ - function MetricHealth(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {vtctldata.GetTabletsResponse} message GetTabletsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTabletsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.tablets = []; + if (message.tablets && message.tablets.length) { + object.tablets = []; + for (let j = 0; j < message.tablets.length; ++j) + object.tablets[j] = $root.topodata.Tablet.toObject(message.tablets[j], options); } + return object; + }; - /** - * MetricHealth last_healthy_at. - * @member {vttime.ITime|null|undefined} last_healthy_at - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @instance - */ - MetricHealth.prototype.last_healthy_at = null; + /** + * Converts this GetTabletsResponse to JSON. + * @function toJSON + * @memberof vtctldata.GetTabletsResponse + * @instance + * @returns {Object.} JSON object + */ + GetTabletsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MetricHealth seconds_since_last_healthy. - * @member {number|Long} seconds_since_last_healthy - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @instance - */ - MetricHealth.prototype.seconds_since_last_healthy = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Gets the default type url for GetTabletsResponse + * @function getTypeUrl + * @memberof vtctldata.GetTabletsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTabletsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.GetTabletsResponse"; + }; - /** - * Creates a new MetricHealth instance using the specified properties. - * @function create - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IMetricHealth=} [properties] Properties to set - * @returns {vtctldata.GetThrottlerStatusResponse.MetricHealth} MetricHealth instance - */ - MetricHealth.create = function create(properties) { - return new MetricHealth(properties); - }; + return GetTabletsResponse; + })(); - /** - * Encodes the specified MetricHealth message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricHealth.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IMetricHealth} message MetricHealth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricHealth.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.last_healthy_at != null && Object.hasOwnProperty.call(message, "last_healthy_at")) - $root.vttime.Time.encode(message.last_healthy_at, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.seconds_since_last_healthy != null && Object.hasOwnProperty.call(message, "seconds_since_last_healthy")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.seconds_since_last_healthy); - return writer; - }; + vtctldata.GetThrottlerStatusRequest = (function() { - /** - * Encodes the specified MetricHealth message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.MetricHealth.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IMetricHealth} message MetricHealth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricHealth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a GetThrottlerStatusRequest. + * @memberof vtctldata + * @interface IGetThrottlerStatusRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetThrottlerStatusRequest tablet_alias + */ - /** - * Decodes a MetricHealth message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetThrottlerStatusResponse.MetricHealth} MetricHealth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricHealth.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusResponse.MetricHealth(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.last_healthy_at = $root.vttime.Time.decode(reader, reader.uint32()); - break; - } - case 2: { - message.seconds_since_last_healthy = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new GetThrottlerStatusRequest. + * @memberof vtctldata + * @classdesc Represents a GetThrottlerStatusRequest. + * @implements IGetThrottlerStatusRequest + * @constructor + * @param {vtctldata.IGetThrottlerStatusRequest=} [properties] Properties to set + */ + function GetThrottlerStatusRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a MetricHealth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetThrottlerStatusResponse.MetricHealth} MetricHealth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricHealth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GetThrottlerStatusRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetThrottlerStatusRequest + * @instance + */ + GetThrottlerStatusRequest.prototype.tablet_alias = null; - /** - * Verifies a MetricHealth message. - * @function verify - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricHealth.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.last_healthy_at != null && message.hasOwnProperty("last_healthy_at")) { - let error = $root.vttime.Time.verify(message.last_healthy_at); - if (error) - return "last_healthy_at." + error; - } - if (message.seconds_since_last_healthy != null && message.hasOwnProperty("seconds_since_last_healthy")) - if (!$util.isInteger(message.seconds_since_last_healthy) && !(message.seconds_since_last_healthy && $util.isInteger(message.seconds_since_last_healthy.low) && $util.isInteger(message.seconds_since_last_healthy.high))) - return "seconds_since_last_healthy: integer|Long expected"; - return null; - }; + /** + * Creates a new GetThrottlerStatusRequest instance using the specified properties. + * @function create + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {vtctldata.IGetThrottlerStatusRequest=} [properties] Properties to set + * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest instance + */ + GetThrottlerStatusRequest.create = function create(properties) { + return new GetThrottlerStatusRequest(properties); + }; - /** - * Creates a MetricHealth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetThrottlerStatusResponse.MetricHealth} MetricHealth - */ - MetricHealth.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetThrottlerStatusResponse.MetricHealth) - return object; - let message = new $root.vtctldata.GetThrottlerStatusResponse.MetricHealth(); - if (object.last_healthy_at != null) { - if (typeof object.last_healthy_at !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.MetricHealth.last_healthy_at: object expected"); - message.last_healthy_at = $root.vttime.Time.fromObject(object.last_healthy_at); - } - if (object.seconds_since_last_healthy != null) - if ($util.Long) - (message.seconds_since_last_healthy = $util.Long.fromValue(object.seconds_since_last_healthy)).unsigned = false; - else if (typeof object.seconds_since_last_healthy === "string") - message.seconds_since_last_healthy = parseInt(object.seconds_since_last_healthy, 10); - else if (typeof object.seconds_since_last_healthy === "number") - message.seconds_since_last_healthy = object.seconds_since_last_healthy; - else if (typeof object.seconds_since_last_healthy === "object") - message.seconds_since_last_healthy = new $util.LongBits(object.seconds_since_last_healthy.low >>> 0, object.seconds_since_last_healthy.high >>> 0).toNumber(); - return message; - }; + /** + * Encodes the specified GetThrottlerStatusRequest message. Does not implicitly {@link vtctldata.GetThrottlerStatusRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {vtctldata.IGetThrottlerStatusRequest} message GetThrottlerStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetThrottlerStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a MetricHealth message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {vtctldata.GetThrottlerStatusResponse.MetricHealth} message MetricHealth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricHealth.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.last_healthy_at = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.seconds_since_last_healthy = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds_since_last_healthy = options.longs === String ? "0" : 0; + /** + * Encodes the specified GetThrottlerStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {vtctldata.IGetThrottlerStatusRequest} message GetThrottlerStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetThrottlerStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetThrottlerStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetThrottlerStatusRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.last_healthy_at != null && message.hasOwnProperty("last_healthy_at")) - object.last_healthy_at = $root.vttime.Time.toObject(message.last_healthy_at, options); - if (message.seconds_since_last_healthy != null && message.hasOwnProperty("seconds_since_last_healthy")) - if (typeof message.seconds_since_last_healthy === "number") - object.seconds_since_last_healthy = options.longs === String ? String(message.seconds_since_last_healthy) : message.seconds_since_last_healthy; - else - object.seconds_since_last_healthy = options.longs === String ? $util.Long.prototype.toString.call(message.seconds_since_last_healthy) : options.longs === Number ? new $util.LongBits(message.seconds_since_last_healthy.low >>> 0, message.seconds_since_last_healthy.high >>> 0).toNumber() : message.seconds_since_last_healthy; - return object; - }; + } + return message; + }; - /** - * Converts this MetricHealth to JSON. - * @function toJSON - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @instance - * @returns {Object.} JSON object - */ - MetricHealth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a GetThrottlerStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetThrottlerStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for MetricHealth - * @function getTypeUrl - * @memberof vtctldata.GetThrottlerStatusResponse.MetricHealth - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricHealth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.GetThrottlerStatusResponse.MetricHealth"; - }; + /** + * Verifies a GetThrottlerStatusRequest message. + * @function verify + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetThrottlerStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + let error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + return null; + }; - return MetricHealth; - })(); + /** + * Creates a GetThrottlerStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetThrottlerStatusRequest} GetThrottlerStatusRequest + */ + GetThrottlerStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetThrottlerStatusRequest) + return object; + let message = new $root.vtctldata.GetThrottlerStatusRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetThrottlerStatusRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + return message; + }; - GetThrottlerStatusResponse.RecentApp = (function() { + /** + * Creates a plain object from a GetThrottlerStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {vtctldata.GetThrottlerStatusRequest} message GetThrottlerStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetThrottlerStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + return object; + }; - /** - * Properties of a RecentApp. - * @memberof vtctldata.GetThrottlerStatusResponse - * @interface IRecentApp - * @property {vttime.ITime|null} [checked_at] RecentApp checked_at - * @property {number|null} [status_code] RecentApp status_code - */ + /** + * Converts this GetThrottlerStatusRequest to JSON. + * @function toJSON + * @memberof vtctldata.GetThrottlerStatusRequest + * @instance + * @returns {Object.} JSON object + */ + GetThrottlerStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new RecentApp. - * @memberof vtctldata.GetThrottlerStatusResponse - * @classdesc Represents a RecentApp. - * @implements IRecentApp - * @constructor - * @param {vtctldata.GetThrottlerStatusResponse.IRecentApp=} [properties] Properties to set - */ - function RecentApp(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for GetThrottlerStatusRequest + * @function getTypeUrl + * @memberof vtctldata.GetThrottlerStatusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetThrottlerStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/vtctldata.GetThrottlerStatusRequest"; + }; - /** - * RecentApp checked_at. - * @member {vttime.ITime|null|undefined} checked_at - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @instance - */ - RecentApp.prototype.checked_at = null; + return GetThrottlerStatusRequest; + })(); - /** - * RecentApp status_code. - * @member {number} status_code - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @instance - */ - RecentApp.prototype.status_code = 0; + vtctldata.GetThrottlerStatusResponse = (function() { - /** - * Creates a new RecentApp instance using the specified properties. - * @function create - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IRecentApp=} [properties] Properties to set - * @returns {vtctldata.GetThrottlerStatusResponse.RecentApp} RecentApp instance - */ - RecentApp.create = function create(properties) { - return new RecentApp(properties); - }; + /** + * Properties of a GetThrottlerStatusResponse. + * @memberof vtctldata + * @interface IGetThrottlerStatusResponse + * @property {tabletmanagerdata.IGetThrottlerStatusResponse|null} [status] GetThrottlerStatusResponse status + */ - /** - * Encodes the specified RecentApp message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.RecentApp.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IRecentApp} message RecentApp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentApp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.checked_at != null && Object.hasOwnProperty.call(message, "checked_at")) - $root.vttime.Time.encode(message.checked_at, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status_code); - return writer; - }; + /** + * Constructs a new GetThrottlerStatusResponse. + * @memberof vtctldata + * @classdesc Represents a GetThrottlerStatusResponse. + * @implements IGetThrottlerStatusResponse + * @constructor + * @param {vtctldata.IGetThrottlerStatusResponse=} [properties] Properties to set + */ + function GetThrottlerStatusResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetThrottlerStatusResponse status. + * @member {tabletmanagerdata.IGetThrottlerStatusResponse|null|undefined} status + * @memberof vtctldata.GetThrottlerStatusResponse + * @instance + */ + GetThrottlerStatusResponse.prototype.status = null; + + /** + * Creates a new GetThrottlerStatusResponse instance using the specified properties. + * @function create + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {vtctldata.IGetThrottlerStatusResponse=} [properties] Properties to set + * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse instance + */ + GetThrottlerStatusResponse.create = function create(properties) { + return new GetThrottlerStatusResponse(properties); + }; + + /** + * Encodes the specified GetThrottlerStatusResponse message. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {vtctldata.IGetThrottlerStatusResponse} message GetThrottlerStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetThrottlerStatusResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.tabletmanagerdata.GetThrottlerStatusResponse.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified RecentApp message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.RecentApp.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {vtctldata.GetThrottlerStatusResponse.IRecentApp} message RecentApp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentApp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetThrottlerStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetThrottlerStatusResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {vtctldata.IGetThrottlerStatusResponse} message GetThrottlerStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetThrottlerStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a RecentApp message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetThrottlerStatusResponse.RecentApp} RecentApp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentApp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusResponse.RecentApp(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.checked_at = $root.vttime.Time.decode(reader, reader.uint32()); - break; - } - case 2: { - message.status_code = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetThrottlerStatusResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetThrottlerStatusResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.status = $root.tabletmanagerdata.GetThrottlerStatusResponse.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a RecentApp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetThrottlerStatusResponse.RecentApp} RecentApp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentApp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a RecentApp message. - * @function verify - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecentApp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.checked_at != null && message.hasOwnProperty("checked_at")) { - let error = $root.vttime.Time.verify(message.checked_at); - if (error) - return "checked_at." + error; - } - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; - return null; - }; + /** + * Decodes a GetThrottlerStatusResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetThrottlerStatusResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a RecentApp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetThrottlerStatusResponse.RecentApp} RecentApp - */ - RecentApp.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetThrottlerStatusResponse.RecentApp) - return object; - let message = new $root.vtctldata.GetThrottlerStatusResponse.RecentApp(); - if (object.checked_at != null) { - if (typeof object.checked_at !== "object") - throw TypeError(".vtctldata.GetThrottlerStatusResponse.RecentApp.checked_at: object expected"); - message.checked_at = $root.vttime.Time.fromObject(object.checked_at); - } - if (object.status_code != null) - message.status_code = object.status_code | 0; - return message; - }; + /** + * Verifies a GetThrottlerStatusResponse message. + * @function verify + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetThrottlerStatusResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) { + let error = $root.tabletmanagerdata.GetThrottlerStatusResponse.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; - /** - * Creates a plain object from a RecentApp message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {vtctldata.GetThrottlerStatusResponse.RecentApp} message RecentApp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecentApp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.checked_at = null; - object.status_code = 0; - } - if (message.checked_at != null && message.hasOwnProperty("checked_at")) - object.checked_at = $root.vttime.Time.toObject(message.checked_at, options); - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; + /** + * Creates a GetThrottlerStatusResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetThrottlerStatusResponse} GetThrottlerStatusResponse + */ + GetThrottlerStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetThrottlerStatusResponse) return object; - }; + let message = new $root.vtctldata.GetThrottlerStatusResponse(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".vtctldata.GetThrottlerStatusResponse.status: object expected"); + message.status = $root.tabletmanagerdata.GetThrottlerStatusResponse.fromObject(object.status); + } + return message; + }; - /** - * Converts this RecentApp to JSON. - * @function toJSON - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @instance - * @returns {Object.} JSON object - */ - RecentApp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetThrottlerStatusResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {vtctldata.GetThrottlerStatusResponse} message GetThrottlerStatusResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetThrottlerStatusResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.status = null; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.tabletmanagerdata.GetThrottlerStatusResponse.toObject(message.status, options); + return object; + }; - /** - * Gets the default type url for RecentApp - * @function getTypeUrl - * @memberof vtctldata.GetThrottlerStatusResponse.RecentApp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecentApp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/vtctldata.GetThrottlerStatusResponse.RecentApp"; - }; + /** + * Converts this GetThrottlerStatusResponse to JSON. + * @function toJSON + * @memberof vtctldata.GetThrottlerStatusResponse + * @instance + * @returns {Object.} JSON object + */ + GetThrottlerStatusResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return RecentApp; - })(); + /** + * Gets the default type url for GetThrottlerStatusResponse + * @function getTypeUrl + * @memberof vtctldata.GetThrottlerStatusResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetThrottlerStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.GetThrottlerStatusResponse"; + }; return GetThrottlerStatusResponse; })(); From ba5297d6a95eabb3f2c18190cb247a9a1378a963 Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Thu, 11 Jul 2024 12:57:14 +0530 Subject: [PATCH 33/55] rpc: retrieve unresolved transactions (#16356) Signed-off-by: Harshit Gangal --- go/vt/proto/query/query.pb.go | 1516 +++++++++-------- go/vt/proto/query/query_vtproto.pb.go | 433 +++++ go/vt/proto/queryservice/queryservice.pb.go | 350 ++-- .../queryservice/queryservice_grpc.pb.go | 38 + go/vt/vtcombo/tablet_map.go | 6 + go/vt/vttablet/endtoend/framework/client.go | 5 + go/vt/vttablet/endtoend/transaction_test.go | 29 + go/vt/vttablet/grpcqueryservice/server.go | 15 + go/vt/vttablet/grpctabletconn/conn.go | 20 + go/vt/vttablet/queryservice/queryservice.go | 3 + go/vt/vttablet/queryservice/wrapped.go | 9 + go/vt/vttablet/sandboxconn/sandboxconn.go | 6 + .../tabletconntest/fakequeryservice.go | 12 + .../vttablet/tabletconntest/tabletconntest.go | 30 + go/vt/vttablet/tabletserver/dt_executor.go | 9 +- go/vt/vttablet/tabletserver/tabletserver.go | 24 +- go/vt/vttablet/tabletserver/twopc.go | 106 +- go/vt/vttablet/tabletserver/twopc_test.go | 76 +- go/vt/vttablet/tabletserver/tx_engine.go | 5 +- proto/query.proto | 12 + proto/queryservice.proto | 3 + web/vtadmin/src/proto/vtadmin.d.ts | 206 +++ web/vtadmin/src/proto/vtadmin.js | 489 ++++++ 23 files changed, 2525 insertions(+), 877 deletions(-) diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 03a58dc1b4b..7723797f895 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -3538,6 +3538,118 @@ func (x *ReadTransactionResponse) GetMetadata() *TransactionMetadata { return nil } +// UnresolvedTransactionsRequest is the payload to UnresolvedTransactions +type UnresolvedTransactionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId,proto3" json:"effective_caller_id,omitempty"` + ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId,proto3" json:"immediate_caller_id,omitempty"` + Target *Target `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` +} + +func (x *UnresolvedTransactionsRequest) Reset() { + *x = UnresolvedTransactionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_query_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnresolvedTransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnresolvedTransactionsRequest) ProtoMessage() {} + +func (x *UnresolvedTransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_query_proto_msgTypes[39] + 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 UnresolvedTransactionsRequest.ProtoReflect.Descriptor instead. +func (*UnresolvedTransactionsRequest) Descriptor() ([]byte, []int) { + return file_query_proto_rawDescGZIP(), []int{39} +} + +func (x *UnresolvedTransactionsRequest) GetEffectiveCallerId() *vtrpc.CallerID { + if x != nil { + return x.EffectiveCallerId + } + return nil +} + +func (x *UnresolvedTransactionsRequest) GetImmediateCallerId() *VTGateCallerID { + if x != nil { + return x.ImmediateCallerId + } + return nil +} + +func (x *UnresolvedTransactionsRequest) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +// UnresolvedTransactionsResponse is the returned value from UnresolvedTransactions +type UnresolvedTransactionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Transactions []*TransactionMetadata `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` +} + +func (x *UnresolvedTransactionsResponse) Reset() { + *x = UnresolvedTransactionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_query_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnresolvedTransactionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnresolvedTransactionsResponse) ProtoMessage() {} + +func (x *UnresolvedTransactionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_query_proto_msgTypes[40] + 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 UnresolvedTransactionsResponse.ProtoReflect.Descriptor instead. +func (*UnresolvedTransactionsResponse) Descriptor() ([]byte, []int) { + return file_query_proto_rawDescGZIP(), []int{40} +} + +func (x *UnresolvedTransactionsResponse) GetTransactions() []*TransactionMetadata { + if x != nil { + return x.Transactions + } + return nil +} + // BeginExecuteRequest is the payload to BeginExecute type BeginExecuteRequest struct { state protoimpl.MessageState @@ -3556,7 +3668,7 @@ type BeginExecuteRequest struct { func (x *BeginExecuteRequest) Reset() { *x = BeginExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[39] + mi := &file_query_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3569,7 +3681,7 @@ func (x *BeginExecuteRequest) String() string { func (*BeginExecuteRequest) ProtoMessage() {} func (x *BeginExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[39] + mi := &file_query_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3582,7 +3694,7 @@ func (x *BeginExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BeginExecuteRequest.ProtoReflect.Descriptor instead. func (*BeginExecuteRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{39} + return file_query_proto_rawDescGZIP(), []int{41} } func (x *BeginExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -3656,7 +3768,7 @@ type BeginExecuteResponse struct { func (x *BeginExecuteResponse) Reset() { *x = BeginExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[40] + mi := &file_query_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3669,7 +3781,7 @@ func (x *BeginExecuteResponse) String() string { func (*BeginExecuteResponse) ProtoMessage() {} func (x *BeginExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[40] + mi := &file_query_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3682,7 +3794,7 @@ func (x *BeginExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BeginExecuteResponse.ProtoReflect.Descriptor instead. func (*BeginExecuteResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{40} + return file_query_proto_rawDescGZIP(), []int{42} } func (x *BeginExecuteResponse) GetError() *vtrpc.RPCError { @@ -3738,7 +3850,7 @@ type BeginStreamExecuteRequest struct { func (x *BeginStreamExecuteRequest) Reset() { *x = BeginStreamExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[41] + mi := &file_query_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3751,7 +3863,7 @@ func (x *BeginStreamExecuteRequest) String() string { func (*BeginStreamExecuteRequest) ProtoMessage() {} func (x *BeginStreamExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[41] + mi := &file_query_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3764,7 +3876,7 @@ func (x *BeginStreamExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BeginStreamExecuteRequest.ProtoReflect.Descriptor instead. func (*BeginStreamExecuteRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{41} + return file_query_proto_rawDescGZIP(), []int{43} } func (x *BeginStreamExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -3838,7 +3950,7 @@ type BeginStreamExecuteResponse struct { func (x *BeginStreamExecuteResponse) Reset() { *x = BeginStreamExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[42] + mi := &file_query_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3851,7 +3963,7 @@ func (x *BeginStreamExecuteResponse) String() string { func (*BeginStreamExecuteResponse) ProtoMessage() {} func (x *BeginStreamExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[42] + mi := &file_query_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3864,7 +3976,7 @@ func (x *BeginStreamExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BeginStreamExecuteResponse.ProtoReflect.Descriptor instead. func (*BeginStreamExecuteResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{42} + return file_query_proto_rawDescGZIP(), []int{44} } func (x *BeginStreamExecuteResponse) GetError() *vtrpc.RPCError { @@ -3918,7 +4030,7 @@ type MessageStreamRequest struct { func (x *MessageStreamRequest) Reset() { *x = MessageStreamRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[43] + mi := &file_query_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3931,7 +4043,7 @@ func (x *MessageStreamRequest) String() string { func (*MessageStreamRequest) ProtoMessage() {} func (x *MessageStreamRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[43] + mi := &file_query_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3944,7 +4056,7 @@ func (x *MessageStreamRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageStreamRequest.ProtoReflect.Descriptor instead. func (*MessageStreamRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{43} + return file_query_proto_rawDescGZIP(), []int{45} } func (x *MessageStreamRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -3987,7 +4099,7 @@ type MessageStreamResponse struct { func (x *MessageStreamResponse) Reset() { *x = MessageStreamResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[44] + mi := &file_query_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4000,7 +4112,7 @@ func (x *MessageStreamResponse) String() string { func (*MessageStreamResponse) ProtoMessage() {} func (x *MessageStreamResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[44] + mi := &file_query_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4013,7 +4125,7 @@ func (x *MessageStreamResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageStreamResponse.ProtoReflect.Descriptor instead. func (*MessageStreamResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{44} + return file_query_proto_rawDescGZIP(), []int{46} } func (x *MessageStreamResponse) GetResult() *QueryResult { @@ -4040,7 +4152,7 @@ type MessageAckRequest struct { func (x *MessageAckRequest) Reset() { *x = MessageAckRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[45] + mi := &file_query_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4053,7 +4165,7 @@ func (x *MessageAckRequest) String() string { func (*MessageAckRequest) ProtoMessage() {} func (x *MessageAckRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[45] + mi := &file_query_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4066,7 +4178,7 @@ func (x *MessageAckRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageAckRequest.ProtoReflect.Descriptor instead. func (*MessageAckRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{45} + return file_query_proto_rawDescGZIP(), []int{47} } func (x *MessageAckRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -4119,7 +4231,7 @@ type MessageAckResponse struct { func (x *MessageAckResponse) Reset() { *x = MessageAckResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[46] + mi := &file_query_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4132,7 +4244,7 @@ func (x *MessageAckResponse) String() string { func (*MessageAckResponse) ProtoMessage() {} func (x *MessageAckResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[46] + mi := &file_query_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4145,7 +4257,7 @@ func (x *MessageAckResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageAckResponse.ProtoReflect.Descriptor instead. func (*MessageAckResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{46} + return file_query_proto_rawDescGZIP(), []int{48} } func (x *MessageAckResponse) GetResult() *QueryResult { @@ -4173,7 +4285,7 @@ type ReserveExecuteRequest struct { func (x *ReserveExecuteRequest) Reset() { *x = ReserveExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[47] + mi := &file_query_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4186,7 +4298,7 @@ func (x *ReserveExecuteRequest) String() string { func (*ReserveExecuteRequest) ProtoMessage() {} func (x *ReserveExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[47] + mi := &file_query_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4199,7 +4311,7 @@ func (x *ReserveExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveExecuteRequest.ProtoReflect.Descriptor instead. func (*ReserveExecuteRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{47} + return file_query_proto_rawDescGZIP(), []int{49} } func (x *ReserveExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -4267,7 +4379,7 @@ type ReserveExecuteResponse struct { func (x *ReserveExecuteResponse) Reset() { *x = ReserveExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[48] + mi := &file_query_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4280,7 +4392,7 @@ func (x *ReserveExecuteResponse) String() string { func (*ReserveExecuteResponse) ProtoMessage() {} func (x *ReserveExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[48] + mi := &file_query_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4293,7 +4405,7 @@ func (x *ReserveExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveExecuteResponse.ProtoReflect.Descriptor instead. func (*ReserveExecuteResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{48} + return file_query_proto_rawDescGZIP(), []int{50} } func (x *ReserveExecuteResponse) GetError() *vtrpc.RPCError { @@ -4342,7 +4454,7 @@ type ReserveStreamExecuteRequest struct { func (x *ReserveStreamExecuteRequest) Reset() { *x = ReserveStreamExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[49] + mi := &file_query_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4355,7 +4467,7 @@ func (x *ReserveStreamExecuteRequest) String() string { func (*ReserveStreamExecuteRequest) ProtoMessage() {} func (x *ReserveStreamExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[49] + mi := &file_query_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4368,7 +4480,7 @@ func (x *ReserveStreamExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveStreamExecuteRequest.ProtoReflect.Descriptor instead. func (*ReserveStreamExecuteRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{49} + return file_query_proto_rawDescGZIP(), []int{51} } func (x *ReserveStreamExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -4436,7 +4548,7 @@ type ReserveStreamExecuteResponse struct { func (x *ReserveStreamExecuteResponse) Reset() { *x = ReserveStreamExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[50] + mi := &file_query_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4449,7 +4561,7 @@ func (x *ReserveStreamExecuteResponse) String() string { func (*ReserveStreamExecuteResponse) ProtoMessage() {} func (x *ReserveStreamExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[50] + mi := &file_query_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4462,7 +4574,7 @@ func (x *ReserveStreamExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveStreamExecuteResponse.ProtoReflect.Descriptor instead. func (*ReserveStreamExecuteResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{50} + return file_query_proto_rawDescGZIP(), []int{52} } func (x *ReserveStreamExecuteResponse) GetError() *vtrpc.RPCError { @@ -4511,7 +4623,7 @@ type ReserveBeginExecuteRequest struct { func (x *ReserveBeginExecuteRequest) Reset() { *x = ReserveBeginExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[51] + mi := &file_query_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4524,7 +4636,7 @@ func (x *ReserveBeginExecuteRequest) String() string { func (*ReserveBeginExecuteRequest) ProtoMessage() {} func (x *ReserveBeginExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[51] + mi := &file_query_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4537,7 +4649,7 @@ func (x *ReserveBeginExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveBeginExecuteRequest.ProtoReflect.Descriptor instead. func (*ReserveBeginExecuteRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{51} + return file_query_proto_rawDescGZIP(), []int{53} } func (x *ReserveBeginExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -4612,7 +4724,7 @@ type ReserveBeginExecuteResponse struct { func (x *ReserveBeginExecuteResponse) Reset() { *x = ReserveBeginExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[52] + mi := &file_query_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4625,7 +4737,7 @@ func (x *ReserveBeginExecuteResponse) String() string { func (*ReserveBeginExecuteResponse) ProtoMessage() {} func (x *ReserveBeginExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[52] + mi := &file_query_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4638,7 +4750,7 @@ func (x *ReserveBeginExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveBeginExecuteResponse.ProtoReflect.Descriptor instead. func (*ReserveBeginExecuteResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{52} + return file_query_proto_rawDescGZIP(), []int{54} } func (x *ReserveBeginExecuteResponse) GetError() *vtrpc.RPCError { @@ -4701,7 +4813,7 @@ type ReserveBeginStreamExecuteRequest struct { func (x *ReserveBeginStreamExecuteRequest) Reset() { *x = ReserveBeginStreamExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[53] + mi := &file_query_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4714,7 +4826,7 @@ func (x *ReserveBeginStreamExecuteRequest) String() string { func (*ReserveBeginStreamExecuteRequest) ProtoMessage() {} func (x *ReserveBeginStreamExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[53] + mi := &file_query_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4727,7 +4839,7 @@ func (x *ReserveBeginStreamExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReserveBeginStreamExecuteRequest.ProtoReflect.Descriptor instead. func (*ReserveBeginStreamExecuteRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{53} + return file_query_proto_rawDescGZIP(), []int{55} } func (x *ReserveBeginStreamExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -4802,7 +4914,7 @@ type ReserveBeginStreamExecuteResponse struct { func (x *ReserveBeginStreamExecuteResponse) Reset() { *x = ReserveBeginStreamExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[54] + mi := &file_query_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4815,7 +4927,7 @@ func (x *ReserveBeginStreamExecuteResponse) String() string { func (*ReserveBeginStreamExecuteResponse) ProtoMessage() {} func (x *ReserveBeginStreamExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[54] + mi := &file_query_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4828,7 +4940,7 @@ func (x *ReserveBeginStreamExecuteResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ReserveBeginStreamExecuteResponse.ProtoReflect.Descriptor instead. func (*ReserveBeginStreamExecuteResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{54} + return file_query_proto_rawDescGZIP(), []int{56} } func (x *ReserveBeginStreamExecuteResponse) GetError() *vtrpc.RPCError { @@ -4889,7 +5001,7 @@ type ReleaseRequest struct { func (x *ReleaseRequest) Reset() { *x = ReleaseRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[55] + mi := &file_query_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4902,7 +5014,7 @@ func (x *ReleaseRequest) String() string { func (*ReleaseRequest) ProtoMessage() {} func (x *ReleaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[55] + mi := &file_query_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4915,7 +5027,7 @@ func (x *ReleaseRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReleaseRequest.ProtoReflect.Descriptor instead. func (*ReleaseRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{55} + return file_query_proto_rawDescGZIP(), []int{57} } func (x *ReleaseRequest) GetEffectiveCallerId() *vtrpc.CallerID { @@ -4963,7 +5075,7 @@ type ReleaseResponse struct { func (x *ReleaseResponse) Reset() { *x = ReleaseResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[56] + mi := &file_query_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4976,7 +5088,7 @@ func (x *ReleaseResponse) String() string { func (*ReleaseResponse) ProtoMessage() {} func (x *ReleaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[56] + mi := &file_query_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4989,7 +5101,7 @@ func (x *ReleaseResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReleaseResponse.ProtoReflect.Descriptor instead. func (*ReleaseResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{56} + return file_query_proto_rawDescGZIP(), []int{58} } // StreamHealthRequest is the payload for StreamHealth @@ -5002,7 +5114,7 @@ type StreamHealthRequest struct { func (x *StreamHealthRequest) Reset() { *x = StreamHealthRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[57] + mi := &file_query_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5015,7 +5127,7 @@ func (x *StreamHealthRequest) String() string { func (*StreamHealthRequest) ProtoMessage() {} func (x *StreamHealthRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[57] + mi := &file_query_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5028,7 +5140,7 @@ func (x *StreamHealthRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamHealthRequest.ProtoReflect.Descriptor instead. func (*StreamHealthRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{57} + return file_query_proto_rawDescGZIP(), []int{59} } // RealtimeStats contains information about the tablet status. @@ -5076,7 +5188,7 @@ type RealtimeStats struct { func (x *RealtimeStats) Reset() { *x = RealtimeStats{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[58] + mi := &file_query_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5089,7 +5201,7 @@ func (x *RealtimeStats) String() string { func (*RealtimeStats) ProtoMessage() {} func (x *RealtimeStats) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[58] + mi := &file_query_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5102,7 +5214,7 @@ func (x *RealtimeStats) ProtoReflect() protoreflect.Message { // Deprecated: Use RealtimeStats.ProtoReflect.Descriptor instead. func (*RealtimeStats) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{58} + return file_query_proto_rawDescGZIP(), []int{60} } func (x *RealtimeStats) GetHealthError() string { @@ -5194,7 +5306,7 @@ type AggregateStats struct { func (x *AggregateStats) Reset() { *x = AggregateStats{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[59] + mi := &file_query_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5207,7 +5319,7 @@ func (x *AggregateStats) String() string { func (*AggregateStats) ProtoMessage() {} func (x *AggregateStats) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[59] + mi := &file_query_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5220,7 +5332,7 @@ func (x *AggregateStats) ProtoReflect() protoreflect.Message { // Deprecated: Use AggregateStats.ProtoReflect.Descriptor instead. func (*AggregateStats) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{59} + return file_query_proto_rawDescGZIP(), []int{61} } func (x *AggregateStats) GetHealthyTabletCount() int32 { @@ -5314,7 +5426,7 @@ type StreamHealthResponse struct { func (x *StreamHealthResponse) Reset() { *x = StreamHealthResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[60] + mi := &file_query_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5327,7 +5439,7 @@ func (x *StreamHealthResponse) String() string { func (*StreamHealthResponse) ProtoMessage() {} func (x *StreamHealthResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[60] + mi := &file_query_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5340,7 +5452,7 @@ func (x *StreamHealthResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamHealthResponse.ProtoReflect.Descriptor instead. func (*StreamHealthResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{60} + return file_query_proto_rawDescGZIP(), []int{62} } func (x *StreamHealthResponse) GetTarget() *Target { @@ -5393,7 +5505,7 @@ type TransactionMetadata struct { func (x *TransactionMetadata) Reset() { *x = TransactionMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[61] + mi := &file_query_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5406,7 +5518,7 @@ func (x *TransactionMetadata) String() string { func (*TransactionMetadata) ProtoMessage() {} func (x *TransactionMetadata) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[61] + mi := &file_query_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5419,7 +5531,7 @@ func (x *TransactionMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionMetadata.ProtoReflect.Descriptor instead. func (*TransactionMetadata) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{61} + return file_query_proto_rawDescGZIP(), []int{63} } func (x *TransactionMetadata) GetDtid() string { @@ -5464,7 +5576,7 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[62] + mi := &file_query_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5477,7 +5589,7 @@ func (x *GetSchemaRequest) String() string { func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[62] + mi := &file_query_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5490,7 +5602,7 @@ func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead. func (*GetSchemaRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{62} + return file_query_proto_rawDescGZIP(), []int{64} } func (x *GetSchemaRequest) GetTarget() *Target { @@ -5528,7 +5640,7 @@ type UDFInfo struct { func (x *UDFInfo) Reset() { *x = UDFInfo{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[63] + mi := &file_query_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5541,7 +5653,7 @@ func (x *UDFInfo) String() string { func (*UDFInfo) ProtoMessage() {} func (x *UDFInfo) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[63] + mi := &file_query_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5554,7 +5666,7 @@ func (x *UDFInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use UDFInfo.ProtoReflect.Descriptor instead. func (*UDFInfo) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{63} + return file_query_proto_rawDescGZIP(), []int{65} } func (x *UDFInfo) GetName() string { @@ -5592,7 +5704,7 @@ type GetSchemaResponse struct { func (x *GetSchemaResponse) Reset() { *x = GetSchemaResponse{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[64] + mi := &file_query_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5605,7 +5717,7 @@ func (x *GetSchemaResponse) String() string { func (*GetSchemaResponse) ProtoMessage() {} func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[64] + mi := &file_query_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5618,7 +5730,7 @@ func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead. func (*GetSchemaResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{64} + return file_query_proto_rawDescGZIP(), []int{66} } func (x *GetSchemaResponse) GetUdfs() []*UDFInfo { @@ -5654,7 +5766,7 @@ type StreamEvent_Statement struct { func (x *StreamEvent_Statement) Reset() { *x = StreamEvent_Statement{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[66] + mi := &file_query_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5667,7 +5779,7 @@ func (x *StreamEvent_Statement) String() string { func (*StreamEvent_Statement) ProtoMessage() {} func (x *StreamEvent_Statement) ProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[66] + mi := &file_query_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6183,47 +6295,9 @@ var file_query_proto_rawDesc = []byte{ 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe0, 0x02, 0x0a, 0x13, 0x42, - 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, - 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, - 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xfe, 0x01, - 0x0a, 0x14, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, - 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 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, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe6, - 0x02, 0x0a, 0x19, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xce, 0x01, 0x0a, 0x1d, 0x55, + 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, @@ -6234,52 +6308,14 @@ var file_query_proto_rawDesc = []byte{ 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x1a, 0x42, 0x65, 0x67, 0x69, - 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, - 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 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, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xd9, - 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, - 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x15, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0xf6, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, + 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x60, 0x0a, 0x1e, 0x55, + 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, + 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe0, 0x02, + 0x0a, 0x13, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, @@ -6291,361 +6327,457 @@ var file_query_proto_rawDesc = []byte{ 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe8, 0x02, 0x0a, 0x15, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, - 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, + 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x22, 0xfe, 0x01, 0x0a, 0x14, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, - 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0xee, - 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, - 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, + 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x22, 0xe6, 0x02, 0x0a, 0x19, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, + 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x1a, 0x42, + 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, + 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, + 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, + 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, + 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x69, + 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe8, 0x02, + 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, + 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x22, 0xee, 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, + 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, + 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x22, 0xf4, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, + 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, + 0x73, 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, + 0x6e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa6, 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, + 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x22, 0xfa, 0x02, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, + 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, + 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, + 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, + 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xac, + 0x02, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, - 0xcc, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, - 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0xf4, - 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, - 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, - 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x5f, - 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa6, 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 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, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xfa, - 0x02, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, - 0x12, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x42, - 0x65, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xac, 0x02, 0x0a, 0x21, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x87, 0x02, 0x0a, 0x0e, 0x52, - 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, - 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, - 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x99, - 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x62, - 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x62, 0x69, 0x6e, 0x6c, 0x6f, - 0x67, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x47, 0x0a, - 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, + 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x87, 0x02, + 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, - 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x03, 0x71, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x69, 0x65, 0x77, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x76, 0x69, 0x65, 0x77, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x64, 0x66, 0x73, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, - 0x64, 0x66, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0xf6, 0x01, 0x0a, 0x0e, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, - 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x34, 0x0a, 0x16, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x14, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x73, 0x4d, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, - 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x4d, 0x61, 0x78, 0x22, 0x95, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, - 0x1c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x19, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x54, 0x65, 0x72, 0x6d, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3b, - 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, - 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0d, 0x72, 0x65, - 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xae, 0x01, 0x0a, 0x13, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, - 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x0c, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x91, 0x01, 0x0a, - 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x22, 0x6d, 0x0a, 0x07, 0x55, 0x44, 0x46, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x12, 0x2c, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, - 0xd5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x75, 0x64, 0x66, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x55, 0x44, 0x46, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x64, 0x66, 0x73, 0x12, 0x58, 0x0a, 0x10, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x92, 0x03, 0x0a, 0x09, 0x4d, 0x79, 0x53, 0x71, - 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, - 0x4c, 0x41, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, - 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x55, - 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x10, - 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x5a, 0x45, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x4c, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x40, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x02, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, - 0x5f, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x80, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x45, 0x54, 0x5f, 0x46, - 0x4c, 0x41, 0x47, 0x10, 0x80, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x46, - 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x80, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, - 0x4e, 0x4f, 0x57, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x40, 0x12, 0x0e, 0x0a, 0x08, 0x4e, - 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x13, 0x0a, 0x0d, 0x50, - 0x41, 0x52, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x01, - 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, - 0x80, 0x02, 0x12, 0x11, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x80, 0x80, 0x04, 0x12, 0x11, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x43, 0x4d, 0x50, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x6b, 0x0a, 0x04, - 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0a, 0x49, 0x53, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x52, 0x41, 0x4c, 0x10, 0x80, 0x02, 0x12, - 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x80, 0x04, - 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x53, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x80, 0x08, 0x12, 0x0d, - 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x80, 0x10, 0x12, 0x0b, 0x0a, - 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, 0x80, 0x20, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, - 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x80, 0x40, 0x2a, 0xc0, 0x03, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x81, 0x02, 0x12, 0x0a, 0x0a, 0x05, - 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, - 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x84, - 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x85, 0x02, 0x12, 0x0b, 0x0a, - 0x06, 0x55, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x86, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, - 0x54, 0x33, 0x32, 0x10, 0x87, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, - 0x10, 0x88, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x89, 0x02, 0x12, - 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x8a, 0x06, 0x12, 0x0c, 0x0a, 0x07, - 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x8b, 0x08, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x4c, - 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x8c, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, - 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x8d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, - 0x10, 0x8e, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x8f, 0x10, 0x12, 0x0d, - 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x90, 0x10, 0x12, 0x09, 0x0a, - 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x91, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x49, - 0x4d, 0x41, 0x4c, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x93, 0x30, - 0x12, 0x09, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x94, 0x50, 0x12, 0x0c, 0x0a, 0x07, 0x56, - 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x95, 0x30, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x41, 0x52, - 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x96, 0x50, 0x12, 0x09, 0x0a, 0x04, 0x43, 0x48, 0x41, - 0x52, 0x10, 0x97, 0x30, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x98, - 0x50, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x49, 0x54, 0x10, 0x99, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x45, - 0x4e, 0x55, 0x4d, 0x10, 0x9a, 0x10, 0x12, 0x08, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x9b, 0x10, - 0x12, 0x09, 0x0a, 0x05, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x10, 0x1c, 0x12, 0x0d, 0x0a, 0x08, 0x47, - 0x45, 0x4f, 0x4d, 0x45, 0x54, 0x52, 0x59, 0x10, 0x9d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x4a, 0x53, - 0x4f, 0x4e, 0x10, 0x9e, 0x10, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x4e, 0x55, 0x4d, 0x10, - 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x56, 0x41, 0x4c, 0x10, 0xa1, 0x20, 0x12, - 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, 0x2a, 0x46, 0x0a, 0x10, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, - 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, - 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x3b, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, 0x45, 0x57, 0x53, - 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x44, 0x46, 0x53, 0x10, - 0x03, 0x42, 0x35, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, 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, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x30, + 0x0a, 0x14, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x62, 0x69, + 0x6e, 0x6c, 0x6f, 0x67, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x47, 0x0a, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, + 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x70, + 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x03, 0x71, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x69, + 0x65, 0x77, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x76, 0x69, 0x65, 0x77, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x64, + 0x66, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x75, 0x64, 0x66, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0xf6, 0x01, + 0x0a, 0x0e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x14, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x4d, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x4d, 0x61, 0x78, 0x22, 0x95, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, + 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x74, 0x65, 0x72, 0x6d, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x54, + 0x65, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, + 0x0d, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, + 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xae, + 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x0c, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, + 0x91, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x07, 0x55, 0x44, 0x46, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x75, 0x64, 0x66, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x55, + 0x44, 0x46, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x64, 0x66, 0x73, 0x12, 0x58, 0x0a, 0x10, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x92, 0x03, 0x0a, 0x09, 0x4d, + 0x79, 0x53, 0x71, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, + 0x59, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x5f, 0x4b, 0x45, + 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x49, 0x51, + 0x55, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x04, 0x12, 0x15, 0x0a, + 0x11, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, + 0x41, 0x47, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x4c, 0x41, + 0x47, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x5a, 0x45, 0x52, 0x4f, 0x46, 0x49, + 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x40, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x49, 0x4e, + 0x41, 0x52, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x45, + 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x02, 0x12, 0x18, 0x0a, 0x13, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x4c, + 0x41, 0x47, 0x10, 0x80, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, + 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x45, + 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x4e, 0x4f, 0x5f, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x46, 0x4c, + 0x41, 0x47, 0x10, 0x80, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x57, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x40, 0x12, 0x0e, + 0x0a, 0x08, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x13, + 0x0a, 0x0d, 0x50, 0x41, 0x52, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, + 0x80, 0x80, 0x01, 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x46, 0x4c, 0x41, + 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x11, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x04, 0x12, 0x11, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x43, + 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x2a, + 0x6b, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x52, 0x41, 0x4c, 0x10, + 0x80, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, + 0x10, 0x80, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x53, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x80, + 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x80, 0x10, + 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, 0x80, 0x20, 0x12, 0x0d, 0x0a, + 0x08, 0x49, 0x53, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x80, 0x40, 0x2a, 0xc0, 0x03, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x81, 0x02, 0x12, + 0x0a, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, + 0x4e, 0x54, 0x31, 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, + 0x36, 0x10, 0x84, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x85, 0x02, + 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x86, 0x06, 0x12, 0x0a, 0x0a, + 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x87, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, + 0x54, 0x33, 0x32, 0x10, 0x88, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, + 0x89, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x8a, 0x06, 0x12, + 0x0c, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x8b, 0x08, 0x12, 0x0c, 0x0a, + 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x8c, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x54, + 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x8d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x44, + 0x41, 0x54, 0x45, 0x10, 0x8e, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x8f, + 0x10, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x90, 0x10, + 0x12, 0x09, 0x0a, 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x91, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, + 0x10, 0x93, 0x30, 0x12, 0x09, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x94, 0x50, 0x12, 0x0c, + 0x0a, 0x07, 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x95, 0x30, 0x12, 0x0e, 0x0a, 0x09, + 0x56, 0x41, 0x52, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x96, 0x50, 0x12, 0x09, 0x0a, 0x04, + 0x43, 0x48, 0x41, 0x52, 0x10, 0x97, 0x30, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, + 0x59, 0x10, 0x98, 0x50, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x49, 0x54, 0x10, 0x99, 0x10, 0x12, 0x09, + 0x0a, 0x04, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x9a, 0x10, 0x12, 0x08, 0x0a, 0x03, 0x53, 0x45, 0x54, + 0x10, 0x9b, 0x10, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x10, 0x1c, 0x12, 0x0d, + 0x0a, 0x08, 0x47, 0x45, 0x4f, 0x4d, 0x45, 0x54, 0x52, 0x59, 0x10, 0x9d, 0x10, 0x12, 0x09, 0x0a, + 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x9e, 0x10, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, 0x52, + 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x4e, + 0x55, 0x4d, 0x10, 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x56, 0x41, 0x4c, 0x10, + 0xa1, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, 0x2a, + 0x46, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, + 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x3b, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, + 0x45, 0x57, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x44, + 0x46, 0x53, 0x10, 0x03, 0x42, 0x35, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, 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, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -6661,7 +6793,7 @@ func file_query_proto_rawDescGZIP() []byte { } var file_query_proto_enumTypes = make([]protoimpl.EnumInfo, 12) -var file_query_proto_msgTypes = make([]protoimpl.MessageInfo, 68) +var file_query_proto_msgTypes = make([]protoimpl.MessageInfo, 70) var file_query_proto_goTypes = []any{ (MySqlFlag)(0), // 0: query.MySqlFlag (Flag)(0), // 1: query.Flag @@ -6714,46 +6846,48 @@ var file_query_proto_goTypes = []any{ (*ConcludeTransactionResponse)(nil), // 48: query.ConcludeTransactionResponse (*ReadTransactionRequest)(nil), // 49: query.ReadTransactionRequest (*ReadTransactionResponse)(nil), // 50: query.ReadTransactionResponse - (*BeginExecuteRequest)(nil), // 51: query.BeginExecuteRequest - (*BeginExecuteResponse)(nil), // 52: query.BeginExecuteResponse - (*BeginStreamExecuteRequest)(nil), // 53: query.BeginStreamExecuteRequest - (*BeginStreamExecuteResponse)(nil), // 54: query.BeginStreamExecuteResponse - (*MessageStreamRequest)(nil), // 55: query.MessageStreamRequest - (*MessageStreamResponse)(nil), // 56: query.MessageStreamResponse - (*MessageAckRequest)(nil), // 57: query.MessageAckRequest - (*MessageAckResponse)(nil), // 58: query.MessageAckResponse - (*ReserveExecuteRequest)(nil), // 59: query.ReserveExecuteRequest - (*ReserveExecuteResponse)(nil), // 60: query.ReserveExecuteResponse - (*ReserveStreamExecuteRequest)(nil), // 61: query.ReserveStreamExecuteRequest - (*ReserveStreamExecuteResponse)(nil), // 62: query.ReserveStreamExecuteResponse - (*ReserveBeginExecuteRequest)(nil), // 63: query.ReserveBeginExecuteRequest - (*ReserveBeginExecuteResponse)(nil), // 64: query.ReserveBeginExecuteResponse - (*ReserveBeginStreamExecuteRequest)(nil), // 65: query.ReserveBeginStreamExecuteRequest - (*ReserveBeginStreamExecuteResponse)(nil), // 66: query.ReserveBeginStreamExecuteResponse - (*ReleaseRequest)(nil), // 67: query.ReleaseRequest - (*ReleaseResponse)(nil), // 68: query.ReleaseResponse - (*StreamHealthRequest)(nil), // 69: query.StreamHealthRequest - (*RealtimeStats)(nil), // 70: query.RealtimeStats - (*AggregateStats)(nil), // 71: query.AggregateStats - (*StreamHealthResponse)(nil), // 72: query.StreamHealthResponse - (*TransactionMetadata)(nil), // 73: query.TransactionMetadata - (*GetSchemaRequest)(nil), // 74: query.GetSchemaRequest - (*UDFInfo)(nil), // 75: query.UDFInfo - (*GetSchemaResponse)(nil), // 76: query.GetSchemaResponse - nil, // 77: query.BoundQuery.BindVariablesEntry - (*StreamEvent_Statement)(nil), // 78: query.StreamEvent.Statement - nil, // 79: query.GetSchemaResponse.TableDefinitionEntry - (topodata.TabletType)(0), // 80: topodata.TabletType - (*vtrpc.CallerID)(nil), // 81: vtrpc.CallerID - (*vtrpc.RPCError)(nil), // 82: vtrpc.RPCError - (*topodata.TabletAlias)(nil), // 83: topodata.TabletAlias + (*UnresolvedTransactionsRequest)(nil), // 51: query.UnresolvedTransactionsRequest + (*UnresolvedTransactionsResponse)(nil), // 52: query.UnresolvedTransactionsResponse + (*BeginExecuteRequest)(nil), // 53: query.BeginExecuteRequest + (*BeginExecuteResponse)(nil), // 54: query.BeginExecuteResponse + (*BeginStreamExecuteRequest)(nil), // 55: query.BeginStreamExecuteRequest + (*BeginStreamExecuteResponse)(nil), // 56: query.BeginStreamExecuteResponse + (*MessageStreamRequest)(nil), // 57: query.MessageStreamRequest + (*MessageStreamResponse)(nil), // 58: query.MessageStreamResponse + (*MessageAckRequest)(nil), // 59: query.MessageAckRequest + (*MessageAckResponse)(nil), // 60: query.MessageAckResponse + (*ReserveExecuteRequest)(nil), // 61: query.ReserveExecuteRequest + (*ReserveExecuteResponse)(nil), // 62: query.ReserveExecuteResponse + (*ReserveStreamExecuteRequest)(nil), // 63: query.ReserveStreamExecuteRequest + (*ReserveStreamExecuteResponse)(nil), // 64: query.ReserveStreamExecuteResponse + (*ReserveBeginExecuteRequest)(nil), // 65: query.ReserveBeginExecuteRequest + (*ReserveBeginExecuteResponse)(nil), // 66: query.ReserveBeginExecuteResponse + (*ReserveBeginStreamExecuteRequest)(nil), // 67: query.ReserveBeginStreamExecuteRequest + (*ReserveBeginStreamExecuteResponse)(nil), // 68: query.ReserveBeginStreamExecuteResponse + (*ReleaseRequest)(nil), // 69: query.ReleaseRequest + (*ReleaseResponse)(nil), // 70: query.ReleaseResponse + (*StreamHealthRequest)(nil), // 71: query.StreamHealthRequest + (*RealtimeStats)(nil), // 72: query.RealtimeStats + (*AggregateStats)(nil), // 73: query.AggregateStats + (*StreamHealthResponse)(nil), // 74: query.StreamHealthResponse + (*TransactionMetadata)(nil), // 75: query.TransactionMetadata + (*GetSchemaRequest)(nil), // 76: query.GetSchemaRequest + (*UDFInfo)(nil), // 77: query.UDFInfo + (*GetSchemaResponse)(nil), // 78: query.GetSchemaResponse + nil, // 79: query.BoundQuery.BindVariablesEntry + (*StreamEvent_Statement)(nil), // 80: query.StreamEvent.Statement + nil, // 81: query.GetSchemaResponse.TableDefinitionEntry + (topodata.TabletType)(0), // 82: topodata.TabletType + (*vtrpc.CallerID)(nil), // 83: vtrpc.CallerID + (*vtrpc.RPCError)(nil), // 84: vtrpc.RPCError + (*topodata.TabletAlias)(nil), // 85: topodata.TabletAlias } var file_query_proto_depIdxs = []int32{ - 80, // 0: query.Target.tablet_type:type_name -> topodata.TabletType + 82, // 0: query.Target.tablet_type:type_name -> topodata.TabletType 2, // 1: query.Value.type:type_name -> query.Type 2, // 2: query.BindVariable.type:type_name -> query.Type 15, // 3: query.BindVariable.values:type_name -> query.Value - 77, // 4: query.BoundQuery.bind_variables:type_name -> query.BoundQuery.BindVariablesEntry + 79, // 4: query.BoundQuery.bind_variables:type_name -> query.BoundQuery.BindVariablesEntry 5, // 5: query.ExecuteOptions.included_fields:type_name -> query.ExecuteOptions.IncludedFields 6, // 6: query.ExecuteOptions.workload:type_name -> query.ExecuteOptions.Workload 7, // 7: query.ExecuteOptions.transaction_isolation:type_name -> query.ExecuteOptions.TransactionIsolation @@ -6763,138 +6897,142 @@ var file_query_proto_depIdxs = []int32{ 2, // 11: query.Field.type:type_name -> query.Type 19, // 12: query.QueryResult.fields:type_name -> query.Field 20, // 13: query.QueryResult.rows:type_name -> query.Row - 78, // 14: query.StreamEvent.statements:type_name -> query.StreamEvent.Statement + 80, // 14: query.StreamEvent.statements:type_name -> query.StreamEvent.Statement 14, // 15: query.StreamEvent.event_token:type_name -> query.EventToken - 81, // 16: query.ExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 16: query.ExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 17: query.ExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 18: query.ExecuteRequest.target:type_name -> query.Target 17, // 19: query.ExecuteRequest.query:type_name -> query.BoundQuery 18, // 20: query.ExecuteRequest.options:type_name -> query.ExecuteOptions 21, // 21: query.ExecuteResponse.result:type_name -> query.QueryResult - 82, // 22: query.ResultWithError.error:type_name -> vtrpc.RPCError + 84, // 22: query.ResultWithError.error:type_name -> vtrpc.RPCError 21, // 23: query.ResultWithError.result:type_name -> query.QueryResult - 81, // 24: query.StreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 24: query.StreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 25: query.StreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 26: query.StreamExecuteRequest.target:type_name -> query.Target 17, // 27: query.StreamExecuteRequest.query:type_name -> query.BoundQuery 18, // 28: query.StreamExecuteRequest.options:type_name -> query.ExecuteOptions 21, // 29: query.StreamExecuteResponse.result:type_name -> query.QueryResult - 81, // 30: query.BeginRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 30: query.BeginRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 31: query.BeginRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 32: query.BeginRequest.target:type_name -> query.Target 18, // 33: query.BeginRequest.options:type_name -> query.ExecuteOptions - 83, // 34: query.BeginResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 35: query.CommitRequest.effective_caller_id:type_name -> vtrpc.CallerID + 85, // 34: query.BeginResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 35: query.CommitRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 36: query.CommitRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 37: query.CommitRequest.target:type_name -> query.Target - 81, // 38: query.RollbackRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 38: query.RollbackRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 39: query.RollbackRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 40: query.RollbackRequest.target:type_name -> query.Target - 81, // 41: query.PrepareRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 41: query.PrepareRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 42: query.PrepareRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 43: query.PrepareRequest.target:type_name -> query.Target - 81, // 44: query.CommitPreparedRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 44: query.CommitPreparedRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 45: query.CommitPreparedRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 46: query.CommitPreparedRequest.target:type_name -> query.Target - 81, // 47: query.RollbackPreparedRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 47: query.RollbackPreparedRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 48: query.RollbackPreparedRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 49: query.RollbackPreparedRequest.target:type_name -> query.Target - 81, // 50: query.CreateTransactionRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 50: query.CreateTransactionRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 51: query.CreateTransactionRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 52: query.CreateTransactionRequest.target:type_name -> query.Target 12, // 53: query.CreateTransactionRequest.participants:type_name -> query.Target - 81, // 54: query.StartCommitRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 54: query.StartCommitRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 55: query.StartCommitRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 56: query.StartCommitRequest.target:type_name -> query.Target - 81, // 57: query.SetRollbackRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 57: query.SetRollbackRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 58: query.SetRollbackRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 59: query.SetRollbackRequest.target:type_name -> query.Target - 81, // 60: query.ConcludeTransactionRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 60: query.ConcludeTransactionRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 61: query.ConcludeTransactionRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 62: query.ConcludeTransactionRequest.target:type_name -> query.Target - 81, // 63: query.ReadTransactionRequest.effective_caller_id:type_name -> vtrpc.CallerID + 83, // 63: query.ReadTransactionRequest.effective_caller_id:type_name -> vtrpc.CallerID 13, // 64: query.ReadTransactionRequest.immediate_caller_id:type_name -> query.VTGateCallerID 12, // 65: query.ReadTransactionRequest.target:type_name -> query.Target - 73, // 66: query.ReadTransactionResponse.metadata:type_name -> query.TransactionMetadata - 81, // 67: query.BeginExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 68: query.BeginExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 69: query.BeginExecuteRequest.target:type_name -> query.Target - 17, // 70: query.BeginExecuteRequest.query:type_name -> query.BoundQuery - 18, // 71: query.BeginExecuteRequest.options:type_name -> query.ExecuteOptions - 82, // 72: query.BeginExecuteResponse.error:type_name -> vtrpc.RPCError - 21, // 73: query.BeginExecuteResponse.result:type_name -> query.QueryResult - 83, // 74: query.BeginExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 75: query.BeginStreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 76: query.BeginStreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 77: query.BeginStreamExecuteRequest.target:type_name -> query.Target - 17, // 78: query.BeginStreamExecuteRequest.query:type_name -> query.BoundQuery - 18, // 79: query.BeginStreamExecuteRequest.options:type_name -> query.ExecuteOptions - 82, // 80: query.BeginStreamExecuteResponse.error:type_name -> vtrpc.RPCError - 21, // 81: query.BeginStreamExecuteResponse.result:type_name -> query.QueryResult - 83, // 82: query.BeginStreamExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 83: query.MessageStreamRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 84: query.MessageStreamRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 85: query.MessageStreamRequest.target:type_name -> query.Target - 21, // 86: query.MessageStreamResponse.result:type_name -> query.QueryResult - 81, // 87: query.MessageAckRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 88: query.MessageAckRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 89: query.MessageAckRequest.target:type_name -> query.Target - 15, // 90: query.MessageAckRequest.ids:type_name -> query.Value - 21, // 91: query.MessageAckResponse.result:type_name -> query.QueryResult - 81, // 92: query.ReserveExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 93: query.ReserveExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 94: query.ReserveExecuteRequest.target:type_name -> query.Target - 17, // 95: query.ReserveExecuteRequest.query:type_name -> query.BoundQuery - 18, // 96: query.ReserveExecuteRequest.options:type_name -> query.ExecuteOptions - 82, // 97: query.ReserveExecuteResponse.error:type_name -> vtrpc.RPCError - 21, // 98: query.ReserveExecuteResponse.result:type_name -> query.QueryResult - 83, // 99: query.ReserveExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 100: query.ReserveStreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 101: query.ReserveStreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 102: query.ReserveStreamExecuteRequest.target:type_name -> query.Target - 17, // 103: query.ReserveStreamExecuteRequest.query:type_name -> query.BoundQuery - 18, // 104: query.ReserveStreamExecuteRequest.options:type_name -> query.ExecuteOptions - 82, // 105: query.ReserveStreamExecuteResponse.error:type_name -> vtrpc.RPCError - 21, // 106: query.ReserveStreamExecuteResponse.result:type_name -> query.QueryResult - 83, // 107: query.ReserveStreamExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 108: query.ReserveBeginExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 109: query.ReserveBeginExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 110: query.ReserveBeginExecuteRequest.target:type_name -> query.Target - 17, // 111: query.ReserveBeginExecuteRequest.query:type_name -> query.BoundQuery - 18, // 112: query.ReserveBeginExecuteRequest.options:type_name -> query.ExecuteOptions - 82, // 113: query.ReserveBeginExecuteResponse.error:type_name -> vtrpc.RPCError - 21, // 114: query.ReserveBeginExecuteResponse.result:type_name -> query.QueryResult - 83, // 115: query.ReserveBeginExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 116: query.ReserveBeginStreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 117: query.ReserveBeginStreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 118: query.ReserveBeginStreamExecuteRequest.target:type_name -> query.Target - 17, // 119: query.ReserveBeginStreamExecuteRequest.query:type_name -> query.BoundQuery - 18, // 120: query.ReserveBeginStreamExecuteRequest.options:type_name -> query.ExecuteOptions - 82, // 121: query.ReserveBeginStreamExecuteResponse.error:type_name -> vtrpc.RPCError - 21, // 122: query.ReserveBeginStreamExecuteResponse.result:type_name -> query.QueryResult - 83, // 123: query.ReserveBeginStreamExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias - 81, // 124: query.ReleaseRequest.effective_caller_id:type_name -> vtrpc.CallerID - 13, // 125: query.ReleaseRequest.immediate_caller_id:type_name -> query.VTGateCallerID - 12, // 126: query.ReleaseRequest.target:type_name -> query.Target - 12, // 127: query.StreamHealthResponse.target:type_name -> query.Target - 70, // 128: query.StreamHealthResponse.realtime_stats:type_name -> query.RealtimeStats - 83, // 129: query.StreamHealthResponse.tablet_alias:type_name -> topodata.TabletAlias - 3, // 130: query.TransactionMetadata.state:type_name -> query.TransactionState - 12, // 131: query.TransactionMetadata.participants:type_name -> query.Target - 12, // 132: query.GetSchemaRequest.target:type_name -> query.Target - 4, // 133: query.GetSchemaRequest.table_type:type_name -> query.SchemaTableType - 2, // 134: query.UDFInfo.return_type:type_name -> query.Type - 75, // 135: query.GetSchemaResponse.udfs:type_name -> query.UDFInfo - 79, // 136: query.GetSchemaResponse.table_definition:type_name -> query.GetSchemaResponse.TableDefinitionEntry - 16, // 137: query.BoundQuery.BindVariablesEntry.value:type_name -> query.BindVariable - 11, // 138: query.StreamEvent.Statement.category:type_name -> query.StreamEvent.Statement.Category - 19, // 139: query.StreamEvent.Statement.primary_key_fields:type_name -> query.Field - 20, // 140: query.StreamEvent.Statement.primary_key_values:type_name -> query.Row - 141, // [141:141] is the sub-list for method output_type - 141, // [141:141] is the sub-list for method input_type - 141, // [141:141] is the sub-list for extension type_name - 141, // [141:141] is the sub-list for extension extendee - 0, // [0:141] is the sub-list for field type_name + 75, // 66: query.ReadTransactionResponse.metadata:type_name -> query.TransactionMetadata + 83, // 67: query.UnresolvedTransactionsRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 68: query.UnresolvedTransactionsRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 69: query.UnresolvedTransactionsRequest.target:type_name -> query.Target + 75, // 70: query.UnresolvedTransactionsResponse.transactions:type_name -> query.TransactionMetadata + 83, // 71: query.BeginExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 72: query.BeginExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 73: query.BeginExecuteRequest.target:type_name -> query.Target + 17, // 74: query.BeginExecuteRequest.query:type_name -> query.BoundQuery + 18, // 75: query.BeginExecuteRequest.options:type_name -> query.ExecuteOptions + 84, // 76: query.BeginExecuteResponse.error:type_name -> vtrpc.RPCError + 21, // 77: query.BeginExecuteResponse.result:type_name -> query.QueryResult + 85, // 78: query.BeginExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 79: query.BeginStreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 80: query.BeginStreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 81: query.BeginStreamExecuteRequest.target:type_name -> query.Target + 17, // 82: query.BeginStreamExecuteRequest.query:type_name -> query.BoundQuery + 18, // 83: query.BeginStreamExecuteRequest.options:type_name -> query.ExecuteOptions + 84, // 84: query.BeginStreamExecuteResponse.error:type_name -> vtrpc.RPCError + 21, // 85: query.BeginStreamExecuteResponse.result:type_name -> query.QueryResult + 85, // 86: query.BeginStreamExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 87: query.MessageStreamRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 88: query.MessageStreamRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 89: query.MessageStreamRequest.target:type_name -> query.Target + 21, // 90: query.MessageStreamResponse.result:type_name -> query.QueryResult + 83, // 91: query.MessageAckRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 92: query.MessageAckRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 93: query.MessageAckRequest.target:type_name -> query.Target + 15, // 94: query.MessageAckRequest.ids:type_name -> query.Value + 21, // 95: query.MessageAckResponse.result:type_name -> query.QueryResult + 83, // 96: query.ReserveExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 97: query.ReserveExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 98: query.ReserveExecuteRequest.target:type_name -> query.Target + 17, // 99: query.ReserveExecuteRequest.query:type_name -> query.BoundQuery + 18, // 100: query.ReserveExecuteRequest.options:type_name -> query.ExecuteOptions + 84, // 101: query.ReserveExecuteResponse.error:type_name -> vtrpc.RPCError + 21, // 102: query.ReserveExecuteResponse.result:type_name -> query.QueryResult + 85, // 103: query.ReserveExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 104: query.ReserveStreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 105: query.ReserveStreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 106: query.ReserveStreamExecuteRequest.target:type_name -> query.Target + 17, // 107: query.ReserveStreamExecuteRequest.query:type_name -> query.BoundQuery + 18, // 108: query.ReserveStreamExecuteRequest.options:type_name -> query.ExecuteOptions + 84, // 109: query.ReserveStreamExecuteResponse.error:type_name -> vtrpc.RPCError + 21, // 110: query.ReserveStreamExecuteResponse.result:type_name -> query.QueryResult + 85, // 111: query.ReserveStreamExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 112: query.ReserveBeginExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 113: query.ReserveBeginExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 114: query.ReserveBeginExecuteRequest.target:type_name -> query.Target + 17, // 115: query.ReserveBeginExecuteRequest.query:type_name -> query.BoundQuery + 18, // 116: query.ReserveBeginExecuteRequest.options:type_name -> query.ExecuteOptions + 84, // 117: query.ReserveBeginExecuteResponse.error:type_name -> vtrpc.RPCError + 21, // 118: query.ReserveBeginExecuteResponse.result:type_name -> query.QueryResult + 85, // 119: query.ReserveBeginExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 120: query.ReserveBeginStreamExecuteRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 121: query.ReserveBeginStreamExecuteRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 122: query.ReserveBeginStreamExecuteRequest.target:type_name -> query.Target + 17, // 123: query.ReserveBeginStreamExecuteRequest.query:type_name -> query.BoundQuery + 18, // 124: query.ReserveBeginStreamExecuteRequest.options:type_name -> query.ExecuteOptions + 84, // 125: query.ReserveBeginStreamExecuteResponse.error:type_name -> vtrpc.RPCError + 21, // 126: query.ReserveBeginStreamExecuteResponse.result:type_name -> query.QueryResult + 85, // 127: query.ReserveBeginStreamExecuteResponse.tablet_alias:type_name -> topodata.TabletAlias + 83, // 128: query.ReleaseRequest.effective_caller_id:type_name -> vtrpc.CallerID + 13, // 129: query.ReleaseRequest.immediate_caller_id:type_name -> query.VTGateCallerID + 12, // 130: query.ReleaseRequest.target:type_name -> query.Target + 12, // 131: query.StreamHealthResponse.target:type_name -> query.Target + 72, // 132: query.StreamHealthResponse.realtime_stats:type_name -> query.RealtimeStats + 85, // 133: query.StreamHealthResponse.tablet_alias:type_name -> topodata.TabletAlias + 3, // 134: query.TransactionMetadata.state:type_name -> query.TransactionState + 12, // 135: query.TransactionMetadata.participants:type_name -> query.Target + 12, // 136: query.GetSchemaRequest.target:type_name -> query.Target + 4, // 137: query.GetSchemaRequest.table_type:type_name -> query.SchemaTableType + 2, // 138: query.UDFInfo.return_type:type_name -> query.Type + 77, // 139: query.GetSchemaResponse.udfs:type_name -> query.UDFInfo + 81, // 140: query.GetSchemaResponse.table_definition:type_name -> query.GetSchemaResponse.TableDefinitionEntry + 16, // 141: query.BoundQuery.BindVariablesEntry.value:type_name -> query.BindVariable + 11, // 142: query.StreamEvent.Statement.category:type_name -> query.StreamEvent.Statement.Category + 19, // 143: query.StreamEvent.Statement.primary_key_fields:type_name -> query.Field + 20, // 144: query.StreamEvent.Statement.primary_key_values:type_name -> query.Row + 145, // [145:145] is the sub-list for method output_type + 145, // [145:145] is the sub-list for method input_type + 145, // [145:145] is the sub-list for extension type_name + 145, // [145:145] is the sub-list for extension extendee + 0, // [0:145] is the sub-list for field type_name } func init() { file_query_proto_init() } @@ -7372,7 +7510,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*BeginExecuteRequest); i { + switch v := v.(*UnresolvedTransactionsRequest); i { case 0: return &v.state case 1: @@ -7384,7 +7522,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*BeginExecuteResponse); i { + switch v := v.(*UnresolvedTransactionsResponse); i { case 0: return &v.state case 1: @@ -7396,7 +7534,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*BeginStreamExecuteRequest); i { + switch v := v.(*BeginExecuteRequest); i { case 0: return &v.state case 1: @@ -7408,7 +7546,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*BeginStreamExecuteResponse); i { + switch v := v.(*BeginExecuteResponse); i { case 0: return &v.state case 1: @@ -7420,7 +7558,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*MessageStreamRequest); i { + switch v := v.(*BeginStreamExecuteRequest); i { case 0: return &v.state case 1: @@ -7432,7 +7570,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*MessageStreamResponse); i { + switch v := v.(*BeginStreamExecuteResponse); i { case 0: return &v.state case 1: @@ -7444,7 +7582,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*MessageAckRequest); i { + switch v := v.(*MessageStreamRequest); i { case 0: return &v.state case 1: @@ -7456,7 +7594,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*MessageAckResponse); i { + switch v := v.(*MessageStreamResponse); i { case 0: return &v.state case 1: @@ -7468,7 +7606,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ReserveExecuteRequest); i { + switch v := v.(*MessageAckRequest); i { case 0: return &v.state case 1: @@ -7480,7 +7618,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ReserveExecuteResponse); i { + switch v := v.(*MessageAckResponse); i { case 0: return &v.state case 1: @@ -7492,7 +7630,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ReserveStreamExecuteRequest); i { + switch v := v.(*ReserveExecuteRequest); i { case 0: return &v.state case 1: @@ -7504,7 +7642,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ReserveStreamExecuteResponse); i { + switch v := v.(*ReserveExecuteResponse); i { case 0: return &v.state case 1: @@ -7516,7 +7654,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ReserveBeginExecuteRequest); i { + switch v := v.(*ReserveStreamExecuteRequest); i { case 0: return &v.state case 1: @@ -7528,7 +7666,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ReserveBeginExecuteResponse); i { + switch v := v.(*ReserveStreamExecuteResponse); i { case 0: return &v.state case 1: @@ -7540,7 +7678,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ReserveBeginStreamExecuteRequest); i { + switch v := v.(*ReserveBeginExecuteRequest); i { case 0: return &v.state case 1: @@ -7552,7 +7690,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ReserveBeginStreamExecuteResponse); i { + switch v := v.(*ReserveBeginExecuteResponse); i { case 0: return &v.state case 1: @@ -7564,7 +7702,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseRequest); i { + switch v := v.(*ReserveBeginStreamExecuteRequest); i { case 0: return &v.state case 1: @@ -7576,7 +7714,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseResponse); i { + switch v := v.(*ReserveBeginStreamExecuteResponse); i { case 0: return &v.state case 1: @@ -7588,7 +7726,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*StreamHealthRequest); i { + switch v := v.(*ReleaseRequest); i { case 0: return &v.state case 1: @@ -7600,7 +7738,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*RealtimeStats); i { + switch v := v.(*ReleaseResponse); i { case 0: return &v.state case 1: @@ -7612,7 +7750,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*AggregateStats); i { + switch v := v.(*StreamHealthRequest); i { case 0: return &v.state case 1: @@ -7624,7 +7762,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*StreamHealthResponse); i { + switch v := v.(*RealtimeStats); i { case 0: return &v.state case 1: @@ -7636,7 +7774,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*TransactionMetadata); i { + switch v := v.(*AggregateStats); i { case 0: return &v.state case 1: @@ -7648,7 +7786,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaRequest); i { + switch v := v.(*StreamHealthResponse); i { case 0: return &v.state case 1: @@ -7660,7 +7798,7 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*UDFInfo); i { + switch v := v.(*TransactionMetadata); i { case 0: return &v.state case 1: @@ -7672,7 +7810,19 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaResponse); i { + switch v := v.(*GetSchemaRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_query_proto_msgTypes[65].Exporter = func(v any, i int) any { + switch v := v.(*UDFInfo); i { case 0: return &v.state case 1: @@ -7684,6 +7834,18 @@ func file_query_proto_init() { } } file_query_proto_msgTypes[66].Exporter = func(v any, i int) any { + switch v := v.(*GetSchemaResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_query_proto_msgTypes[68].Exporter = func(v any, i int) any { switch v := v.(*StreamEvent_Statement); i { case 0: return &v.state @@ -7702,7 +7864,7 @@ func file_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_query_proto_rawDesc, NumEnums: 12, - NumMessages: 68, + NumMessages: 70, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/query/query_vtproto.pb.go b/go/vt/proto/query/query_vtproto.pb.go index 636c950642d..8092c6abe19 100644 --- a/go/vt/proto/query/query_vtproto.pb.go +++ b/go/vt/proto/query/query_vtproto.pb.go @@ -901,6 +901,49 @@ func (m *ReadTransactionResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *UnresolvedTransactionsRequest) CloneVT() *UnresolvedTransactionsRequest { + if m == nil { + return (*UnresolvedTransactionsRequest)(nil) + } + r := &UnresolvedTransactionsRequest{ + EffectiveCallerId: m.EffectiveCallerId.CloneVT(), + ImmediateCallerId: m.ImmediateCallerId.CloneVT(), + Target: m.Target.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *UnresolvedTransactionsRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *UnresolvedTransactionsResponse) CloneVT() *UnresolvedTransactionsResponse { + if m == nil { + return (*UnresolvedTransactionsResponse)(nil) + } + r := &UnresolvedTransactionsResponse{} + if rhs := m.Transactions; rhs != nil { + tmpContainer := make([]*TransactionMetadata, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Transactions = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *UnresolvedTransactionsResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *BeginExecuteRequest) CloneVT() *BeginExecuteRequest { if m == nil { return (*BeginExecuteRequest)(nil) @@ -3929,6 +3972,114 @@ func (m *ReadTransactionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *UnresolvedTransactionsRequest) 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 *UnresolvedTransactionsRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *UnresolvedTransactionsRequest) 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.Target != nil { + size, err := m.Target.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.ImmediateCallerId != nil { + size, err := m.ImmediateCallerId.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.EffectiveCallerId != nil { + size, err := m.EffectiveCallerId.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnresolvedTransactionsResponse) 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 *UnresolvedTransactionsResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *UnresolvedTransactionsResponse) 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 len(m.Transactions) > 0 { + for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Transactions[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *BeginExecuteRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -6752,6 +6903,44 @@ func (m *ReadTransactionResponse) SizeVT() (n int) { return n } +func (m *UnresolvedTransactionsRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EffectiveCallerId != nil { + l = m.EffectiveCallerId.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.ImmediateCallerId != nil { + l = m.ImmediateCallerId.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Target != nil { + l = m.Target.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *UnresolvedTransactionsResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Transactions) > 0 { + for _, e := range m.Transactions { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + func (m *BeginExecuteRequest) SizeVT() (n int) { if m == nil { return 0 @@ -13613,6 +13802,250 @@ func (m *ReadTransactionResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *UnresolvedTransactionsRequest) 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: UnresolvedTransactionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnresolvedTransactionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveCallerId", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EffectiveCallerId == nil { + m.EffectiveCallerId = &vtrpc.CallerID{} + } + if err := m.EffectiveCallerId.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImmediateCallerId", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ImmediateCallerId == nil { + m.ImmediateCallerId = &VTGateCallerID{} + } + if err := m.ImmediateCallerId.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Target == nil { + m.Target = &Target{} + } + if err := m.Target.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 *UnresolvedTransactionsResponse) 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: UnresolvedTransactionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnresolvedTransactionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) + } + 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 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transactions = append(m.Transactions, &TransactionMetadata{}) + if err := m.Transactions[len(m.Transactions)-1].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 *BeginExecuteRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/vt/proto/queryservice/queryservice.pb.go b/go/vt/proto/queryservice/queryservice.pb.go index 34e8003415d..3ef39575e60 100644 --- a/go/vt/proto/queryservice/queryservice.pb.go +++ b/go/vt/proto/queryservice/queryservice.pb.go @@ -45,7 +45,7 @@ var file_queryservice_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x32, 0xac, 0x11, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x07, 0x45, + 0x6f, 0x32, 0x95, 0x12, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, @@ -105,89 +105,95 @@ var file_queryservice_proto_rawDesc = []byte{ 0x65, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x42, 0x65, 0x67, 0x69, 0x6e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x65, 0x67, 0x69, - 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, - 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x12, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, - 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x12, - 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x21, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, - 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, - 0x22, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x16, 0x55, 0x6e, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x24, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x49, 0x0a, 0x0c, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x12, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x42, + 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x12, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x19, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x65, 0x67, 0x69, + 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1b, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4f, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x12, 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5e, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x63, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x12, 0x27, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x15, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1a, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x07, 0x56, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, - 0x01, 0x12, 0x52, 0x0a, 0x0b, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x77, 0x73, - 0x12, 0x1e, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x0d, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, - 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, - 0x5b, 0x0a, 0x0e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x12, 0x21, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, - 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x42, 0x2b, 0x5a, 0x29, 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, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x12, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x30, 0x01, 0x12, 0x46, 0x0a, 0x07, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, + 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x69, 0x6e, 0x6c, + 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x0b, 0x56, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x69, 0x6e, 0x6c, + 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, + 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x69, 0x6e, 0x6c, + 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, + 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x58, + 0x0a, 0x0d, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x20, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x0e, 0x56, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x69, 0x6e, + 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x2b, 0x5a, 0x29, 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, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_queryservice_proto_goTypes = []any{ @@ -204,49 +210,51 @@ var file_queryservice_proto_goTypes = []any{ (*query.SetRollbackRequest)(nil), // 10: query.SetRollbackRequest (*query.ConcludeTransactionRequest)(nil), // 11: query.ConcludeTransactionRequest (*query.ReadTransactionRequest)(nil), // 12: query.ReadTransactionRequest - (*query.BeginExecuteRequest)(nil), // 13: query.BeginExecuteRequest - (*query.BeginStreamExecuteRequest)(nil), // 14: query.BeginStreamExecuteRequest - (*query.MessageStreamRequest)(nil), // 15: query.MessageStreamRequest - (*query.MessageAckRequest)(nil), // 16: query.MessageAckRequest - (*query.ReserveExecuteRequest)(nil), // 17: query.ReserveExecuteRequest - (*query.ReserveBeginExecuteRequest)(nil), // 18: query.ReserveBeginExecuteRequest - (*query.ReserveStreamExecuteRequest)(nil), // 19: query.ReserveStreamExecuteRequest - (*query.ReserveBeginStreamExecuteRequest)(nil), // 20: query.ReserveBeginStreamExecuteRequest - (*query.ReleaseRequest)(nil), // 21: query.ReleaseRequest - (*query.StreamHealthRequest)(nil), // 22: query.StreamHealthRequest - (*binlogdata.VStreamRequest)(nil), // 23: binlogdata.VStreamRequest - (*binlogdata.VStreamRowsRequest)(nil), // 24: binlogdata.VStreamRowsRequest - (*binlogdata.VStreamTablesRequest)(nil), // 25: binlogdata.VStreamTablesRequest - (*binlogdata.VStreamResultsRequest)(nil), // 26: binlogdata.VStreamResultsRequest - (*query.GetSchemaRequest)(nil), // 27: query.GetSchemaRequest - (*query.ExecuteResponse)(nil), // 28: query.ExecuteResponse - (*query.StreamExecuteResponse)(nil), // 29: query.StreamExecuteResponse - (*query.BeginResponse)(nil), // 30: query.BeginResponse - (*query.CommitResponse)(nil), // 31: query.CommitResponse - (*query.RollbackResponse)(nil), // 32: query.RollbackResponse - (*query.PrepareResponse)(nil), // 33: query.PrepareResponse - (*query.CommitPreparedResponse)(nil), // 34: query.CommitPreparedResponse - (*query.RollbackPreparedResponse)(nil), // 35: query.RollbackPreparedResponse - (*query.CreateTransactionResponse)(nil), // 36: query.CreateTransactionResponse - (*query.StartCommitResponse)(nil), // 37: query.StartCommitResponse - (*query.SetRollbackResponse)(nil), // 38: query.SetRollbackResponse - (*query.ConcludeTransactionResponse)(nil), // 39: query.ConcludeTransactionResponse - (*query.ReadTransactionResponse)(nil), // 40: query.ReadTransactionResponse - (*query.BeginExecuteResponse)(nil), // 41: query.BeginExecuteResponse - (*query.BeginStreamExecuteResponse)(nil), // 42: query.BeginStreamExecuteResponse - (*query.MessageStreamResponse)(nil), // 43: query.MessageStreamResponse - (*query.MessageAckResponse)(nil), // 44: query.MessageAckResponse - (*query.ReserveExecuteResponse)(nil), // 45: query.ReserveExecuteResponse - (*query.ReserveBeginExecuteResponse)(nil), // 46: query.ReserveBeginExecuteResponse - (*query.ReserveStreamExecuteResponse)(nil), // 47: query.ReserveStreamExecuteResponse - (*query.ReserveBeginStreamExecuteResponse)(nil), // 48: query.ReserveBeginStreamExecuteResponse - (*query.ReleaseResponse)(nil), // 49: query.ReleaseResponse - (*query.StreamHealthResponse)(nil), // 50: query.StreamHealthResponse - (*binlogdata.VStreamResponse)(nil), // 51: binlogdata.VStreamResponse - (*binlogdata.VStreamRowsResponse)(nil), // 52: binlogdata.VStreamRowsResponse - (*binlogdata.VStreamTablesResponse)(nil), // 53: binlogdata.VStreamTablesResponse - (*binlogdata.VStreamResultsResponse)(nil), // 54: binlogdata.VStreamResultsResponse - (*query.GetSchemaResponse)(nil), // 55: query.GetSchemaResponse + (*query.UnresolvedTransactionsRequest)(nil), // 13: query.UnresolvedTransactionsRequest + (*query.BeginExecuteRequest)(nil), // 14: query.BeginExecuteRequest + (*query.BeginStreamExecuteRequest)(nil), // 15: query.BeginStreamExecuteRequest + (*query.MessageStreamRequest)(nil), // 16: query.MessageStreamRequest + (*query.MessageAckRequest)(nil), // 17: query.MessageAckRequest + (*query.ReserveExecuteRequest)(nil), // 18: query.ReserveExecuteRequest + (*query.ReserveBeginExecuteRequest)(nil), // 19: query.ReserveBeginExecuteRequest + (*query.ReserveStreamExecuteRequest)(nil), // 20: query.ReserveStreamExecuteRequest + (*query.ReserveBeginStreamExecuteRequest)(nil), // 21: query.ReserveBeginStreamExecuteRequest + (*query.ReleaseRequest)(nil), // 22: query.ReleaseRequest + (*query.StreamHealthRequest)(nil), // 23: query.StreamHealthRequest + (*binlogdata.VStreamRequest)(nil), // 24: binlogdata.VStreamRequest + (*binlogdata.VStreamRowsRequest)(nil), // 25: binlogdata.VStreamRowsRequest + (*binlogdata.VStreamTablesRequest)(nil), // 26: binlogdata.VStreamTablesRequest + (*binlogdata.VStreamResultsRequest)(nil), // 27: binlogdata.VStreamResultsRequest + (*query.GetSchemaRequest)(nil), // 28: query.GetSchemaRequest + (*query.ExecuteResponse)(nil), // 29: query.ExecuteResponse + (*query.StreamExecuteResponse)(nil), // 30: query.StreamExecuteResponse + (*query.BeginResponse)(nil), // 31: query.BeginResponse + (*query.CommitResponse)(nil), // 32: query.CommitResponse + (*query.RollbackResponse)(nil), // 33: query.RollbackResponse + (*query.PrepareResponse)(nil), // 34: query.PrepareResponse + (*query.CommitPreparedResponse)(nil), // 35: query.CommitPreparedResponse + (*query.RollbackPreparedResponse)(nil), // 36: query.RollbackPreparedResponse + (*query.CreateTransactionResponse)(nil), // 37: query.CreateTransactionResponse + (*query.StartCommitResponse)(nil), // 38: query.StartCommitResponse + (*query.SetRollbackResponse)(nil), // 39: query.SetRollbackResponse + (*query.ConcludeTransactionResponse)(nil), // 40: query.ConcludeTransactionResponse + (*query.ReadTransactionResponse)(nil), // 41: query.ReadTransactionResponse + (*query.UnresolvedTransactionsResponse)(nil), // 42: query.UnresolvedTransactionsResponse + (*query.BeginExecuteResponse)(nil), // 43: query.BeginExecuteResponse + (*query.BeginStreamExecuteResponse)(nil), // 44: query.BeginStreamExecuteResponse + (*query.MessageStreamResponse)(nil), // 45: query.MessageStreamResponse + (*query.MessageAckResponse)(nil), // 46: query.MessageAckResponse + (*query.ReserveExecuteResponse)(nil), // 47: query.ReserveExecuteResponse + (*query.ReserveBeginExecuteResponse)(nil), // 48: query.ReserveBeginExecuteResponse + (*query.ReserveStreamExecuteResponse)(nil), // 49: query.ReserveStreamExecuteResponse + (*query.ReserveBeginStreamExecuteResponse)(nil), // 50: query.ReserveBeginStreamExecuteResponse + (*query.ReleaseResponse)(nil), // 51: query.ReleaseResponse + (*query.StreamHealthResponse)(nil), // 52: query.StreamHealthResponse + (*binlogdata.VStreamResponse)(nil), // 53: binlogdata.VStreamResponse + (*binlogdata.VStreamRowsResponse)(nil), // 54: binlogdata.VStreamRowsResponse + (*binlogdata.VStreamTablesResponse)(nil), // 55: binlogdata.VStreamTablesResponse + (*binlogdata.VStreamResultsResponse)(nil), // 56: binlogdata.VStreamResultsResponse + (*query.GetSchemaResponse)(nil), // 57: query.GetSchemaResponse } var file_queryservice_proto_depIdxs = []int32{ 0, // 0: queryservice.Query.Execute:input_type -> query.ExecuteRequest @@ -262,51 +270,53 @@ var file_queryservice_proto_depIdxs = []int32{ 10, // 10: queryservice.Query.SetRollback:input_type -> query.SetRollbackRequest 11, // 11: queryservice.Query.ConcludeTransaction:input_type -> query.ConcludeTransactionRequest 12, // 12: queryservice.Query.ReadTransaction:input_type -> query.ReadTransactionRequest - 13, // 13: queryservice.Query.BeginExecute:input_type -> query.BeginExecuteRequest - 14, // 14: queryservice.Query.BeginStreamExecute:input_type -> query.BeginStreamExecuteRequest - 15, // 15: queryservice.Query.MessageStream:input_type -> query.MessageStreamRequest - 16, // 16: queryservice.Query.MessageAck:input_type -> query.MessageAckRequest - 17, // 17: queryservice.Query.ReserveExecute:input_type -> query.ReserveExecuteRequest - 18, // 18: queryservice.Query.ReserveBeginExecute:input_type -> query.ReserveBeginExecuteRequest - 19, // 19: queryservice.Query.ReserveStreamExecute:input_type -> query.ReserveStreamExecuteRequest - 20, // 20: queryservice.Query.ReserveBeginStreamExecute:input_type -> query.ReserveBeginStreamExecuteRequest - 21, // 21: queryservice.Query.Release:input_type -> query.ReleaseRequest - 22, // 22: queryservice.Query.StreamHealth:input_type -> query.StreamHealthRequest - 23, // 23: queryservice.Query.VStream:input_type -> binlogdata.VStreamRequest - 24, // 24: queryservice.Query.VStreamRows:input_type -> binlogdata.VStreamRowsRequest - 25, // 25: queryservice.Query.VStreamTables:input_type -> binlogdata.VStreamTablesRequest - 26, // 26: queryservice.Query.VStreamResults:input_type -> binlogdata.VStreamResultsRequest - 27, // 27: queryservice.Query.GetSchema:input_type -> query.GetSchemaRequest - 28, // 28: queryservice.Query.Execute:output_type -> query.ExecuteResponse - 29, // 29: queryservice.Query.StreamExecute:output_type -> query.StreamExecuteResponse - 30, // 30: queryservice.Query.Begin:output_type -> query.BeginResponse - 31, // 31: queryservice.Query.Commit:output_type -> query.CommitResponse - 32, // 32: queryservice.Query.Rollback:output_type -> query.RollbackResponse - 33, // 33: queryservice.Query.Prepare:output_type -> query.PrepareResponse - 34, // 34: queryservice.Query.CommitPrepared:output_type -> query.CommitPreparedResponse - 35, // 35: queryservice.Query.RollbackPrepared:output_type -> query.RollbackPreparedResponse - 36, // 36: queryservice.Query.CreateTransaction:output_type -> query.CreateTransactionResponse - 37, // 37: queryservice.Query.StartCommit:output_type -> query.StartCommitResponse - 38, // 38: queryservice.Query.SetRollback:output_type -> query.SetRollbackResponse - 39, // 39: queryservice.Query.ConcludeTransaction:output_type -> query.ConcludeTransactionResponse - 40, // 40: queryservice.Query.ReadTransaction:output_type -> query.ReadTransactionResponse - 41, // 41: queryservice.Query.BeginExecute:output_type -> query.BeginExecuteResponse - 42, // 42: queryservice.Query.BeginStreamExecute:output_type -> query.BeginStreamExecuteResponse - 43, // 43: queryservice.Query.MessageStream:output_type -> query.MessageStreamResponse - 44, // 44: queryservice.Query.MessageAck:output_type -> query.MessageAckResponse - 45, // 45: queryservice.Query.ReserveExecute:output_type -> query.ReserveExecuteResponse - 46, // 46: queryservice.Query.ReserveBeginExecute:output_type -> query.ReserveBeginExecuteResponse - 47, // 47: queryservice.Query.ReserveStreamExecute:output_type -> query.ReserveStreamExecuteResponse - 48, // 48: queryservice.Query.ReserveBeginStreamExecute:output_type -> query.ReserveBeginStreamExecuteResponse - 49, // 49: queryservice.Query.Release:output_type -> query.ReleaseResponse - 50, // 50: queryservice.Query.StreamHealth:output_type -> query.StreamHealthResponse - 51, // 51: queryservice.Query.VStream:output_type -> binlogdata.VStreamResponse - 52, // 52: queryservice.Query.VStreamRows:output_type -> binlogdata.VStreamRowsResponse - 53, // 53: queryservice.Query.VStreamTables:output_type -> binlogdata.VStreamTablesResponse - 54, // 54: queryservice.Query.VStreamResults:output_type -> binlogdata.VStreamResultsResponse - 55, // 55: queryservice.Query.GetSchema:output_type -> query.GetSchemaResponse - 28, // [28:56] is the sub-list for method output_type - 0, // [0:28] is the sub-list for method input_type + 13, // 13: queryservice.Query.UnresolvedTransactions:input_type -> query.UnresolvedTransactionsRequest + 14, // 14: queryservice.Query.BeginExecute:input_type -> query.BeginExecuteRequest + 15, // 15: queryservice.Query.BeginStreamExecute:input_type -> query.BeginStreamExecuteRequest + 16, // 16: queryservice.Query.MessageStream:input_type -> query.MessageStreamRequest + 17, // 17: queryservice.Query.MessageAck:input_type -> query.MessageAckRequest + 18, // 18: queryservice.Query.ReserveExecute:input_type -> query.ReserveExecuteRequest + 19, // 19: queryservice.Query.ReserveBeginExecute:input_type -> query.ReserveBeginExecuteRequest + 20, // 20: queryservice.Query.ReserveStreamExecute:input_type -> query.ReserveStreamExecuteRequest + 21, // 21: queryservice.Query.ReserveBeginStreamExecute:input_type -> query.ReserveBeginStreamExecuteRequest + 22, // 22: queryservice.Query.Release:input_type -> query.ReleaseRequest + 23, // 23: queryservice.Query.StreamHealth:input_type -> query.StreamHealthRequest + 24, // 24: queryservice.Query.VStream:input_type -> binlogdata.VStreamRequest + 25, // 25: queryservice.Query.VStreamRows:input_type -> binlogdata.VStreamRowsRequest + 26, // 26: queryservice.Query.VStreamTables:input_type -> binlogdata.VStreamTablesRequest + 27, // 27: queryservice.Query.VStreamResults:input_type -> binlogdata.VStreamResultsRequest + 28, // 28: queryservice.Query.GetSchema:input_type -> query.GetSchemaRequest + 29, // 29: queryservice.Query.Execute:output_type -> query.ExecuteResponse + 30, // 30: queryservice.Query.StreamExecute:output_type -> query.StreamExecuteResponse + 31, // 31: queryservice.Query.Begin:output_type -> query.BeginResponse + 32, // 32: queryservice.Query.Commit:output_type -> query.CommitResponse + 33, // 33: queryservice.Query.Rollback:output_type -> query.RollbackResponse + 34, // 34: queryservice.Query.Prepare:output_type -> query.PrepareResponse + 35, // 35: queryservice.Query.CommitPrepared:output_type -> query.CommitPreparedResponse + 36, // 36: queryservice.Query.RollbackPrepared:output_type -> query.RollbackPreparedResponse + 37, // 37: queryservice.Query.CreateTransaction:output_type -> query.CreateTransactionResponse + 38, // 38: queryservice.Query.StartCommit:output_type -> query.StartCommitResponse + 39, // 39: queryservice.Query.SetRollback:output_type -> query.SetRollbackResponse + 40, // 40: queryservice.Query.ConcludeTransaction:output_type -> query.ConcludeTransactionResponse + 41, // 41: queryservice.Query.ReadTransaction:output_type -> query.ReadTransactionResponse + 42, // 42: queryservice.Query.UnresolvedTransactions:output_type -> query.UnresolvedTransactionsResponse + 43, // 43: queryservice.Query.BeginExecute:output_type -> query.BeginExecuteResponse + 44, // 44: queryservice.Query.BeginStreamExecute:output_type -> query.BeginStreamExecuteResponse + 45, // 45: queryservice.Query.MessageStream:output_type -> query.MessageStreamResponse + 46, // 46: queryservice.Query.MessageAck:output_type -> query.MessageAckResponse + 47, // 47: queryservice.Query.ReserveExecute:output_type -> query.ReserveExecuteResponse + 48, // 48: queryservice.Query.ReserveBeginExecute:output_type -> query.ReserveBeginExecuteResponse + 49, // 49: queryservice.Query.ReserveStreamExecute:output_type -> query.ReserveStreamExecuteResponse + 50, // 50: queryservice.Query.ReserveBeginStreamExecute:output_type -> query.ReserveBeginStreamExecuteResponse + 51, // 51: queryservice.Query.Release:output_type -> query.ReleaseResponse + 52, // 52: queryservice.Query.StreamHealth:output_type -> query.StreamHealthResponse + 53, // 53: queryservice.Query.VStream:output_type -> binlogdata.VStreamResponse + 54, // 54: queryservice.Query.VStreamRows:output_type -> binlogdata.VStreamRowsResponse + 55, // 55: queryservice.Query.VStreamTables:output_type -> binlogdata.VStreamTablesResponse + 56, // 56: queryservice.Query.VStreamResults:output_type -> binlogdata.VStreamResultsResponse + 57, // 57: queryservice.Query.GetSchema:output_type -> query.GetSchemaResponse + 29, // [29:58] is the sub-list for method output_type + 0, // [0:29] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/go/vt/proto/queryservice/queryservice_grpc.pb.go b/go/vt/proto/queryservice/queryservice_grpc.pb.go index c05ea4f83a3..ebf52ce4dcf 100644 --- a/go/vt/proto/queryservice/queryservice_grpc.pb.go +++ b/go/vt/proto/queryservice/queryservice_grpc.pb.go @@ -54,6 +54,8 @@ type QueryClient interface { ConcludeTransaction(ctx context.Context, in *query.ConcludeTransactionRequest, opts ...grpc.CallOption) (*query.ConcludeTransactionResponse, error) // ReadTransaction returns the 2pc transaction info. ReadTransaction(ctx context.Context, in *query.ReadTransactionRequest, opts ...grpc.CallOption) (*query.ReadTransactionResponse, error) + // UnresolvedTransactions returns the 2pc transaction info. + UnresolvedTransactions(ctx context.Context, in *query.UnresolvedTransactionsRequest, opts ...grpc.CallOption) (*query.UnresolvedTransactionsResponse, error) // BeginExecute executes a begin and the specified SQL query. BeginExecute(ctx context.Context, in *query.BeginExecuteRequest, opts ...grpc.CallOption) (*query.BeginExecuteResponse, error) // BeginStreamExecute executes a begin and the specified SQL query. @@ -235,6 +237,15 @@ func (c *queryClient) ReadTransaction(ctx context.Context, in *query.ReadTransac return out, nil } +func (c *queryClient) UnresolvedTransactions(ctx context.Context, in *query.UnresolvedTransactionsRequest, opts ...grpc.CallOption) (*query.UnresolvedTransactionsResponse, error) { + out := new(query.UnresolvedTransactionsResponse) + err := c.cc.Invoke(ctx, "/queryservice.Query/UnresolvedTransactions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) BeginExecute(ctx context.Context, in *query.BeginExecuteRequest, opts ...grpc.CallOption) (*query.BeginExecuteResponse, error) { out := new(query.BeginExecuteResponse) err := c.cc.Invoke(ctx, "/queryservice.Query/BeginExecute", in, out, opts...) @@ -634,6 +645,8 @@ type QueryServer interface { ConcludeTransaction(context.Context, *query.ConcludeTransactionRequest) (*query.ConcludeTransactionResponse, error) // ReadTransaction returns the 2pc transaction info. ReadTransaction(context.Context, *query.ReadTransactionRequest) (*query.ReadTransactionResponse, error) + // UnresolvedTransactions returns the 2pc transaction info. + UnresolvedTransactions(context.Context, *query.UnresolvedTransactionsRequest) (*query.UnresolvedTransactionsResponse, error) // BeginExecute executes a begin and the specified SQL query. BeginExecute(context.Context, *query.BeginExecuteRequest) (*query.BeginExecuteResponse, error) // BeginStreamExecute executes a begin and the specified SQL query. @@ -711,6 +724,9 @@ func (UnimplementedQueryServer) ConcludeTransaction(context.Context, *query.Conc func (UnimplementedQueryServer) ReadTransaction(context.Context, *query.ReadTransactionRequest) (*query.ReadTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ReadTransaction not implemented") } +func (UnimplementedQueryServer) UnresolvedTransactions(context.Context, *query.UnresolvedTransactionsRequest) (*query.UnresolvedTransactionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnresolvedTransactions not implemented") +} func (UnimplementedQueryServer) BeginExecute(context.Context, *query.BeginExecuteRequest) (*query.BeginExecuteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BeginExecute not implemented") } @@ -1006,6 +1022,24 @@ func _Query_ReadTransaction_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_UnresolvedTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(query.UnresolvedTransactionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnresolvedTransactions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/queryservice.Query/UnresolvedTransactions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnresolvedTransactions(ctx, req.(*query.UnresolvedTransactionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_BeginExecute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(query.BeginExecuteRequest) if err := dec(in); err != nil { @@ -1361,6 +1395,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "ReadTransaction", Handler: _Query_ReadTransaction_Handler, }, + { + MethodName: "UnresolvedTransactions", + Handler: _Query_UnresolvedTransactions_Handler, + }, { MethodName: "BeginExecute", Handler: _Query_BeginExecute_Handler, diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index 99f7544d18a..0331d30f2ba 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -553,6 +553,12 @@ func (itc *internalTabletConn) ReadTransaction(ctx context.Context, target *quer return metadata, tabletconn.ErrorFromGRPC(vterrors.ToGRPC(err)) } +// UnresolvedTransactions is part of queryservice.QueryService +func (itc *internalTabletConn) UnresolvedTransactions(ctx context.Context, target *querypb.Target) (transactions []*querypb.TransactionMetadata, err error) { + transactions, err = itc.tablet.qsc.QueryService().UnresolvedTransactions(ctx, target) + return transactions, tabletconn.ErrorFromGRPC(vterrors.ToGRPC(err)) +} + // BeginExecute is part of queryservice.QueryService func (itc *internalTabletConn) BeginExecute( ctx context.Context, diff --git a/go/vt/vttablet/endtoend/framework/client.go b/go/vt/vttablet/endtoend/framework/client.go index dc4b7f9f339..1cbff71dc25 100644 --- a/go/vt/vttablet/endtoend/framework/client.go +++ b/go/vt/vttablet/endtoend/framework/client.go @@ -178,6 +178,11 @@ func (client *QueryClient) ReadTransaction(dtid string) (*querypb.TransactionMet return client.server.ReadTransaction(client.ctx, client.target, dtid) } +// UnresolvedTransactions invokes the UnresolvedTransactions API of TabletServer. +func (client *QueryClient) UnresolvedTransactions() ([]*querypb.TransactionMetadata, error) { + return client.server.UnresolvedTransactions(client.ctx, client.target) +} + // SetServingType is for testing transitions. // It currently supports only primary->replica and back. func (client *QueryClient) SetServingType(tabletType topodatapb.TabletType) error { diff --git a/go/vt/vttablet/endtoend/transaction_test.go b/go/vt/vttablet/endtoend/transaction_test.go index b15e73585ba..296f5c18b56 100644 --- a/go/vt/vttablet/endtoend/transaction_test.go +++ b/go/vt/vttablet/endtoend/transaction_test.go @@ -737,3 +737,32 @@ func TestManualTwopcz(t *testing.T) { fmt.Print("Sleeping for 30 seconds\n") time.Sleep(30 * time.Second) } + +// TestUnresolvedTransactions tests the UnresolvedTransactions API. +func TestUnresolvedTransactions(t *testing.T) { + client := framework.NewClient() + + participants := []*querypb.Target{ + {Keyspace: "ks1", Shard: "-80"}, + {Keyspace: "ks1", Shard: "80-"}, + } + err := client.CreateTransaction("dtid01", participants) + require.NoError(t, err) + + // expected no transaction to show here, as 1 second not passed. + transactions, err := client.UnresolvedTransactions() + require.NoError(t, err) + require.Empty(t, transactions) + + // abandon age is 1 second. + time.Sleep(2 * time.Second) + + transactions, err = client.UnresolvedTransactions() + require.NoError(t, err) + want := []*querypb.TransactionMetadata{{ + Dtid: "dtid01", + State: querypb.TransactionState_PREPARE, + Participants: participants, + }} + utils.MustMatch(t, want, transactions) +} diff --git a/go/vt/vttablet/grpcqueryservice/server.go b/go/vt/vttablet/grpcqueryservice/server.go index 64a7697162d..c26d291aa50 100644 --- a/go/vt/vttablet/grpcqueryservice/server.go +++ b/go/vt/vttablet/grpcqueryservice/server.go @@ -233,6 +233,21 @@ func (q *query) ReadTransaction(ctx context.Context, request *querypb.ReadTransa return &querypb.ReadTransactionResponse{Metadata: result}, nil } +// UnresolvedTransactions is part of the queryservice.QueryServer interface +func (q *query) UnresolvedTransactions(ctx context.Context, request *querypb.UnresolvedTransactionsRequest) (response *querypb.UnresolvedTransactionsResponse, err error) { + defer q.server.HandlePanic(&err) + ctx = callerid.NewContext(callinfo.GRPCCallInfo(ctx), + request.EffectiveCallerId, + request.ImmediateCallerId, + ) + transactions, err := q.server.UnresolvedTransactions(ctx, request.Target) + if err != nil { + return nil, vterrors.ToGRPC(err) + } + + return &querypb.UnresolvedTransactionsResponse{Transactions: transactions}, nil +} + // BeginExecute is part of the queryservice.QueryServer interface func (q *query) BeginExecute(ctx context.Context, request *querypb.BeginExecuteRequest) (response *querypb.BeginExecuteResponse, err error) { defer q.server.HandlePanic(&err) diff --git a/go/vt/vttablet/grpctabletconn/conn.go b/go/vt/vttablet/grpctabletconn/conn.go index fe446fbec27..a76505383b7 100644 --- a/go/vt/vttablet/grpctabletconn/conn.go +++ b/go/vt/vttablet/grpctabletconn/conn.go @@ -438,6 +438,26 @@ func (conn *gRPCQueryClient) ReadTransaction(ctx context.Context, target *queryp return response.Metadata, nil } +// UnresolvedTransactions returns all unresolved distributed transactions. +func (conn *gRPCQueryClient) UnresolvedTransactions(ctx context.Context, target *querypb.Target) ([]*querypb.TransactionMetadata, error) { + conn.mu.RLock() + defer conn.mu.RUnlock() + if conn.cc == nil { + return nil, tabletconn.ConnClosed + } + + req := &querypb.UnresolvedTransactionsRequest{ + Target: target, + EffectiveCallerId: callerid.EffectiveCallerIDFromContext(ctx), + ImmediateCallerId: callerid.ImmediateCallerIDFromContext(ctx), + } + response, err := conn.c.UnresolvedTransactions(ctx, req) + if err != nil { + return nil, tabletconn.ErrorFromGRPC(err) + } + return response.Transactions, nil +} + // BeginExecute starts a transaction and runs an Execute. func (conn *gRPCQueryClient) BeginExecute(ctx context.Context, target *querypb.Target, preQueries []string, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (state queryservice.TransactionState, result *sqltypes.Result, err error) { conn.mu.RLock() diff --git a/go/vt/vttablet/queryservice/queryservice.go b/go/vt/vttablet/queryservice/queryservice.go index c4d72b0c927..10cf48fd8b1 100644 --- a/go/vt/vttablet/queryservice/queryservice.go +++ b/go/vt/vttablet/queryservice/queryservice.go @@ -76,6 +76,9 @@ type QueryService interface { // ReadTransaction returns the metadata for the specified dtid. ReadTransaction(ctx context.Context, target *querypb.Target, dtid string) (metadata *querypb.TransactionMetadata, err error) + // UnresolvedTransactions returns the list of unresolved distributed transactions. + UnresolvedTransactions(ctx context.Context, target *querypb.Target) ([]*querypb.TransactionMetadata, error) + // Execute for query execution Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) // StreamExecute for query execution with streaming diff --git a/go/vt/vttablet/queryservice/wrapped.go b/go/vt/vttablet/queryservice/wrapped.go index 910a1d8948e..d24bd051c4a 100644 --- a/go/vt/vttablet/queryservice/wrapped.go +++ b/go/vt/vttablet/queryservice/wrapped.go @@ -176,6 +176,15 @@ func (ws *wrappedService) ReadTransaction(ctx context.Context, target *querypb.T return metadata, err } +func (ws *wrappedService) UnresolvedTransactions(ctx context.Context, target *querypb.Target) (transactions []*querypb.TransactionMetadata, err error) { + err = ws.wrapper(ctx, target, ws.impl, "UnresolvedTransactions", false, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { + var innerErr error + transactions, innerErr = conn.UnresolvedTransactions(ctx, target) + return canRetry(ctx, innerErr), innerErr + }) + return transactions, err +} + func (ws *wrappedService) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (qr *sqltypes.Result, err error) { inDedicatedConn := transactionID != 0 || reservedID != 0 err = ws.wrapper(ctx, target, ws.impl, "Execute", inDedicatedConn, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { diff --git a/go/vt/vttablet/sandboxconn/sandboxconn.go b/go/vt/vttablet/sandboxconn/sandboxconn.go index 618a87b1d81..e7bc3221058 100644 --- a/go/vt/vttablet/sandboxconn/sandboxconn.go +++ b/go/vt/vttablet/sandboxconn/sandboxconn.go @@ -427,6 +427,12 @@ func (sbc *SandboxConn) ReadTransaction(ctx context.Context, target *querypb.Tar return nil, nil } +// UnresolvedTransactions is part of the QueryService interface. +func (sbc *SandboxConn) UnresolvedTransactions(context.Context, *querypb.Target) ([]*querypb.TransactionMetadata, error) { + // TODO implement me + panic("implement me") +} + // BeginExecute is part of the QueryService interface. func (sbc *SandboxConn) BeginExecute(ctx context.Context, target *querypb.Target, preQueries []string, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (queryservice.TransactionState, *sqltypes.Result, error) { sbc.panicIfNeeded() diff --git a/go/vt/vttablet/tabletconntest/fakequeryservice.go b/go/vt/vttablet/tabletconntest/fakequeryservice.go index 2efd7d330ed..54deee1aed7 100644 --- a/go/vt/vttablet/tabletconntest/fakequeryservice.go +++ b/go/vt/vttablet/tabletconntest/fakequeryservice.go @@ -359,6 +359,18 @@ func (f *FakeQueryService) ReadTransaction(ctx context.Context, target *querypb. return Metadata, nil } +// UnresolvedTransactions is part of the queryservice.QueryService interface +func (f *FakeQueryService) UnresolvedTransactions(ctx context.Context, target *querypb.Target) ([]*querypb.TransactionMetadata, error) { + if f.HasError { + return nil, f.TabletError + } + if f.Panics { + panic(fmt.Errorf("test-triggered panic")) + } + f.checkTargetCallerID(ctx, "UnresolvedTransactions", target) + return []*querypb.TransactionMetadata{Metadata}, nil +} + // ExecuteQuery is a fake test query. const ExecuteQuery = "executeQuery" diff --git a/go/vt/vttablet/tabletconntest/tabletconntest.go b/go/vt/vttablet/tabletconntest/tabletconntest.go index f8dafb0636e..0f443d8d58d 100644 --- a/go/vt/vttablet/tabletconntest/tabletconntest.go +++ b/go/vt/vttablet/tabletconntest/tabletconntest.go @@ -399,6 +399,33 @@ func testReadTransactionPanics(t *testing.T, conn queryservice.QueryService, f * }) } +func testUnresolvedTransactions(t *testing.T, conn queryservice.QueryService, f *FakeQueryService) { + t.Log("testUnresolvedTransactions") + ctx := context.Background() + ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) + transactions, err := conn.UnresolvedTransactions(ctx, TestTarget) + require.NoError(t, err) + require.True(t, proto.Equal(transactions[0], Metadata)) +} + +func testUnresolvedTransactionsError(t *testing.T, conn queryservice.QueryService, f *FakeQueryService) { + t.Log("testUnresolvedTransactionsError") + f.HasError = true + testErrorHelper(t, f, "UnresolvedTransactions", func(ctx context.Context) error { + _, err := conn.UnresolvedTransactions(ctx, TestTarget) + return err + }) + f.HasError = false +} + +func testUnresolvedTransactionsPanics(t *testing.T, conn queryservice.QueryService, f *FakeQueryService) { + t.Log("testUnresolvedTransactionsPanics") + testPanicHelper(t, f, "UnresolvedTransactions", func(ctx context.Context) error { + _, err := conn.UnresolvedTransactions(ctx, TestTarget) + return err + }) +} + func testExecute(t *testing.T, conn queryservice.QueryService, f *FakeQueryService) { t.Log("testExecute") f.ExpectedTransactionID = ExecuteTransactionID @@ -936,6 +963,7 @@ func TestSuite(ctx context.Context, t *testing.T, protocol string, tablet *topod testSetRollback, testConcludeTransaction, testReadTransaction, + testUnresolvedTransactions, testExecute, testBeginExecute, testStreamExecute, @@ -956,6 +984,7 @@ func TestSuite(ctx context.Context, t *testing.T, protocol string, tablet *topod testSetRollbackError, testConcludeTransactionError, testReadTransactionError, + testUnresolvedTransactionsError, testExecuteError, testBeginExecuteErrorInBegin, testBeginExecuteErrorInExecute, @@ -979,6 +1008,7 @@ func TestSuite(ctx context.Context, t *testing.T, protocol string, tablet *topod testSetRollbackPanics, testConcludeTransactionPanics, testReadTransactionPanics, + testUnresolvedTransactionsPanics, testExecutePanics, testBeginExecutePanics, testStreamExecutePanics, diff --git a/go/vt/vttablet/tabletserver/dt_executor.go b/go/vt/vttablet/tabletserver/dt_executor.go index baaa8b43a4e..3bc4d4d98b5 100644 --- a/go/vt/vttablet/tabletserver/dt_executor.go +++ b/go/vt/vttablet/tabletserver/dt_executor.go @@ -20,15 +20,13 @@ import ( "context" "time" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" - "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/log" - querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" + "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" ) // DTExecutor is used for executing a distributed transactional request. @@ -290,3 +288,8 @@ func (dte *DTExecutor) inTransaction(f func(*StatefulConnection) error) error { } return nil } + +// UnresolvedTransactions returns the list of unresolved distributed transactions. +func (dte *DTExecutor) UnresolvedTransactions() ([]*querypb.TransactionMetadata, error) { + return dte.te.twoPC.UnresolvedTransactions(dte.ctx, time.Now().Add(-dte.te.abandonAge)) +} diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 18825f51f77..06558b96145 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -44,6 +44,10 @@ import ( "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/mysqlctl" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + querypb "vitess.io/vitess/go/vt/proto/query" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/srvtopo" @@ -67,11 +71,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/txserializer" "vitess.io/vitess/go/vt/vttablet/tabletserver/txthrottler" "vitess.io/vitess/go/vt/vttablet/tabletserver/vstreamer" - - binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" - querypb "vitess.io/vitess/go/vt/proto/query" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" - vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" ) // logPoolFull is for throttling transaction / query pool full messages in the log. @@ -748,6 +747,21 @@ func (tsv *TabletServer) ReadTransaction(ctx context.Context, target *querypb.Ta return metadata, err } +// UnresolvedTransactions returns the unresolved distributed transaction record. +func (tsv *TabletServer) UnresolvedTransactions(ctx context.Context, target *querypb.Target) (transactions []*querypb.TransactionMetadata, err error) { + err = tsv.execRequest( + ctx, tsv.loadQueryTimeout(), + "UnresolvedTransactions", "unresolved_transaction", nil, + target, nil, false, /* allowOnShutdown */ + func(ctx context.Context, logStats *tabletenv.LogStats) error { + txe := NewDTExecutor(ctx, tsv.te, logStats) + transactions, err = txe.UnresolvedTransactions() + return err + }, + ) + return +} + // Execute executes the query and returns the result as response. func (tsv *TabletServer) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (result *sqltypes.Result, err error) { span, ctx := trace.NewSpan(ctx, "TabletServer.Execute") diff --git a/go/vt/vttablet/tabletserver/twopc.go b/go/vt/vttablet/tabletserver/twopc.go index e53dd40ca8a..ad652d43135 100644 --- a/go/vt/vttablet/tabletserver/twopc.go +++ b/go/vt/vttablet/tabletserver/twopc.go @@ -22,19 +22,17 @@ import ( "time" "vitess.io/vitess/go/constants/sidecar" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" - "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/dbconfigs" "vitess.io/vitess/go/vt/dbconnpool" "vitess.io/vitess/go/vt/log" - "vitess.io/vitess/go/vt/sqlparser" - "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" - querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" + "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" ) const ( @@ -51,12 +49,18 @@ const ( sqlReadAllRedo = `select t.dtid, t.state, t.time_created, s.statement from %s.redo_state t - join %s.redo_statement s on t.dtid = s.dtid + join %s.redo_statement s on t.dtid = s.dtid order by t.dtid, s.id` sqlReadAllTransactions = `select t.dtid, t.state, t.time_created, p.keyspace, p.shard from %s.dt_state t - join %s.dt_participant p on t.dtid = p.dtid + join %s.dt_participant p on t.dtid = p.dtid + order by t.dtid, p.id` + + sqlReadAllUnresolvedTransactions = `select t.dtid, t.state, p.keyspace, p.shard + from %s.dt_state t + join %s.dt_participant p on t.dtid = p.dtid + where time_created < %a order by t.dtid, p.id` ) @@ -72,15 +76,16 @@ type TwoPC struct { readAllRedo string countUnresolvedRedo *sqlparser.ParsedQuery - insertTransaction *sqlparser.ParsedQuery - insertParticipants *sqlparser.ParsedQuery - transition *sqlparser.ParsedQuery - deleteTransaction *sqlparser.ParsedQuery - deleteParticipants *sqlparser.ParsedQuery - readTransaction *sqlparser.ParsedQuery - readParticipants *sqlparser.ParsedQuery - readAbandoned *sqlparser.ParsedQuery - readAllTransactions string + insertTransaction *sqlparser.ParsedQuery + insertParticipants *sqlparser.ParsedQuery + transition *sqlparser.ParsedQuery + deleteTransaction *sqlparser.ParsedQuery + deleteParticipants *sqlparser.ParsedQuery + readTransaction *sqlparser.ParsedQuery + readParticipants *sqlparser.ParsedQuery + readAbandoned *sqlparser.ParsedQuery + readUnresolvedTransactions *sqlparser.ParsedQuery + readAllTransactions string } // NewTwoPC creates a TwoPC variable. @@ -136,6 +141,8 @@ func (tpc *TwoPC) initializeQueries() { "select dtid, time_created from %s.dt_state where time_created < %a", dbname, ":time_created") tpc.readAllTransactions = fmt.Sprintf(sqlReadAllTransactions, dbname, dbname) + tpc.readUnresolvedTransactions = sqlparser.BuildParsedQuery(sqlReadAllUnresolvedTransactions, + dbname, dbname, ":time_created") } // Open starts the TwoPC service. @@ -475,5 +482,70 @@ func (tpc *TwoPC) read(ctx context.Context, conn *connpool.Conn, pq *sqlparser.P if err != nil { return nil, err } + // TODO: check back for limit, 10k is too high already to have unresolved transactions. return conn.Exec(ctx, q, 10000, false) } + +// UnresolvedTransactions returns the list of unresolved transactions +// the list from database is retrieved as +// dtid | state | keyspace | shard +// 1 | PREPARE | ks | 40-80 +// 1 | PREPARE | ks | 80-c0 +// 2 | COMMIT | ks | -40 +// Here there are 2 dtids with 2 participants for dtid:1 and 1 participant for dtid:2. +func (tpc *TwoPC) UnresolvedTransactions(ctx context.Context, abandonTime time.Time) ([]*querypb.TransactionMetadata, error) { + conn, err := tpc.readPool.Get(ctx, nil) + if err != nil { + return nil, err + } + defer conn.Recycle() + + bindVars := map[string]*querypb.BindVariable{ + "time_created": sqltypes.Int64BindVariable(abandonTime.UnixNano()), + } + qr, err := tpc.read(ctx, conn.Conn, tpc.readUnresolvedTransactions, bindVars) + if err != nil { + return nil, err + } + + var ( + txs []*querypb.TransactionMetadata + currentTx *querypb.TransactionMetadata + ) + + appendCurrentTx := func() { + if currentTx != nil { + txs = append(txs, currentTx) + } + } + + for _, row := range qr.Rows { + // Extract the distributed transaction ID from the row + dtid := row[0].ToString() + + // Check if we are starting a new transaction + if currentTx == nil || currentTx.Dtid != dtid { + // If we have an existing transaction, append it to the list + appendCurrentTx() + + // Extract the transaction state and initialize a new TransactionMetadata + stateID, _ := row[1].ToInt() + currentTx = &querypb.TransactionMetadata{ + Dtid: dtid, + State: querypb.TransactionState(stateID), + Participants: []*querypb.Target{}, + } + } + + // Add the current participant (keyspace and shard) to the transaction + currentTx.Participants = append(currentTx.Participants, &querypb.Target{ + Keyspace: row[2].ToString(), + Shard: row[3].ToString(), + }) + } + + // Append the last transaction if it exists + appendCurrentTx() + + return txs, nil +} diff --git a/go/vt/vttablet/tabletserver/twopc_test.go b/go/vt/vttablet/tabletserver/twopc_test.go index 2ef5e05b7c7..af67f644830 100644 --- a/go/vt/vttablet/tabletserver/twopc_test.go +++ b/go/vt/vttablet/tabletserver/twopc_test.go @@ -23,11 +23,12 @@ import ( "testing" "time" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" + "github.com/stretchr/testify/require" "vitess.io/vitess/go/sqltypes" - + "vitess.io/vitess/go/test/utils" querypb "vitess.io/vitess/go/vt/proto/query" + "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" ) func TestReadAllRedo(t *testing.T) { @@ -396,3 +397,74 @@ func jsonStr(v any) string { out, _ := json.Marshal(v) return string(out) } + +// TestUnresolvedTransactions tests the retrieval of unresolved transactions from the database and +// providing the output in proto format. +func TestUnresolvedTransactions(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + _, tsv, db := newTestTxExecutor(t, ctx) + defer db.Close() + defer tsv.StopService() + + conn, err := tsv.qe.conns.Get(ctx, nil) + require.NoError(t, err) + defer conn.Recycle() + + tcases := []struct { + name string + unresolvedTx *sqltypes.Result + expectedTx []*querypb.TransactionMetadata + }{{ + name: "no unresolved transactions", + unresolvedTx: &sqltypes.Result{}, + }, { + name: "one unresolved transaction", + unresolvedTx: sqltypes.MakeTestResult( + sqltypes.MakeTestFields("dtid|state|keyspace|shard", + "VARBINARY|INT64|VARCHAR|VARCHAR"), + "dtid0|1|ks01|shard01", + "dtid0|1|ks01|shard02"), + expectedTx: []*querypb.TransactionMetadata{{ + Dtid: "dtid0", + State: querypb.TransactionState_PREPARE, + Participants: []*querypb.Target{ + {Keyspace: "ks01", Shard: "shard01"}, + {Keyspace: "ks01", Shard: "shard02"}, + }}}, + }, { + name: "two unresolved transaction", + unresolvedTx: sqltypes.MakeTestResult( + sqltypes.MakeTestFields("dtid|state|keyspace|shard", + "VARBINARY|INT64|VARCHAR|VARCHAR"), + "dtid0|2|ks01|shard01", + "dtid0|2|ks01|shard02", + "dtid1|3|ks02|shard03", + "dtid1|3|ks01|shard02"), + expectedTx: []*querypb.TransactionMetadata{{ + Dtid: "dtid0", + State: querypb.TransactionState_COMMIT, + Participants: []*querypb.Target{ + {Keyspace: "ks01", Shard: "shard01"}, + {Keyspace: "ks01", Shard: "shard02"}, + }}, { + Dtid: "dtid1", + State: querypb.TransactionState_ROLLBACK, + Participants: []*querypb.Target{ + {Keyspace: "ks02", Shard: "shard03"}, + {Keyspace: "ks01", Shard: "shard02"}, + }}, + }, + }} + + tpc := tsv.te.twoPC + txQueryPattern := `.*time_created < 1000.*` + for _, tcase := range tcases { + t.Run(tcase.name, func(t *testing.T) { + db.AddQueryPattern(txQueryPattern, tcase.unresolvedTx) + distributed, err := tpc.UnresolvedTransactions(ctx, time.UnixMicro(1)) + require.NoError(t, err) + utils.MustMatch(t, tcase.expectedTx, distributed) + }) + } +} diff --git a/go/vt/vttablet/tabletserver/tx_engine.go b/go/vt/vttablet/tabletserver/tx_engine.go index 7e8ecc06a75..3161f3b88c1 100644 --- a/go/vt/vttablet/tabletserver/tx_engine.go +++ b/go/vt/vttablet/tabletserver/tx_engine.go @@ -28,6 +28,8 @@ import ( "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/dtids" "vitess.io/vitess/go/vt/log" + querypb "vitess.io/vitess/go/vt/proto/query" + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/vtgateconn" @@ -35,9 +37,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" "vitess.io/vitess/go/vt/vttablet/tabletserver/txlimiter" - - querypb "vitess.io/vitess/go/vt/proto/query" - vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" ) type txEngineState int diff --git a/proto/query.proto b/proto/query.proto index d4e99af7c7d..8af243f0ef9 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -638,6 +638,18 @@ message ReadTransactionResponse { TransactionMetadata metadata = 1; } +// UnresolvedTransactionsRequest is the payload to UnresolvedTransactions +message UnresolvedTransactionsRequest { + vtrpc.CallerID effective_caller_id = 1; + VTGateCallerID immediate_caller_id = 2; + Target target = 3; +} + +// UnresolvedTransactionsResponse is the returned value from UnresolvedTransactions +message UnresolvedTransactionsResponse { + repeated TransactionMetadata transactions = 1; +} + // BeginExecuteRequest is the payload to BeginExecute message BeginExecuteRequest { vtrpc.CallerID effective_caller_id = 1; diff --git a/proto/queryservice.proto b/proto/queryservice.proto index e2de692532c..b987f692289 100644 --- a/proto/queryservice.proto +++ b/proto/queryservice.proto @@ -69,6 +69,9 @@ service Query { // ReadTransaction returns the 2pc transaction info. rpc ReadTransaction(query.ReadTransactionRequest) returns (query.ReadTransactionResponse) {}; + // UnresolvedTransactions returns the 2pc transaction info. + rpc UnresolvedTransactions(query.UnresolvedTransactionsRequest) returns (query.UnresolvedTransactionsResponse) {}; + // BeginExecute executes a begin and the specified SQL query. rpc BeginExecute(query.BeginExecuteRequest) returns (query.BeginExecuteResponse) {}; diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 7cec9343085..6598523835c 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -40102,6 +40102,212 @@ export namespace query { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UnresolvedTransactionsRequest. */ + interface IUnresolvedTransactionsRequest { + + /** UnresolvedTransactionsRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); + + /** UnresolvedTransactionsRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** UnresolvedTransactionsRequest target */ + target?: (query.ITarget|null); + } + + /** Represents an UnresolvedTransactionsRequest. */ + class UnresolvedTransactionsRequest implements IUnresolvedTransactionsRequest { + + /** + * Constructs a new UnresolvedTransactionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: query.IUnresolvedTransactionsRequest); + + /** UnresolvedTransactionsRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); + + /** UnresolvedTransactionsRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** UnresolvedTransactionsRequest target. */ + public target?: (query.ITarget|null); + + /** + * Creates a new UnresolvedTransactionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UnresolvedTransactionsRequest instance + */ + public static create(properties?: query.IUnresolvedTransactionsRequest): query.UnresolvedTransactionsRequest; + + /** + * Encodes the specified UnresolvedTransactionsRequest message. Does not implicitly {@link query.UnresolvedTransactionsRequest.verify|verify} messages. + * @param message UnresolvedTransactionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IUnresolvedTransactionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnresolvedTransactionsRequest message, length delimited. Does not implicitly {@link query.UnresolvedTransactionsRequest.verify|verify} messages. + * @param message UnresolvedTransactionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IUnresolvedTransactionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnresolvedTransactionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnresolvedTransactionsRequest + * @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): query.UnresolvedTransactionsRequest; + + /** + * Decodes an UnresolvedTransactionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnresolvedTransactionsRequest + * @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)): query.UnresolvedTransactionsRequest; + + /** + * Verifies an UnresolvedTransactionsRequest 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 an UnresolvedTransactionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnresolvedTransactionsRequest + */ + public static fromObject(object: { [k: string]: any }): query.UnresolvedTransactionsRequest; + + /** + * Creates a plain object from an UnresolvedTransactionsRequest message. Also converts values to other types if specified. + * @param message UnresolvedTransactionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.UnresolvedTransactionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnresolvedTransactionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnresolvedTransactionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UnresolvedTransactionsResponse. */ + interface IUnresolvedTransactionsResponse { + + /** UnresolvedTransactionsResponse transactions */ + transactions?: (query.ITransactionMetadata[]|null); + } + + /** Represents an UnresolvedTransactionsResponse. */ + class UnresolvedTransactionsResponse implements IUnresolvedTransactionsResponse { + + /** + * Constructs a new UnresolvedTransactionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: query.IUnresolvedTransactionsResponse); + + /** UnresolvedTransactionsResponse transactions. */ + public transactions: query.ITransactionMetadata[]; + + /** + * Creates a new UnresolvedTransactionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UnresolvedTransactionsResponse instance + */ + public static create(properties?: query.IUnresolvedTransactionsResponse): query.UnresolvedTransactionsResponse; + + /** + * Encodes the specified UnresolvedTransactionsResponse message. Does not implicitly {@link query.UnresolvedTransactionsResponse.verify|verify} messages. + * @param message UnresolvedTransactionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IUnresolvedTransactionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnresolvedTransactionsResponse message, length delimited. Does not implicitly {@link query.UnresolvedTransactionsResponse.verify|verify} messages. + * @param message UnresolvedTransactionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IUnresolvedTransactionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnresolvedTransactionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnresolvedTransactionsResponse + * @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): query.UnresolvedTransactionsResponse; + + /** + * Decodes an UnresolvedTransactionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnresolvedTransactionsResponse + * @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)): query.UnresolvedTransactionsResponse; + + /** + * Verifies an UnresolvedTransactionsResponse 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 an UnresolvedTransactionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnresolvedTransactionsResponse + */ + public static fromObject(object: { [k: string]: any }): query.UnresolvedTransactionsResponse; + + /** + * Creates a plain object from an UnresolvedTransactionsResponse message. Also converts values to other types if specified. + * @param message UnresolvedTransactionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.UnresolvedTransactionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnresolvedTransactionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnresolvedTransactionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a BeginExecuteRequest. */ interface IBeginExecuteRequest { diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 9fd83e98430..997c7c1f08b 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -96678,6 +96678,495 @@ export const query = $root.query = (() => { return ReadTransactionResponse; })(); + query.UnresolvedTransactionsRequest = (function() { + + /** + * Properties of an UnresolvedTransactionsRequest. + * @memberof query + * @interface IUnresolvedTransactionsRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] UnresolvedTransactionsRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] UnresolvedTransactionsRequest immediate_caller_id + * @property {query.ITarget|null} [target] UnresolvedTransactionsRequest target + */ + + /** + * Constructs a new UnresolvedTransactionsRequest. + * @memberof query + * @classdesc Represents an UnresolvedTransactionsRequest. + * @implements IUnresolvedTransactionsRequest + * @constructor + * @param {query.IUnresolvedTransactionsRequest=} [properties] Properties to set + */ + function UnresolvedTransactionsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnresolvedTransactionsRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.UnresolvedTransactionsRequest + * @instance + */ + UnresolvedTransactionsRequest.prototype.effective_caller_id = null; + + /** + * UnresolvedTransactionsRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.UnresolvedTransactionsRequest + * @instance + */ + UnresolvedTransactionsRequest.prototype.immediate_caller_id = null; + + /** + * UnresolvedTransactionsRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.UnresolvedTransactionsRequest + * @instance + */ + UnresolvedTransactionsRequest.prototype.target = null; + + /** + * Creates a new UnresolvedTransactionsRequest instance using the specified properties. + * @function create + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {query.IUnresolvedTransactionsRequest=} [properties] Properties to set + * @returns {query.UnresolvedTransactionsRequest} UnresolvedTransactionsRequest instance + */ + UnresolvedTransactionsRequest.create = function create(properties) { + return new UnresolvedTransactionsRequest(properties); + }; + + /** + * Encodes the specified UnresolvedTransactionsRequest message. Does not implicitly {@link query.UnresolvedTransactionsRequest.verify|verify} messages. + * @function encode + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {query.IUnresolvedTransactionsRequest} message UnresolvedTransactionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnresolvedTransactionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UnresolvedTransactionsRequest message, length delimited. Does not implicitly {@link query.UnresolvedTransactionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {query.IUnresolvedTransactionsRequest} message UnresolvedTransactionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnresolvedTransactionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnresolvedTransactionsRequest message from the specified reader or buffer. + * @function decode + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.UnresolvedTransactionsRequest} UnresolvedTransactionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnresolvedTransactionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.UnresolvedTransactionsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; + } + case 2: { + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnresolvedTransactionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.UnresolvedTransactionsRequest} UnresolvedTransactionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnresolvedTransactionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnresolvedTransactionsRequest message. + * @function verify + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnresolvedTransactionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + let error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + let error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + let error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + return null; + }; + + /** + * Creates an UnresolvedTransactionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {Object.} object Plain object + * @returns {query.UnresolvedTransactionsRequest} UnresolvedTransactionsRequest + */ + UnresolvedTransactionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.UnresolvedTransactionsRequest) + return object; + let message = new $root.query.UnresolvedTransactionsRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.UnresolvedTransactionsRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.UnresolvedTransactionsRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.UnresolvedTransactionsRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + return message; + }; + + /** + * Creates a plain object from an UnresolvedTransactionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {query.UnresolvedTransactionsRequest} message UnresolvedTransactionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnresolvedTransactionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + return object; + }; + + /** + * Converts this UnresolvedTransactionsRequest to JSON. + * @function toJSON + * @memberof query.UnresolvedTransactionsRequest + * @instance + * @returns {Object.} JSON object + */ + UnresolvedTransactionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UnresolvedTransactionsRequest + * @function getTypeUrl + * @memberof query.UnresolvedTransactionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnresolvedTransactionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/query.UnresolvedTransactionsRequest"; + }; + + return UnresolvedTransactionsRequest; + })(); + + query.UnresolvedTransactionsResponse = (function() { + + /** + * Properties of an UnresolvedTransactionsResponse. + * @memberof query + * @interface IUnresolvedTransactionsResponse + * @property {Array.|null} [transactions] UnresolvedTransactionsResponse transactions + */ + + /** + * Constructs a new UnresolvedTransactionsResponse. + * @memberof query + * @classdesc Represents an UnresolvedTransactionsResponse. + * @implements IUnresolvedTransactionsResponse + * @constructor + * @param {query.IUnresolvedTransactionsResponse=} [properties] Properties to set + */ + function UnresolvedTransactionsResponse(properties) { + this.transactions = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnresolvedTransactionsResponse transactions. + * @member {Array.} transactions + * @memberof query.UnresolvedTransactionsResponse + * @instance + */ + UnresolvedTransactionsResponse.prototype.transactions = $util.emptyArray; + + /** + * Creates a new UnresolvedTransactionsResponse instance using the specified properties. + * @function create + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {query.IUnresolvedTransactionsResponse=} [properties] Properties to set + * @returns {query.UnresolvedTransactionsResponse} UnresolvedTransactionsResponse instance + */ + UnresolvedTransactionsResponse.create = function create(properties) { + return new UnresolvedTransactionsResponse(properties); + }; + + /** + * Encodes the specified UnresolvedTransactionsResponse message. Does not implicitly {@link query.UnresolvedTransactionsResponse.verify|verify} messages. + * @function encode + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {query.IUnresolvedTransactionsResponse} message UnresolvedTransactionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnresolvedTransactionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transactions != null && message.transactions.length) + for (let i = 0; i < message.transactions.length; ++i) + $root.query.TransactionMetadata.encode(message.transactions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UnresolvedTransactionsResponse message, length delimited. Does not implicitly {@link query.UnresolvedTransactionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {query.IUnresolvedTransactionsResponse} message UnresolvedTransactionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnresolvedTransactionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnresolvedTransactionsResponse message from the specified reader or buffer. + * @function decode + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.UnresolvedTransactionsResponse} UnresolvedTransactionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnresolvedTransactionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.UnresolvedTransactionsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.transactions && message.transactions.length)) + message.transactions = []; + message.transactions.push($root.query.TransactionMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnresolvedTransactionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.UnresolvedTransactionsResponse} UnresolvedTransactionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnresolvedTransactionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnresolvedTransactionsResponse message. + * @function verify + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnresolvedTransactionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transactions != null && message.hasOwnProperty("transactions")) { + if (!Array.isArray(message.transactions)) + return "transactions: array expected"; + for (let i = 0; i < message.transactions.length; ++i) { + let error = $root.query.TransactionMetadata.verify(message.transactions[i]); + if (error) + return "transactions." + error; + } + } + return null; + }; + + /** + * Creates an UnresolvedTransactionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {Object.} object Plain object + * @returns {query.UnresolvedTransactionsResponse} UnresolvedTransactionsResponse + */ + UnresolvedTransactionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.UnresolvedTransactionsResponse) + return object; + let message = new $root.query.UnresolvedTransactionsResponse(); + if (object.transactions) { + if (!Array.isArray(object.transactions)) + throw TypeError(".query.UnresolvedTransactionsResponse.transactions: array expected"); + message.transactions = []; + for (let i = 0; i < object.transactions.length; ++i) { + if (typeof object.transactions[i] !== "object") + throw TypeError(".query.UnresolvedTransactionsResponse.transactions: object expected"); + message.transactions[i] = $root.query.TransactionMetadata.fromObject(object.transactions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UnresolvedTransactionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {query.UnresolvedTransactionsResponse} message UnresolvedTransactionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnresolvedTransactionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.transactions = []; + if (message.transactions && message.transactions.length) { + object.transactions = []; + for (let j = 0; j < message.transactions.length; ++j) + object.transactions[j] = $root.query.TransactionMetadata.toObject(message.transactions[j], options); + } + return object; + }; + + /** + * Converts this UnresolvedTransactionsResponse to JSON. + * @function toJSON + * @memberof query.UnresolvedTransactionsResponse + * @instance + * @returns {Object.} JSON object + */ + UnresolvedTransactionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UnresolvedTransactionsResponse + * @function getTypeUrl + * @memberof query.UnresolvedTransactionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnresolvedTransactionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/query.UnresolvedTransactionsResponse"; + }; + + return UnresolvedTransactionsResponse; + })(); + query.BeginExecuteRequest = (function() { /** From 75aee8ab0c842d296c32d6b2cd1b06bdb84e6788 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:58:55 +0300 Subject: [PATCH 34/55] Throttler flaky test: explicitly disabling throttler so as to ensure it does not re-enable (#16369) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/vttablet/tabletserver/throttle/throttler_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/go/vt/vttablet/tabletserver/throttle/throttler_test.go b/go/vt/vttablet/tabletserver/throttle/throttler_test.go index d9b910a3152..f544d6566be 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler_test.go @@ -771,6 +771,16 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { assert.Len(t, checkResult.Metrics, 1) }) }) + + t.Run("Disable", func(t *testing.T) { + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: false, + MetricThresholds: map[string]float64{}, + AppCheckedMetrics: map[string]*topodatapb.ThrottlerConfig_MetricNames{}, + } + throttler.applyThrottlerConfig(ctx, throttlerConfig) + sleepTillThresholdApplies() + }) }) } From 0f242e9868552baf121c288e0a92781001b150d6 Mon Sep 17 00:00:00 2001 From: Brendan Dougherty Date: Thu, 11 Jul 2024 19:01:19 -0400 Subject: [PATCH 35/55] VTCombo: Ensure VSchema exists when creating keyspace (#16094) Signed-off-by: Brendan Dougherty --- go/test/endtoend/vtcombo/vttest_sample_test.go | 13 +++++++++++++ go/vt/vtcombo/tablet_map.go | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/go/test/endtoend/vtcombo/vttest_sample_test.go b/go/test/endtoend/vtcombo/vttest_sample_test.go index daeb5e8deb9..4895c1195b0 100644 --- a/go/test/endtoend/vtcombo/vttest_sample_test.go +++ b/go/test/endtoend/vtcombo/vttest_sample_test.go @@ -130,6 +130,8 @@ func TestStandalone(t *testing.T) { tmp, _ := cmd.([]any) require.Contains(t, tmp[0], "vtcombo") + assertVSchemaExists(t, grpcAddress) + ctx := context.Background() conn, err := vtgateconn.Dial(ctx, grpcAddress) require.NoError(t, err) @@ -160,6 +162,17 @@ func TestStandalone(t *testing.T) { assertTransactionalityAndRollbackObeyed(ctx, t, conn, idStart) } +func assertVSchemaExists(t *testing.T, grpcAddress string) { + tmpCmd := exec.Command("vtctldclient", "--server", grpcAddress, "--compact", "GetVSchema", "routed") + + log.Infof("Running vtctldclient with command: %v", tmpCmd.Args) + + output, err := tmpCmd.CombinedOutput() + require.NoError(t, err, fmt.Sprintf("Output:\n%v", string(output))) + + assert.Equal(t, "{}\n", string(output)) +} + func assertInsertedRowsExist(ctx context.Context, t *testing.T, conn *vtgateconn.VTGateConn, idStart, rowCount int) { cur := conn.Session(ks1+":-80@rdonly", nil) bindVariables := map[string]*querypb.BindVariable{ diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index 0331d30f2ba..77b7446fc1d 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -322,6 +322,11 @@ func CreateKs( return 0, fmt.Errorf("CreateKeyspace(%v) failed: %v", keyspace, err) } + // make sure a valid vschema has been loaded + if err := ts.EnsureVSchema(ctx, keyspace); err != nil { + return 0, fmt.Errorf("EnsureVSchema(%v) failed: %v", keyspace, err) + } + // iterate through the shards for _, spb := range kpb.Shards { shard := spb.Name From 3d36adb16eff96485db992454e2e287545367035 Mon Sep 17 00:00:00 2001 From: shanth96 Date: Fri, 12 Jul 2024 12:21:32 -0400 Subject: [PATCH 36/55] parse transaction timeout as duration (#16338) Signed-off-by: shanth96 --- go/cmd/vttestserver/cli/main.go | 2 +- go/flags/endtoend/vttestserver.txt | 2 +- go/vt/vttest/local_cluster.go | 2 +- go/vt/vttest/vtprocess.go | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/go/cmd/vttestserver/cli/main.go b/go/cmd/vttestserver/cli/main.go index 5601623b2fa..479ea4441f8 100644 --- a/go/cmd/vttestserver/cli/main.go +++ b/go/cmd/vttestserver/cli/main.go @@ -206,7 +206,7 @@ func New() (cmd *cobra.Command) { cmd.Flags().BoolVar(&config.EnableSystemSettings, "enable_system_settings", true, "This will enable the system settings to be changed per session at the database connection level") cmd.Flags().StringVar(&config.TransactionMode, "transaction_mode", "MULTI", "Transaction mode MULTI (default), SINGLE or TWOPC ") - cmd.Flags().Float64Var(&config.TransactionTimeout, "queryserver-config-transaction-timeout", 0, "query server transaction timeout (in seconds), a transaction will be killed if it takes longer than this value") + cmd.Flags().DurationVar(&config.TransactionTimeout, "queryserver-config-transaction-timeout", 30*time.Second, "query server transaction timeout, a transaction will be killed if it takes longer than this value") cmd.Flags().StringVar(&config.TabletHostName, "tablet_hostname", "localhost", "The hostname to use for the tablet otherwise it will be derived from OS' hostname") diff --git a/go/flags/endtoend/vttestserver.txt b/go/flags/endtoend/vttestserver.txt index 8cce76afc65..95c69714e59 100644 --- a/go/flags/endtoend/vttestserver.txt +++ b/go/flags/endtoend/vttestserver.txt @@ -106,7 +106,7 @@ Flags: --pprof-http enable pprof http endpoints --proto_topo string Define the fake cluster topology as a compact text format encoded vttest proto. See vttest.proto for more information. --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 + --queryserver-config-transaction-timeout duration query server transaction timeout, a transaction will be killed if it takes longer than this value (default 30s) --rdonly_count int Rdonly tablets per shard (default 1) --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) diff --git a/go/vt/vttest/local_cluster.go b/go/vt/vttest/local_cluster.go index 3c65f7de1eb..406269ef749 100644 --- a/go/vt/vttest/local_cluster.go +++ b/go/vt/vttest/local_cluster.go @@ -128,7 +128,7 @@ type Config struct { // TransactionMode is SINGLE, MULTI or TWOPC TransactionMode string - TransactionTimeout float64 + TransactionTimeout time.Duration // The host name to use for the table otherwise it will be resolved from the local hostname TabletHostName string diff --git a/go/vt/vttest/vtprocess.go b/go/vt/vttest/vtprocess.go index 2d2c9116c6d..3f34994bb75 100644 --- a/go/vt/vttest/vtprocess.go +++ b/go/vt/vttest/vtprocess.go @@ -188,7 +188,6 @@ var QueryServerArgs = []string{ "--queryserver-config-schema-reload-time", "60s", "--queryserver-config-stream-pool-size", "4", "--queryserver-config-transaction-cap", "4", - "--queryserver-config-transaction-timeout", "300s", "--queryserver-config-txpool-timeout", "300s", } @@ -260,7 +259,7 @@ func VtcomboProcess(environment Environment, args *Config, mysql MySQLManager) ( vt.ExtraArgs = append(vt.ExtraArgs, []string{"--transaction_mode", args.TransactionMode}...) } if args.TransactionTimeout != 0 { - vt.ExtraArgs = append(vt.ExtraArgs, "--queryserver-config-transaction-timeout", fmt.Sprintf("%f", args.TransactionTimeout)) + vt.ExtraArgs = append(vt.ExtraArgs, "--queryserver-config-transaction-timeout", fmt.Sprintf("%v", args.TransactionTimeout)) } if args.TabletHostName != "" { vt.ExtraArgs = append(vt.ExtraArgs, []string{"--tablet_hostname", args.TabletHostName}...) From fd6411dcfceccbc1a8ad56ef9a803c25f6145e1c Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Mon, 15 Jul 2024 07:44:44 +0300 Subject: [PATCH 37/55] Online DDL: remove legacy (and ancient) 'REVERT ' syntax (#16301) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/schema/online_ddl.go | 48 +++++++------------------ go/vt/schema/online_ddl_test.go | 9 ++++- go/vt/schema/parser.go | 15 -------- go/vt/schema/parser_test.go | 17 --------- go/vt/vtgate/engine/revert_migration.go | 4 +-- 5 files changed, 21 insertions(+), 72 deletions(-) diff --git a/go/vt/schema/online_ddl.go b/go/vt/schema/online_ddl.go index 7b8647f86b7..59363b00889 100644 --- a/go/vt/schema/online_ddl.go +++ b/go/vt/schema/online_ddl.go @@ -223,35 +223,21 @@ func NewOnlineDDL(keyspace string, table string, sql string, ddlStrategySetting encodeDirective(string(ddlStrategySetting.Strategy)), encodeDirective(ddlStrategySetting.Options), )} - if uuid, err := legacyParseRevertUUID(sql); err == nil { - sql = fmt.Sprintf("revert vitess_migration '%s'", uuid) - } stmt, err := parser.Parse(sql) if err != nil { - isLegacyRevertStatement := false - // query validation and rebuilding - if _, err := legacyParseRevertUUID(sql); err == nil { - // This is a revert statement of the form "revert ". We allow this for now. Future work will - // make sure the statement is a valid, parseable "revert vitess_migration ''", but we must - // be backwards compatible for now. - isLegacyRevertStatement = true - } - if !isLegacyRevertStatement { - // otherwise the statement should have been parseable! - return nil, err - } - } else { - switch stmt := stmt.(type) { - case sqlparser.DDLStatement: - stmt.SetComments(comments) - case *sqlparser.RevertMigration: - stmt.SetComments(comments) - default: - return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "Unsupported statement for Online DDL: %v", sqlparser.String(stmt)) - } - sql = sqlparser.String(stmt) + return nil, err + } + switch stmt := stmt.(type) { + case sqlparser.DDLStatement: + stmt.SetComments(comments) + case *sqlparser.RevertMigration: + stmt.SetComments(comments) + default: + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "Unsupported statement for Online DDL: %v", sqlparser.String(stmt)) } + sql = sqlparser.String(stmt) + } return &OnlineDDL{ @@ -354,14 +340,7 @@ func (onlineDDL *OnlineDDL) sqlWithoutComments(parser *sqlparser.Parser) (sql st sql = onlineDDL.SQL stmt, err := parser.Parse(sql) if err != nil { - // query validation and rebuilding - if _, err := legacyParseRevertUUID(sql); err == nil { - // This is a revert statement of the form "revert ". We allow this for now. Future work will - // make sure the statement is a valid, parseable "revert vitess_migration ''", but we must - // be backwards compatible for now. - return sql, nil - } - // otherwise the statement should have been parseable! + // The statement should have been parseable! return "", err } @@ -421,9 +400,6 @@ func (onlineDDL *OnlineDDL) GetActionStr(parser *sqlparser.Parser) (action sqlpa // fo the reverted migration. // The function returns error when this is not a revert migration. func (onlineDDL *OnlineDDL) GetRevertUUID(parser *sqlparser.Parser) (uuid string, err error) { - if uuid, err := legacyParseRevertUUID(onlineDDL.SQL); err == nil { - return uuid, nil - } if stmt, err := parser.Parse(onlineDDL.SQL); err == nil { if revert, ok := stmt.(*sqlparser.RevertMigration); ok { return revert.UUID, nil diff --git a/go/vt/schema/online_ddl_test.go b/go/vt/schema/online_ddl_test.go index c443f6b28ce..dad92904854 100644 --- a/go/vt/schema/online_ddl_test.go +++ b/go/vt/schema/online_ddl_test.go @@ -157,10 +157,14 @@ func TestGetRevertUUID(t *testing.T) { }{ { statement: "revert 4e5dcf80_354b_11eb_82cd_f875a4d24e90", - uuid: "4e5dcf80_354b_11eb_82cd_f875a4d24e90", + isError: true, }, { statement: "REVERT 4e5dcf80_354b_11eb_82cd_f875a4d24e90", + isError: true, + }, + { + statement: "revert vitess_migration '4e5dcf80_354b_11eb_82cd_f875a4d24e90'", uuid: "4e5dcf80_354b_11eb_82cd_f875a4d24e90", }, { @@ -185,6 +189,9 @@ func TestGetRevertUUID(t *testing.T) { for _, ts := range tt { t.Run(ts.statement, func(t *testing.T) { onlineDDL, err := NewOnlineDDL("test_ks", "t", ts.statement, NewDDLStrategySetting(DDLStrategyOnline, ""), migrationContext, "", parser) + if err != nil && ts.isError { + return + } assert.NoError(t, err) require.NotNil(t, onlineDDL) uuid, err := onlineDDL.GetRevertUUID(parser) diff --git a/go/vt/schema/parser.go b/go/vt/schema/parser.go index 78ec4ec36e6..7f5e133e01c 100644 --- a/go/vt/schema/parser.go +++ b/go/vt/schema/parser.go @@ -17,7 +17,6 @@ limitations under the License. package schema import ( - "fmt" "regexp" "strings" @@ -50,7 +49,6 @@ var ( // ALTER TABLE tbl something regexp.MustCompile(alterTableBasicPattern + `([\S]+)\s+(.*$)`), } - revertStatementRegexp = regexp.MustCompile(`(?i)^revert\s+([\S]*)$`) enumValuesRegexp = regexp.MustCompile("(?i)^enum[(](.*)[)]$") setValuesRegexp = regexp.MustCompile("(?i)^set[(](.*)[)]$") @@ -79,19 +77,6 @@ func ParseAlterTableOptions(alterStatement string) (explicitSchema, explicitTabl return explicitSchema, explicitTable, alterOptions } -// legacyParseRevertUUID expects a query like "revert 4e5dcf80_354b_11eb_82cd_f875a4d24e90" and returns the UUID value. -func legacyParseRevertUUID(sql string) (uuid string, err error) { - submatch := revertStatementRegexp.FindStringSubmatch(sql) - if len(submatch) == 0 { - return "", fmt.Errorf("Not a Revert DDL: '%s'", sql) - } - uuid = submatch[1] - if !IsOnlineDDLUUID(uuid) { - return "", fmt.Errorf("Not an online DDL UUID: '%s'", uuid) - } - return uuid, nil -} - // ParseEnumValues parses the comma delimited part of an enum column definition func ParseEnumValues(enumColumnType string) string { if submatch := enumValuesRegexp.FindStringSubmatch(enumColumnType); len(submatch) > 0 { diff --git a/go/vt/schema/parser_test.go b/go/vt/schema/parser_test.go index fe9264c29b9..dc696fd3d1d 100644 --- a/go/vt/schema/parser_test.go +++ b/go/vt/schema/parser_test.go @@ -48,23 +48,6 @@ func TestParseAlterTableOptions(t *testing.T) { } } -func TestLegacyParseRevertUUID(t *testing.T) { - - { - uuid, err := legacyParseRevertUUID("revert 4e5dcf80_354b_11eb_82cd_f875a4d24e90") - assert.NoError(t, err) - assert.Equal(t, "4e5dcf80_354b_11eb_82cd_f875a4d24e90", uuid) - } - { - _, err := legacyParseRevertUUID("revert 4e5dcf80_354b_11eb_82cd_f875a4") - assert.Error(t, err) - } - { - _, err := legacyParseRevertUUID("revert vitess_migration '4e5dcf80_354b_11eb_82cd_f875a4d24e90'") - assert.Error(t, err) - } -} - func TestParseEnumValues(t *testing.T) { { inputs := []string{ diff --git a/go/vt/vtgate/engine/revert_migration.go b/go/vt/vtgate/engine/revert_migration.go index a7690d07f42..2eb2af061a5 100644 --- a/go/vt/vtgate/engine/revert_migration.go +++ b/go/vt/vtgate/engine/revert_migration.go @@ -80,14 +80,12 @@ func (v *RevertMigration) TryExecute(ctx context.Context, vcursor VCursor, bindV Rows: [][]sqltypes.Value{}, } - sql := fmt.Sprintf("revert %s", v.Stmt.UUID) - ddlStrategySetting, err := schema.ParseDDLStrategy(vcursor.Session().GetDDLStrategy()) if err != nil { return nil, err } ddlStrategySetting.Strategy = schema.DDLStrategyOnline // and we keep the options as they were - onlineDDL, err := schema.NewOnlineDDL(v.GetKeyspaceName(), "", sql, ddlStrategySetting, fmt.Sprintf("vtgate:%s", vcursor.Session().GetSessionUUID()), "", vcursor.Environment().Parser()) + onlineDDL, err := schema.NewOnlineDDL(v.GetKeyspaceName(), "", v.Query, ddlStrategySetting, fmt.Sprintf("vtgate:%s", vcursor.Session().GetSessionUUID()), "", vcursor.Environment().Parser()) if err != nil { return result, err } From 8a59865817029578efcac98abf1a502150d572c9 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Mon, 15 Jul 2024 08:22:38 -0400 Subject: [PATCH 38/55] SetShardTabletControl: Improve flag help output (#16376) Signed-off-by: Matt Lord --- go/cmd/vtctldclient/command/shards.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go/cmd/vtctldclient/command/shards.go b/go/cmd/vtctldclient/command/shards.go index 1a3288a30b8..70032299f16 100644 --- a/go/cmd/vtctldclient/command/shards.go +++ b/go/cmd/vtctldclient/command/shards.go @@ -671,10 +671,10 @@ func init() { Root.AddCommand(SetShardIsPrimaryServing) - SetShardTabletControl.Flags().StringSliceVarP(&setShardTabletControlOptions.Cells, "cells", "c", nil, "Specifies a comma-separated list of cells to update.") - SetShardTabletControl.Flags().StringSliceVar(&setShardTabletControlOptions.DeniedTables, "denied-tables", nil, "Specifies a comma-separated list of tables to add to the denylist (for MoveTables). Each table name is either an exact match, or a regular expression of the form '/regexp/'.") - SetShardTabletControl.Flags().BoolVarP(&setShardTabletControlOptions.Remove, "remove", "r", false, "Removes the specified cells for MoveTables operations.") - SetShardTabletControl.Flags().BoolVar(&setShardTabletControlOptions.DisableQueryService, "disable-query-service", false, "Sets the DisableQueryService flag in the specified cells. This flag requires --denied-tables and --remove to be unset; if either is set, this flag is ignored.") + SetShardTabletControl.Flags().StringSliceVarP(&setShardTabletControlOptions.Cells, "cells", "c", nil, "Specifies a comma-separated list of cells to update (all cells will be used by default).") + SetShardTabletControl.Flags().StringSliceVar(&setShardTabletControlOptions.DeniedTables, "denied-tables", nil, "Specifies a comma-separated list of tables to add to the DeniedTables list, or remove from the list if --remove is also specified, in the Shard records (MoveTables). Each table name is either an exact match, or a regular expression of the form '/regexp/'.") + SetShardTabletControl.Flags().BoolVarP(&setShardTabletControlOptions.Remove, "remove", "r", false, "Removes the TabletControl field and its DeniedTables entries, or if specified with --denied-tables then only remove the specified tables from the DeniedTables list, in the Shard records (MoveTables) in the specified cells (using all cells by default).") + SetShardTabletControl.Flags().BoolVar(&setShardTabletControlOptions.DisableQueryService, "disable-query-service", false, "Adds or removes the DisableQueryService field in the SrvKeyspace record (Reshard) for the specified cells (using all cells by deefault). This flag requires --denied-tables and --remove to be unset; if either is set, this flag is ignored.") Root.AddCommand(SetShardTabletControl) Root.AddCommand(ShardReplicationAdd) From 1f881fde4958ca20b9dd37e7eb3e9f9cfabd6c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Mon, 15 Jul 2024 15:30:56 +0200 Subject: [PATCH 39/55] fix issue with aggregation inside of derived tables (#16366) Signed-off-by: Andres Taylor --- .../aggregation/aggregation.test | 8 ++- .../planbuilder/operators/SQL_builder.go | 8 +++ .../operators/horizon_expanding.go | 28 +++++++++- .../planbuilder/operators/queryprojection.go | 5 +- .../planbuilder/testdata/aggr_cases.json | 56 ++++++++++++++++++- .../planbuilder/testdata/cte_cases.json | 2 +- 6 files changed, 97 insertions(+), 10 deletions(-) diff --git a/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test b/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test index 3f89d867ff8..f4c82933d91 100644 --- a/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test +++ b/go/test/endtoend/vtgate/vitess_tester/aggregation/aggregation.test @@ -56,5 +56,9 @@ select COUNT(*) from (select 1 as one FROM `t3` WHERE `t3`.`name` = 'B' - ORDER BY id DESC LIMIT 25 - OFFSET 0) subquery_for_count; \ No newline at end of file + ORDER BY id DESC + LIMIT 25 OFFSET 0) subquery_for_count; + +select u.id, u.t1_id, t.num_segments +from (select id, count(*) as num_segments from t1 group by 1 order by 2 desc limit 20) t + join t2 u on u.id = t.id; \ No newline at end of file diff --git a/go/vt/vtgate/planbuilder/operators/SQL_builder.go b/go/vt/vtgate/planbuilder/operators/SQL_builder.go index fef4ae2aee4..221c0cee2c7 100644 --- a/go/vt/vtgate/planbuilder/operators/SQL_builder.go +++ b/go/vt/vtgate/planbuilder/operators/SQL_builder.go @@ -466,6 +466,14 @@ func buildAggregation(op *Aggregator, qb *queryBuilder) { if op.WithRollup { qb.setWithRollup() } + + if op.DT != nil { + sel := qb.asSelectStatement() + qb.stmt = nil + qb.addTableExpr(op.DT.Alias, op.DT.Alias, TableID(op), &sqlparser.DerivedTable{ + Select: sel, + }, nil, op.DT.Columns) + } } func buildOrdering(op *Ordering, qb *queryBuilder) { diff --git a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go index 3b934752a00..dd40dbeb918 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go +++ b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go @@ -82,7 +82,7 @@ func expandSelectHorizon(ctx *plancontext.PlanningContext, horizon *Horizon, sel // if we are dealing with a derived table, we need to make sure that the ordering columns // are available outside the derived table for _, order := range horizon.Query.GetOrderBy() { - qp.addColumn(ctx, order.Expr) + qp.addDerivedColumn(ctx, order.Expr) } } @@ -108,7 +108,7 @@ func expandSelectHorizon(ctx *plancontext.PlanningContext, horizon *Horizon, sel } if len(qp.OrderExprs) > 0 { - op = expandOrderBy(ctx, op, qp) + op = expandOrderBy(ctx, op, qp, horizon.Alias) extracted = append(extracted, "Ordering") } @@ -124,7 +124,7 @@ func expandSelectHorizon(ctx *plancontext.PlanningContext, horizon *Horizon, sel return op, Rewrote(fmt.Sprintf("expand SELECT horizon into (%s)", strings.Join(extracted, ", "))) } -func expandOrderBy(ctx *plancontext.PlanningContext, op Operator, qp *QueryProjection) Operator { +func expandOrderBy(ctx *plancontext.PlanningContext, op Operator, qp *QueryProjection, derived string) Operator { var newOrder []OrderBy sqc := &SubQueryBuilder{} proj, ok := op.(*Projection) @@ -134,6 +134,9 @@ func expandOrderBy(ctx *plancontext.PlanningContext, op Operator, qp *QueryProje newExpr, subqs := sqc.pullOutValueSubqueries(ctx, expr.SimplifiedExpr, TableID(op), false) if newExpr == nil { // If no subqueries are found, retain the original order expression + if derived != "" { + expr = exposeOrderingColumn(ctx, qp, expr, derived) + } newOrder = append(newOrder, expr) continue } @@ -167,6 +170,25 @@ func expandOrderBy(ctx *plancontext.PlanningContext, op Operator, qp *QueryProje } } +// exposeOrderingColumn will expose the ordering column to the outer query +func exposeOrderingColumn(ctx *plancontext.PlanningContext, qp *QueryProjection, orderBy OrderBy, derived string) OrderBy { + for _, se := range qp.SelectExprs { + aliasedExpr, err := se.GetAliasedExpr() + if err != nil { + panic(vterrors.VT13001("unexpected expression in select")) + } + if ctx.SemTable.EqualsExprWithDeps(aliasedExpr.Expr, orderBy.SimplifiedExpr) { + newExpr := sqlparser.NewColNameWithQualifier(aliasedExpr.ColumnName(), sqlparser.NewTableName(derived)) + ctx.SemTable.CopySemanticInfo(orderBy.SimplifiedExpr, newExpr) + orderBy.SimplifiedExpr = newExpr + orderBy.Inner = &sqlparser.Order{Expr: newExpr, Direction: orderBy.Inner.Direction} + break + } + } + + return orderBy +} + func createProjectionFromSelect(ctx *plancontext.PlanningContext, horizon *Horizon) Operator { qp := horizon.getQP(ctx) diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index c747870f5d2..a8cfaba6985 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -664,8 +664,9 @@ func (qp *QueryProjection) useGroupingOverDistinct(ctx *plancontext.PlanningCont return true } -// addColumn adds a column to the QueryProjection if it is not already present -func (qp *QueryProjection) addColumn(ctx *plancontext.PlanningContext, expr sqlparser.Expr) { +// addColumn adds a column to the QueryProjection if it is not already present. +// It will use a column name that is available on the outside of the derived table +func (qp *QueryProjection) addDerivedColumn(ctx *plancontext.PlanningContext, expr sqlparser.Expr) { for _, selectExpr := range qp.SelectExprs { getExpr, err := selectExpr.GetExpr() if err != nil { diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index a2155ee0700..e005e168ba9 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -760,6 +760,58 @@ ] } }, + { + "comment": "Aggregation with derived table", + "query": "select u.id, u.name, t.num_segments from (select id, count(*) as num_segments from user group by 1 order by 2 desc limit 20) t join unsharded u on u.id = t.id", + "plan": { + "QueryType": "SELECT", + "Original": "select u.id, u.name, t.num_segments from (select id, count(*) as num_segments from user group by 1 order by 2 desc limit 20) t join unsharded u on u.id = t.id", + "Instructions": { + "OperatorType": "Join", + "Variant": "Join", + "JoinColumnIndexes": "R:0,R:1,L:0", + "JoinVars": { + "t_id": 1 + }, + "TableName": "`user`_unsharded", + "Inputs": [ + { + "OperatorType": "Limit", + "Count": "20", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select t.num_segments, t.id from (select id, count(*) as num_segments from `user` where 1 != 1 group by id) as t where 1 != 1", + "OrderBy": "0 DESC", + "Query": "select t.num_segments, t.id from (select id, count(*) as num_segments from `user` group by id) as t order by t.num_segments desc limit 20", + "Table": "`user`" + } + ] + }, + { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select u.id, u.`name` from unsharded as u where 1 != 1", + "Query": "select u.id, u.`name` from unsharded as u where u.id = :t_id", + "Table": "unsharded" + } + ] + }, + "TablesUsed": [ + "main.unsharded", + "user.user" + ] + } + }, { "comment": "scatter aggregate multiple group by (numbers)", "query": "select a, b, count(*) from user group by 2, 1", @@ -3650,7 +3702,7 @@ }, "FieldQuery": "select x.id, x.val1, 1, weight_string(x.val1) from (select id, val1 from `user` where 1 != 1) as x where 1 != 1", "OrderBy": "(1|3) ASC", - "Query": "select x.id, x.val1, 1, weight_string(x.val1) from (select id, val1 from `user` where val2 < 4) as x order by `user`.val1 asc limit 2", + "Query": "select x.id, x.val1, 1, weight_string(x.val1) from (select id, val1 from `user` where val2 < 4) as x order by x.val1 asc limit 2", "Table": "`user`" } ] @@ -7173,7 +7225,7 @@ }, "FieldQuery": "select subquery_for_count.one, subquery_for_count.id, 1, weight_string(subquery_for_count.id) from (select 1 as one, id from `user` where 1 != 1) as subquery_for_count where 1 != 1", "OrderBy": "(1|3) DESC", - "Query": "select subquery_for_count.one, subquery_for_count.id, 1, weight_string(subquery_for_count.id) from (select 1 as one, id from `user` where `user`.is_not_deleted = true) as subquery_for_count order by id desc limit 25", + "Query": "select subquery_for_count.one, subquery_for_count.id, 1, weight_string(subquery_for_count.id) from (select 1 as one, id from `user` where `user`.is_not_deleted = true) as subquery_for_count order by subquery_for_count.id desc limit 25", "Table": "`user`" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/cte_cases.json b/go/vt/vtgate/planbuilder/testdata/cte_cases.json index 7b54bcb5a4a..1fd398012e3 100644 --- a/go/vt/vtgate/planbuilder/testdata/cte_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/cte_cases.json @@ -352,7 +352,7 @@ }, "FieldQuery": "select x.id, x.val1, 1, weight_string(x.val1) from (select id, val1 from `user` where 1 != 1) as x where 1 != 1", "OrderBy": "(1|3) ASC", - "Query": "select x.id, x.val1, 1, weight_string(x.val1) from (select id, val1 from `user` where val2 < 4) as x order by `user`.val1 asc limit 2", + "Query": "select x.id, x.val1, 1, weight_string(x.val1) from (select id, val1 from `user` where val2 < 4) as x order by x.val1 asc limit 2", "Table": "`user`" } ] From 3cb61cd613edc485d5d6cb78d621a33faab6a52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Mon, 15 Jul 2024 18:53:16 +0200 Subject: [PATCH 40/55] Fix Join Predicate Cleanup Bug in Route Merging (#16386) Signed-off-by: Andres Taylor Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard --- .../vtgate/vitess_tester/join/join.test | 49 +++++++++++++++++++ .../vtgate/vitess_tester/join/vschema.json | 38 ++++++++++++++ .../planbuilder/operators/SQL_builder.go | 4 +- .../planbuilder/testdata/from_cases.json | 24 +++++++++ 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 go/test/endtoend/vtgate/vitess_tester/join/join.test create mode 100644 go/test/endtoend/vtgate/vitess_tester/join/vschema.json diff --git a/go/test/endtoend/vtgate/vitess_tester/join/join.test b/go/test/endtoend/vtgate/vitess_tester/join/join.test new file mode 100644 index 00000000000..cffd3a1b3aa --- /dev/null +++ b/go/test/endtoend/vtgate/vitess_tester/join/join.test @@ -0,0 +1,49 @@ +CREATE TABLE `t1` +( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(191) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE InnoDB, + CHARSET utf8mb4, + COLLATE utf8mb4_unicode_ci; + +CREATE TABLE `t2` +( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `t1_id` int unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE InnoDB, + CHARSET utf8mb4, + COLLATE utf8mb4_unicode_ci; + +CREATE TABLE `t3` +( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(191) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE InnoDB, + CHARSET utf8mb4, + COLLATE utf8mb4_unicode_ci; + +insert into t1 (id, name) +values (1, 'A'), + (2, 'B'), + (3, 'C'), + (4, 'D'); + +insert into t2 (id, t1_id) +values (1, 1), + (2, 2), + (3, 3); + +insert into t3 (id, name) +values (1, 'A'), + (2, 'B'), + (3, 'B'), + (4, 'B'), + (5, 'B'); + +-- wait_authoritative t1 +-- wait_authoritative t2 +-- wait_authoritative t3 +select 42 from t1 join t2 on t1.id = t2.t1_id join t3 on t1.id = t3.id where t1.name or t2.id or t3.name; diff --git a/go/test/endtoend/vtgate/vitess_tester/join/vschema.json b/go/test/endtoend/vtgate/vitess_tester/join/vschema.json new file mode 100644 index 00000000000..b922d3f760c --- /dev/null +++ b/go/test/endtoend/vtgate/vitess_tester/join/vschema.json @@ -0,0 +1,38 @@ +{ + "keyspaces": { + "joinks": { + "sharded": true, + "vindexes": { + "hash": { + "type": "hash" + } + }, + "tables": { + "t1": { + "column_vindexes": [ + { + "column": "id", + "name": "hash" + } + ] + }, + "t2": { + "column_vindexes": [ + { + "column": "t1_id", + "name": "hash" + } + ] + }, + "t3": { + "column_vindexes": [ + { + "column": "id", + "name": "hash" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/go/vt/vtgate/planbuilder/operators/SQL_builder.go b/go/vt/vtgate/planbuilder/operators/SQL_builder.go index 221c0cee2c7..08cf3c4801c 100644 --- a/go/vt/vtgate/planbuilder/operators/SQL_builder.go +++ b/go/vt/vtgate/planbuilder/operators/SQL_builder.go @@ -233,7 +233,9 @@ func (qb *queryBuilder) joinWith(other *queryBuilder, onCondition sqlparser.Expr switch joinType { case sqlparser.NormalJoinType: newFromClause = append(stmt.GetFrom(), otherStmt.GetFrom()...) - qb.addPredicate(onCondition) + for _, pred := range sqlparser.SplitAndExpression(nil, onCondition) { + qb.addPredicate(pred) + } default: newFromClause = []sqlparser.TableExpr{buildJoin(stmt, otherStmt, onCondition, joinType)} } diff --git a/go/vt/vtgate/planbuilder/testdata/from_cases.json b/go/vt/vtgate/planbuilder/testdata/from_cases.json index cbdfcd835b5..50b56b428ec 100644 --- a/go/vt/vtgate/planbuilder/testdata/from_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/from_cases.json @@ -1824,6 +1824,30 @@ ] } }, + { + "comment": "three table join with join predicate touching all tables", + "query": "select 42 from user u join user_extra ue on u.id = ue.user_id join music m on m.user_id = u.id where u.foo or m.foo or ue.foo", + "plan": { + "QueryType": "SELECT", + "Original": "select 42 from user u join user_extra ue on u.id = ue.user_id join music m on m.user_id = u.id where u.foo or m.foo or ue.foo", + "Instructions": { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select 42 from `user` as u, user_extra as ue, music as m where 1 != 1", + "Query": "select 42 from `user` as u, user_extra as ue, music as m where u.id = ue.user_id and m.user_id = u.id and (u.foo or m.foo or ue.foo)", + "Table": "`user`, music, user_extra" + }, + "TablesUsed": [ + "user.music", + "user.user", + "user.user_extra" + ] + } + }, { "comment": "join of normal table with information_schema", "query": "select unsharded.foo from unsharded join information_schema.CHARACTER_SETS", From 2e009e3e1d7a84b071926c18ad951f305ebf4cf9 Mon Sep 17 00:00:00 2001 From: vitess-bot <139342327+vitess-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:55:13 -0400 Subject: [PATCH 41/55] Upgrade the Golang Dependencies (#16379) Signed-off-by: GitHub Co-authored-by: frouioui --- go.mod | 58 +++++++++++++------------- go.sum | 128 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 93 insertions(+), 93 deletions(-) diff --git a/go.mod b/go.mod index 47dafd671f7..59d0ad29827 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module vitess.io/vitess go 1.22.5 require ( - cloud.google.com/go/storage v1.42.0 + cloud.google.com/go/storage v1.43.0 github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 github.com/Azure/azure-pipeline-go v0.2.3 github.com/Azure/azure-storage-blob-go v0.15.0 github.com/HdrHistogram/hdrhistogram-go v0.9.0 // indirect github.com/aquarapid/vaultlib v0.5.1 github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.54.13 + github.com/aws/aws-sdk-go v1.54.19 github.com/buger/jsonparser v1.1.1 github.com/cespare/xxhash/v2 v2.3.0 github.com/corpix/uarand v0.1.1 // indirect @@ -18,7 +18,7 @@ require ( github.com/evanphx/json-patch v5.9.0+incompatible github.com/fsnotify/fsnotify v1.7.0 github.com/go-sql-driver/mysql v1.7.1 - github.com/golang/glog v1.2.1 + github.com/golang/glog v1.2.2 github.com/golang/protobuf v1.5.4 github.com/golang/snappy v0.0.4 github.com/google/go-cmp v0.6.0 @@ -28,7 +28,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/hashicorp/consul/api v1.29.1 + github.com/hashicorp/consul/api v1.29.2 github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428 @@ -43,7 +43,7 @@ require ( github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e github.com/opentracing/opentracing-go v1.2.0 github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/philhofer/fwd v1.1.2 // indirect + github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect github.com/pierrec/lz4 v2.6.1+incompatible github.com/pires/go-proxyproto v0.7.0 github.com/pkg/errors v0.9.1 @@ -59,7 +59,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/tchap/go-patricia v2.3.0+incompatible github.com/tidwall/gjson v1.17.1 - github.com/tinylib/msgp v1.1.9 // indirect + github.com/tinylib/msgp v1.2.0 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 @@ -68,17 +68,17 @@ require ( go.etcd.io/etcd/client/pkg/v3 v3.5.14 go.etcd.io/etcd/client/v3 v3.5.14 go.uber.org/mock v0.2.0 - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 golang.org/x/oauth2 v0.21.0 - golang.org/x/sys v0.21.0 - golang.org/x/term v0.21.0 + golang.org/x/sys v0.22.0 + golang.org/x/term v0.22.0 golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 - golang.org/x/tools v0.22.0 - google.golang.org/api v0.187.0 - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect + golang.org/x/tools v0.23.0 + google.golang.org/api v0.188.0 + google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect google.golang.org/grpc v1.65.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b @@ -104,22 +104,22 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 github.com/xlab/treeprint v1.2.0 go.uber.org/goleak v1.3.0 - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 + golang.org/x/exp v0.0.0-20240707233637-46b078467d37 golang.org/x/sync v0.7.0 gonum.org/v1/gonum v0.14.0 - modernc.org/sqlite v1.30.1 + modernc.org/sqlite v1.30.2 ) require ( cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.1 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.4.0 // indirect - cloud.google.com/go/iam v1.1.10 // indirect - github.com/DataDog/appsec-internal-go v1.6.0 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.54.0 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0 // indirect - github.com/DataDog/go-libddwaf/v3 v3.2.1 // indirect + cloud.google.com/go/auth v0.7.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/iam v1.1.11 // indirect + github.com/DataDog/appsec-internal-go v1.7.0 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.55.0 // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.55.0 // indirect + github.com/DataDog/go-libddwaf/v3 v3.3.0 // indirect github.com/DataDog/go-sqllexer v0.0.12 // indirect github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect github.com/DataDog/sketches-go v1.4.6 // indirect @@ -176,8 +176,8 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect @@ -185,13 +185,13 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect - modernc.org/libc v1.54.1 // indirect + modernc.org/libc v1.55.1 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.8.0 // indirect modernc.org/strutil v1.2.0 // indirect diff --git a/go.sum b/go.sum index 35df734575e..3ff3456402a 100644 --- a/go.sum +++ b/go.sum @@ -2,18 +2,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/auth v0.6.1 h1:T0Zw1XM5c1GlpN2HYr2s+m3vr1p2wy+8VN+Z1FKxW38= -cloud.google.com/go/auth v0.6.1/go.mod h1:eFHG7zDzbXHKmjJddFG/rBlcGp6t25SwRUiEQSlO4x4= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= -cloud.google.com/go/compute/metadata v0.4.0 h1:vHzJCWaM4g8XIcm8kopr3XmDA4Gy/lblD3EhhSux05c= -cloud.google.com/go/compute/metadata v0.4.0/go.mod h1:SIQh1Kkb4ZJ8zJ874fqVkslA29PRXuleyj6vOzlbK7M= -cloud.google.com/go/iam v1.1.10 h1:ZSAr64oEhQSClwBL670MsJAW5/RLiC6kfw3Bqmd5ZDI= -cloud.google.com/go/iam v1.1.10/go.mod h1:iEgMq62sg8zx446GCaijmA2Miwg5o3UbO+nI47WHJps= -cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= -cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= -cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= -cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= +cloud.google.com/go/auth v0.7.1 h1:Iv1bbpzJ2OIg16m94XI9/tlzZZl3cdeR3nGVGj78N7s= +cloud.google.com/go/auth v0.7.1/go.mod h1:VEc4p5NNxycWQTMQEDQF0bd6aTMb6VgYDXEwiJJQAbs= +cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= +cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/iam v1.1.11 h1:0mQ8UKSfdHLut6pH9FM3bI55KWR46ketn0PuXleDyxw= +cloud.google.com/go/iam v1.1.11/go.mod h1:biXoiLWYIKntto2joP+62sd9uW5EpkZmKIvfNcTWlnQ= +cloud.google.com/go/longrunning v0.5.9 h1:haH9pAuXdPAMqHvzX0zlWQigXT7B0+CL4/2nXXdBo5k= +cloud.google.com/go/longrunning v0.5.9/go.mod h1:HD+0l9/OOW0za6UWdKJtXoFAX/BGg/3Wj8p10NeWF7c= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= @@ -32,17 +32,17 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/appsec-internal-go v1.6.0 h1:QHvPOv/O0s2fSI/BraZJNpRDAtdlrRm5APJFZNBxjAw= -github.com/DataDog/appsec-internal-go v1.6.0/go.mod h1:pEp8gjfNLtEOmz+iZqC8bXhu0h4k7NUsW/qiQb34k1U= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.54.0 h1:rLQBdJQSvuFXGs5jK9Mc8BSpD5dalmxwKPPiwzXmlTk= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.54.0/go.mod h1:4/9D8y6pQo5a/Tg8GAQN8SaRIRWxxyl5QHzPRuu8D0k= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0 h1:6t+OZCHDCzaCZwanZI+XD/gw5L4va6d/7hGjI1F1mms= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0/go.mod h1:3yFk56PJ57yS1GqI9HAsS4PSlAeGCC9RQA7jxKzYj6g= +github.com/DataDog/appsec-internal-go v1.7.0 h1:iKRNLih83dJeVya3IoUfK+6HLD/hQsIbyBlfvLmAeb0= +github.com/DataDog/appsec-internal-go v1.7.0/go.mod h1:wW0cRfWBo4C044jHGwYiyh5moQV2x0AhnwqMuiX7O/g= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.55.0 h1:q8n6qVTPATzBL02e0rxCOrLFWDNw4as0GcuKWkJENFk= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.55.0/go.mod h1:/C99KWKukVnTtIiYCQ55izSNDQceREb8vSPa3zUn6jc= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.55.0 h1:+T+3WXCFC9g8r4AVBaD3v1LOKSLyKAtl/LtXyCTcm7I= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.55.0/go.mod h1:3yFk56PJ57yS1GqI9HAsS4PSlAeGCC9RQA7jxKzYj6g= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= -github.com/DataDog/go-libddwaf/v3 v3.2.1 h1:lZPc6UxCOwioHc++nsldKR50FpIrRh1uGnGLuryqnE8= -github.com/DataDog/go-libddwaf/v3 v3.2.1/go.mod h1:AP+7Atb8ftSsrha35wht7+K3R+xuzfVSQhabSO4w6CY= +github.com/DataDog/go-libddwaf/v3 v3.3.0 h1:jS72fuQpFgJZEdEJDmHJCPAgNTEMZoz1EUvimPUOiJ4= +github.com/DataDog/go-libddwaf/v3 v3.3.0/go.mod h1:Bz/0JkpGf689mzbUjKJeheJINqsyyhM8p9PDuHdK2Ec= github.com/DataDog/go-sqllexer v0.0.12 h1:ncvAr5bbwtc7JMezzcU2379oKz1oHhRF1hkR6BSvhqM= github.com/DataDog/go-sqllexer v0.0.12/go.mod h1:KwkYhpFEVIq+BfobkTC1vfqm4gTi65skV/DpDBXtexc= github.com/DataDog/go-tuf v1.1.0-0.5.2 h1:4CagiIekonLSfL8GMHRHcHudo1fQnxELS9g4tiAupQ4= @@ -73,8 +73,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.54.13 h1:zpCuiG+/mFdDY/klKJvmSioAZWk45F4rLGq0JWVAAzk= -github.com/aws/aws-sdk-go v1.54.13/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.54.19 h1:tyWV+07jagrNiCcGRzRhdtVjQs7Vy41NwsuOcl0IbVI= +github.com/aws/aws-sdk-go v1.54.19/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -162,8 +162,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -230,10 +230,10 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vb github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/hashicorp/consul/api v1.29.1 h1:UEwOjYJrd3lG1x5w7HxDRMGiAUPrb3f103EoeKuuEcc= -github.com/hashicorp/consul/api v1.29.1/go.mod h1:lumfRkY/coLuqMICkI7Fh3ylMG31mQSRZyef2c5YvJI= -github.com/hashicorp/consul/proto-public v0.6.1 h1:+uzH3olCrksXYWAYHKqK782CtK9scfqH+Unlw3UHhCg= -github.com/hashicorp/consul/proto-public v0.6.1/go.mod h1:cXXbOg74KBNGajC+o8RlA502Esf0R9prcoJgiOX/2Tg= +github.com/hashicorp/consul/api v1.29.2 h1:aYyRn8EdE2mSfG14S1+L9Qkjtz8RzmaWh6AcNGRNwPw= +github.com/hashicorp/consul/api v1.29.2/go.mod h1:0YObcaLNDSbtlgzIRtmRXI1ZkeuK0trCBxwZQ4MYnIk= +github.com/hashicorp/consul/proto-public v0.6.2 h1:+DA/3g/IiKlJZb88NBn0ZgXrxJp2NlvCZdEyl+qxvL0= +github.com/hashicorp/consul/proto-public v0.6.2/go.mod h1:cXXbOg74KBNGajC+o8RlA502Esf0R9prcoJgiOX/2Tg= github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -392,8 +392,8 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= -github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= +github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= +github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs= @@ -509,8 +509,8 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= -github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= +github.com/tinylib/msgp v1.2.0 h1:0uKB/662twsVBpYUPbokj4sTSKhWFKB7LopO2kWK8lY= +github.com/tinylib/msgp v1.2.0/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= @@ -533,10 +533,10 @@ go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= @@ -568,11 +568,11 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= +golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -580,8 +580,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -605,8 +605,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= @@ -657,11 +657,11 @@ golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -682,8 +682,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -692,8 +692,8 @@ golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSm golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -google.golang.org/api v0.187.0 h1:Mxs7VATVC2v7CY+7Xwm4ndkX71hpElcvx0D1Ji/p1eo= -google.golang.org/api v0.187.0/go.mod h1:KIHlTc4x7N7gKKuVsdmfBXN13yEEWXWFURWY6SBp2gk= +google.golang.org/api v0.188.0 h1:51y8fJ/b1AaaBRJr4yWm96fPcuxSo0JcegXE3DaHQHw= +google.golang.org/api v0.188.0/go.mod h1:VR0d+2SIiWOYG3r/jdm7adPW9hI2aRv9ETOSCQ9Beag= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -701,12 +701,12 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d h1:/hmn0Ku5kWij/kjGsrcJeC1T/MrJi2iNWwgAqrihFwc= +google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY= +google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY= +google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -771,16 +771,16 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ= modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= -modernc.org/ccgo/v4 v4.19.0 h1:f9K5VdC0nVhHKTFMvhjtZ8TbRgFQbASvE5yO1zs8eC0= -modernc.org/ccgo/v4 v4.19.0/go.mod h1:CfpAl+673iXNwMG/aqcQn+vDcu4Es/YLya7+9RHjTa4= +modernc.org/ccgo/v4 v4.19.2 h1:lwQZgvboKD0jBwdaeVCTouxhxAyN6iawF3STraAal8Y= +modernc.org/ccgo/v4 v4.19.2/go.mod h1:ysS3mxiMV38XGRTTcgo0DQTeTmAO4oCmJl1nX9VFI3s= modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b h1:BnN1t+pb1cy61zbvSUV7SeI0PwosMhlAEi/vBY4qxp8= modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= -modernc.org/libc v1.54.1 h1:5vzs86ANQehsFZXqjxUam20JwgK2eODTOcGMIWcCdg4= -modernc.org/libc v1.54.1/go.mod h1:B0D6klDmSmnq26T1iocn9kzyX6NtbzjuI3+oX/xfvng= +modernc.org/libc v1.55.1 h1:2K/vMbMDGymj0CO4mcQybYW8SW3czB+u9rlghpMkTrI= +modernc.org/libc v1.55.1/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= @@ -789,8 +789,8 @@ modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc= modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss= -modernc.org/sqlite v1.30.1 h1:YFhPVfu2iIgUf9kuA1CR7iiHdcEEsI2i+yjRYHscyxk= -modernc.org/sqlite v1.30.1/go.mod h1:DUmsiWQDaAvU4abhc/N+djlom/L2o8f7gZ95RCvyoLU= +modernc.org/sqlite v1.30.2 h1:IPVVkhLu5mMVnS1dQgh3h0SAACRWcVk7aoLP9Us3UCk= +modernc.org/sqlite v1.30.2/go.mod h1:DUmsiWQDaAvU4abhc/N+djlom/L2o8f7gZ95RCvyoLU= modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= From 8eda6024e5aff3a9bbbd001f2ef643f900bffc97 Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:57:27 +0530 Subject: [PATCH 42/55] Add semi-sync plugin test in main (#16372) Signed-off-by: Manan Gupta --- .../upgrade_downgrade_test_semi_sync.yml | 164 ++++++++++++++++++ .../reparent/semisync/semi_sync_test.go | 102 +++++++++++ 2 files changed, 266 insertions(+) create mode 100644 .github/workflows/upgrade_downgrade_test_semi_sync.yml create mode 100644 go/test/endtoend/reparent/semisync/semi_sync_test.go diff --git a/.github/workflows/upgrade_downgrade_test_semi_sync.yml b/.github/workflows/upgrade_downgrade_test_semi_sync.yml new file mode 100644 index 00000000000..91b3b22b93e --- /dev/null +++ b/.github/workflows/upgrade_downgrade_test_semi_sync.yml @@ -0,0 +1,164 @@ +name: Semi Sync Upgrade Downgrade Testing +on: + push: + pull_request: + +concurrency: + group: format('{0}-{1}', ${{ github.ref }}, 'Semi Sync Upgrade Downgrade Testing') + cancel-in-progress: true + +permissions: read-all + +jobs: + upgrade_downgrade_test_e2e: + timeout-minutes: 60 + name: Run Semi Sync Upgrade Downgrade Test + runs-on: gh-hosted-runners-16cores-1 + + steps: + - name: Skip CI + run: | + if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then + echo "skipping CI due to the 'Skip CI' label" + exit 1 + fi + + - 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 "skip-workflow=${skip}" >> $GITHUB_OUTPUT + + - name: Check out commit's code + if: steps.skip-workflow.outputs.skip-workflow == 'false' + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set output with latest release branch + if: steps.skip-workflow.outputs.skip-workflow == 'false' + id: output-previous-release-ref + run: | + previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + echo $previous_release_ref + echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT + + - name: Check for changes in relevant files + if: steps.skip-workflow.outputs.skip-workflow == 'false' + uses: dorny/paths-filter@v3.0.1 + id: changes + with: + token: '' + filters: | + end_to_end: + - 'go/**' + - 'go/**/*.go' + - 'test.go' + - 'Makefile' + - 'build.env' + - 'go.sum' + - 'go.mod' + - 'proto/*.proto' + - 'tools/**' + - 'config/**' + - 'bootstrap.sh' + - '.github/workflows/upgrade_downgrade_test_semi_sync.yml' + + - name: Set up Go + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + uses: actions/setup-go@v5 + with: + go-version: 1.22.5 + + - name: Set up python + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + uses: actions/setup-python@v5 + + - name: Tune the OS + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" + + - name: Get base dependencies + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + sudo apt-get update + sudo apt-get install -y mysql-server mysql-client 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 + + 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 percona-release enable-only tools + sudo apt-get update + sudo apt-get install -y percona-xtrabackup-80 + + # Checkout to the last release of Vitess + - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + uses: actions/checkout@v4 + with: + ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} + + - name: Get dependencies for the last release + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + go mod download + + - name: Building last release's binaries + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + timeout-minutes: 10 + run: | + source build.env + NOVTADMINBUILD=1 make build + mkdir -p /tmp/vitess-build-other/ + cp -R bin /tmp/vitess-build-other/ + rm -Rf bin/* + + # Checkout to this build's commit + - name: Check out commit's code + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + uses: actions/checkout@v4 + + - name: Get dependencies for this commit + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + go mod download + + - name: Building the binaries for this commit + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + timeout-minutes: 10 + run: | + source build.env + NOVTADMINBUILD=1 make build + mkdir -p /tmp/vitess-build-current/ + cp -R bin /tmp/vitess-build-current/ + + # Copy last releases vttablet + - name: Copy last release's VTTablet + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + source build.env + + cp /tmp/vitess-build-other/bin/vttablet $PWD/bin/vttabletold + vttabletold --version + + - name: Run semi sync tests + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + run: | + rm -rf /tmp/vtdataroot + mkdir -p /tmp/vtdataroot + set -x + source build.env + go test -v -count=1 -run="" ./go/test/endtoend/reparent/semisync -alsologtostderr \ No newline at end of file diff --git a/go/test/endtoend/reparent/semisync/semi_sync_test.go b/go/test/endtoend/reparent/semisync/semi_sync_test.go new file mode 100644 index 00000000000..07cf4a7abc8 --- /dev/null +++ b/go/test/endtoend/reparent/semisync/semi_sync_test.go @@ -0,0 +1,102 @@ +/* +Copyright 2024 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 semisync + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/reparent/utils" +) + +func TestSemiSyncUpgradeDowngrade(t *testing.T) { + ver, err := cluster.GetMajorVersion("vtgate") + require.NoError(t, err) + if ver != 21 { + t.Skip("We only want to run this test for v21 release") + } + defer cluster.PanicHandler(t) + clusterInstance := utils.SetupReparentCluster(t, "semi_sync") + defer utils.TeardownCluster(clusterInstance) + tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets + + // Verify that replication is running as intended. + utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[1], tablets[2], tablets[3]}) + + replica := tablets[1] + // Verify we are using the correct vttablet version. + verifyVttabletVersion(t, replica, 21) + // Check the plugin loaded in vttablet. + require.EqualValues(t, mysql.SemiSyncTypeSource, semiSyncExtensionLoaded(t, replica)) + + t.Run("Downgrade to previous release", func(t *testing.T) { + // change vttablet binary and downgrade it. + changeVttabletBinary(t, replica, "vttabletold") + // Verify we are using the older vttablet version. + verifyVttabletVersion(t, replica, 20) + // Verify that replication is running as intended. + utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[1], tablets[2], tablets[3]}) + // Check the plugin loaded in vttablet. + require.EqualValues(t, mysql.SemiSyncTypeSource, semiSyncExtensionLoaded(t, replica)) + }) + + t.Run("Upgrade to current release", func(t *testing.T) { + // change vttablet binary and downgrade it. + changeVttabletBinary(t, replica, "vttablet") + // Verify we are using the older vttablet version. + verifyVttabletVersion(t, replica, 21) + // Verify that replication is running as intended. + utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[1], tablets[2], tablets[3]}) + // Check the plugin loaded in vttablet. + require.EqualValues(t, mysql.SemiSyncTypeSource, semiSyncExtensionLoaded(t, replica)) + }) +} + +// semiSyncExtensionLoaded checks if the semisync extension has been loaded. +// It should work for both MariaDB and MySQL. +func semiSyncExtensionLoaded(t *testing.T, replica *cluster.Vttablet) mysql.SemiSyncType { + qr := utils.RunSQL(context.Background(), t, `SHOW VARIABLES LIKE 'rpl_semi_sync_%_enabled'`, replica) + for _, row := range qr.Rows { + if row[0].ToString() == "rpl_semi_sync_source_enabled" { + return mysql.SemiSyncTypeSource + } + if row[0].ToString() == "rpl_semi_sync_master_enabled" { + return mysql.SemiSyncTypeMaster + } + } + return mysql.SemiSyncTypeOff +} + +func changeVttabletBinary(t *testing.T, replica *cluster.Vttablet, binary string) { + t.Helper() + err := replica.VttabletProcess.TearDown() + require.NoError(t, err) + replica.VttabletProcess.Binary = binary + err = replica.VttabletProcess.Setup() + require.NoError(t, err) +} + +func verifyVttabletVersion(t *testing.T, replica *cluster.Vttablet, version int) { + t.Helper() + verGot, err := cluster.GetMajorVersion(replica.VttabletProcess.Binary) + require.NoError(t, err) + require.EqualValues(t, version, verGot) +} From 66bf89b180cdbd9d8bbf06b75301f6089d71a4ff Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:03:00 +0530 Subject: [PATCH 43/55] Fix panic in schema tracker in presence of keyspace routing rules (#16383) Signed-off-by: Manan Gupta --- go/vt/vtgate/vschema_manager.go | 8 +++--- go/vt/vtgate/vschema_manager_test.go | 43 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/go/vt/vtgate/vschema_manager.go b/go/vt/vtgate/vschema_manager.go index c73266af769..2b6761f4a8e 100644 --- a/go/vt/vtgate/vschema_manager.go +++ b/go/vt/vtgate/vschema_manager.go @@ -229,9 +229,9 @@ func (vm *VSchemaManager) updateTableInfo(vschema *vindexes.VSchema, ks *vindexe // Now that we have ensured that all the tables are created, we can start populating the foreign keys // in the tables. for tblName, tblInfo := range m { - rTbl, err := vschema.FindRoutedTable(ksName, tblName, topodatapb.TabletType_PRIMARY) - if err != nil { - log.Errorf("error finding routed table %s: %v", tblName, err) + rTbl := ks.Tables[tblName] + if rTbl == nil { + log.Errorf("unable to find table %s in %s", tblName, ksName) continue } for _, fkDef := range tblInfo.ForeignKeys { @@ -240,7 +240,7 @@ func (vm *VSchemaManager) updateTableInfo(vschema *vindexes.VSchema, ks *vindexe continue } parentTbl, err := vschema.FindRoutedTable(ksName, fkDef.ReferenceDefinition.ReferencedTable.Name.String(), topodatapb.TabletType_PRIMARY) - if err != nil { + if err != nil || parentTbl == nil { log.Errorf("error finding parent table %s: %v", fkDef.ReferenceDefinition.ReferencedTable.Name.String(), err) continue } diff --git a/go/vt/vtgate/vschema_manager_test.go b/go/vt/vtgate/vschema_manager_test.go index 32f83f0021a..8dfb889df0d 100644 --- a/go/vt/vtgate/vschema_manager_test.go +++ b/go/vt/vtgate/vschema_manager_test.go @@ -336,6 +336,49 @@ func TestVSchemaUpdate(t *testing.T) { } } +// TestKeyspaceRoutingRules tests that the vschema manager doens't panic in the presence of keyspace routing rules. +func TestKeyspaceRoutingRules(t *testing.T) { + cols1 := []vindexes.Column{{ + Name: sqlparser.NewIdentifierCI("id"), + Type: querypb.Type_INT64, + }} + // Create a vschema manager with a fake vschema that returns a table with a column and a primary key. + vm := &VSchemaManager{} + vm.schema = &fakeSchema{t: map[string]*vindexes.TableInfo{ + "t1": { + Columns: cols1, + Indexes: []*sqlparser.IndexDefinition{ + { + Info: &sqlparser.IndexInfo{Type: sqlparser.IndexTypePrimary}, + Columns: []*sqlparser.IndexColumn{ + { + Column: sqlparser.NewIdentifierCI("id"), + }, + }, + }, + }, + }, + }} + // Define a vschema that has a keyspace routing rule. + vs := &vindexes.VSchema{ + Keyspaces: map[string]*vindexes.KeyspaceSchema{ + "ks": { + Tables: map[string]*vindexes.Table{}, + Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, + }, + "ks2": { + Tables: map[string]*vindexes.Table{}, + Keyspace: &vindexes.Keyspace{Name: "ks2", Sharded: true}, + }, + }, + KeyspaceRoutingRules: map[string]string{ + "ks": "ks2", + }, + } + // Ensure that updating the vschema manager from the vschema doesn't cause a panic. + vm.updateFromSchema(vs) +} + func TestRebuildVSchema(t *testing.T) { cols1 := []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("id"), From 37b10ad4b4ac079f57c345dee6e84c7bfdbce03a Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:12:25 +0300 Subject: [PATCH 44/55] Online DDL: do not update last_throttled_timestamp with zero value (#16395) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- .../onlineddl_vrepl_stress_suite_test.go | 24 +++++++++++-------- go/vt/vttablet/onlineddl/executor.go | 6 +++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go b/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go index 8d631e0e935..2492d30788d 100644 --- a/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go +++ b/go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go @@ -73,6 +73,7 @@ type testcase struct { var ( clusterInstance *cluster.LocalProcessCluster + primaryTablet *cluster.Vttablet vtParams mysql.ConnParams evaluatedMysqlParams *mysql.ConnParams @@ -368,6 +369,9 @@ var ( truncateStatement = ` TRUNCATE TABLE stress_test ` + setSqlMode = ` + set @@global.sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' + ` ) const ( @@ -391,17 +395,13 @@ func nextOpOrder() int64 { return opOrder } -func getTablet() *cluster.Vttablet { - return clusterInstance.Keyspaces[0].Shards[0].Vttablets[0] -} - func mysqlParams() *mysql.ConnParams { if evaluatedMysqlParams != nil { return evaluatedMysqlParams } evaluatedMysqlParams = &mysql.ConnParams{ Uname: "vt_dba", - UnixSocket: path.Join(os.Getenv("VTDATAROOT"), fmt.Sprintf("/vt_%010d", getTablet().TabletUID), "/mysql.sock"), + UnixSocket: path.Join(os.Getenv("VTDATAROOT"), fmt.Sprintf("/vt_%010d", primaryTablet.TabletUID), "/mysql.sock"), DbName: fmt.Sprintf("vt_%s", keyspaceName), } return evaluatedMysqlParams @@ -486,7 +486,11 @@ func TestSchemaChange(t *testing.T) { shards = clusterInstance.Keyspaces[0].Shards require.Equal(t, 1, len(shards)) + require.Equal(t, 1, len(shards[0].Vttablets)) + primaryTablet = shards[0].Vttablets[0] + _, err := primaryTablet.VttabletProcess.QueryTablet(setSqlMode, keyspaceName, true) + require.NoError(t, err) throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) for _, testcase := range testCases { @@ -500,7 +504,7 @@ func TestSchemaChange(t *testing.T) { } }) t.Run("create schema", func(t *testing.T) { - assert.Equal(t, 1, len(clusterInstance.Keyspaces[0].Shards)) + assert.Len(t, shards, 1) testWithInitialSchema(t) }) t.Run("prepare table", func(t *testing.T) { @@ -596,8 +600,8 @@ func testOnlineDDLStatement(t *testing.T, alterStatement string, ddlStrategy str // checkTable checks the number of tables in the first two shards. func checkTable(t *testing.T, showTableName string) { - for i := range clusterInstance.Keyspaces[0].Shards { - checkTablesCount(t, clusterInstance.Keyspaces[0].Shards[i].Vttablets[0], showTableName, 1) + for i := range shards { + checkTablesCount(t, shards[i].Vttablets[0], showTableName, 1) } } @@ -626,8 +630,8 @@ func checkTablesCount(t *testing.T, tablet *cluster.Vttablet, showTableName stri // checkMigratedTables checks the CREATE STATEMENT of a table after migration func checkMigratedTable(t *testing.T, tableName, expectHint string) { - for i := range clusterInstance.Keyspaces[0].Shards { - createStatement := getCreateTableStatement(t, clusterInstance.Keyspaces[0].Shards[i].Vttablets[0], tableName) + for i := range shards { + createStatement := getCreateTableStatement(t, shards[i].Vttablets[0], tableName) assert.Contains(t, createStatement, expectHint) } } diff --git a/go/vt/vttablet/onlineddl/executor.go b/go/vt/vttablet/onlineddl/executor.go index 00998c453e1..1d2137b7426 100644 --- a/go/vt/vttablet/onlineddl/executor.go +++ b/go/vt/vttablet/onlineddl/executor.go @@ -3870,8 +3870,10 @@ func (e *Executor) reviewRunningMigrations(ctx context.Context) (countRunnning i _ = e.updateRowsCopied(ctx, uuid, s.rowsCopied) _ = e.updateMigrationProgressByRowsCopied(ctx, uuid, s.rowsCopied) _ = e.updateMigrationETASecondsByProgress(ctx, uuid) - _ = e.updateMigrationLastThrottled(ctx, uuid, time.Unix(s.timeThrottled, 0), s.componentThrottled) - + if s.timeThrottled != 0 { + // Avoid creating a 0000-00-00 00:00:00 timestamp + _ = e.updateMigrationLastThrottled(ctx, uuid, time.Unix(s.timeThrottled, 0), s.componentThrottled) + } if onlineDDL.StrategySetting().IsInOrderCompletion() { // We will fail an in-order migration if there's _prior_ migrations within the same migration-context // which have failed. From af8f42af13f15356a54871cefe2d02955c045028 Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:24:29 +0530 Subject: [PATCH 45/55] Fix panic in user defined aggregation functions planning (#16398) Signed-off-by: Manan Gupta --- .../planbuilder/operators/aggregator.go | 3 ++ .../planbuilder/operators/queryprojection.go | 2 +- .../planbuilder/testdata/aggr_cases.json | 48 +++++++++++++++++++ .../testdata/unsupported_cases.json | 5 ++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/go/vt/vtgate/planbuilder/operators/aggregator.go b/go/vt/vtgate/planbuilder/operators/aggregator.go index 36cb0b1a771..bb969912f4f 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregator.go +++ b/go/vt/vtgate/planbuilder/operators/aggregator.go @@ -438,6 +438,9 @@ func (aggr Aggr) getPushColumnExprs() sqlparser.Exprs { return sqlparser.Exprs{aggr.Original.Expr} case opcode.AggregateCountStar: return sqlparser.Exprs{sqlparser.NewIntLiteral("1")} + case opcode.AggregateUDF: + // AggregateUDFs can't be evaluated on the vtgate. So either we are able to push everything down, or we will have to fail the query. + return nil default: return aggr.Func.GetArgs() } diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index a8cfaba6985..a245831ca13 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -68,7 +68,7 @@ type ( // Aggr encodes all information needed for aggregation functions Aggr struct { Original *sqlparser.AliasedExpr // The original SQL expression for the aggregation - Func sqlparser.AggrFunc // The aggregation function (e.g., COUNT, SUM). If nil, it means AggregateAnyValue is used + Func sqlparser.AggrFunc // The aggregation function (e.g., COUNT, SUM). If nil, it means AggregateAnyValue or AggregateUDF is used OpCode opcode.AggregateOpcode // The opcode representing the type of aggregation being performed // OriginalOpCode will contain opcode.AggregateUnassigned unless we are changing the opcode while pushing them down diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index e005e168ba9..eca27d81213 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -2216,6 +2216,54 @@ ] } }, + { + "comment": "User defined aggregation expression being used in order by of a query that is single sharded", + "query": "select col1, udf_aggr( col2 ) r from user where id = 1 group by col1 having r >= 0.3", + "plan": { + "QueryType": "SELECT", + "Original": "select col1, udf_aggr( col2 ) r from user where id = 1 group by col1 having r >= 0.3", + "Instructions": { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select col1, udf_aggr(col2) as r from `user` where 1 != 1 group by col1", + "Query": "select col1, udf_aggr(col2) as r from `user` where id = 1 group by col1 having udf_aggr(`user`.col2) >= 0.3", + "Table": "`user`", + "Values": [ + "1" + ], + "Vindex": "user_index" + }, + "TablesUsed": [ + "user.user" + ] + } + }, + { + "comment": "user defined aggregation such that it can pushed to mysql in a scatter route", + "query": "select id, udf_aggr( col2 ) r from user group by id", + "plan": { + "QueryType": "SELECT", + "Original": "select id, udf_aggr( col2 ) r from user group by id", + "Instructions": { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select id, udf_aggr(col2) as r from `user` where 1 != 1 group by id", + "Query": "select id, udf_aggr(col2) as r from `user` group by id", + "Table": "`user`" + }, + "TablesUsed": [ + "user.user" + ] + } + }, { "comment": "distinct on text column with collation", "query": "select col, count(distinct textcol1) from user group by col", diff --git a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json index 6f3148e602b..2ddbdcad038 100644 --- a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json @@ -19,6 +19,11 @@ "query": "select id from user group by id, (select id from user_extra)", "plan": "VT12001: unsupported: subqueries in GROUP BY" }, + { + "comment": "user defined functions used in having clause that needs evaluation on vtgate", + "query": "select col1, udf_aggr( col2 ) r from user group by col1 having r >= 0.3", + "plan": "VT12001: unsupported: Aggregate UDF 'udf_aggr(col2)' must be pushed down to MySQL" + }, { "comment": "update changes primary vindex column", "query": "update user set id = 1 where id = 1", From 91182d3751ed84c837e92eda0413d3fe13b249e1 Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:00:09 +0530 Subject: [PATCH 46/55] Fix subquery planning having an aggregation that is used in order by as long as we can merge it all into a single route (#16402) Signed-off-by: Manan Gupta --- .../operators/horizon_expanding.go | 13 ++++++--- .../planbuilder/testdata/select_cases.json | 27 +++++++++++++++++++ .../testdata/unsupported_cases.json | 5 ++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go index dd40dbeb918..fd3d992d0ca 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go +++ b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go @@ -141,13 +141,18 @@ func expandOrderBy(ctx *plancontext.PlanningContext, op Operator, qp *QueryProje continue } - // If the operator is not a projection, we cannot handle subqueries with aggregation + // If the operator is not a projection, we cannot handle subqueries with aggregation if we are unable to push everything into a single route. if !ok { - panic(vterrors.VT12001("subquery with aggregation in order by")) + ctx.SemTable.NotSingleRouteErr = vterrors.VT12001("subquery with aggregation in order by") + return &Ordering{ + Source: op, + Order: qp.OrderExprs, + } + } else { + // Add the new subquery expression to the projection + proj.addSubqueryExpr(ctx, aeWrap(newExpr), newExpr, subqs...) } - // Add the new subquery expression to the projection - proj.addSubqueryExpr(ctx, aeWrap(newExpr), newExpr, subqs...) // Replace the original order expression with the new expression containing subqueries newOrder = append(newOrder, OrderBy{ Inner: &sqlparser.Order{ diff --git a/go/vt/vtgate/planbuilder/testdata/select_cases.json b/go/vt/vtgate/planbuilder/testdata/select_cases.json index 98d0f9d0cbd..f1134847deb 100644 --- a/go/vt/vtgate/planbuilder/testdata/select_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/select_cases.json @@ -793,6 +793,33 @@ ] } }, + { + "comment": "subquery with an aggregation in order by that can be merged into a single route", + "query": "select col, trim((select user_name from user where id = 3)) val from user_extra where user_id = 3 group by col order by val", + "plan": { + "QueryType": "SELECT", + "Original": "select col, trim((select user_name from user where id = 3)) val from user_extra where user_id = 3 group by col order by val", + "Instructions": { + "OperatorType": "Route", + "Variant": "EqualUnique", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select col, trim((select user_name from `user` where 1 != 1)) as val from user_extra where 1 != 1 group by col", + "Query": "select col, trim((select user_name from `user` where id = 3)) as val from user_extra where user_id = 3 group by col order by trim((select `user`.user_name from `user` where `user`.id = 3)) asc", + "Table": "user_extra", + "Values": [ + "3" + ], + "Vindex": "user_index" + }, + "TablesUsed": [ + "user.user", + "user.user_extra" + ] + } + }, { "comment": "Jumbled references", "query": "select user.col, user_extra.id, user.col2 from user join user_extra", diff --git a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json index 2ddbdcad038..e1618d91efb 100644 --- a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json @@ -29,6 +29,11 @@ "query": "update user set id = 1 where id = 1", "plan": "VT12001: unsupported: you cannot UPDATE primary vindex columns; invalid update on vindex: user_index" }, + { + "comment": "subquery with an aggregation in order by that cannot be merged into a single route", + "query": "select col, trim((select user_name from user where col = 'a')) val from user_extra where user_id = 3 group by col order by val", + "plan": "VT12001: unsupported: subquery with aggregation in order by" + }, { "comment": "update change in multicol vindex column", "query": "update multicol_tbl set colc = 5, colb = 4 where cola = 1 and colb = 2", From 66fbbcf9b562d926824e377010bd1b5cbcdd3fe5 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Tue, 16 Jul 2024 10:21:34 -0400 Subject: [PATCH 47/55] Use default schema reload config values when config file is empty (#16393) Signed-off-by: Matt Lord --- go/vt/vttablet/tabletserver/tabletenv/config.go | 4 ---- go/vt/vttablet/tabletserver/tabletenv/config_test.go | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/vt/vttablet/tabletserver/tabletenv/config.go b/go/vt/vttablet/tabletserver/tabletenv/config.go index 89f827fa1f3..cf2947f55aa 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config.go @@ -406,8 +406,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) { if err != nil { return err } - } else { - cfg.SchemaReloadInterval = 0 } if tmp.SchemaChangeReloadTimeout != "" { @@ -415,8 +413,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) { if err != nil { return err } - } else { - cfg.SchemaChangeReloadTimeout = 0 } return nil diff --git a/go/vt/vttablet/tabletserver/tabletenv/config_test.go b/go/vt/vttablet/tabletserver/tabletenv/config_test.go index a51a3c599e8..d16b6276964 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config_test.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config_test.go @@ -58,6 +58,8 @@ func TestConfigParse(t *testing.T) { MaxInnoDBTrxHistLen: 1000, MaxMySQLReplLagSecs: 400, }, + SchemaChangeReloadTimeout: 30 * time.Second, + SchemaReloadInterval: 30 * time.Minute, } gotBytes, err := yaml2.Marshal(&cfg) @@ -93,6 +95,8 @@ replicationTracker: {} rowStreamer: maxInnoDBTrxHistLen: 1000 maxMySQLReplLagSecs: 400 +schemaChangeReloadTimeout: 30s +schemaReloadIntervalSeconds: 30m0s txPool: {} ` assert.Equal(t, wantBytes, string(gotBytes)) From 921aa29ace74a8bc51069288456f0cbfbd9f2a40 Mon Sep 17 00:00:00 2001 From: Renan Rangel Date: Tue, 16 Jul 2024 20:28:37 +0100 Subject: [PATCH 48/55] fixing issue with xtrabackup and long gtids (#16304) Signed-off-by: Renan Rangel --- go/vt/mysqlctl/xtrabackupengine.go | 35 ++++++++++++++----------- go/vt/mysqlctl/xtrabackupengine_test.go | 35 ++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/go/vt/mysqlctl/xtrabackupengine.go b/go/vt/mysqlctl/xtrabackupengine.go index 3f8491fdfb6..e6d02eedc1d 100644 --- a/go/vt/mysqlctl/xtrabackupengine.go +++ b/go/vt/mysqlctl/xtrabackupengine.go @@ -71,6 +71,7 @@ const ( writerBufferSize = 2 * 1024 * 1024 /*2 MiB*/ xtrabackupBinaryName = "xtrabackup" xtrabackupEngineName = "xtrabackup" + xtrabackupInfoFile = "xtrabackup_info" xbstream = "xbstream" ) @@ -292,7 +293,6 @@ func (be *XtrabackupEngine) backupFiles( numStripes int, flavor string, ) (replicationPosition replication.Position, finalErr error) { - backupProgram := path.Join(xtrabackupEnginePath, xtrabackupBinaryName) flagsToExec := []string{"--defaults-file=" + params.Cnf.Path, "--backup", @@ -300,6 +300,7 @@ func (be *XtrabackupEngine) backupFiles( "--slave-info", "--user=" + xtrabackupUser, "--target-dir=" + params.Cnf.TmpDir, + "--extra-lsndir=" + params.Cnf.TmpDir, } if xtrabackupStreamMode != "" { flagsToExec = append(flagsToExec, "--stream="+xtrabackupStreamMode) @@ -398,27 +399,14 @@ func (be *XtrabackupEngine) backupFiles( // the replication position. Note that if we don't read stderr as we go, the // xtrabackup process gets blocked when the write buffer fills up. stderrBuilder := &strings.Builder{} - posBuilder := &strings.Builder{} stderrDone := make(chan struct{}) go func() { defer close(stderrDone) scanner := bufio.NewScanner(backupErr) - capture := false for scanner.Scan() { line := scanner.Text() params.Logger.Infof("xtrabackup stderr: %s", line) - - // Wait until we see the first line of the binlog position. - // Then capture all subsequent lines. We need multiple lines since - // the value we're looking for has newlines in it. - if !capture { - if !strings.Contains(line, "MySQL binlog position") { - continue - } - capture = true - } - fmt.Fprintln(posBuilder, line) } if err := scanner.Err(); err != nil { params.Logger.Errorf("error reading from xtrabackup stderr: %v", err) @@ -462,8 +450,7 @@ func (be *XtrabackupEngine) backupFiles( return replicationPosition, vterrors.Wrap(err, fmt.Sprintf("xtrabackup failed with error. Output=%s", sterrOutput)) } - posOutput := posBuilder.String() - replicationPosition, rerr := findReplicationPosition(posOutput, flavor, params.Logger) + replicationPosition, rerr := findReplicationPositionFromXtrabackupInfo(params.Cnf.TmpDir, flavor, params.Logger) if rerr != nil { return replicationPosition, vterrors.Wrap(rerr, "backup failed trying to find replication position") } @@ -751,6 +738,22 @@ func (be *XtrabackupEngine) extractFiles(ctx context.Context, logger logutil.Log return nil } +func findReplicationPositionFromXtrabackupInfo(directory, flavor string, logger logutil.Logger) (replication.Position, error) { + f, err := os.Open(path.Join(directory, xtrabackupInfoFile)) + if err != nil { + return replication.Position{}, vterrors.Errorf(vtrpc.Code_INVALID_ARGUMENT, + "couldn't open %q to read GTID position", path.Join(directory, xtrabackupInfoFile)) + } + defer f.Close() + + contents, err := io.ReadAll(f) + if err != nil { + return replication.Position{}, vterrors.Errorf(vtrpc.Code_INVALID_ARGUMENT, "couldn't read GTID position from %q", f.Name()) + } + + return findReplicationPosition(string(contents), flavor, logger) +} + var xtrabackupReplicationPositionRegexp = regexp.MustCompile(`GTID of the last change '([^']*)'`) func findReplicationPosition(input, flavor string, logger logutil.Logger) (replication.Position, error) { diff --git a/go/vt/mysqlctl/xtrabackupengine_test.go b/go/vt/mysqlctl/xtrabackupengine_test.go index f560833d278..1139c671ca5 100644 --- a/go/vt/mysqlctl/xtrabackupengine_test.go +++ b/go/vt/mysqlctl/xtrabackupengine_test.go @@ -20,6 +20,8 @@ import ( "bytes" "crypto/rand" "io" + "os" + "path" "testing" "github.com/stretchr/testify/assert" @@ -49,22 +51,47 @@ func TestFindReplicationPosition(t *testing.T) { assert.NoError(t, err) assert.Equal(t, want, pos.String()) } +func TestFindReplicationPositionFromXtrabackupInfo(t *testing.T) { + input := `tool_version = 8.0.35-30 + binlog_pos = filename 'vt-0476396352-bin.000005', position '310088991', GTID of the last change '145e508e-ae54-11e9-8ce6-46824dd1815e:1-3, + 1e51f8be-ae54-11e9-a7c6-4280a041109b:1-3, + 47b59de1-b368-11e9-b48b-624401d35560:1-152981, + 557def0a-b368-11e9-84ed-f6fffd91cc57:1-3, + 599ef589-ae55-11e9-9688-ca1f44501925:1-14857169, + b9ce485d-b36b-11e9-9b17-2a6e0a6011f4:1-371262' + format = xbstream + ` + want := "145e508e-ae54-11e9-8ce6-46824dd1815e:1-3,1e51f8be-ae54-11e9-a7c6-4280a041109b:1-3,47b59de1-b368-11e9-b48b-624401d35560:1-152981,557def0a-b368-11e9-84ed-f6fffd91cc57:1-3,599ef589-ae55-11e9-9688-ca1f44501925:1-14857169,b9ce485d-b36b-11e9-9b17-2a6e0a6011f4:1-371262" + + tmp, err := os.MkdirTemp(t.TempDir(), "test") + assert.NoError(t, err) + + f, err := os.Create(path.Join(tmp, xtrabackupInfoFile)) + assert.NoError(t, err) + _, err = f.WriteString(input) + assert.NoError(t, err) + assert.NoError(t, f.Close()) + + pos, err := findReplicationPositionFromXtrabackupInfo(tmp, "MySQL56", logutil.NewConsoleLogger()) + assert.NoError(t, err) + assert.Equal(t, want, pos.String()) +} -func TestFindReplicationPositionNoMatch(t *testing.T) { +func TestFindReplicationPositionNoMatchFromXtrabackupInfo(t *testing.T) { // Make sure failure to find a match triggers an error. input := `nothing` - _, err := findReplicationPosition(input, "MySQL56", logutil.NewConsoleLogger()) + _, err := findReplicationPositionFromXtrabackupInfo(input, "MySQL56", logutil.NewConsoleLogger()) assert.Error(t, err) } -func TestFindReplicationPositionEmptyMatch(t *testing.T) { +func TestFindReplicationPositionEmptyMatchFromXtrabackupInfo(t *testing.T) { // Make sure failure to find a match triggers an error. input := `GTID of the last change ' '` - _, err := findReplicationPosition(input, "MySQL56", logutil.NewConsoleLogger()) + _, err := findReplicationPositionFromXtrabackupInfo(input, "MySQL56", logutil.NewConsoleLogger()) assert.Error(t, err) } From f73f62468e9852be321139110b6758c98fdb60c6 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Wed, 17 Jul 2024 07:18:44 +0300 Subject: [PATCH 49/55] Throttler code: some refactoring and cleanup (#16368) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- .../mysql_inventory.go => base/inventory.go} | 17 +- .../inventory_test.go} | 10 +- .../throttle/{mysql => base}/probe.go | 2 +- .../throttle/{mysql => base}/probe_test.go | 2 +- .../{mysql.go => base/tablet_results.go} | 61 ++--- .../throttle/base/tablet_results_test.go | 199 ++++++++++++++ .../throttle_metric_cache.go} | 59 ++--- go/vt/vttablet/tabletserver/throttle/check.go | 4 +- .../tabletserver/throttle/mysql_test.go | 242 ----------------- .../tabletserver/throttle/throttler.go | 247 +++++++++--------- .../tabletserver/throttle/throttler_test.go | 114 ++++---- 11 files changed, 435 insertions(+), 522 deletions(-) rename go/vt/vttablet/tabletserver/throttle/{mysql/mysql_inventory.go => base/inventory.go} (84%) rename go/vt/vttablet/tabletserver/throttle/{mysql/mysql_inventory_test.go => base/inventory_test.go} (86%) rename go/vt/vttablet/tabletserver/throttle/{mysql => base}/probe.go (99%) rename go/vt/vttablet/tabletserver/throttle/{mysql => base}/probe_test.go (99%) rename go/vt/vttablet/tabletserver/throttle/{mysql.go => base/tablet_results.go} (55%) create mode 100644 go/vt/vttablet/tabletserver/throttle/base/tablet_results_test.go rename go/vt/vttablet/tabletserver/throttle/{mysql/mysql_throttle_metric.go => base/throttle_metric_cache.go} (69%) delete mode 100644 go/vt/vttablet/tabletserver/throttle/mysql_test.go diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go b/go/vt/vttablet/tabletserver/throttle/base/inventory.go similarity index 84% rename from go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go rename to go/vt/vttablet/tabletserver/throttle/base/inventory.go index f8ae0e26f11..5294caf1115 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory.go +++ b/go/vt/vttablet/tabletserver/throttle/base/inventory.go @@ -39,22 +39,7 @@ limitations under the License. SOFTWARE. */ -package mysql - -import ( - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" -) - -// TabletResultMap maps a tablet to a result -type TabletResultMap map[string]base.MetricResultMap - -func (m TabletResultMap) Split(alias string) (withAlias TabletResultMap, all TabletResultMap) { - withAlias = make(TabletResultMap) - if val, ok := m[alias]; ok { - withAlias[alias] = val - } - return withAlias, m -} +package base // Inventory has the operational data about probes, their metrics, and relevant configuration type Inventory struct { diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go b/go/vt/vttablet/tabletserver/throttle/base/inventory_test.go similarity index 86% rename from go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go rename to go/vt/vttablet/tabletserver/throttle/base/inventory_test.go index fe6204a36c2..2850a3b3035 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_inventory_test.go +++ b/go/vt/vttablet/tabletserver/throttle/base/inventory_test.go @@ -14,22 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -package mysql +package base import ( "testing" "github.com/stretchr/testify/assert" "golang.org/x/exp/maps" - - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) func TestTabletResultMapSplit(t *testing.T) { tabletResultMap := TabletResultMap{ - "a": make(base.MetricResultMap), - "b": make(base.MetricResultMap), - "c": make(base.MetricResultMap), + "a": make(MetricResultMap), + "b": make(MetricResultMap), + "c": make(MetricResultMap), } { withAlias, all := tabletResultMap.Split("b") diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/probe.go b/go/vt/vttablet/tabletserver/throttle/base/probe.go similarity index 99% rename from go/vt/vttablet/tabletserver/throttle/mysql/probe.go rename to go/vt/vttablet/tabletserver/throttle/base/probe.go index af0d660096e..0fe813d571e 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/probe.go +++ b/go/vt/vttablet/tabletserver/throttle/base/probe.go @@ -39,7 +39,7 @@ limitations under the License. SOFTWARE. */ -package mysql +package base import ( "fmt" diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/probe_test.go b/go/vt/vttablet/tabletserver/throttle/base/probe_test.go similarity index 99% rename from go/vt/vttablet/tabletserver/throttle/mysql/probe_test.go rename to go/vt/vttablet/tabletserver/throttle/base/probe_test.go index 8f489f39258..af1b09ec181 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/probe_test.go +++ b/go/vt/vttablet/tabletserver/throttle/base/probe_test.go @@ -39,7 +39,7 @@ limitations under the License. SOFTWARE. */ -package mysql +package base import ( "testing" diff --git a/go/vt/vttablet/tabletserver/throttle/mysql.go b/go/vt/vttablet/tabletserver/throttle/base/tablet_results.go similarity index 55% rename from go/vt/vttablet/tabletserver/throttle/mysql.go rename to go/vt/vttablet/tabletserver/throttle/base/tablet_results.go index ae0361c6018..88e958e884e 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql.go +++ b/go/vt/vttablet/tabletserver/throttle/base/tablet_results.go @@ -14,63 +14,42 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This codebase originates from https://github.com/github/freno, See https://github.com/github/freno/blob/master/LICENSE -/* - MIT License - - Copyright (c) 2017 GitHub - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +package base - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -package throttle +import "sort" -import ( - "context" - "sort" +// TabletResultMap maps a tablet to a result +type TabletResultMap map[string]MetricResultMap - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/mysql" -) +func (m TabletResultMap) Split(alias string) (withAlias TabletResultMap, all TabletResultMap) { + withAlias = make(TabletResultMap) + if val, ok := m[alias]; ok { + withAlias[alias] = val + } + return withAlias, m +} -func aggregateMySQLProbes( - ctx context.Context, - metricName base.MetricName, - tabletResultsMap mysql.TabletResultMap, +func AggregateTabletMetricResults( + metricName MetricName, + tabletResultsMap TabletResultMap, ignoreHostsCount int, IgnoreDialTCPErrors bool, ignoreHostsThreshold float64, -) (worstMetric base.MetricResult) { +) (worstMetric MetricResult) { // probes is known not to change. It can be *replaced*, but not changed. // so it's safe to iterate it probeValues := []float64{} for _, tabletMetricResults := range tabletResultsMap { tabletMetricResult, ok := tabletMetricResults[metricName] if !ok { - return base.NoSuchMetric + return NoSuchMetric } if tabletMetricResult == nil { - return base.NoMetricResultYet + return NoMetricResultYet } value, err := tabletMetricResult.Get() if err != nil { - if IgnoreDialTCPErrors && base.IsDialTCPError(err) { + if IgnoreDialTCPErrors && IsDialTCPError(err) { continue } if ignoreHostsCount > 0 { @@ -85,7 +64,7 @@ func aggregateMySQLProbes( probeValues = append(probeValues, value) } if len(probeValues) == 0 { - return base.NoHostsMetricResult + return NoHostsMetricResult } // If we got here, that means no errors (or good-to-skip errors) @@ -115,6 +94,6 @@ func aggregateMySQLProbes( ignoreHostsCount = ignoreHostsCount - 1 } worstValue := probeValues[len(probeValues)-1] - worstMetric = base.NewSimpleMetricResult(worstValue) + worstMetric = NewSimpleMetricResult(worstValue) return worstMetric } diff --git a/go/vt/vttablet/tabletserver/throttle/base/tablet_results_test.go b/go/vt/vttablet/tabletserver/throttle/base/tablet_results_test.go new file mode 100644 index 00000000000..98888eebbb8 --- /dev/null +++ b/go/vt/vttablet/tabletserver/throttle/base/tablet_results_test.go @@ -0,0 +1,199 @@ +/* +Copyright 2024 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 base + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +var ( + alias1 = "zone1-0001" + alias2 = "zone1-0002" + alias3 = "zone1-0003" + alias4 = "zone1-0004" + alias5 = "zone1-0005" +) + +const ( + nonexistentMetricName MetricName = "nonexistent" +) + +func newMetricResultMap(val float64) MetricResultMap { + return MetricResultMap{ + DefaultMetricName: NewSimpleMetricResult(val), + LagMetricName: NewSimpleMetricResult(val), + LoadAvgMetricName: NewSimpleMetricResult(3.14), + } +} +func noSuchMetricMap() MetricResultMap { + result := make(MetricResultMap) + for _, metricName := range KnownMetricNames { + result[metricName] = NoSuchMetric + } + return result +} + +func TestAggregateTabletMetricResultsNoErrors(t *testing.T) { + tabletResultsMap := TabletResultMap{ + alias1: newMetricResultMap(1.2), + alias2: newMetricResultMap(1.7), + alias3: newMetricResultMap(0.3), + alias4: newMetricResultMap(0.6), + alias5: newMetricResultMap(1.1), + } + + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 0, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.7) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 1, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.2) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 2, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.1) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 3, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 0.6) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 4, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 0.3) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 5, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 0.3) + } +} + +func TestAggregateTabletMetricResultsNoErrorsIgnoreHostsThreshold(t *testing.T) { + tabletResultsMap := TabletResultMap{ + alias1: newMetricResultMap(1.2), + alias2: newMetricResultMap(1.7), + alias3: newMetricResultMap(0.3), + alias4: newMetricResultMap(0.6), + alias5: newMetricResultMap(1.1), + } + + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 0, false, 1.0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.7) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 1, false, 1.0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.2) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 2, false, 1.0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.1) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 3, false, 1.0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 0.6) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 4, false, 1.0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 0.6) + } + { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 5, false, 1.0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 0.6) + } +} + +func TestAggregateTabletMetricResultsWithErrors(t *testing.T) { + tabletResultsMap := TabletResultMap{ + alias1: newMetricResultMap(1.2), + alias2: newMetricResultMap(1.7), + alias3: newMetricResultMap(0.3), + alias4: noSuchMetricMap(), + alias5: newMetricResultMap(1.1), + } + + t.Run("nonexistent", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(nonexistentMetricName, tabletResultsMap, 0, false, 0) + _, err := worstMetric.Get() + assert.Error(t, err) + assert.Equal(t, ErrNoSuchMetric, err) + }) + t.Run("no ignore", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 0, false, 0) + _, err := worstMetric.Get() + assert.Error(t, err) + assert.Equal(t, ErrNoSuchMetric, err) + }) + t.Run("ignore 1", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 1, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, 1.7, value) + }) + t.Run("ignore 2", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 2, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, 1.2, value) + }) + + tabletResultsMap[alias1][DefaultMetricName] = NoSuchMetric + t.Run("no such metric", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 0, false, 0) + _, err := worstMetric.Get() + assert.Error(t, err) + assert.Equal(t, ErrNoSuchMetric, err) + }) + t.Run("no such metric, ignore 1", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 1, false, 0) + _, err := worstMetric.Get() + assert.Error(t, err) + assert.Equal(t, ErrNoSuchMetric, err) + }) + t.Run("metric found", func(t *testing.T) { + worstMetric := AggregateTabletMetricResults(DefaultMetricName, tabletResultsMap, 2, false, 0) + value, err := worstMetric.Get() + assert.NoError(t, err) + assert.Equal(t, value, 1.7) + }) +} diff --git a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go b/go/vt/vttablet/tabletserver/throttle/base/throttle_metric_cache.go similarity index 69% rename from go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go rename to go/vt/vttablet/tabletserver/throttle/base/throttle_metric_cache.go index 58447315a94..8695cb83229 100644 --- a/go/vt/vttablet/tabletserver/throttle/mysql/mysql_throttle_metric.go +++ b/go/vt/vttablet/tabletserver/throttle/base/throttle_metric_cache.go @@ -39,7 +39,7 @@ limitations under the License. SOFTWARE. */ -package mysql +package base import ( "context" @@ -49,7 +49,6 @@ import ( "github.com/patrickmn/go-cache" "vitess.io/vitess/go/stats" - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) // MetricsQueryType indicates the type of metrics query on MySQL backend. See following. @@ -66,31 +65,31 @@ const ( MetricsQueryTypeUnknown ) -var mysqlMetricCache = cache.New(cache.NoExpiration, 10*time.Second) +var metricCache = cache.New(cache.NoExpiration, 10*time.Second) -func getMySQLMetricCacheKey(probe *Probe) string { +func getMetricCacheKey(probe *Probe) string { return probe.Alias } -func cacheMySQLThrottleMetric(probe *Probe, mySQLThrottleMetrics MySQLThrottleMetrics) MySQLThrottleMetrics { - for _, metric := range mySQLThrottleMetrics { +func cacheThrottleMetric(probe *Probe, throttleMetrics ThrottleMetrics) ThrottleMetrics { + for _, metric := range throttleMetrics { if metric.Err != nil { - return mySQLThrottleMetrics + return throttleMetrics } } if probe.CacheMillis > 0 { - mysqlMetricCache.Set(getMySQLMetricCacheKey(probe), mySQLThrottleMetrics, time.Duration(probe.CacheMillis)*time.Millisecond) + metricCache.Set(getMetricCacheKey(probe), throttleMetrics, time.Duration(probe.CacheMillis)*time.Millisecond) } - return mySQLThrottleMetrics + return throttleMetrics } -func getCachedMySQLThrottleMetrics(probe *Probe) MySQLThrottleMetrics { +func getCachedThrottleMetrics(probe *Probe) ThrottleMetrics { if probe.CacheMillis == 0 { return nil } - if metrics, found := mysqlMetricCache.Get(getMySQLMetricCacheKey(probe)); found { - mySQLThrottleMetrics, _ := metrics.(MySQLThrottleMetrics) - return mySQLThrottleMetrics + if metrics, found := metricCache.Get(getMetricCacheKey(probe)); found { + throttleMetrics, _ := metrics.(ThrottleMetrics) + return throttleMetrics } return nil } @@ -109,49 +108,49 @@ func GetMetricsQueryType(query string) MetricsQueryType { return MetricsQueryTypeUnknown } -// MySQLThrottleMetric has the probed metric for a tablet -type MySQLThrottleMetric struct { // nolint:revive - Name base.MetricName - Scope base.Scope +// ThrottleMetric has the probed metric for a tablet +type ThrottleMetric struct { // nolint:revive + Name MetricName + Scope Scope Alias string Value float64 Err error } -type MySQLThrottleMetrics map[base.MetricName]*MySQLThrottleMetric // nolint:revive +type ThrottleMetrics map[MetricName]*ThrottleMetric // nolint:revive -// NewMySQLThrottleMetric creates a new MySQLThrottleMetric -func NewMySQLThrottleMetric() *MySQLThrottleMetric { - return &MySQLThrottleMetric{Value: 0} +// NewThrottleMetric creates a new ThrottleMetric +func NewThrottleMetric() *ThrottleMetric { + return &ThrottleMetric{Value: 0} } // GetClusterTablet returns the ClusterTablet part of the metric -func (metric *MySQLThrottleMetric) GetTabletAlias() string { +func (metric *ThrottleMetric) GetTabletAlias() string { return metric.Alias } // Get implements MetricResult -func (metric *MySQLThrottleMetric) Get() (float64, error) { +func (metric *ThrottleMetric) Get() (float64, error) { return metric.Value, metric.Err } // WithError returns this metric with given error -func (metric *MySQLThrottleMetric) WithError(err error) *MySQLThrottleMetric { +func (metric *ThrottleMetric) WithError(err error) *ThrottleMetric { metric.Err = err return metric } // ReadThrottleMetrics returns a metric for the given probe. Either by explicit query // or via SHOW REPLICA STATUS -func ReadThrottleMetrics(ctx context.Context, probe *Probe, metricsFunc func(context.Context) MySQLThrottleMetrics) MySQLThrottleMetrics { - if metrics := getCachedMySQLThrottleMetrics(probe); metrics != nil { +func ReadThrottleMetrics(ctx context.Context, probe *Probe, metricsFunc func(context.Context) ThrottleMetrics) ThrottleMetrics { + if metrics := getCachedThrottleMetrics(probe); metrics != nil { return metrics } started := time.Now() - mySQLThrottleMetrics := metricsFunc(ctx) + throttleMetrics := metricsFunc(ctx) - go func(metrics MySQLThrottleMetrics, started time.Time) { + go func(metrics ThrottleMetrics, started time.Time) { stats.GetOrNewGauge("ThrottlerProbesLatency", "probes latency").Set(time.Since(started).Nanoseconds()) stats.GetOrNewCounter("ThrottlerProbesTotal", "total probes").Add(1) for _, metric := range metrics { @@ -160,7 +159,7 @@ func ReadThrottleMetrics(ctx context.Context, probe *Probe, metricsFunc func(con break } } - }(mySQLThrottleMetrics, started) + }(throttleMetrics, started) - return cacheMySQLThrottleMetric(probe, mySQLThrottleMetrics) + return cacheThrottleMetric(probe, throttleMetrics) } diff --git a/go/vt/vttablet/tabletserver/throttle/check.go b/go/vt/vttablet/tabletserver/throttle/check.go index 1287ef945ed..e43c4cab043 100644 --- a/go/vt/vttablet/tabletserver/throttle/check.go +++ b/go/vt/vttablet/tabletserver/throttle/check.go @@ -62,8 +62,6 @@ var ( statsThrottlerCheckAnyError = stats.GetOrNewCounter("ThrottlerCheckAnyError", "total number of failed checks") ) -type ThrottlePriority int - // CheckFlags provide hints for a check type CheckFlags struct { Scope base.Scope @@ -165,7 +163,7 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba } metricResultFunc := func() (metricResult base.MetricResult, threshold float64) { - return check.throttler.getMySQLStoreMetric(ctx, metricScope, metricName) + return check.throttler.getScopedMetric(metricScope, metricName) } metricCheckResult := check.checkAppMetricResult(ctx, appName, metricResultFunc, flags) diff --git a/go/vt/vttablet/tabletserver/throttle/mysql_test.go b/go/vt/vttablet/tabletserver/throttle/mysql_test.go deleted file mode 100644 index 78cc1fdbdd3..00000000000 --- a/go/vt/vttablet/tabletserver/throttle/mysql_test.go +++ /dev/null @@ -1,242 +0,0 @@ -/* -Copyright 2023 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. -*/ - -// This codebase originates from https://github.com/github/freno, See https://github.com/github/freno/blob/master/LICENSE -/* - MIT License - - Copyright (c) 2017 GitHub - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -package throttle - -import ( - "context" - "testing" - - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/mysql" - - "github.com/stretchr/testify/assert" -) - -var ( - alias1 = "zone1-0001" - alias2 = "zone1-0002" - alias3 = "zone1-0003" - alias4 = "zone1-0004" - alias5 = "zone1-0005" -) - -const ( - nonexistentMetricName base.MetricName = "nonexistent" -) - -func newMetricResultMap(val float64) base.MetricResultMap { - return base.MetricResultMap{ - base.DefaultMetricName: base.NewSimpleMetricResult(val), - base.LagMetricName: base.NewSimpleMetricResult(val), - base.LoadAvgMetricName: base.NewSimpleMetricResult(3.14), - } -} -func noSuchMetricMap() base.MetricResultMap { - result := make(base.MetricResultMap) - for _, metricName := range base.KnownMetricNames { - result[metricName] = base.NoSuchMetric - } - return result -} - -func TestAggregateMySQLProbesNoErrors(t *testing.T) { - ctx := context.Background() - tabletResultsMap := mysql.TabletResultMap{ - alias1: newMetricResultMap(1.2), - alias2: newMetricResultMap(1.7), - alias3: newMetricResultMap(0.3), - alias4: newMetricResultMap(0.6), - alias5: newMetricResultMap(1.1), - } - var probes mysql.Probes = map[string](*mysql.Probe){} - for clusterKey := range tabletResultsMap { - probes[clusterKey] = &mysql.Probe{Alias: clusterKey} - } - - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.7) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.2) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.1) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 3, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 0.6) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 4, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 0.3) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 5, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 0.3) - } -} - -func TestAggregateMySQLProbesNoErrorsIgnoreHostsThreshold(t *testing.T) { - ctx := context.Background() - tabletResultsMap := mysql.TabletResultMap{ - alias1: newMetricResultMap(1.2), - alias2: newMetricResultMap(1.7), - alias3: newMetricResultMap(0.3), - alias4: newMetricResultMap(0.6), - alias5: newMetricResultMap(1.1), - } - var probes mysql.Probes = map[string](*mysql.Probe){} - for clusterKey := range tabletResultsMap { - probes[clusterKey] = &mysql.Probe{Alias: clusterKey} - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 1.0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.7) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 1.0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.2) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 1.0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.1) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 3, false, 1.0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 0.6) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 4, false, 1.0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 0.6) - } - { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 5, false, 1.0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 0.6) - } -} - -func TestAggregateMySQLProbesWithErrors(t *testing.T) { - ctx := context.Background() - tabletResultsMap := mysql.TabletResultMap{ - alias1: newMetricResultMap(1.2), - alias2: newMetricResultMap(1.7), - alias3: newMetricResultMap(0.3), - alias4: noSuchMetricMap(), - alias5: newMetricResultMap(1.1), - } - var probes mysql.Probes = map[string](*mysql.Probe){} - for clusterKey := range tabletResultsMap { - probes[clusterKey] = &mysql.Probe{Alias: clusterKey} - } - - t.Run("nonexistent", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, nonexistentMetricName, tabletResultsMap, 0, false, 0) - _, err := worstMetric.Get() - assert.Error(t, err) - assert.Equal(t, base.ErrNoSuchMetric, err) - }) - t.Run("no ignore", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 0) - _, err := worstMetric.Get() - assert.Error(t, err) - assert.Equal(t, base.ErrNoSuchMetric, err) - }) - t.Run("ignore 1", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, 1.7, value) - }) - t.Run("ignore 2", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, 1.2, value) - }) - - tabletResultsMap[alias1][base.DefaultMetricName] = base.NoSuchMetric - t.Run("no such metric", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 0, false, 0) - _, err := worstMetric.Get() - assert.Error(t, err) - assert.Equal(t, base.ErrNoSuchMetric, err) - }) - t.Run("no such metric, ignore 1", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 1, false, 0) - _, err := worstMetric.Get() - assert.Error(t, err) - assert.Equal(t, base.ErrNoSuchMetric, err) - }) - t.Run("metric found", func(t *testing.T) { - worstMetric := aggregateMySQLProbes(ctx, base.DefaultMetricName, tabletResultsMap, 2, false, 0) - value, err := worstMetric.Get() - assert.NoError(t, err) - assert.Equal(t, value, 1.7) - }) -} diff --git a/go/vt/vttablet/tabletserver/throttle/throttler.go b/go/vt/vttablet/tabletserver/throttle/throttler.go index e3e36123e7e..73458974dcb 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler.go @@ -78,17 +78,16 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/config" - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/mysql" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" "vitess.io/vitess/go/vt/vttablet/tmclient" ) const ( leaderCheckInterval = 5 * time.Second - mysqlCollectInterval = 250 * time.Millisecond // PRIMARY polls replicas - mysqlDormantCollectInterval = 5 * time.Second // PRIMARY polls replicas when dormant (no recent checks) - mysqlRefreshInterval = 10 * time.Second // Refreshing tablet inventory - mysqlAggregateInterval = 125 * time.Millisecond + activeCollectInterval = 250 * time.Millisecond // PRIMARY polls replicas + dormantCollectInterval = 5 * time.Second // PRIMARY polls replicas when dormant (no recent checks) + inventoryRefreshInterval = 10 * time.Second // Refreshing tablet inventory + metricsAggregateInterval = 125 * time.Millisecond throttledAppsSnapshotInterval = 5 * time.Second recentCheckRateLimiterInterval = 1 * time.Second // Ticker assisting in determining when the throttler was last checked @@ -157,10 +156,10 @@ type Throttler struct { isOpen atomic.Bool leaderCheckInterval time.Duration - mysqlCollectInterval time.Duration - mysqlDormantCollectInterval time.Duration - mysqlRefreshInterval time.Duration - mysqlAggregateInterval time.Duration + activeCollectInterval time.Duration + dormantCollectInterval time.Duration + inventoryRefreshInterval time.Duration + metricsAggregateInterval time.Duration throttledAppsSnapshotInterval time.Duration dormantPeriod time.Duration @@ -180,24 +179,24 @@ type Throttler struct { throttleTabletTypesMap map[topodatapb.TabletType]bool - mysqlThrottleMetricChan chan *mysql.MySQLThrottleMetric - mysqlClusterProbesChan chan *mysql.ClusterProbes - throttlerConfigChan chan *topodatapb.ThrottlerConfig - serialFuncChan chan func() // Used by unit tests to inject non-racy behavior + throttleMetricChan chan *base.ThrottleMetric + clusterProbesChan chan *base.ClusterProbes + throttlerConfigChan chan *topodatapb.ThrottlerConfig + serialFuncChan chan func() // Used by unit tests to inject non-racy behavior - mysqlInventory *mysql.Inventory + inventory *base.Inventory metricsQuery atomic.Value customMetricsQuery atomic.Value MetricsThreshold atomic.Uint64 checkAsCheckSelf atomic.Bool - mysqlMetricThresholds *cache.Cache - aggregatedMetrics *cache.Cache - throttledApps *cache.Cache - recentApps *cache.Cache - metricsHealth *cache.Cache - appCheckedMetrics *cache.Cache + metricThresholds *cache.Cache + aggregatedMetrics *cache.Cache + throttledApps *cache.Cache + recentApps *cache.Cache + metricsHealth *cache.Cache + appCheckedMetrics *cache.Cache initMutex sync.Mutex enableMutex sync.Mutex @@ -205,7 +204,7 @@ type Throttler struct { cancelEnableContext context.CancelFunc throttledAppsMutex sync.Mutex - readSelfThrottleMetrics func(context.Context) mysql.MySQLThrottleMetrics // overwritten by unit test + readSelfThrottleMetrics func(context.Context) base.ThrottleMetrics // overwritten by unit test httpClient *http.Client @@ -251,28 +250,28 @@ func NewThrottler(env tabletenv.Env, srvTopoServer srvtopo.Server, ts *topo.Serv }), } - throttler.mysqlThrottleMetricChan = make(chan *mysql.MySQLThrottleMetric) - throttler.mysqlClusterProbesChan = make(chan *mysql.ClusterProbes) + throttler.throttleMetricChan = make(chan *base.ThrottleMetric) + throttler.clusterProbesChan = make(chan *base.ClusterProbes) throttler.throttlerConfigChan = make(chan *topodatapb.ThrottlerConfig) throttler.serialFuncChan = make(chan func()) - throttler.mysqlInventory = mysql.NewInventory() + throttler.inventory = base.NewInventory() throttler.throttledApps = cache.New(cache.NoExpiration, 0) - throttler.mysqlMetricThresholds = cache.New(cache.NoExpiration, 0) + throttler.metricThresholds = cache.New(cache.NoExpiration, 0) throttler.aggregatedMetrics = cache.New(aggregatedMetricsExpiration, 0) throttler.recentApps = cache.New(recentAppsExpiration, recentAppsExpiration) throttler.metricsHealth = cache.New(cache.NoExpiration, 0) throttler.appCheckedMetrics = cache.New(cache.NoExpiration, 0) - throttler.httpClient = base.SetupHTTPClient(2 * mysqlCollectInterval) + throttler.httpClient = base.SetupHTTPClient(2 * activeCollectInterval) throttler.initThrottleTabletTypes() throttler.check = NewThrottlerCheck(throttler) throttler.leaderCheckInterval = leaderCheckInterval - throttler.mysqlCollectInterval = mysqlCollectInterval - throttler.mysqlDormantCollectInterval = mysqlDormantCollectInterval - throttler.mysqlRefreshInterval = mysqlRefreshInterval - throttler.mysqlAggregateInterval = mysqlAggregateInterval + throttler.activeCollectInterval = activeCollectInterval + throttler.dormantCollectInterval = dormantCollectInterval + throttler.inventoryRefreshInterval = inventoryRefreshInterval + throttler.metricsAggregateInterval = metricsAggregateInterval throttler.throttledAppsSnapshotInterval = throttledAppsSnapshotInterval throttler.dormantPeriod = dormantPeriod throttler.recentCheckDormantDiff = int64(throttler.dormantPeriod / recentCheckRateLimiterInterval) @@ -282,7 +281,7 @@ func NewThrottler(env tabletenv.Env, srvTopoServer srvtopo.Server, ts *topo.Serv } throttler.StoreMetricsThreshold(defaultThresholds[base.LagMetricName]) - throttler.readSelfThrottleMetrics = func(ctx context.Context) mysql.MySQLThrottleMetrics { + throttler.readSelfThrottleMetrics = func(ctx context.Context) base.ThrottleMetrics { return throttler.readSelfThrottleMetricsInternal(ctx) } @@ -426,14 +425,14 @@ func (throttler *Throttler) WatchSrvKeyspaceCallback(srvks *topodatapb.SrvKeyspa // - throttler config. This can be a list of zero or more entries. These metrics override the inventory. func (throttler *Throttler) convergeMetricThresholds() { for _, metricName := range base.KnownMetricNames { - if val, ok := throttler.mysqlMetricThresholds.Get(throttlerConfigPrefix + metricName.String()); ok { + if val, ok := throttler.metricThresholds.Get(throttlerConfigPrefix + metricName.String()); ok { // Value supplied by throttler config takes precedence - throttler.mysqlMetricThresholds.Set(metricName.String(), val, cache.DefaultExpiration) + throttler.metricThresholds.Set(metricName.String(), val, cache.DefaultExpiration) continue } // metric not indicated in the throttler config, therefore we should use the default threshold for that metric - if val, ok := throttler.mysqlMetricThresholds.Get(inventoryPrefix + metricName.String()); ok { - throttler.mysqlMetricThresholds.Set(metricName.String(), val, cache.DefaultExpiration) + if val, ok := throttler.metricThresholds.Get(inventoryPrefix + metricName.String()); ok { + throttler.metricThresholds.Set(metricName.String(), val, cache.DefaultExpiration) } } } @@ -502,13 +501,13 @@ func (throttler *Throttler) applyThrottlerConfig(ctx context.Context, throttlerC { // Metric thresholds for metricName, threshold := range throttlerConfig.MetricThresholds { - throttler.mysqlMetricThresholds.Set(throttlerConfigPrefix+metricName, threshold, cache.DefaultExpiration) + throttler.metricThresholds.Set(throttlerConfigPrefix+metricName, threshold, cache.DefaultExpiration) } for _, metricName := range base.KnownMetricNames { if _, ok := throttlerConfig.MetricThresholds[metricName.String()]; !ok { // metric not indicated in the throttler config, therefore should be removed from the map // so that we know to apply the inventory default threshold - throttler.mysqlMetricThresholds.Delete(throttlerConfigPrefix + metricName.String()) + throttler.metricThresholds.Delete(throttlerConfigPrefix + metricName.String()) } } throttler.convergeMetricThresholds() @@ -727,8 +726,8 @@ func (throttler *Throttler) stimulatePrimaryThrottler(ctx context.Context, tmCli return nil } -func (throttler *Throttler) readSelfLoadAvgPerCore(ctx context.Context) *mysql.MySQLThrottleMetric { - metric := &mysql.MySQLThrottleMetric{ +func (throttler *Throttler) readSelfLoadAvgPerCore(ctx context.Context) *base.ThrottleMetric { + metric := &base.ThrottleMetric{ Scope: base.SelfScope, Alias: throttler.tabletAlias, } @@ -779,9 +778,9 @@ func (throttler *Throttler) readSelfLoadAvgPerCore(ctx context.Context) *mysql.M return metric } -// readSelfMySQLThrottleMetric reads the mysql metric from thi very tablet's backend mysql. -func (throttler *Throttler) readSelfMySQLThrottleMetric(ctx context.Context, query string) *mysql.MySQLThrottleMetric { - metric := &mysql.MySQLThrottleMetric{ +// readSelfMySQLThrottleMetric reads the metric from this very tablet or from its backend mysql. +func (throttler *Throttler) readSelfMySQLThrottleMetric(ctx context.Context, query string) *base.ThrottleMetric { + metric := &base.ThrottleMetric{ Scope: base.SelfScope, Alias: throttler.tabletAlias, } @@ -800,18 +799,18 @@ func (throttler *Throttler) readSelfMySQLThrottleMetric(ctx context.Context, que } row := tm.Named().Row() if row == nil { - return metric.WithError(fmt.Errorf("no results for readSelfMySQLThrottleMetric")) + return metric.WithError(fmt.Errorf("no results for readSelfThrottleMetric")) } - metricsQueryType := mysql.GetMetricsQueryType(query) + metricsQueryType := base.GetMetricsQueryType(query) switch metricsQueryType { - case mysql.MetricsQueryTypeSelect: + case base.MetricsQueryTypeSelect: // We expect a single row, single column result. // The "for" iteration below is just a way to get first result without knowing column name for k := range row { metric.Value, metric.Err = row.ToFloat64(k) } - case mysql.MetricsQueryTypeShowGlobal: + case base.MetricsQueryTypeShowGlobal: metric.Value, metric.Err = strconv.ParseFloat(row["Value"].ToString(), 64) default: metric.Err = fmt.Errorf("Unsupported metrics query type for query: %s", throttler.GetMetricsQuery()) @@ -862,10 +861,10 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { return t } leaderCheckTicker := addTicker(throttler.leaderCheckInterval) - mysqlCollectTicker := addTicker(throttler.mysqlCollectInterval) - mysqlDormantCollectTicker := addTicker(throttler.mysqlDormantCollectInterval) - mysqlRefreshTicker := addTicker(throttler.mysqlRefreshInterval) - mysqlAggregateTicker := addTicker(throttler.mysqlAggregateInterval) + activeCollectTicker := addTicker(throttler.activeCollectInterval) + dormantCollectTicker := addTicker(throttler.dormantCollectInterval) + inventoryRefreshTicker := addTicker(throttler.inventoryRefreshInterval) + metricsAggregateTicker := addTicker(throttler.metricsAggregateInterval) throttledAppsTicker := addTicker(throttler.throttledAppsSnapshotInterval) primaryStimulatorRateLimiter := timer.NewRateLimiter(throttler.dormantPeriod) throttler.recentCheckRateLimiter = timer.NewRateLimiter(recentCheckRateLimiterInterval) @@ -924,17 +923,17 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { if transitionedIntoLeader { // transitioned into leadership, let's speed up the next 'refresh' and 'collect' ticks - go mysqlRefreshTicker.TickNow() + go inventoryRefreshTicker.TickNow() throttler.requestHeartbeats() } }() - case <-mysqlCollectTicker.C: + case <-activeCollectTicker.C: if throttler.IsOpen() { // frequent // Always collect self metrics: - throttler.collectSelfMySQLMetrics(ctx, tmClient) + throttler.collectSelfMetrics(ctx) if !throttler.isDormant() { - throttler.collectShardMySQLMetrics(ctx, tmClient) + throttler.collectShardMetrics(ctx, tmClient) } // if throttler.recentlyChecked() { @@ -956,32 +955,32 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { } } - case <-mysqlDormantCollectTicker.C: + case <-dormantCollectTicker.C: if throttler.IsOpen() { // infrequent if throttler.isDormant() { - throttler.collectShardMySQLMetrics(ctx, tmClient) + throttler.collectShardMetrics(ctx, tmClient) } } - case metric := <-throttler.mysqlThrottleMetricChan: - // incoming MySQL metric, frequent, as result of collectMySQLMetrics() - metricResultsMap, ok := throttler.mysqlInventory.TabletMetrics[metric.GetTabletAlias()] + case metric := <-throttler.throttleMetricChan: + // incoming metric, frequent, as result of collectMetrics() + metricResultsMap, ok := throttler.inventory.TabletMetrics[metric.GetTabletAlias()] if !ok { metricResultsMap = base.NewMetricResultMap() - throttler.mysqlInventory.TabletMetrics[metric.GetTabletAlias()] = metricResultsMap + throttler.inventory.TabletMetrics[metric.GetTabletAlias()] = metricResultsMap } metricResultsMap[metric.Name] = metric - case <-mysqlRefreshTicker.C: + case <-inventoryRefreshTicker.C: // sparse if throttler.IsOpen() { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) } - case probes := <-throttler.mysqlClusterProbesChan: - // incoming structural update, sparse, as result of refreshMySQLInventory() - throttler.updateMySQLClusterProbes(ctx, probes) - case <-mysqlAggregateTicker.C: + case probes := <-throttler.clusterProbesChan: + // incoming structural update, sparse, as result of refreshInventory() + throttler.updateClusterProbes(ctx, probes) + case <-metricsAggregateTicker.C: if throttler.IsOpen() { - throttler.aggregateMySQLMetrics(ctx) + throttler.aggregateMetrics() } case <-throttledAppsTicker.C: if throttler.IsOpen() { @@ -997,11 +996,11 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) { }() } -func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, tmClient tmclient.TabletManagerClient, probe *mysql.Probe) (probeFunc func(context.Context) mysql.MySQLThrottleMetrics) { - metricsWithError := func(err error) mysql.MySQLThrottleMetrics { - metrics := mysql.MySQLThrottleMetrics{} +func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, tmClient tmclient.TabletManagerClient, probe *base.Probe) (probeFunc func(context.Context) base.ThrottleMetrics) { + metricsWithError := func(err error) base.ThrottleMetrics { + metrics := base.ThrottleMetrics{} for _, metricName := range base.KnownMetricNames { - metrics[metricName] = &mysql.MySQLThrottleMetric{ + metrics[metricName] = &base.ThrottleMetric{ Name: metricName, Scope: scope, Alias: probe.Alias, @@ -1010,30 +1009,30 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, tmClie } return metrics } - return func(ctx context.Context) mysql.MySQLThrottleMetrics { + return func(ctx context.Context) base.ThrottleMetrics { // Some reasonable timeout, to ensure we release connections even if they're hanging (otherwise grpc-go keeps polling those connections forever) - ctx, cancel := context.WithTimeout(ctx, 4*mysqlCollectInterval) + ctx, cancel := context.WithTimeout(ctx, 4*activeCollectInterval) defer cancel() - // Hit a tablet's `check-self` via HTTP, and convert its CheckResult JSON output into a MySQLThrottleMetric - mySQLThrottleMetric := mysql.NewMySQLThrottleMetric() - mySQLThrottleMetric.Name = base.DefaultMetricName - mySQLThrottleMetric.Scope = scope - mySQLThrottleMetric.Alias = probe.Alias + // Hit a tablet's `check-self` via HTTP, and convert its CheckResult JSON output into a ThrottleMetric + throttleMetric := base.NewThrottleMetric() + throttleMetric.Name = base.DefaultMetricName + throttleMetric.Scope = scope + throttleMetric.Alias = probe.Alias if probe.Tablet == nil { return metricsWithError(fmt.Errorf("found nil tablet reference for alias '%v'", probe.Alias)) } - metrics := make(mysql.MySQLThrottleMetrics) + metrics := make(base.ThrottleMetrics) req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space resp, gRPCErr := tmClient.CheckThrottler(ctx, probe.Tablet, req) if gRPCErr != nil { return metricsWithError(fmt.Errorf("gRPC error accessing tablet %v. Err=%v", probe.Alias, gRPCErr)) } - mySQLThrottleMetric.Value = resp.Value + throttleMetric.Value = resp.Value if resp.StatusCode == http.StatusInternalServerError { - mySQLThrottleMetric.Err = fmt.Errorf("Status code: %d", resp.StatusCode) + throttleMetric.Err = fmt.Errorf("Status code: %d", resp.StatusCode) } if resp.RecentlyChecked { // We have just probed a tablet, and it reported back that someone just recently "check"ed it. @@ -1043,7 +1042,7 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, tmClie } for name, metric := range resp.Metrics { metricName := base.MetricName(name) - metrics[metricName] = &mysql.MySQLThrottleMetric{ + metrics[metricName] = &base.ThrottleMetric{ Name: metricName, Scope: scope, Alias: probe.Alias, @@ -1055,22 +1054,22 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, tmClie } if len(resp.Metrics) == 0 { // Backwards compatibility to v20. v20 does not report multi metrics. - mySQLThrottleMetric.Name = throttler.metricNameUsedAsDefault() - metrics[mySQLThrottleMetric.Name] = mySQLThrottleMetric + throttleMetric.Name = throttler.metricNameUsedAsDefault() + metrics[throttleMetric.Name] = throttleMetric } return metrics } } -func (throttler *Throttler) readSelfThrottleMetricsInternal(ctx context.Context) mysql.MySQLThrottleMetrics { +func (throttler *Throttler) readSelfThrottleMetricsInternal(ctx context.Context) base.ThrottleMetrics { - writeMetric := func(metricName base.MetricName, metric *mysql.MySQLThrottleMetric) { + writeMetric := func(metricName base.MetricName, metric *base.ThrottleMetric) { metric.Name = metricName select { case <-ctx.Done(): return - case throttler.mysqlThrottleMetricChan <- metric: + case throttler.throttleMetricChan <- metric: } } @@ -1081,8 +1080,8 @@ func (throttler *Throttler) readSelfThrottleMetricsInternal(ctx context.Context) return nil } -func (throttler *Throttler) collectSelfMySQLMetrics(ctx context.Context, tmClient tmclient.TabletManagerClient) { - probe := throttler.mysqlInventory.ClustersProbes[throttler.tabletAlias] +func (throttler *Throttler) collectSelfMetrics(ctx context.Context) { + probe := throttler.inventory.ClustersProbes[throttler.tabletAlias] if probe == nil { // probe not created yet return @@ -1096,19 +1095,19 @@ func (throttler *Throttler) collectSelfMySQLMetrics(ctx context.Context, tmClien defer atomic.StoreInt64(&probe.QueryInProgress, 0) // Throttler is probing its own tablet's metrics: - _ = mysql.ReadThrottleMetrics(ctx, probe, throttler.readSelfThrottleMetrics) + _ = base.ReadThrottleMetrics(ctx, probe, throttler.readSelfThrottleMetrics) }() } -func (throttler *Throttler) collectShardMySQLMetrics(ctx context.Context, tmClient tmclient.TabletManagerClient) { +func (throttler *Throttler) collectShardMetrics(ctx context.Context, tmClient tmclient.TabletManagerClient) { // probes is known not to change. It can be *replaced*, but not changed. // so it's safe to iterate it - for _, probe := range throttler.mysqlInventory.ClustersProbes { + for _, probe := range throttler.inventory.ClustersProbes { if probe.Alias == throttler.tabletAlias { // We skip collecting our own metrics continue } - go func(probe *mysql.Probe) { + go func(probe *base.Probe) { // Avoid querying the same server twice at the same time. If previous read is still there, // we avoid re-reading it. if !atomic.CompareAndSwapInt64(&probe.QueryInProgress, 0, 1) { @@ -1119,22 +1118,22 @@ func (throttler *Throttler) collectShardMySQLMetrics(ctx context.Context, tmClie // Throttler probing other tablets: throttleMetricFunc := throttler.generateTabletProbeFunction(base.ShardScope, tmClient, probe) - throttleMetrics := mysql.ReadThrottleMetrics(ctx, probe, throttleMetricFunc) + throttleMetrics := base.ReadThrottleMetrics(ctx, probe, throttleMetricFunc) for _, metric := range throttleMetrics { select { case <-ctx.Done(): return - case throttler.mysqlThrottleMetricChan <- metric: + case throttler.throttleMetricChan <- metric: } } }(probe) } } -// refreshMySQLInventory will re-structure the inventory based on reading config settings -func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { +// refreshInventory will re-structure the inventory based on reading config settings +func (throttler *Throttler) refreshInventory(ctx context.Context) error { // distribute the query/threshold from the throttler down to the cluster settings and from there to the probes - addProbe := func(alias string, tablet *topodatapb.Tablet, scope base.Scope, mysqlSettings *config.MySQLConfigurationSettings, probes mysql.Probes) bool { + addProbe := func(alias string, tablet *topodatapb.Tablet, scope base.Scope, mysqlSettings *config.MySQLConfigurationSettings, probes base.Probes) bool { for _, ignore := range mysqlSettings.IgnoreHosts { if strings.Contains(alias, ignore) { log.Infof("Throttler: tablet ignored: %+v", alias) @@ -1152,7 +1151,7 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { } } - probe := &mysql.Probe{ + probe := &base.Probe{ Alias: alias, Tablet: tablet, CacheMillis: mysqlSettings.CacheMillis, @@ -1161,11 +1160,11 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { return true } - attemptWriteProbes := func(clusterProbes *mysql.ClusterProbes) error { + attemptWriteProbes := func(clusterProbes *base.ClusterProbes) error { select { case <-ctx.Done(): return ctx.Err() - case throttler.mysqlClusterProbesChan <- clusterProbes: + case throttler.clusterProbesChan <- clusterProbes: return nil } } @@ -1181,16 +1180,16 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { threshold = metricsThreshold } - throttler.mysqlMetricThresholds.Set(inventoryPrefix+metricName.String(), math.Float64frombits(threshold), cache.DefaultExpiration) + throttler.metricThresholds.Set(inventoryPrefix+metricName.String(), math.Float64frombits(threshold), cache.DefaultExpiration) } throttler.convergeMetricThresholds() clusterSettingsCopy := *mysqlSettings // config may dynamically change, but internal structure (config.Settings().MySQLStore.Clusters in our case) // is immutable and can only be _replaced_. Hence, it's safe to read in a goroutine: collect := func() error { - clusterProbes := &mysql.ClusterProbes{ + clusterProbes := &base.ClusterProbes{ IgnoreHostsCount: clusterSettingsCopy.IgnoreHostsCount, - TabletProbes: mysql.NewProbes(), + TabletProbes: base.NewProbes(), } // self tablet addProbe(throttler.tabletAlias, nil, base.SelfScope, &clusterSettingsCopy, clusterProbes.TabletProbes) @@ -1199,13 +1198,13 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { // of previous clusters it used to probe. It may have recollection of specific probes for such clusters. // This now ensures any existing cluster probes are overridden with an empty list of probes. // `clusterProbes` was created above as empty, and identifiable via `scope`. This will in turn - // be used to overwrite throttler.mysqlInventory.ClustersProbes[clusterProbes.scope] in - // updateMySQLClusterProbes(). + // be used to overwrite throttler.inventory.ClustersProbes[clusterProbes.scope] in + // updateClusterProbes(). return attemptWriteProbes(clusterProbes) // not the leader (primary tablet)? Then no more work for us. } // The primary tablet is also in charge of collecting the shard's metrics - ctx, cancel := context.WithTimeout(ctx, mysqlRefreshInterval) + ctx, cancel := context.WithTimeout(ctx, inventoryRefreshInterval) defer cancel() tabletAliases, err := throttler.ts.FindAllTabletAliasesInShard(ctx, throttler.keyspace, throttler.shard) @@ -1226,17 +1225,17 @@ func (throttler *Throttler) refreshMySQLInventory(ctx context.Context) error { } go func() { if err := collect(); err != nil { - log.Errorf("refreshMySQLInventory: %+v", err) + log.Errorf("refreshInventory: %+v", err) } }() return nil } // synchronous update of inventory -func (throttler *Throttler) updateMySQLClusterProbes(ctx context.Context, clusterProbes *mysql.ClusterProbes) error { - throttler.mysqlInventory.ClustersProbes = clusterProbes.TabletProbes - throttler.mysqlInventory.IgnoreHostsCount = clusterProbes.IgnoreHostsCount - throttler.mysqlInventory.IgnoreHostsThreshold = clusterProbes.IgnoreHostsThreshold +func (throttler *Throttler) updateClusterProbes(ctx context.Context, clusterProbes *base.ClusterProbes) error { + throttler.inventory.ClustersProbes = clusterProbes.TabletProbes + throttler.inventory.IgnoreHostsCount = clusterProbes.IgnoreHostsCount + throttler.inventory.IgnoreHostsThreshold = clusterProbes.IgnoreHostsThreshold return nil } @@ -1248,14 +1247,14 @@ func (throttler *Throttler) metricNameUsedAsDefault() base.MetricName { } // synchronous aggregation of collected data -func (throttler *Throttler) aggregateMySQLMetrics(ctx context.Context) error { +func (throttler *Throttler) aggregateMetrics() error { metricNameUsedAsDefault := throttler.metricNameUsedAsDefault() - aggregateTabletsMetrics := func(scope base.Scope, metricName base.MetricName, tabletResultsMap mysql.TabletResultMap) { - ignoreHostsCount := throttler.mysqlInventory.IgnoreHostsCount - ignoreHostsThreshold := throttler.mysqlInventory.IgnoreHostsThreshold + aggregateTabletsMetrics := func(scope base.Scope, metricName base.MetricName, tabletResultsMap base.TabletResultMap) { + ignoreHostsCount := throttler.inventory.IgnoreHostsCount + ignoreHostsThreshold := throttler.inventory.IgnoreHostsThreshold ignoreDialTCPErrors := throttler.configSettings.MySQLStore.IgnoreDialTCPErrors - aggregatedMetric := aggregateMySQLProbes(ctx, metricName, tabletResultsMap, ignoreHostsCount, ignoreDialTCPErrors, ignoreHostsThreshold) + aggregatedMetric := base.AggregateTabletMetricResults(metricName, tabletResultsMap, ignoreHostsCount, ignoreDialTCPErrors, ignoreHostsThreshold) aggregatedMetricName := metricName.AggregatedName(scope) throttler.aggregatedMetrics.Set(aggregatedMetricName, aggregatedMetric, cache.DefaultExpiration) if metricName == metricNameUsedAsDefault { @@ -1269,7 +1268,7 @@ func (throttler *Throttler) aggregateMySQLMetrics(ctx context.Context) error { // is to be stored as "default" continue } - selfResultsMap, shardResultsMap := throttler.mysqlInventory.TabletMetrics.Split(throttler.tabletAlias) + selfResultsMap, shardResultsMap := throttler.inventory.TabletMetrics.Split(throttler.tabletAlias) aggregateTabletsMetrics(base.SelfScope, metricName, selfResultsMap) aggregateTabletsMetrics(base.ShardScope, metricName, shardResultsMap) } @@ -1283,8 +1282,8 @@ func (throttler *Throttler) getAggregatedMetric(aggregatedName string) base.Metr return base.NoSuchMetric } -func (throttler *Throttler) getMySQLStoreMetric(ctx context.Context, scope base.Scope, metricName base.MetricName) (base.MetricResult, float64) { - thresholdVal, found := throttler.mysqlMetricThresholds.Get(metricName.String()) +func (throttler *Throttler) getScopedMetric(scope base.Scope, metricName base.MetricName) (base.MetricResult, float64) { + thresholdVal, found := throttler.metricThresholds.Get(metricName.String()) if !found { return base.NoSuchMetric, 0 } @@ -1293,9 +1292,9 @@ func (throttler *Throttler) getMySQLStoreMetric(ctx context.Context, scope base. return throttler.getAggregatedMetric(aggregatedName), threshold } -func (throttler *Throttler) mysqlMetricThresholdsSnapshot() map[string]float64 { +func (throttler *Throttler) metricThresholdsSnapshot() map[string]float64 { snapshot := make(map[string]float64) - for key, value := range throttler.mysqlMetricThresholds.Items() { + for key, value := range throttler.metricThresholds.Items() { threshold, _ := value.Object.(float64) snapshot[key] = threshold } @@ -1528,7 +1527,7 @@ func (throttler *Throttler) AppRequestMetricResult(ctx context.Context, appName return metricResultFunc() } -// checkScope checks the aggregated value of given MySQL store +// checkScope checks the aggregated value of given store func (throttler *Throttler) checkScope(ctx context.Context, appName string, scope base.Scope, metricNames base.MetricNames, flags *CheckFlags) (checkResult *CheckResult) { if !throttler.IsRunning() { return okMetricCheckResult @@ -1650,7 +1649,7 @@ func (throttler *Throttler) Status() *ThrottlerStatus { MetricNameUsedAsDefault: throttler.metricNameUsedAsDefault().String(), AggregatedMetrics: throttler.aggregatedMetricsSnapshot(), - MetricsThresholds: throttler.mysqlMetricThresholdsSnapshot(), + MetricsThresholds: throttler.metricThresholdsSnapshot(), MetricsHealth: throttler.metricsHealthSnapshot(), ThrottledApps: throttler.ThrottledApps(), AppCheckedMetrics: throttler.appCheckedMetricsSnapshot(), diff --git a/go/vt/vttablet/tabletserver/throttle/throttler_test.go b/go/vt/vttablet/tabletserver/throttle/throttler_test.go index f544d6566be..6363143fd43 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler_test.go @@ -38,7 +38,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/config" - "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/mysql" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" "vitess.io/vitess/go/vt/vttablet/tmclient" @@ -47,26 +46,26 @@ import ( ) var ( - selfMetrics = mysql.MySQLThrottleMetrics{ - base.LagMetricName: &mysql.MySQLThrottleMetric{ + selfMetrics = base.ThrottleMetrics{ + base.LagMetricName: &base.ThrottleMetric{ Scope: base.SelfScope, Alias: "", Value: 0.3, Err: nil, }, - base.ThreadsRunningMetricName: &mysql.MySQLThrottleMetric{ + base.ThreadsRunningMetricName: &base.ThrottleMetric{ Scope: base.SelfScope, Alias: "", Value: 26, Err: nil, }, - base.CustomMetricName: &mysql.MySQLThrottleMetric{ + base.CustomMetricName: &base.ThrottleMetric{ Scope: base.SelfScope, Alias: "", Value: 17, Err: nil, }, - base.LoadAvgMetricName: &mysql.MySQLThrottleMetric{ + base.LoadAvgMetricName: &base.ThrottleMetric{ Scope: base.SelfScope, Alias: "", Value: 2.718, @@ -234,26 +233,26 @@ func newTestThrottler() *Throttler { env := tabletenv.NewEnv(vtenv.NewTestEnv(), nil, "TabletServerTest") throttler := &Throttler{ - mysqlClusterProbesChan: make(chan *mysql.ClusterProbes), - heartbeatWriter: &FakeHeartbeatWriter{}, - ts: &FakeTopoServer{}, - mysqlInventory: mysql.NewInventory(), - pool: connpool.NewPool(env, "ThrottlerPool", tabletenv.ConnPoolConfig{}), - tabletTypeFunc: func() topodatapb.TabletType { return topodatapb.TabletType_PRIMARY }, - overrideTmClient: &fakeTMClient{}, + clusterProbesChan: make(chan *base.ClusterProbes), + heartbeatWriter: &FakeHeartbeatWriter{}, + ts: &FakeTopoServer{}, + inventory: base.NewInventory(), + pool: connpool.NewPool(env, "ThrottlerPool", tabletenv.ConnPoolConfig{}), + tabletTypeFunc: func() topodatapb.TabletType { return topodatapb.TabletType_PRIMARY }, + overrideTmClient: &fakeTMClient{}, } throttler.metricsQuery.Store(metricsQuery) throttler.MetricsThreshold.Store(math.Float64bits(0.75)) throttler.configSettings = config.NewConfigurationSettings() throttler.initConfig() - throttler.mysqlThrottleMetricChan = make(chan *mysql.MySQLThrottleMetric) - throttler.mysqlClusterProbesChan = make(chan *mysql.ClusterProbes) + throttler.throttleMetricChan = make(chan *base.ThrottleMetric) + throttler.clusterProbesChan = make(chan *base.ClusterProbes) throttler.throttlerConfigChan = make(chan *topodatapb.ThrottlerConfig) throttler.serialFuncChan = make(chan func()) - throttler.mysqlInventory = mysql.NewInventory() + throttler.inventory = base.NewInventory() throttler.throttledApps = cache.New(cache.NoExpiration, 0) - throttler.mysqlMetricThresholds = cache.New(cache.NoExpiration, 0) + throttler.metricThresholds = cache.New(cache.NoExpiration, 0) throttler.aggregatedMetrics = cache.New(10*aggregatedMetricsExpiration, 0) throttler.recentApps = cache.New(recentAppsExpiration, 0) throttler.metricsHealth = cache.New(cache.NoExpiration, 0) @@ -263,21 +262,21 @@ func newTestThrottler() *Throttler { // High contention & racy intervals: throttler.leaderCheckInterval = 10 * time.Millisecond - throttler.mysqlCollectInterval = 10 * time.Millisecond - throttler.mysqlDormantCollectInterval = 10 * time.Millisecond - throttler.mysqlRefreshInterval = 10 * time.Millisecond - throttler.mysqlAggregateInterval = 10 * time.Millisecond + throttler.activeCollectInterval = 10 * time.Millisecond + throttler.dormantCollectInterval = 10 * time.Millisecond + throttler.inventoryRefreshInterval = 10 * time.Millisecond + throttler.metricsAggregateInterval = 10 * time.Millisecond throttler.throttledAppsSnapshotInterval = 10 * time.Millisecond throttler.dormantPeriod = 5 * time.Second throttler.recentCheckDormantDiff = int64(throttler.dormantPeriod / recentCheckRateLimiterInterval) throttler.recentCheckDiff = int64(3 * time.Second / recentCheckRateLimiterInterval) - throttler.readSelfThrottleMetrics = func(ctx context.Context) mysql.MySQLThrottleMetrics { + throttler.readSelfThrottleMetrics = func(ctx context.Context) base.ThrottleMetrics { for _, metric := range selfMetrics { go func() { select { case <-ctx.Done(): - case throttler.mysqlThrottleMetricChan <- metric: + case throttler.throttleMetricChan <- metric: } }() } @@ -380,17 +379,17 @@ func TestApplyThrottlerConfig(t *testing.T) { }) t.Run("metric thresholds", func(t *testing.T) { { - val, ok := throttler.mysqlMetricThresholds.Get("lag") + val, ok := throttler.metricThresholds.Get("lag") require.True(t, ok) assert.Equal(t, float64(0.75), val) } { - val, ok := throttler.mysqlMetricThresholds.Get("threads_running") + val, ok := throttler.metricThresholds.Get("threads_running") require.True(t, ok) assert.Equal(t, float64(3.0), val) } { - val, ok := throttler.mysqlMetricThresholds.Get("loadavg") + val, ok := throttler.metricThresholds.Get("loadavg") require.True(t, ok) assert.Equal(t, float64(1.0), val) } @@ -432,7 +431,7 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { t.Run("check low threshold", func(t *testing.T) { sleepTillThresholdApplies() { - _, ok := throttler.mysqlMetricThresholds.Get("config/lag") + _, ok := throttler.metricThresholds.Get("config/lag") assert.False(t, ok) } assert.Equal(t, float64(0.0033), throttler.GetMetricsThreshold()) @@ -455,7 +454,7 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { t.Run("check with high 'lag' threshold", func(t *testing.T) { sleepTillThresholdApplies() { - val, ok := throttler.mysqlMetricThresholds.Get("config/lag") + val, ok := throttler.metricThresholds.Get("config/lag") require.True(t, ok) assert.Equal(t, float64(4444), val) } @@ -471,17 +470,17 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { assert.Equal(t, float64(0.0033), throttler.GetMetricsThreshold()) t.Run("metric thresholds", func(t *testing.T) { { - val, ok := throttler.mysqlMetricThresholds.Get("config/lag") + val, ok := throttler.metricThresholds.Get("config/lag") require.True(t, ok) assert.Equal(t, float64(4444), val) } { - val, ok := throttler.mysqlMetricThresholds.Get("inventory/lag") + val, ok := throttler.metricThresholds.Get("inventory/lag") require.True(t, ok) assert.Equal(t, float64(0.0033), val) } { - val, ok := throttler.mysqlMetricThresholds.Get("lag") + val, ok := throttler.metricThresholds.Get("lag") require.True(t, ok) assert.Equal(t, float64(4444), val) } @@ -898,12 +897,12 @@ func TestIsAppExempted(t *testing.T) { assert.True(t, throttler.IsAppExempted("schema-tracker")) } -// TestRefreshMySQLInventory tests the behavior of the throttler's RefreshMySQLInventory() function, which +// TestRefreshInventory tests the behavior of the throttler's RefreshInventory() function, which // is called periodically in actual throttler. For a given cluster name, it generates a list of probes // the throttler will use to check metrics. // On a replica tablet, that list is expect to probe the tablet itself. // On the PRIMARY, the list includes all shard tablets, including the PRIMARY itself. -func TestRefreshMySQLInventory(t *testing.T) { +func TestRefreshInventory(t *testing.T) { ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() @@ -912,10 +911,10 @@ func TestRefreshMySQLInventory(t *testing.T) { configSettings := config.NewConfigurationSettings() throttler := &Throttler{ - mysqlClusterProbesChan: make(chan *mysql.ClusterProbes), - mysqlMetricThresholds: cache.New(cache.NoExpiration, 0), - ts: &FakeTopoServer{}, - mysqlInventory: mysql.NewInventory(), + clusterProbesChan: make(chan *base.ClusterProbes), + metricThresholds: cache.New(cache.NoExpiration, 0), + ts: &FakeTopoServer{}, + inventory: base.NewInventory(), } throttler.metricsQuery.Store(metricsQuery) throttler.configSettings = configSettings @@ -926,7 +925,7 @@ func TestRefreshMySQLInventory(t *testing.T) { testName := fmt.Sprintf("leader=%t", throttler.isLeader.Load()) t.Run(testName, func(t *testing.T) { // validateProbesCount expects number of probes according to cluster name and throttler's leadership status - validateProbesCount := func(t *testing.T, probes mysql.Probes) { + validateProbesCount := func(t *testing.T, probes base.Probes) { if throttler.isLeader.Load() { assert.Equal(t, 3, len(probes)) } else { @@ -938,12 +937,12 @@ func TestRefreshMySQLInventory(t *testing.T) { defer cancel() for { select { - case probes := <-throttler.mysqlClusterProbesChan: + case probes := <-throttler.clusterProbesChan: // Worth noting that in this unit test, the throttler is _closed_ and _disabled_. Its own Operate() function does - // not run, and therefore there is none but us to both populate `mysqlClusterProbesChan` as well as + // not run, and therefore there is none but us to both populate `clusterProbesChan` as well as // read from it. We do not compete here with any other goroutine. assert.NotNil(t, probes) - throttler.updateMySQLClusterProbes(ctx, probes) + throttler.updateClusterProbes(ctx, probes) validateProbesCount(t, probes.TabletProbes) // Achieved our goal return @@ -953,7 +952,7 @@ func TestRefreshMySQLInventory(t *testing.T) { } }) t.Run("validating probes", func(t *testing.T) { - probes := throttler.mysqlInventory.ClustersProbes + probes := throttler.inventory.ClustersProbes validateProbesCount(t, probes) }) }) @@ -961,19 +960,19 @@ func TestRefreshMySQLInventory(t *testing.T) { t.Run("initial, not leader", func(t *testing.T) { throttler.isLeader.Store(false) - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) validateClusterProbes(t, ctx) }) t.Run("promote", func(t *testing.T) { throttler.isLeader.Store(true) - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) validateClusterProbes(t, ctx) }) t.Run("demote, expect cleanup", func(t *testing.T) { throttler.isLeader.Store(false) - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) validateClusterProbes(t, ctx) }) } @@ -1114,7 +1113,7 @@ func TestProbesWhileOperating(t *testing.T) { client := NewBackgroundClient(throttler, testAppName, base.UndefinedScope) t.Run("threshold exceeded", func(t *testing.T) { <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) { checkOK := client.ThrottleCheckOK(ctx, "") @@ -1126,7 +1125,7 @@ func TestProbesWhileOperating(t *testing.T) { t.Run("adjust threshold", func(t *testing.T) { throttler.MetricsThreshold.Store(math.Float64bits(0.95)) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) { checkOK := client.ThrottleCheckOK(ctx, "") @@ -1136,7 +1135,7 @@ func TestProbesWhileOperating(t *testing.T) { t.Run("restore threshold", func(t *testing.T) { throttler.MetricsThreshold.Store(savedThreshold) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) client.clearSuccessfulResultsCache() // ensure we don't read the successful result from the test above { @@ -1153,10 +1152,9 @@ func TestProbesWhileOperating(t *testing.T) { // as opposed to choosing the "lag" metric results. throttler.customMetricsQuery.Store("select non_empty") <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.aggregateMySQLMetrics(ctx) + throttler.aggregateMetrics() }) assert.Equal(t, base.CustomMetricName, throttler.metricNameUsedAsDefault()) - // throttler.aggregateMySQLMetrics(ctx) aggr := throttler.aggregatedMetricsSnapshot() assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() @@ -1204,7 +1202,7 @@ func TestProbesWhileOperating(t *testing.T) { client := NewBackgroundClient(throttler, testAppName, base.UndefinedScope) t.Run("threshold exceeded", func(t *testing.T) { <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) { checkOK := client.ThrottleCheckOK(ctx, "") @@ -1216,7 +1214,7 @@ func TestProbesWhileOperating(t *testing.T) { t.Run("adjust threshold, too low", func(t *testing.T) { throttler.MetricsThreshold.Store(math.Float64bits(0.95)) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) { checkOK := client.ThrottleCheckOK(ctx, "") @@ -1226,7 +1224,7 @@ func TestProbesWhileOperating(t *testing.T) { t.Run("adjust threshold, still too low", func(t *testing.T) { throttler.MetricsThreshold.Store(math.Float64bits(15)) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) { checkOK := client.ThrottleCheckOK(ctx, "") @@ -1236,7 +1234,7 @@ func TestProbesWhileOperating(t *testing.T) { t.Run("adjust threshold", func(t *testing.T) { throttler.MetricsThreshold.Store(math.Float64bits(18)) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) { checkOK := client.ThrottleCheckOK(ctx, "") @@ -1246,7 +1244,7 @@ func TestProbesWhileOperating(t *testing.T) { t.Run("restore threshold", func(t *testing.T) { throttler.MetricsThreshold.Store(savedThreshold) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) client.clearSuccessfulResultsCache() // ensure we don't read the successful result from the test above { @@ -1351,7 +1349,7 @@ func TestProbesPostDisable(t *testing.T) { throttler := newTestThrottler() runThrottler(t, ctx, throttler, 2*time.Second, nil) - probes := throttler.mysqlInventory.ClustersProbes + probes := throttler.inventory.ClustersProbes <-time.After(1 * time.Second) // throttler's context was cancelled, but still some functionality needs to complete t.Run("probes", func(t *testing.T) { @@ -1371,7 +1369,7 @@ func TestProbesPostDisable(t *testing.T) { }) t.Run("metrics", func(t *testing.T) { - assert.Equal(t, 3, len(throttler.mysqlInventory.TabletMetrics)) // 1 self tablet + 2 shard tablets + assert.Equal(t, 3, len(throttler.inventory.TabletMetrics)) // 1 self tablet + 2 shard tablets }) t.Run("aggregated", func(t *testing.T) { @@ -1879,7 +1877,7 @@ func TestReplica(t *testing.T) { // Change custom threshold throttler.MetricsThreshold.Store(math.Float64bits(0.1)) <-runSerialFunction(t, ctx, throttler, func(ctx context.Context) { - throttler.refreshMySQLInventory(ctx) + throttler.refreshInventory(ctx) }) checkResult = throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) From c9c0aa5db40eaf508c5d124898c2af25a8b78cc2 Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Wed, 17 Jul 2024 12:14:53 +0530 Subject: [PATCH 50/55] Transaction watcher and notifier (#16363) Signed-off-by: Harshit Gangal Signed-off-by: Andres Taylor Co-authored-by: Andres Taylor --- go/flags/endtoend/vtcombo.txt | 1 - go/flags/endtoend/vttablet.txt | 2 - .../vtgate/transaction/twopc/main_test.go | 1 - .../endtoend/vtgate/transaction/tx_test.go | 1 - go/vt/proto/query/query.pb.go | 320 +++++++++--------- go/vt/proto/query/query_vtproto.pb.go | 34 ++ go/vt/sidecardb/schema/twopc/dt_state.sql | 3 +- go/vt/vtexplain/vtexplain_vttablet.go | 1 - go/vt/vttablet/endtoend/framework/server.go | 27 -- go/vt/vttablet/endtoend/main_test.go | 7 + go/vt/vttablet/endtoend/transaction_test.go | 163 +++++++-- .../vttablet/tabletserver/dt_executor_test.go | 70 ++-- .../vttablet/tabletserver/health_streamer.go | 15 + .../tabletserver/query_executor_test.go | 9 +- .../vttablet/tabletserver/tabletenv/config.go | 14 +- go/vt/vttablet/tabletserver/tabletserver.go | 2 +- .../tabletserver/tabletserver_test.go | 8 +- go/vt/vttablet/tabletserver/twopc.go | 84 +++-- go/vt/vttablet/tabletserver/twopc_test.go | 8 +- go/vt/vttablet/tabletserver/tx_engine.go | 61 +--- go/vt/vttablet/tabletserver/tx_engine_test.go | 10 +- proto/query.proto | 6 +- web/vtadmin/src/proto/vtadmin.d.ts | 10 +- web/vtadmin/src/proto/vtadmin.js | 35 +- 24 files changed, 503 insertions(+), 389 deletions(-) diff --git a/go/flags/endtoend/vtcombo.txt b/go/flags/endtoend/vtcombo.txt index 743bbf5b7bb..c59cd789ed3 100644 --- a/go/flags/endtoend/vtcombo.txt +++ b/go/flags/endtoend/vtcombo.txt @@ -389,7 +389,6 @@ Flags: --transaction_mode string SINGLE: disallow multi-db transactions, MULTI: allow multi-db transactions with best effort commit, TWOPC: allow multi-db transactions with 2pc commit (default "MULTI") --truncate-error-len int truncate errors sent to client if they are longer than this value (0 means do not truncate) --twopc_abandon_age float time in seconds. Any unresolved transaction older than this time will be sent to the coordinator to be resolved. - --twopc_coordinator_address string address of the (VTGate) process(es) that will be used to notify of abandoned transactions. --twopc_enable if the flag is on, 2pc is enabled. Other 2pc flags must be supplied. --tx-throttler-config string Synonym to -tx_throttler_config (default "target_replication_lag_sec:2 max_replication_lag_sec:10 initial_rate:100 max_increase:1 emergency_decrease:0.5 min_duration_between_increases_sec:40 max_duration_between_increases_sec:62 min_duration_between_decreases_sec:20 spread_backlog_across_sec:20 age_bad_rate_after_sec:180 bad_rate_increase:0.1 max_rate_approach_threshold:0.9") --tx-throttler-default-priority int Default priority assigned to queries that lack priority information (default 100) diff --git a/go/flags/endtoend/vttablet.txt b/go/flags/endtoend/vttablet.txt index 40d686979c0..f5a7f8e8f51 100644 --- a/go/flags/endtoend/vttablet.txt +++ b/go/flags/endtoend/vttablet.txt @@ -387,7 +387,6 @@ Flags: --transaction_limit_by_username Include VTGateCallerID.username when considering who the user is for the purpose of transaction limit. (default true) --transaction_limit_per_user float Maximum number of transactions a single user is allowed to use at any time, represented as fraction of -transaction_cap. (default 0.4) --twopc_abandon_age float time in seconds. Any unresolved transaction older than this time will be sent to the coordinator to be resolved. - --twopc_coordinator_address string address of the (VTGate) process(es) that will be used to notify of abandoned transactions. --twopc_enable if the flag is on, 2pc is enabled. Other 2pc flags must be supplied. --tx-throttler-config string Synonym to -tx_throttler_config (default "target_replication_lag_sec:2 max_replication_lag_sec:10 initial_rate:100 max_increase:1 emergency_decrease:0.5 min_duration_between_increases_sec:40 max_duration_between_increases_sec:62 min_duration_between_decreases_sec:20 spread_backlog_across_sec:20 age_bad_rate_after_sec:180 bad_rate_increase:0.1 max_rate_approach_threshold:0.9") --tx-throttler-default-priority int Default priority assigned to queries that lack priority information (default 100) @@ -417,7 +416,6 @@ Flags: --vstream-binlog-rotation-threshold int Byte size at which a VStreamer will attempt to rotate the source's open binary log before starting a GTID snapshot based stream (e.g. a ResultStreamer or RowStreamer) (default 67108864) --vstream_dynamic_packet_size Enable dynamic packet sizing for VReplication. This will adjust the packet size during replication to improve performance. (default true) --vstream_packet_size int Suggested packet size for VReplication streamer. This is used only as a recommendation. The actual packet size may be more or less than this amount. (default 250000) - --vtgate_protocol string how to talk to vtgate (default "grpc") --vttablet_skip_buildinfo_tags string comma-separated list of buildinfo tags to skip from merging with --init_tags. each tag is either an exact match or a regular expression of the form '/regexp/'. (default "/.*/") --wait_for_backup_interval duration (init restore parameter) if this is greater than 0, instead of starting up empty when no backups are found, keep checking at this interval for a backup to appear --watch_replication_stream When enabled, vttablet will stream the MySQL replication stream from the local server, and use it to update schema when it sees a DDL. diff --git a/go/test/endtoend/vtgate/transaction/twopc/main_test.go b/go/test/endtoend/vtgate/transaction/twopc/main_test.go index 102235d672a..af5c1a395ad 100644 --- a/go/test/endtoend/vtgate/transaction/twopc/main_test.go +++ b/go/test/endtoend/vtgate/transaction/twopc/main_test.go @@ -78,7 +78,6 @@ func TestMain(m *testing.M) { ) clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--twopc_enable", - "--twopc_coordinator_address", fmt.Sprintf("localhost:%d", clusterInstance.VtgateGrpcPort), "--twopc_abandon_age", "3600", "--queryserver-config-transaction-cap", "3", ) diff --git a/go/test/endtoend/vtgate/transaction/tx_test.go b/go/test/endtoend/vtgate/transaction/tx_test.go index 8a004277b89..40621a1d84b 100644 --- a/go/test/endtoend/vtgate/transaction/tx_test.go +++ b/go/test/endtoend/vtgate/transaction/tx_test.go @@ -59,7 +59,6 @@ func TestMain(m *testing.M) { // Set extra tablet args for twopc clusterInstance.VtTabletExtraArgs = []string{ "--twopc_enable", - "--twopc_coordinator_address", fmt.Sprintf("localhost:%d", clusterInstance.VtgateGrpcPort), "--twopc_abandon_age", "3600", } diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 7723797f895..c10568cc69b 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -428,8 +428,8 @@ type TransactionState int32 const ( TransactionState_UNKNOWN TransactionState = 0 TransactionState_PREPARE TransactionState = 1 - TransactionState_COMMIT TransactionState = 2 - TransactionState_ROLLBACK TransactionState = 3 + TransactionState_ROLLBACK TransactionState = 2 + TransactionState_COMMIT TransactionState = 3 ) // Enum value maps for TransactionState. @@ -437,14 +437,14 @@ var ( TransactionState_name = map[int32]string{ 0: "UNKNOWN", 1: "PREPARE", - 2: "COMMIT", - 3: "ROLLBACK", + 2: "ROLLBACK", + 3: "COMMIT", } TransactionState_value = map[string]int32{ "UNKNOWN": 0, "PREPARE": 1, - "COMMIT": 2, - "ROLLBACK": 3, + "ROLLBACK": 2, + "COMMIT": 3, } ) @@ -5182,7 +5182,8 @@ type RealtimeStats struct { // view_schema_changed is to provide list of views that have schema changes detected by the tablet. ViewSchemaChanged []string `protobuf:"bytes,8,rep,name=view_schema_changed,json=viewSchemaChanged,proto3" json:"view_schema_changed,omitempty"` // udfs_changed is used to signal that the UDFs have changed on the tablet. - UdfsChanged bool `protobuf:"varint,9,opt,name=udfs_changed,json=udfsChanged,proto3" json:"udfs_changed,omitempty"` + UdfsChanged bool `protobuf:"varint,9,opt,name=udfs_changed,json=udfsChanged,proto3" json:"udfs_changed,omitempty"` + TxUnresolved bool `protobuf:"varint,10,opt,name=tx_unresolved,json=txUnresolved,proto3" json:"tx_unresolved,omitempty"` } func (x *RealtimeStats) Reset() { @@ -5280,6 +5281,13 @@ func (x *RealtimeStats) GetUdfsChanged() bool { return false } +func (x *RealtimeStats) GetTxUnresolved() bool { + if x != nil { + return x.TxUnresolved + } + return false +} + // AggregateStats contains information about the health of a group of // tablets for a Target. It is used to propagate stats from a vtgate // to another, or from the Gateway layer of a vtgate to the routing @@ -6605,7 +6613,7 @@ var file_query_proto_rawDesc = []byte{ 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, + 0x74, 0x22, 0xbe, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, @@ -6630,154 +6638,156 @@ var file_query_proto_rawDesc = []byte{ 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x76, 0x69, 0x65, 0x77, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x64, 0x66, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x75, 0x64, 0x66, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0xf6, 0x01, - 0x0a, 0x0e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x14, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x4d, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x4d, 0x61, 0x78, 0x22, 0x95, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, - 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x74, 0x65, 0x72, 0x6d, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x54, - 0x65, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x0d, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, - 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xae, - 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x0c, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, - 0x91, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, + 0x52, 0x0b, 0x75, 0x64, 0x66, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x23, 0x0a, + 0x0d, 0x74, 0x78, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x74, 0x78, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, + 0x65, 0x64, 0x22, 0xf6, 0x01, 0x0a, 0x0e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x6e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, + 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, + 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x4d, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, + 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x4d, 0x61, 0x78, 0x22, 0x95, 0x02, 0x0a, 0x14, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x07, 0x55, 0x44, 0x46, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x75, 0x64, 0x66, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x55, - 0x44, 0x46, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x64, 0x66, 0x73, 0x12, 0x58, 0x0a, 0x10, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x92, 0x03, 0x0a, 0x09, 0x4d, - 0x79, 0x53, 0x71, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, - 0x59, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x5f, 0x4b, 0x45, - 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x49, 0x51, - 0x55, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x04, 0x12, 0x15, 0x0a, - 0x11, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, - 0x41, 0x47, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x5a, 0x45, 0x52, 0x4f, 0x46, 0x49, - 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x40, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x49, 0x4e, - 0x41, 0x52, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x45, - 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x02, 0x12, 0x18, 0x0a, 0x13, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x4c, - 0x41, 0x47, 0x10, 0x80, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, - 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x45, - 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x4e, 0x4f, 0x5f, - 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x46, 0x4c, - 0x41, 0x47, 0x10, 0x80, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x57, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x40, 0x12, 0x0e, - 0x0a, 0x08, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x13, - 0x0a, 0x0d, 0x50, 0x41, 0x52, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x80, 0x80, 0x01, 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x11, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x04, 0x12, 0x11, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x43, - 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x2a, - 0x6b, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x00, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x52, 0x41, 0x4c, 0x10, - 0x80, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, - 0x10, 0x80, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x53, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x80, - 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x80, 0x10, - 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, 0x80, 0x20, 0x12, 0x0d, 0x0a, - 0x08, 0x49, 0x53, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x80, 0x40, 0x2a, 0xc0, 0x03, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x81, 0x02, 0x12, - 0x0a, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, - 0x4e, 0x54, 0x31, 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, - 0x36, 0x10, 0x84, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x85, 0x02, - 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x86, 0x06, 0x12, 0x0a, 0x0a, - 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x87, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, - 0x54, 0x33, 0x32, 0x10, 0x88, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, - 0x89, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x8a, 0x06, 0x12, - 0x0c, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x8b, 0x08, 0x12, 0x0c, 0x0a, - 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x8c, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x54, - 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x8d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x44, - 0x41, 0x54, 0x45, 0x10, 0x8e, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x8f, - 0x10, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x90, 0x10, - 0x12, 0x09, 0x0a, 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x91, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, - 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, - 0x10, 0x93, 0x30, 0x12, 0x09, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x94, 0x50, 0x12, 0x0c, - 0x0a, 0x07, 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x95, 0x30, 0x12, 0x0e, 0x0a, 0x09, - 0x56, 0x41, 0x52, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x96, 0x50, 0x12, 0x09, 0x0a, 0x04, - 0x43, 0x48, 0x41, 0x52, 0x10, 0x97, 0x30, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, - 0x59, 0x10, 0x98, 0x50, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x49, 0x54, 0x10, 0x99, 0x10, 0x12, 0x09, - 0x0a, 0x04, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x9a, 0x10, 0x12, 0x08, 0x0a, 0x03, 0x53, 0x45, 0x54, - 0x10, 0x9b, 0x10, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x10, 0x1c, 0x12, 0x0d, - 0x0a, 0x08, 0x47, 0x45, 0x4f, 0x4d, 0x45, 0x54, 0x52, 0x59, 0x10, 0x9d, 0x10, 0x12, 0x09, 0x0a, - 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x9e, 0x10, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, 0x52, - 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x4e, - 0x55, 0x4d, 0x10, 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x56, 0x41, 0x4c, 0x10, - 0xa1, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, 0x2a, - 0x46, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, - 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x3b, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, - 0x45, 0x57, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, - 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x44, - 0x46, 0x53, 0x10, 0x03, 0x42, 0x35, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, 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, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x54, 0x65, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, + 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4a, 0x04, 0x08, + 0x06, 0x10, 0x07, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, + 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x6e, 0x74, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x12, 0x35, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x07, 0x55, 0x44, 0x46, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0b, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, + 0x04, 0x75, 0x64, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x55, 0x44, 0x46, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x64, 0x66, + 0x73, 0x12, 0x58, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, + 0x92, 0x03, 0x0a, 0x09, 0x4d, 0x79, 0x53, 0x71, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x09, 0x0a, + 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, + 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, + 0x52, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, + 0x0f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, + 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x4b, + 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4c, 0x4f, + 0x42, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x49, + 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x5a, + 0x45, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x40, 0x12, 0x10, + 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x01, + 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x02, + 0x12, 0x18, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x49, + 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x08, 0x12, + 0x0d, 0x0a, 0x08, 0x53, 0x45, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x10, 0x12, 0x1a, + 0x0a, 0x15, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, + 0x55, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x4e, + 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x57, 0x5f, 0x46, 0x4c, 0x41, 0x47, + 0x10, 0x80, 0x40, 0x12, 0x0e, 0x0a, 0x08, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, + 0x80, 0x80, 0x02, 0x12, 0x13, 0x0a, 0x0d, 0x50, 0x41, 0x52, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x01, 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x11, 0x0a, 0x0b, 0x55, 0x4e, + 0x49, 0x51, 0x55, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x04, 0x12, 0x11, 0x0a, + 0x0b, 0x42, 0x49, 0x4e, 0x43, 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x08, + 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x6b, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x49, 0x4e, 0x54, 0x45, + 0x47, 0x52, 0x41, 0x4c, 0x10, 0x80, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x55, 0x4e, 0x53, + 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x80, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x53, 0x46, 0x4c, + 0x4f, 0x41, 0x54, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, + 0x45, 0x44, 0x10, 0x80, 0x10, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, + 0x80, 0x20, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x80, + 0x40, 0x2a, 0xc0, 0x03, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, + 0x4c, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, + 0x38, 0x10, 0x81, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, + 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, 0x0a, 0x06, + 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x84, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, + 0x32, 0x34, 0x10, 0x85, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, + 0x86, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x87, 0x02, 0x12, 0x0b, + 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x88, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, + 0x4e, 0x54, 0x36, 0x34, 0x10, 0x89, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, + 0x34, 0x10, 0x8a, 0x06, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, + 0x8b, 0x08, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x8c, 0x08, + 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x8d, 0x10, + 0x12, 0x09, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x8e, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x54, + 0x49, 0x4d, 0x45, 0x10, 0x8f, 0x10, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, + 0x4d, 0x45, 0x10, 0x90, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x91, 0x06, + 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x12, 0x12, 0x09, 0x0a, + 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x93, 0x30, 0x12, 0x09, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, + 0x10, 0x94, 0x50, 0x12, 0x0c, 0x0a, 0x07, 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x95, + 0x30, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x41, 0x52, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x96, + 0x50, 0x12, 0x09, 0x0a, 0x04, 0x43, 0x48, 0x41, 0x52, 0x10, 0x97, 0x30, 0x12, 0x0b, 0x0a, 0x06, + 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x98, 0x50, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x49, 0x54, + 0x10, 0x99, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x9a, 0x10, 0x12, 0x08, + 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x9b, 0x10, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x55, 0x50, 0x4c, + 0x45, 0x10, 0x1c, 0x12, 0x0d, 0x0a, 0x08, 0x47, 0x45, 0x4f, 0x4d, 0x45, 0x54, 0x52, 0x59, 0x10, + 0x9d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x9e, 0x10, 0x12, 0x0e, 0x0a, + 0x0a, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, + 0x06, 0x48, 0x45, 0x58, 0x4e, 0x55, 0x4d, 0x10, 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, + 0x58, 0x56, 0x41, 0x4c, 0x10, 0xa1, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, 0x4e, 0x55, + 0x4d, 0x10, 0xa2, 0x20, 0x2a, 0x46, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x03, 0x2a, 0x3b, 0x0a, 0x0f, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x09, 0x0a, 0x05, 0x56, 0x49, 0x45, 0x57, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, + 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x55, 0x44, 0x46, 0x53, 0x10, 0x03, 0x42, 0x35, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, + 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, 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, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/vt/proto/query/query_vtproto.pb.go b/go/vt/proto/query/query_vtproto.pb.go index 8092c6abe19..c7069cfd6d7 100644 --- a/go/vt/proto/query/query_vtproto.pb.go +++ b/go/vt/proto/query/query_vtproto.pb.go @@ -1403,6 +1403,7 @@ func (m *RealtimeStats) CloneVT() *RealtimeStats { CpuUsage: m.CpuUsage, Qps: m.Qps, UdfsChanged: m.UdfsChanged, + TxUnresolved: m.TxUnresolved, } if rhs := m.TableSchemaChanged; rhs != nil { tmpContainer := make([]string, len(rhs)) @@ -5523,6 +5524,16 @@ func (m *RealtimeStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.TxUnresolved { + i-- + if m.TxUnresolved { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } if m.UdfsChanged { i-- if m.UdfsChanged { @@ -7527,6 +7538,9 @@ func (m *RealtimeStats) SizeVT() (n int) { if m.UdfsChanged { n += 2 } + if m.TxUnresolved { + n += 2 + } n += len(m.unknownFields) return n } @@ -18111,6 +18125,26 @@ func (m *RealtimeStats) UnmarshalVT(dAtA []byte) error { } } m.UdfsChanged = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxUnresolved", 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.TxUnresolved = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/go/vt/sidecardb/schema/twopc/dt_state.sql b/go/vt/sidecardb/schema/twopc/dt_state.sql index dff9e4c3770..9247ea5fa3c 100644 --- a/go/vt/sidecardb/schema/twopc/dt_state.sql +++ b/go/vt/sidecardb/schema/twopc/dt_state.sql @@ -19,5 +19,6 @@ CREATE TABLE IF NOT EXISTS dt_state dtid varbinary(512) NOT NULL, state bigint NOT NULL, time_created bigint NOT NULL, - primary key(dtid) + primary key(dtid), + key (time_created) ) ENGINE = InnoDB diff --git a/go/vt/vtexplain/vtexplain_vttablet.go b/go/vt/vtexplain/vtexplain_vttablet.go index 3f9aee0efa3..ed977e7bcb0 100644 --- a/go/vt/vtexplain/vtexplain_vttablet.go +++ b/go/vt/vtexplain/vtexplain_vttablet.go @@ -113,7 +113,6 @@ func (vte *VTExplain) newTablet(ctx context.Context, env *vtenv.Environment, opt config := tabletenv.NewCurrentConfig() config.TrackSchemaVersions = false if opts.ExecutionMode == ModeTwoPC { - config.TwoPCCoordinatorAddress = "XXX" config.TwoPCAbandonAge = 1.0 config.TwoPCEnable = true } diff --git a/go/vt/vttablet/endtoend/framework/server.go b/go/vt/vttablet/endtoend/framework/server.go index 95c8114fd9f..2cd3ccc354c 100644 --- a/go/vt/vttablet/endtoend/framework/server.go +++ b/go/vt/vttablet/endtoend/framework/server.go @@ -35,8 +35,6 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/vt/dbconfigs" - "vitess.io/vitess/go/vt/vtgate/fakerpcvtgateconn" - "vitess.io/vitess/go/vt/vtgate/vtgateconn" "vitess.io/vitess/go/vt/vttablet/tabletserver" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" @@ -51,8 +49,6 @@ var ( Server *tabletserver.TabletServer // ServerAddress is the http URL for the server. ServerAddress string - // ResolveChan is the channel that sends dtids that are to be resolved. - ResolveChan = make(chan string, 1) // TopoServer is the topology for the server TopoServer *topo.Server ) @@ -61,15 +57,6 @@ var ( // all the global variables. This function should only be called // once at the beginning of the test. func StartCustomServer(ctx context.Context, connParams, connAppDebugParams mysql.ConnParams, dbName string, cfg *tabletenv.TabletConfig) error { - // Setup a fake vtgate server. - protocol := "resolveTest" - vtgateconn.SetVTGateProtocol(protocol) - vtgateconn.RegisterDialer(protocol, func(context.Context, string) (vtgateconn.Impl, error) { - return &txResolver{ - FakeVTGateConn: fakerpcvtgateconn.FakeVTGateConn{}, - }, nil - }) - dbcfgs := dbconfigs.NewTestDBConfigs(connParams, connAppDebugParams, dbName) Target = &querypb.Target{ @@ -118,7 +105,6 @@ func StartServer(ctx context.Context, connParams, connAppDebugParams mysql.ConnP config.StrictTableACL = true config.TwoPCEnable = true config.TwoPCAbandonAge = 1 - config.TwoPCCoordinatorAddress = "fake" config.HotRowProtection.Mode = tabletenv.Enable config.TrackSchemaVersions = true config.GracePeriods.Shutdown = 2 * time.Second @@ -138,16 +124,3 @@ func StartServer(ctx context.Context, connParams, connAppDebugParams mysql.ConnP func StopServer() { Server.StopService() } - -// txResolver transmits dtids to be resolved through ResolveChan. -type txResolver struct { - fakerpcvtgateconn.FakeVTGateConn -} - -func (conn *txResolver) ResolveTransaction(ctx context.Context, dtid string) error { - select { - case ResolveChan <- dtid: - default: - } - return nil -} diff --git a/go/vt/vttablet/endtoend/main_test.go b/go/vt/vttablet/endtoend/main_test.go index 939147cb139..1284f790b93 100644 --- a/go/vt/vttablet/endtoend/main_test.go +++ b/go/vt/vttablet/endtoend/main_test.go @@ -340,6 +340,13 @@ var tableACLConfig = `{ "readers": ["dev"], "writers": ["dev"], "admins": ["dev"] + }, + { + "name": "vitess_twopc", + "table_names_or_prefixes": ["dt_state"], + "readers": ["dev"], + "writers": ["dev"], + "admins": ["dev"] } ] }` diff --git a/go/vt/vttablet/endtoend/transaction_test.go b/go/vt/vttablet/endtoend/transaction_test.go index 296f5c18b56..94453dd70e7 100644 --- a/go/vt/vttablet/endtoend/transaction_test.go +++ b/go/vt/vttablet/endtoend/transaction_test.go @@ -540,7 +540,7 @@ func TestMMCommitFlow(t *testing.T) { info.TimeCreated = 0 wantInfo := &querypb.TransactionMetadata{ Dtid: "aa", - State: 2, + State: querypb.TransactionState_COMMIT, Participants: []*querypb.Target{{ Keyspace: "test1", Shard: "0", @@ -593,7 +593,7 @@ func TestMMRollbackFlow(t *testing.T) { info.TimeCreated = 0 wantInfo := &querypb.TransactionMetadata{ Dtid: "aa", - State: 3, + State: querypb.TransactionState_ROLLBACK, Participants: []*querypb.Target{{ Keyspace: "test1", Shard: "0", @@ -612,7 +612,43 @@ func TestMMRollbackFlow(t *testing.T) { require.NoError(t, err) } -func TestWatchdog(t *testing.T) { +type AsyncChecker struct { + t *testing.T + ch chan bool +} + +func newAsyncChecker(t *testing.T) *AsyncChecker { + return &AsyncChecker{ + t: t, + ch: make(chan bool), + } +} + +func (ac *AsyncChecker) check() { + ac.ch <- true +} + +func (ac *AsyncChecker) shouldNotify(timeout time.Duration, message string) { + select { + case <-ac.ch: + // notified, all is well + case <-time.After(timeout): + // timed out waiting for notification + ac.t.Error(message) + } +} +func (ac *AsyncChecker) shouldNotNotify(timeout time.Duration, message string) { + select { + case <-ac.ch: + // notified - not expected + ac.t.Error(message) + case <-time.After(timeout): + // timed out waiting for notification, which is expected + } +} + +// TestTransactionWatcherSignal test that unresolved transaction signal is received via health stream. +func TestTransactionWatcherSignal(t *testing.T) { client := framework.NewClient() query := "insert into vitess_test (intval, floatval, charval, binval) " + @@ -622,44 +658,38 @@ func TestWatchdog(t *testing.T) { _, err = client.Execute(query, nil) require.NoError(t, err) - start := time.Now() - err = client.CreateTransaction("aa", []*querypb.Target{{ - Keyspace: "test1", - Shard: "0", - }, { - Keyspace: "test2", - Shard: "1", - }}) + ch := newAsyncChecker(t) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + go func() { + err := client.StreamHealthWithContext(ctx, func(shr *querypb.StreamHealthResponse) error { + if shr.RealtimeStats.TxUnresolved { + ch.check() + } + return nil + }) + require.NoError(t, err) + }() + + err = client.CreateTransaction("aa", []*querypb.Target{ + {Keyspace: "test1", Shard: "0"}, + {Keyspace: "test2", Shard: "1"}}) require.NoError(t, err) - // The watchdog should kick in after 1 second. - dtid := <-framework.ResolveChan - if dtid != "aa" { - t.Errorf("dtid: %s, want aa", dtid) - } - diff := time.Since(start) - if diff < 1*time.Second { - t.Errorf("diff: %v, want greater than 1s", diff) - } + // wait for unresolved transaction signal + ch.shouldNotify(2*time.Second, "timed out waiting for transaction watcher signal") err = client.SetRollback("aa", 0) require.NoError(t, err) + + // still should receive unresolved transaction signal + ch.shouldNotify(2*time.Second, "timed out waiting for transaction watcher signal") + err = client.ConcludeTransaction("aa") require.NoError(t, err) - // Make sure the watchdog stops sending messages. - // Check twice. Sometimes, a race can still cause - // a stray message. - dtid = "" - for i := 0; i < 2; i++ { - select { - case dtid = <-framework.ResolveChan: - continue - case <-time.After(2 * time.Second): - return - } - } - t.Errorf("Unexpected message: %s", dtid) + // transaction watcher should stop sending singal now. + ch.shouldNotNotify(2*time.Second, "unexpected signal for resolved transaction") } func TestUnresolvedTracking(t *testing.T) { @@ -743,11 +773,11 @@ func TestUnresolvedTransactions(t *testing.T) { client := framework.NewClient() participants := []*querypb.Target{ - {Keyspace: "ks1", Shard: "-80"}, - {Keyspace: "ks1", Shard: "80-"}, + {Keyspace: "ks1", Shard: "80-c0"}, } err := client.CreateTransaction("dtid01", participants) require.NoError(t, err) + defer client.ConcludeTransaction("dtid01") // expected no transaction to show here, as 1 second not passed. transactions, err := client.UnresolvedTransactions() @@ -766,3 +796,66 @@ func TestUnresolvedTransactions(t *testing.T) { }} utils.MustMatch(t, want, transactions) } + +// TestUnresolvedTransactions tests the UnresolvedTransactions API. +func TestUnresolvedTransactionsOrdering(t *testing.T) { + client := framework.NewClient() + + participants1 := []*querypb.Target{ + {Keyspace: "ks1", Shard: "c0-"}, + {Keyspace: "ks1", Shard: "80-c0"}, + } + participants2 := []*querypb.Target{ + {Keyspace: "ks1", Shard: "-40"}, + {Keyspace: "ks1", Shard: "80-c0"}, + } + participants3 := []*querypb.Target{ + {Keyspace: "ks1", Shard: "c0-"}, + {Keyspace: "ks1", Shard: "-40"}, + } + // prepare state + err := client.CreateTransaction("dtid01", participants1) + require.NoError(t, err) + defer client.ConcludeTransaction("dtid01") + + // commit state + err = client.CreateTransaction("dtid02", participants2) + require.NoError(t, err) + defer client.ConcludeTransaction("dtid02") + _, err = client.Execute( + fmt.Sprintf("update _vt.dt_state set state = %d where dtid = 'dtid02'", querypb.TransactionState_COMMIT.Number()), nil) + require.NoError(t, err) + + // rollback state + err = client.CreateTransaction("dtid03", participants3) + require.NoError(t, err) + defer client.ConcludeTransaction("dtid03") + _, err = client.Execute( + fmt.Sprintf("update _vt.dt_state set state = %d where dtid = 'dtid03'", querypb.TransactionState_ROLLBACK.Number()), nil) + require.NoError(t, err) + + // expected no transaction to show here, as 1 second not passed. + transactions, err := client.UnresolvedTransactions() + require.NoError(t, err) + require.Empty(t, transactions) + + // abandon age is 1 second. + time.Sleep(2 * time.Second) + + transactions, err = client.UnresolvedTransactions() + require.NoError(t, err) + want := []*querypb.TransactionMetadata{{ + Dtid: "dtid02", + State: querypb.TransactionState_COMMIT, + Participants: participants2, + }, { + Dtid: "dtid03", + State: querypb.TransactionState_ROLLBACK, + Participants: participants3, + }, { + Dtid: "dtid01", + State: querypb.TransactionState_PREPARE, + Participants: participants1, + }} + utils.MustMatch(t, want, transactions) +} diff --git a/go/vt/vttablet/tabletserver/dt_executor_test.go b/go/vt/vttablet/tabletserver/dt_executor_test.go index 6637cc83841..448dd63bf5a 100644 --- a/go/vt/vttablet/tabletserver/dt_executor_test.go +++ b/go/vt/vttablet/tabletserver/dt_executor_test.go @@ -31,8 +31,6 @@ import ( "vitess.io/vitess/go/mysql/fakesqldb" "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/vt/vtgate/fakerpcvtgateconn" - "vitess.io/vitess/go/vt/vtgate/vtgateconn" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" querypb "vitess.io/vitess/go/vt/proto/query" @@ -449,51 +447,41 @@ func TestExecutorReadAllTransactions(t *testing.T) { } } -// These vars and types are used only for TestExecutorResolveTransaction -var dtidCh = make(chan string) - -type FakeVTGateConn struct { - fakerpcvtgateconn.FakeVTGateConn -} - -func (conn *FakeVTGateConn) ResolveTransaction(ctx context.Context, dtid string) error { - dtidCh <- dtid - return nil -} - -func TestExecutorResolveTransaction(t *testing.T) { +// TestTransactionNotifier tests that the transaction notifier is called +// when a transaction watcher receives unresolved transaction count more than zero. +func TestTransactionNotifier(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - protocol := "resolveTest" - oldValue := vtgateconn.GetVTGateProtocol() - vtgateconn.SetVTGateProtocol(protocol) - defer func() { - vtgateconn.SetVTGateProtocol(oldValue) - }() - vtgateconn.RegisterDialer(protocol, func(context.Context, string) (vtgateconn.Impl, error) { - return &FakeVTGateConn{ - FakeVTGateConn: fakerpcvtgateconn.FakeVTGateConn{}, - }, nil - }) + _, tsv, db := newShortAgeExecutor(t, ctx) defer db.Close() defer tsv.StopService() - want := "aa" db.AddQueryPattern( - "select dtid, time_created from _vt\\.dt_state where time_created.*", - &sqltypes.Result{ - Fields: []*querypb.Field{ - {Type: sqltypes.VarChar}, - {Type: sqltypes.Int64}, - }, - Rows: [][]sqltypes.Value{{ - sqltypes.NewVarBinary(want), - sqltypes.NewVarBinary("1"), - }}, - }) - got := <-dtidCh - if got != want { - t.Errorf("ResolveTransaction: %s, want %s", got, want) + "select count\\(\\*\\) from _vt\\.redo_state where time_created.*", + sqltypes.MakeTestResult(sqltypes.MakeTestFields("count(*)", "int64"), "0")) + + // zero unresolved transactions + db.AddQueryPattern( + "select count\\(\\*\\) from _vt\\.dt_state where time_created.*", + sqltypes.MakeTestResult(sqltypes.MakeTestFields("count(*)", "int64"), "0")) + notifyCh := make(chan any) + tsv.te.dxNotify = func() { + notifyCh <- nil + } + select { + case <-notifyCh: + t.Error("unresolved transaction notifier call unexpected") + case <-time.After(1 * time.Second): + } + + // non zero unresolved transactions + db.AddQueryPattern( + "select count\\(\\*\\) from _vt\\.dt_state where time_created.*", + sqltypes.MakeTestResult(sqltypes.MakeTestFields("count(*)", "int64"), "1")) + select { + case <-notifyCh: + case <-time.After(1 * time.Second): + t.Error("unresolved transaction notifier expected but not received") } } diff --git a/go/vt/vttablet/tabletserver/health_streamer.go b/go/vt/vttablet/tabletserver/health_streamer.go index 269e3daefd6..cfc5ea5e974 100644 --- a/go/vt/vttablet/tabletserver/health_streamer.go +++ b/go/vt/vttablet/tabletserver/health_streamer.go @@ -346,3 +346,18 @@ func (hs *healthStreamer) reload(created, altered, dropped []*schema.Table, udfs hs.state.RealtimeStats.UdfsChanged = false return nil } + +// sendUnresolvedTransactionSignal sends broadcast message about unresolved transactions. +func (hs *healthStreamer) sendUnresolvedTransactionSignal() { + hs.mu.Lock() + defer hs.mu.Unlock() + // send signal only when primary is serving. + if !hs.isServingPrimary { + return + } + + hs.state.RealtimeStats.TxUnresolved = true + shr := hs.state.CloneVT() + hs.broadCastToClients(shr) + hs.state.RealtimeStats.TxUnresolved = false +} diff --git a/go/vt/vttablet/tabletserver/query_executor_test.go b/go/vt/vttablet/tabletserver/query_executor_test.go index c4f3ed1b00c..771d9e3479d 100644 --- a/go/vt/vttablet/tabletserver/query_executor_test.go +++ b/go/vt/vttablet/tabletserver/query_executor_test.go @@ -1513,7 +1513,6 @@ func newTestTabletServer(ctx context.Context, flags executorFlags, db *fakesqldb } else { cfg.EnableOnlineDDL = true } - cfg.TwoPCCoordinatorAddress = "fake" if flags&shortTwopcAge > 0 { cfg.TwoPCAbandonAge = 0.5 } else { @@ -1704,10 +1703,10 @@ func addQueryExecutorSupportedQueries(db *fakesqldb.DB) { mysql.ShowPrimaryRow("msg", "id"), }, }, - "begin": {}, - "commit": {}, - "rollback": {}, - fmt.Sprintf(sqlReadAllRedo, "_vt", "_vt"): {}, + "begin": {}, + "commit": {}, + "rollback": {}, + fmt.Sprintf(readAllRedo, "_vt", "_vt"): {}, } sidecardb.AddSchemaInitQueries(db, true, sqlparser.NewTestParser()) diff --git a/go/vt/vttablet/tabletserver/tabletenv/config.go b/go/vt/vttablet/tabletserver/tabletenv/config.go index cf2947f55aa..158f40d5202 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config.go @@ -157,7 +157,6 @@ func registerTabletEnvFlags(fs *pflag.FlagSet) { fs.BoolVar(¤tConfig.TrackSchemaVersions, "track_schema_versions", false, "When enabled, vttablet will store versions of schemas at each position that a DDL is applied and allow retrieval of the schema corresponding to a position") fs.Int64Var(¤tConfig.SchemaVersionMaxAgeSeconds, "schema-version-max-age-seconds", 0, "max age of schema version records to kept in memory by the vreplication historian") fs.BoolVar(¤tConfig.TwoPCEnable, "twopc_enable", defaultConfig.TwoPCEnable, "if the flag is on, 2pc is enabled. Other 2pc flags must be supplied.") - fs.StringVar(¤tConfig.TwoPCCoordinatorAddress, "twopc_coordinator_address", defaultConfig.TwoPCCoordinatorAddress, "address of the (VTGate) process(es) that will be used to notify of abandoned transactions.") SecondsVar(fs, ¤tConfig.TwoPCAbandonAge, "twopc_abandon_age", defaultConfig.TwoPCAbandonAge, "time in seconds. Any unresolved transaction older than this time will be sent to the coordinator to be resolved.") // Tx throttler config flagutil.DualFormatBoolVar(fs, ¤tConfig.EnableTxThrottler, "enable_tx_throttler", defaultConfig.EnableTxThrottler, "If true replication-lag-based throttling on transactions will be enabled.") @@ -332,13 +331,12 @@ type TabletConfig struct { ExternalConnections map[string]*dbconfigs.DBConfigs `json:"externalConnections,omitempty"` - SanitizeLogMessages bool `json:"-"` - StrictTableACL bool `json:"-"` - EnableTableACLDryRun bool `json:"-"` - TableACLExemptACL string `json:"-"` - TwoPCEnable bool `json:"-"` - TwoPCCoordinatorAddress string `json:"-"` - TwoPCAbandonAge Seconds `json:"-"` + SanitizeLogMessages bool `json:"-"` + StrictTableACL bool `json:"-"` + EnableTableACLDryRun bool `json:"-"` + TableACLExemptACL string `json:"-"` + TwoPCEnable bool `json:"-"` + TwoPCAbandonAge Seconds `json:"-"` EnableTxThrottler bool `json:"-"` TxThrottlerConfig *TxThrottlerConfigFlag `json:"-"` diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 06558b96145..8a6d1a0be39 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -181,7 +181,7 @@ func NewTabletServer(ctx context.Context, env *vtenv.Environment, name string, c tsv.watcher = NewBinlogWatcher(tsv, tsv.vstreamer, tsv.config) tsv.qe = NewQueryEngine(tsv, tsv.se) tsv.txThrottler = txthrottler.NewTxThrottler(tsv, topoServer) - tsv.te = NewTxEngine(tsv) + tsv.te = NewTxEngine(tsv, tsv.hs.sendUnresolvedTransactionSignal) tsv.messager = messager.NewEngine(tsv, tsv.se, tsv.vstreamer) tsv.tableGC = gc.NewTableGC(tsv, topoServer, tsv.lagThrottler) diff --git a/go/vt/vttablet/tabletserver/tabletserver_test.go b/go/vt/vttablet/tabletserver/tabletserver_test.go index 563ab5e84b3..7ffd201c0a4 100644 --- a/go/vt/vttablet/tabletserver/tabletserver_test.go +++ b/go/vt/vttablet/tabletserver/tabletserver_test.go @@ -2745,10 +2745,10 @@ func addTabletServerSupportedQueries(db *fakesqldb.DB) { Type: sqltypes.Int64, }}, }, - "begin": {}, - "commit": {}, - "rollback": {}, - fmt.Sprintf(sqlReadAllRedo, "_vt", "_vt"): {}, + "begin": {}, + "commit": {}, + "rollback": {}, + fmt.Sprintf(readAllRedo, "_vt", "_vt"): {}, } parser := sqlparser.NewTestParser() sidecardb.AddSchemaInitQueries(db, true, parser) diff --git a/go/vt/vttablet/tabletserver/twopc.go b/go/vt/vttablet/tabletserver/twopc.go index ad652d43135..fff6d4b0cd8 100644 --- a/go/vt/vttablet/tabletserver/twopc.go +++ b/go/vt/vttablet/tabletserver/twopc.go @@ -47,21 +47,27 @@ const ( // DTStateRollback represents the ROLLBACK state for dt_state. DTStateRollback = querypb.TransactionState_ROLLBACK - sqlReadAllRedo = `select t.dtid, t.state, t.time_created, s.statement + readAllRedo = `select t.dtid, t.state, t.time_created, s.statement from %s.redo_state t join %s.redo_statement s on t.dtid = s.dtid order by t.dtid, s.id` - sqlReadAllTransactions = `select t.dtid, t.state, t.time_created, p.keyspace, p.shard + readAllTransactions = `select t.dtid, t.state, t.time_created, p.keyspace, p.shard from %s.dt_state t join %s.dt_participant p on t.dtid = p.dtid order by t.dtid, p.id` - sqlReadAllUnresolvedTransactions = `select t.dtid, t.state, p.keyspace, p.shard + // Ordering by state in descending order to retrieve COMMIT, ROLLBACK, PREPARE in that sequence. + // Resolving COMMIT first is crucial because we need to address transactions where a commit decision has already been made but remains unresolved. + // For transactions with a commit decision, applications are already aware of the outcome and are waiting for the resolution. + // By addressing these first, we ensure atomic commits and improve user experience. For other transactions, the decision is typically to rollback. + readUnresolvedTransactions = `select t.dtid, t.state, p.keyspace, p.shard from %s.dt_state t join %s.dt_participant p on t.dtid = p.dtid where time_created < %a - order by t.dtid, p.id` + order by t.state desc, t.dtid` + + countUnresolvedTransactions = `select count(*) from %s.dt_state where time_created < %a` ) // TwoPC performs 2PC metadata management (MM) functions. @@ -83,9 +89,9 @@ type TwoPC struct { deleteParticipants *sqlparser.ParsedQuery readTransaction *sqlparser.ParsedQuery readParticipants *sqlparser.ParsedQuery - readAbandoned *sqlparser.ParsedQuery readUnresolvedTransactions *sqlparser.ParsedQuery readAllTransactions string + countUnresolvedTransaction *sqlparser.ParsedQuery } // NewTwoPC creates a TwoPC variable. @@ -111,7 +117,7 @@ func (tpc *TwoPC) initializeQueries() { tpc.deleteRedoStmt = sqlparser.BuildParsedQuery( "delete from %s.redo_statement where dtid = %a", dbname, ":dtid") - tpc.readAllRedo = fmt.Sprintf(sqlReadAllRedo, dbname, dbname) + tpc.readAllRedo = fmt.Sprintf(readAllRedo, dbname, dbname) tpc.countUnresolvedRedo = sqlparser.BuildParsedQuery( "select count(*) from %s.redo_state where time_created < %a", dbname, ":time_created") @@ -137,12 +143,11 @@ func (tpc *TwoPC) initializeQueries() { tpc.readParticipants = sqlparser.BuildParsedQuery( "select keyspace, shard from %s.dt_participant where dtid = %a", dbname, ":dtid") - tpc.readAbandoned = sqlparser.BuildParsedQuery( - "select dtid, time_created from %s.dt_state where time_created < %a", - dbname, ":time_created") - tpc.readAllTransactions = fmt.Sprintf(sqlReadAllTransactions, dbname, dbname) - tpc.readUnresolvedTransactions = sqlparser.BuildParsedQuery(sqlReadAllUnresolvedTransactions, + tpc.readAllTransactions = fmt.Sprintf(readAllTransactions, dbname, dbname) + tpc.readUnresolvedTransactions = sqlparser.BuildParsedQuery(readUnresolvedTransactions, dbname, dbname, ":time_created") + tpc.countUnresolvedTransaction = sqlparser.BuildParsedQuery(countUnresolvedTransactions, + dbname, ":time_created") } // Open starts the TwoPC service. @@ -261,7 +266,7 @@ func (tpc *TwoPC) ReadAllRedo(ctx context.Context) (prepared, failed []*tx.Prepa return prepared, failed, nil } -// CountUnresolvedRedo returns the number of prepared transactions that are still unresolved. +// CountUnresolvedRedo returns the number of prepared transaction recovery log that are older than the supplied time. func (tpc *TwoPC) CountUnresolvedRedo(ctx context.Context, unresolvedTime time.Time) (int64, error) { conn, err := tpc.readPool.Get(ctx, nil) if err != nil { @@ -276,9 +281,7 @@ func (tpc *TwoPC) CountUnresolvedRedo(ctx context.Context, unresolvedTime time.T if err != nil { return 0, err } - if len(qr.Rows) < 1 { - return 0, nil - } + // executed query is a scalar aggregation, so we can safely assume that the result is a single row. v, _ := qr.Rows[0][0].ToCastInt64() return v, nil } @@ -371,7 +374,7 @@ func (tpc *TwoPC) ReadTransaction(ctx context.Context, dtid string) (*querypb.Tr return nil, vterrors.Wrapf(err, "error parsing state for dtid %s", dtid) } result.State = querypb.TransactionState(st) - if result.State < querypb.TransactionState_PREPARE || result.State > querypb.TransactionState_ROLLBACK { + if result.State < querypb.TransactionState_PREPARE || result.State > querypb.TransactionState_COMMIT { return nil, fmt.Errorf("unexpected state for dtid %s: %v", dtid, result.State) } // A failure in time parsing will show up as a very old time, @@ -395,33 +398,6 @@ func (tpc *TwoPC) ReadTransaction(ctx context.Context, dtid string) (*querypb.Tr return result, nil } -// ReadAbandoned returns the list of abandoned transactions -// and their associated start time. -func (tpc *TwoPC) ReadAbandoned(ctx context.Context, abandonTime time.Time) (map[string]time.Time, error) { - conn, err := tpc.readPool.Get(ctx, nil) - if err != nil { - return nil, err - } - defer conn.Recycle() - - bindVars := map[string]*querypb.BindVariable{ - "time_created": sqltypes.Int64BindVariable(abandonTime.UnixNano()), - } - qr, err := tpc.read(ctx, conn.Conn, tpc.readAbandoned, bindVars) - if err != nil { - return nil, err - } - txs := make(map[string]time.Time, len(qr.Rows)) - for _, row := range qr.Rows { - t, err := row[1].ToCastInt64() - if err != nil { - return nil, err - } - txs[row[0].ToString()] = time.Unix(0, t) - } - return txs, nil -} - // ReadAllTransactions returns info about all distributed transactions. func (tpc *TwoPC) ReadAllTransactions(ctx context.Context) ([]*tx.DistributedTx, error) { conn, err := tpc.readPool.Get(ctx, nil) @@ -451,7 +427,7 @@ func (tpc *TwoPC) ReadAllTransactions(ctx context.Context) ([]*tx.DistributedTx, log.Errorf("Error parsing state for dtid %s: %v.", dtid, err) } protostate := querypb.TransactionState(st) - if protostate < querypb.TransactionState_UNKNOWN || protostate > querypb.TransactionState_ROLLBACK { + if protostate < querypb.TransactionState_PREPARE || protostate > querypb.TransactionState_COMMIT { log.Errorf("Unexpected state for dtid %s: %v.", dtid, protostate) } curTx = &tx.DistributedTx{ @@ -549,3 +525,23 @@ func (tpc *TwoPC) UnresolvedTransactions(ctx context.Context, abandonTime time.T return txs, nil } + +// CountUnresolvedTransaction returns the number of transaction record that are older than the given time. +func (tpc *TwoPC) CountUnresolvedTransaction(ctx context.Context, unresolvedTime time.Time) (int64, error) { + conn, err := tpc.readPool.Get(ctx, nil) + if err != nil { + return 0, err + } + defer conn.Recycle() + + bindVars := map[string]*querypb.BindVariable{ + "time_created": sqltypes.Int64BindVariable(unresolvedTime.UnixNano()), + } + qr, err := tpc.read(ctx, conn.Conn, tpc.countUnresolvedTransaction, bindVars) + if err != nil { + return 0, err + } + // executed query is a scalar aggregation, so we can safely assume that the result is a single row. + v, _ := qr.Rows[0][0].ToCastInt64() + return v, nil +} diff --git a/go/vt/vttablet/tabletserver/twopc_test.go b/go/vt/vttablet/tabletserver/twopc_test.go index af67f644830..f0fa77e0ff8 100644 --- a/go/vt/vttablet/tabletserver/twopc_test.go +++ b/go/vt/vttablet/tabletserver/twopc_test.go @@ -437,10 +437,10 @@ func TestUnresolvedTransactions(t *testing.T) { unresolvedTx: sqltypes.MakeTestResult( sqltypes.MakeTestFields("dtid|state|keyspace|shard", "VARBINARY|INT64|VARCHAR|VARCHAR"), - "dtid0|2|ks01|shard01", - "dtid0|2|ks01|shard02", - "dtid1|3|ks02|shard03", - "dtid1|3|ks01|shard02"), + "dtid0|3|ks01|shard01", + "dtid0|3|ks01|shard02", + "dtid1|2|ks02|shard03", + "dtid1|2|ks01|shard02"), expectedTx: []*querypb.TransactionMetadata{{ Dtid: "dtid0", State: querypb.TransactionState_COMMIT, diff --git a/go/vt/vttablet/tabletserver/tx_engine.go b/go/vt/vttablet/tabletserver/tx_engine.go index 3161f3b88c1..57c6ff1fd64 100644 --- a/go/vt/vttablet/tabletserver/tx_engine.go +++ b/go/vt/vttablet/tabletserver/tx_engine.go @@ -32,7 +32,6 @@ import ( vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/vtgateconn" "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" @@ -89,10 +88,11 @@ type TxEngine struct { preparedPool *TxPreparedPool twoPC *TwoPC twoPCReady sync.WaitGroup + dxNotify func() } // NewTxEngine creates a new TxEngine. -func NewTxEngine(env tabletenv.Env) *TxEngine { +func NewTxEngine(env tabletenv.Env, dxNotifier func()) *TxEngine { config := env.Config() te := &TxEngine{ env: env, @@ -103,16 +103,11 @@ func NewTxEngine(env tabletenv.Env) *TxEngine { te.txPool = NewTxPool(env, limiter) te.twopcEnabled = config.TwoPCEnable if te.twopcEnabled { - if config.TwoPCCoordinatorAddress == "" { - log.Error("Coordinator address not specified: Disabling 2PC") - te.twopcEnabled = false - } if config.TwoPCAbandonAge <= 0 { log.Error("2PC abandon age not specified: Disabling 2PC") te.twopcEnabled = false } } - te.coordinatorAddress = config.TwoPCCoordinatorAddress te.abandonAge = config.TwoPCAbandonAge.Get() te.ticks = timer.NewTimer(te.abandonAge / 2) @@ -127,6 +122,7 @@ func NewTxEngine(env tabletenv.Env) *TxEngine { IdleTimeout: env.Config().TxPool.IdleTimeout, }) te.twoPC = NewTwoPC(readPool) + te.dxNotify = dxNotifier te.state = NotServing return te } @@ -180,7 +176,7 @@ func (te *TxEngine) transition(state txEngineState) { te.env.Stats().InternalErrors.Add("TwopcResurrection", 1) log.Errorf("Could not prepare transactions: %v", err) } - te.startWatchdog() + te.startTransactionWatcher() }() } } @@ -311,7 +307,7 @@ func (te *TxEngine) shutdownLocked() { // Shut down functions are idempotent. // No need to check if 2pc is enabled. log.Infof("TxEngine - stop watchdog") - te.stopWatchdog() + te.stopTransactionWatcher() poolEmpty := make(chan bool) rollbackDone := make(chan bool) @@ -452,58 +448,37 @@ func (te *TxEngine) rollbackPrepared() { } } -// startWatchdog starts the watchdog goroutine, which looks for abandoned +// startTransactionWatcher starts the watchdog goroutine, which looks for abandoned // transactions and calls the notifier on them. -func (te *TxEngine) startWatchdog() { +func (te *TxEngine) startTransactionWatcher() { te.ticks.Start(func() { ctx, cancel := context.WithTimeout(tabletenv.LocalContext(), te.abandonAge/4) defer cancel() // Raise alerts on prepares that have been unresolved for too long. - // Use 5x abandonAge to give opportunity for watchdog to resolve these. + // Use 5x abandonAge to give opportunity for transaction coordinator to resolve these redo logs. count, err := te.twoPC.CountUnresolvedRedo(ctx, time.Now().Add(-te.abandonAge*5)) if err != nil { - te.env.Stats().InternalErrors.Add("WatchdogFail", 1) - log.Errorf("Error reading unresolved prepares: '%v': %v", te.coordinatorAddress, err) + te.env.Stats().InternalErrors.Add("RedoWatcherFail", 1) + log.Errorf("Error reading prepared transactions: %v", err) } te.env.Stats().Unresolved.Set("Prepares", count) - // Resolve lingering distributed transactions. - txs, err := te.twoPC.ReadAbandoned(ctx, time.Now().Add(-te.abandonAge)) - if err != nil { - te.env.Stats().InternalErrors.Add("WatchdogFail", 1) - log.Errorf("Error reading transactions for 2pc watchdog: %v", err) - return - } - if len(txs) == 0 { - return - } - - coordConn, err := vtgateconn.Dial(ctx, te.coordinatorAddress) + // Notify lingering distributed transactions. + count, err = te.twoPC.CountUnresolvedTransaction(ctx, time.Now().Add(-te.abandonAge)) if err != nil { - te.env.Stats().InternalErrors.Add("WatchdogFail", 1) - log.Errorf("Error connecting to coordinator '%v': %v", te.coordinatorAddress, err) + te.env.Stats().InternalErrors.Add("TransactionWatcherFail", 1) + log.Errorf("Error reading unresolved transactions: %v", err) return } - defer coordConn.Close() - - var wg sync.WaitGroup - for tx := range txs { - wg.Add(1) - go func(dtid string) { - defer wg.Done() - if err := coordConn.ResolveTransaction(ctx, dtid); err != nil { - te.env.Stats().InternalErrors.Add("WatchdogFail", 1) - log.Errorf("Error notifying for dtid %s: %v", dtid, err) - } - }(tx) + if count > 0 { + te.dxNotify() } - wg.Wait() }) } -// stopWatchdog stops the watchdog goroutine. -func (te *TxEngine) stopWatchdog() { +// stopTransactionWatcher stops the watchdog goroutine. +func (te *TxEngine) stopTransactionWatcher() { te.ticks.Stop() } diff --git a/go/vt/vttablet/tabletserver/tx_engine_test.go b/go/vt/vttablet/tabletserver/tx_engine_test.go index 3c3a8a4eb4f..95057d754fb 100644 --- a/go/vt/vttablet/tabletserver/tx_engine_test.go +++ b/go/vt/vttablet/tabletserver/tx_engine_test.go @@ -49,7 +49,7 @@ func TestTxEngineClose(t *testing.T) { cfg.TxPool.Size = 10 cfg.Oltp.TxTimeout = 100 * time.Millisecond cfg.GracePeriods.Shutdown = 0 - te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest")) + te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest"), nil) // Normal close. te.AcceptReadWrite() @@ -152,7 +152,7 @@ func TestTxEngineBegin(t *testing.T) { db.AddQueryPattern(".*", &sqltypes.Result{}) cfg := tabletenv.NewDefaultConfig() cfg.DB = newDBConfigs(db) - te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest")) + te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest"), nil) for _, exec := range []func() (int64, string, error){ func() (int64, string, error) { @@ -198,7 +198,7 @@ func TestTxEngineRenewFails(t *testing.T) { db.AddQueryPattern(".*", &sqltypes.Result{}) cfg := tabletenv.NewDefaultConfig() cfg.DB = newDBConfigs(db) - te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest")) + te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest"), nil) te.AcceptReadOnly() options := &querypb.ExecuteOptions{} connID, _, err := te.ReserveBegin(ctx, options, nil, nil) @@ -536,7 +536,7 @@ func setupTxEngine(db *fakesqldb.DB) *TxEngine { cfg.TxPool.Size = 10 cfg.Oltp.TxTimeout = 100 * time.Millisecond cfg.GracePeriods.Shutdown = 0 - te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest")) + te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest"), nil) return te } @@ -568,7 +568,7 @@ func TestTxEngineFailReserve(t *testing.T) { db.AddQueryPattern(".*", &sqltypes.Result{}) cfg := tabletenv.NewDefaultConfig() cfg.DB = newDBConfigs(db) - te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest")) + te := NewTxEngine(tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TabletServerTest"), nil) options := &querypb.ExecuteOptions{} _, err := te.Reserve(ctx, options, 0, nil) diff --git a/proto/query.proto b/proto/query.proto index 8af243f0ef9..99bef7780ac 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -898,6 +898,8 @@ message RealtimeStats { // udfs_changed is used to signal that the UDFs have changed on the tablet. bool udfs_changed = 9; + + bool tx_unresolved = 10; } // AggregateStats contains information about the health of a group of @@ -986,8 +988,8 @@ message StreamHealthResponse { enum TransactionState { UNKNOWN = 0; PREPARE = 1; - COMMIT = 2; - ROLLBACK = 3; + ROLLBACK = 2; + COMMIT = 3; } // TransactionMetadata contains the metadata for a distributed transaction. diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 6598523835c..f347f0f33c8 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -42594,6 +42594,9 @@ export namespace query { /** RealtimeStats udfs_changed */ udfs_changed?: (boolean|null); + + /** RealtimeStats tx_unresolved */ + tx_unresolved?: (boolean|null); } /** Represents a RealtimeStats. */ @@ -42632,6 +42635,9 @@ export namespace query { /** RealtimeStats udfs_changed. */ public udfs_changed: boolean; + /** RealtimeStats tx_unresolved. */ + public tx_unresolved: boolean; + /** * Creates a new RealtimeStats instance using the specified properties. * @param [properties] Properties to set @@ -42950,8 +42956,8 @@ export namespace query { enum TransactionState { UNKNOWN = 0, PREPARE = 1, - COMMIT = 2, - ROLLBACK = 3 + ROLLBACK = 2, + COMMIT = 3 } /** Properties of a TransactionMetadata. */ diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 997c7c1f08b..7cf7fdc61b1 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -103280,6 +103280,7 @@ export const query = $root.query = (() => { * @property {Array.|null} [table_schema_changed] RealtimeStats table_schema_changed * @property {Array.|null} [view_schema_changed] RealtimeStats view_schema_changed * @property {boolean|null} [udfs_changed] RealtimeStats udfs_changed + * @property {boolean|null} [tx_unresolved] RealtimeStats tx_unresolved */ /** @@ -103371,6 +103372,14 @@ export const query = $root.query = (() => { */ RealtimeStats.prototype.udfs_changed = false; + /** + * RealtimeStats tx_unresolved. + * @member {boolean} tx_unresolved + * @memberof query.RealtimeStats + * @instance + */ + RealtimeStats.prototype.tx_unresolved = false; + /** * Creates a new RealtimeStats instance using the specified properties. * @function create @@ -103415,6 +103424,8 @@ export const query = $root.query = (() => { writer.uint32(/* id 8, wireType 2 =*/66).string(message.view_schema_changed[i]); if (message.udfs_changed != null && Object.hasOwnProperty.call(message, "udfs_changed")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.udfs_changed); + if (message.tx_unresolved != null && Object.hasOwnProperty.call(message, "tx_unresolved")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.tx_unresolved); return writer; }; @@ -103489,6 +103500,10 @@ export const query = $root.query = (() => { message.udfs_changed = reader.bool(); break; } + case 10: { + message.tx_unresolved = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -103559,6 +103574,9 @@ export const query = $root.query = (() => { if (message.udfs_changed != null && message.hasOwnProperty("udfs_changed")) if (typeof message.udfs_changed !== "boolean") return "udfs_changed: boolean expected"; + if (message.tx_unresolved != null && message.hasOwnProperty("tx_unresolved")) + if (typeof message.tx_unresolved !== "boolean") + return "tx_unresolved: boolean expected"; return null; }; @@ -103609,6 +103627,8 @@ export const query = $root.query = (() => { } if (object.udfs_changed != null) message.udfs_changed = Boolean(object.udfs_changed); + if (object.tx_unresolved != null) + message.tx_unresolved = Boolean(object.tx_unresolved); return message; }; @@ -103641,6 +103661,7 @@ export const query = $root.query = (() => { object.cpu_usage = 0; object.qps = 0; object.udfs_changed = false; + object.tx_unresolved = false; } if (message.health_error != null && message.hasOwnProperty("health_error")) object.health_error = message.health_error; @@ -103669,6 +103690,8 @@ export const query = $root.query = (() => { } if (message.udfs_changed != null && message.hasOwnProperty("udfs_changed")) object.udfs_changed = message.udfs_changed; + if (message.tx_unresolved != null && message.hasOwnProperty("tx_unresolved")) + object.tx_unresolved = message.tx_unresolved; return object; }; @@ -104305,15 +104328,15 @@ export const query = $root.query = (() => { * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} PREPARE=1 PREPARE value - * @property {number} COMMIT=2 COMMIT value - * @property {number} ROLLBACK=3 ROLLBACK value + * @property {number} ROLLBACK=2 ROLLBACK value + * @property {number} COMMIT=3 COMMIT value */ query.TransactionState = (function() { const valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "PREPARE"] = 1; - values[valuesById[2] = "COMMIT"] = 2; - values[valuesById[3] = "ROLLBACK"] = 3; + values[valuesById[2] = "ROLLBACK"] = 2; + values[valuesById[3] = "COMMIT"] = 3; return values; })(); @@ -104554,11 +104577,11 @@ export const query = $root.query = (() => { case 1: message.state = 1; break; - case "COMMIT": + case "ROLLBACK": case 2: message.state = 2; break; - case "ROLLBACK": + case "COMMIT": case 3: message.state = 3; break; From 7c30816f2e09be9fc21b10beb8b17a11be148898 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Wed, 17 Jul 2024 20:57:16 +0300 Subject: [PATCH 51/55] VReplication: disable use of `session_track_gtids` (#16424) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/vttablet/tabletserver/vstreamer/snapshot_conn.go | 9 +-------- go/vt/vttablet/tabletserver/vstreamer/tablestreamer.go | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/go/vt/vttablet/tabletserver/vstreamer/snapshot_conn.go b/go/vt/vttablet/tabletserver/vstreamer/snapshot_conn.go index bf49ca46618..f3eda83bd45 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/snapshot_conn.go +++ b/go/vt/vttablet/tabletserver/vstreamer/snapshot_conn.go @@ -88,14 +88,7 @@ func (conn *snapshotConn) streamWithSnapshot(ctx context.Context, table, query s query, err) } - _, err = conn.ExecuteFetch("set session session_track_gtids = START_GTID", 1, false) - if err != nil { - // session_track_gtids = START_GTID unsupported or cannot execute. Resort to LOCK-based snapshot - gtid, err = conn.startSnapshot(ctx, table) - } else { - // session_track_gtids = START_GTID supported. Get a transaction with consistent GTID without LOCKing tables. - gtid, err = conn.startSnapshotWithConsistentGTID(ctx) - } + gtid, err = conn.startSnapshot(ctx, table) if err != nil { return "", rotatedLog, err } diff --git a/go/vt/vttablet/tabletserver/vstreamer/tablestreamer.go b/go/vt/vttablet/tabletserver/vstreamer/tablestreamer.go index 80f850dae2e..d3bbd136f12 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/tablestreamer.go +++ b/go/vt/vttablet/tabletserver/vstreamer/tablestreamer.go @@ -95,14 +95,7 @@ func (ts *tableStreamer) Stream() error { defer conn.Close() ts.snapshotConn = conn - _, err = conn.ExecuteFetch("set session session_track_gtids = START_GTID", 1, false) - if err != nil { - // session_track_gtids = START_GTID unsupported or cannot execute. Resort to LOCK-based snapshot - ts.gtid, err = conn.startSnapshotAllTables(ts.ctx) - } else { - // session_track_gtids = START_GTID supported. Get a transaction with consistent GTID without LOCKing tables. - ts.gtid, err = conn.startSnapshotWithConsistentGTID(ts.ctx) - } + ts.gtid, err = conn.startSnapshotAllTables(ts.ctx) if err != nil { return err } From 77822752f3d84896e30f2db9b40dfbbe19eb0de8 Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:04:32 -0600 Subject: [PATCH 52/55] Deprecate vttablet metrics `QueryCacheXX` and rename to `TabletQueryPlanCacheXX` (#16289) Signed-off-by: Florent Poinsard --- changelog/21.0/21.0.0/summary.md | 15 +++++++ config/tablet/default.yaml | 1 - doc/design-docs/TabletServerParamsAsYAML.md | 1 - go/vt/vttablet/endtoend/config_test.go | 8 ++-- go/vt/vttablet/endtoend/misc_test.go | 2 +- go/vt/vttablet/tabletserver/debugenv.go | 3 +- go/vt/vttablet/tabletserver/query_engine.go | 44 ++++++++++++++++--- .../tabletserver/query_engine_test.go | 20 ++++++--- 8 files changed, 73 insertions(+), 21 deletions(-) diff --git a/changelog/21.0/21.0.0/summary.md b/changelog/21.0/21.0.0/summary.md index b1ae99eb3cf..0d046ae9d75 100644 --- a/changelog/21.0/21.0.0/summary.md +++ b/changelog/21.0/21.0.0/summary.md @@ -7,6 +7,7 @@ - **[Deprecations and Deletions](#deprecations-and-deletions)** - [Deletion of deprecated metrics](#metric-deletion) - [VTTablet Flags](#vttablet-flags) + - [Metrics](#deprecations-metrics) - **[Traffic Mirroring](#traffic-mirroring)** - **[New VTGate Shutdown Behavior](#new-vtgate-shutdown-behavior)** - **[Tablet Throttler: Multi-Metric support](#tablet-throttler)** @@ -40,6 +41,20 @@ The following metrics that were deprecated in the previous release, have now bee - `queryserver-enable-settings-pool` flag, added in v15, has been on by default since v17. It is now deprecated and will be removed in a future release. +#### Metrics + +The following metrics are now deprecated, if provided please use their replacement. + +| Component | Metric Name | Replaced By | +|------------|:---------------------:|:-------------------------------:| +| `vttablet` | `QueryCacheLength` | `QueryEnginePlanCacheLength` | +| `vttablet` | `QueryCacheSize` | `QueryEnginePlanCacheSize` | +| `vttablet` | `QueryCacheCapacity` | `QueryEnginePlanCacheCapacity` | +| `vttablet` | `QueryCacheEvictions` | `QueryEnginePlanCacheEvictions` | +| `vttablet` | `QueryCacheHits` | `QueryEnginePlanCacheHits` | +| `vttablet` | `QueryCacheMisses` | `QueryEnginePlanCacheMisses` | + + ### Traffic Mirroring Traffic mirroring is intended to help reduce some of the uncertainty inherent to `MoveTables SwitchTraffic`. When traffic mirroring is enabled, VTGate will mirror a percentage of traffic from one keyspace to another. diff --git a/config/tablet/default.yaml b/config/tablet/default.yaml index ec9d1f94833..d0e4eca477b 100644 --- a/config/tablet/default.yaml +++ b/config/tablet/default.yaml @@ -99,7 +99,6 @@ hotRowProtection: consolidator: enable|disable|notOnPrimary # enable-consolidator, enable-consolidator-replicas passthroughDML: false # queryserver-config-passthrough-dmls streamBufferSize: 32768 # queryserver-config-stream-buffer-size -queryCacheSize: 5000 # queryserver-config-query-cache-size schemaReloadIntervalSeconds: 1800 # queryserver-config-schema-reload-time watchReplication: false # watch_replication_stream terseErrors: false # queryserver-config-terse-errors diff --git a/doc/design-docs/TabletServerParamsAsYAML.md b/doc/design-docs/TabletServerParamsAsYAML.md index 52d48a5e6f6..e14712f4ff8 100644 --- a/doc/design-docs/TabletServerParamsAsYAML.md +++ b/doc/design-docs/TabletServerParamsAsYAML.md @@ -126,7 +126,6 @@ heartbeatIntervalMilliseconds: 0 # heartbeat_enable, heartbeat_interval shutdownGracePeriodSeconds: 0 # transaction_shutdown_grace_period passthroughDML: false # queryserver-config-passthrough-dmls streamBufferSize: 32768 # queryserver-config-stream-buffer-size -queryCacheSize: 5000 # queryserver-config-query-cache-size schemaReloadIntervalSeconds: 1800 # queryserver-config-schema-reload-time watchReplication: false # watch_replication_stream terseErrors: false # queryserver-config-terse-errors diff --git a/go/vt/vttablet/endtoend/config_test.go b/go/vt/vttablet/endtoend/config_test.go index b1dc7f5dcb9..3902113f354 100644 --- a/go/vt/vttablet/endtoend/config_test.go +++ b/go/vt/vttablet/endtoend/config_test.go @@ -192,7 +192,7 @@ func TestConsolidatorReplicasOnly(t *testing.T) { } } -func TestQueryPlanCache(t *testing.T) { +func TestQueryEnginePlanCacheSize(t *testing.T) { var cachedPlanSize = int((&tabletserver.TabletPlan{}).CachedSize(true)) // sleep to avoid race between SchemaChanged event clearing out the plans cache which breaks this test @@ -211,19 +211,19 @@ func TestQueryPlanCache(t *testing.T) { assert.Equal(t, 1, framework.Server.QueryPlanCacheLen()) vend := framework.DebugVars() - assert.GreaterOrEqual(t, framework.FetchInt(vend, "QueryCacheSize"), cachedPlanSize) + assert.GreaterOrEqual(t, framework.FetchInt(vend, "QueryEnginePlanCacheSize"), cachedPlanSize) _, _ = client.Execute("select * from vitess_test where intval=:ival2", bindVars) require.Equal(t, 2, framework.Server.QueryPlanCacheLen()) vend = framework.DebugVars() - assert.GreaterOrEqual(t, framework.FetchInt(vend, "QueryCacheSize"), 2*cachedPlanSize) + assert.GreaterOrEqual(t, framework.FetchInt(vend, "QueryEnginePlanCacheSize"), 2*cachedPlanSize) _, _ = client.Execute("select * from vitess_test where intval=1", bindVars) require.Equal(t, 3, framework.Server.QueryPlanCacheLen()) vend = framework.DebugVars() - assert.GreaterOrEqual(t, framework.FetchInt(vend, "QueryCacheSize"), 3*cachedPlanSize) + assert.GreaterOrEqual(t, framework.FetchInt(vend, "QueryEnginePlanCacheSize"), 3*cachedPlanSize) } func TestMaxResultSize(t *testing.T) { diff --git a/go/vt/vttablet/endtoend/misc_test.go b/go/vt/vttablet/endtoend/misc_test.go index 768399572db..29bbba56873 100644 --- a/go/vt/vttablet/endtoend/misc_test.go +++ b/go/vt/vttablet/endtoend/misc_test.go @@ -198,7 +198,7 @@ func TestTrailingComment(t *testing.T) { } v2 := framework.Server.QueryPlanCacheLen() if v2 != v1+1 { - t.Errorf("QueryCacheLength(%s): %d, want %d", query, v2, v1+1) + t.Errorf("QueryEnginePlanCacheLength(%s): %d, want %d", query, v2, v1+1) } } } diff --git a/go/vt/vttablet/tabletserver/debugenv.go b/go/vt/vttablet/tabletserver/debugenv.go index 924d5acbebb..54cf09db7d6 100644 --- a/go/vt/vttablet/tabletserver/debugenv.go +++ b/go/vt/vttablet/tabletserver/debugenv.go @@ -152,7 +152,8 @@ func debugEnvHandler(tsv *TabletServer, w http.ResponseWriter, r *http.Request) vars = addVar(vars, "PoolSize", tsv.PoolSize) vars = addVar(vars, "StreamPoolSize", tsv.StreamPoolSize) vars = addVar(vars, "TxPoolSize", tsv.TxPoolSize) - vars = addVar(vars, "QueryCacheCapacity", tsv.QueryPlanCacheCap) + vars = addVar(vars, "QueryCacheCapacity", tsv.QueryPlanCacheCap) // QueryCacheCapacity is deprecated in v21, it is replaced by QueryEnginePlanCacheCapacity + vars = addVar(vars, "QueryEnginePlanCacheCapacity", tsv.QueryPlanCacheCap) vars = addVar(vars, "MaxResultSize", tsv.MaxResultSize) vars = addVar(vars, "WarnResultSize", tsv.WarnResultSize) vars = addVar(vars, "RowStreamerMaxInnoDBTrxHistLen", func() int64 { return tsv.Config().RowStreamer.MaxInnoDBTrxHistLen }) diff --git a/go/vt/vttablet/tabletserver/query_engine.go b/go/vt/vttablet/tabletserver/query_engine.go index f8245ac8e2f..d0542165878 100644 --- a/go/vt/vttablet/tabletserver/query_engine.go +++ b/go/vt/vttablet/tabletserver/query_engine.go @@ -188,7 +188,8 @@ type QueryEngine struct { // stats // Note: queryErrorCountsWithCode is similar to queryErrorCounts except it contains error code as an additional dimension queryCounts, queryCountsWithTabletType, queryTimes, queryErrorCounts, queryErrorCountsWithCode, queryRowsAffected, queryRowsReturned, queryTextCharsProcessed *stats.CountersWithMultiLabels - queryCacheHits, queryCacheMisses *stats.CounterFunc + queryEnginePlanCacheHits, queryEnginePlanCacheMisses *stats.CounterFunc + queryCacheHitsDeprecated, queryCacheMissesDeprecated *stats.CounterFunc // stats flags enablePerWorkloadTableMetrics bool @@ -269,22 +270,51 @@ func NewQueryEngine(env tabletenv.Env, se *schema.Engine) *QueryEngine { env.Exporter().NewGaugeFunc("StreamBufferSize", "Query engine stream buffer size", qe.streamBufferSize.Load) env.Exporter().NewCounterFunc("TableACLExemptCount", "Query engine table ACL exempt count", qe.tableaclExemptCount.Load) - env.Exporter().NewGaugeFunc("QueryCacheLength", "Query engine query plan cache length", func() int64 { + // QueryCacheLength is deprecated in v21 and will be removed in >=v22. This metric is replaced by QueryEnginePlanCacheLength. + env.Exporter().NewGaugeFunc("QueryCacheLength", "Query engine query plan cache length (deprecated: please use QueryEnginePlanCacheLength)", func() int64 { return int64(qe.plans.Len()) }) - env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query plan cache size", func() int64 { + env.Exporter().NewGaugeFunc("QueryEnginePlanCacheLength", "Query engine query plan cache length", func() int64 { + return int64(qe.plans.Len()) + }) + + // QueryCacheSize is deprecated in v21 and will be removed in >=v22. This metric is replaced QueryEnginePlanCacheSize. + env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query plan cache size (deprecated: please use QueryEnginePlanCacheSize)", func() int64 { + return int64(qe.plans.UsedCapacity()) + }) + env.Exporter().NewGaugeFunc("QueryEnginePlanCacheSize", "Query engine query plan cache size", func() int64 { return int64(qe.plans.UsedCapacity()) }) - env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query plan cache capacity", func() int64 { + + // QueryCacheCapacity is deprecated in v21 and will be removed in >=v22. This metric is replaced by QueryEnginePlanCacheCapacity. + env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query plan cache capacity (deprecated: please use QueryEnginePlanCacheCapacity)", func() int64 { + return int64(qe.plans.MaxCapacity()) + }) + env.Exporter().NewGaugeFunc("QueryEnginePlanCacheCapacity", "Query engine query plan cache capacity", func() int64 { return int64(qe.plans.MaxCapacity()) }) - env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query plan cache evictions", func() int64 { + + // QueryCacheEvictions is deprecated in v21 and will be removed in >=v22. This metric is replaced by QueryEnginePlanCacheEvictions. + env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query plan cache evictions (deprecated: please use QueryEnginePlanCacheEvictions)", func() int64 { return qe.plans.Metrics.Evicted() }) - qe.queryCacheHits = env.Exporter().NewCounterFunc("QueryCacheHits", "Query engine query plan cache hits", func() int64 { + env.Exporter().NewCounterFunc("QueryEnginePlanCacheEvictions", "Query engine query plan cache evictions", func() int64 { + return qe.plans.Metrics.Evicted() + }) + + // QueryCacheHits is deprecated in v21 and will be removed in >=v22. This metric is replaced by QueryEnginePlanCacheHits. + qe.queryCacheHitsDeprecated = env.Exporter().NewCounterFunc("QueryCacheHits", "Query engine query plan cache hits (deprecated: please use QueryEnginePlanCacheHits)", func() int64 { + return qe.plans.Metrics.Hits() + }) + qe.queryEnginePlanCacheHits = env.Exporter().NewCounterFunc("QueryEnginePlanCacheHits", "Query engine query plan cache hits", func() int64 { return qe.plans.Metrics.Hits() }) - qe.queryCacheMisses = env.Exporter().NewCounterFunc("QueryCacheMisses", "Query engine query plan cache misses", func() int64 { + + // QueryCacheMisses is deprecated in v21 and will be removed in >=v22. This metric is replaced by QueryEnginePlanCacheMisses. + qe.queryCacheMissesDeprecated = env.Exporter().NewCounterFunc("QueryCacheMisses", "Query engine query plan cache misses (deprecated: please use QueryEnginePlanCacheMisses)", func() int64 { + return qe.plans.Metrics.Misses() + }) + qe.queryEnginePlanCacheMisses = env.Exporter().NewCounterFunc("QueryEnginePlanCacheMisses", "Query engine query plan cache misses", func() int64 { return qe.plans.Metrics.Misses() }) diff --git a/go/vt/vttablet/tabletserver/query_engine_test.go b/go/vt/vttablet/tabletserver/query_engine_test.go index 199dc0cf334..a1c293ea8ba 100644 --- a/go/vt/vttablet/tabletserver/query_engine_test.go +++ b/go/vt/vttablet/tabletserver/query_engine_test.go @@ -197,8 +197,10 @@ func TestQueryPlanCache(t *testing.T) { ctx := context.Background() logStats := tabletenv.NewLogStats(ctx, "GetPlanStats") - initialHits := qe.queryCacheHits.Get() - initialMisses := qe.queryCacheMisses.Get() + initialHits := qe.queryEnginePlanCacheHits.Get() + initialMisses := qe.queryEnginePlanCacheMisses.Get() + initialHitsDeprecated := qe.queryCacheHitsDeprecated.Get() + initialMissesDeprecated := qe.queryCacheMissesDeprecated.Get() firstPlan, err := qe.GetPlan(ctx, logStats, firstQuery, false) require.NoError(t, err) @@ -206,8 +208,11 @@ func TestQueryPlanCache(t *testing.T) { assertPlanCacheSize(t, qe, 1) - require.Equal(t, int64(0), qe.queryCacheHits.Get()-initialHits) - require.Equal(t, int64(1), qe.queryCacheMisses.Get()-initialMisses) + require.Equal(t, int64(0), qe.queryEnginePlanCacheHits.Get()-initialHits) + require.Equal(t, int64(1), qe.queryEnginePlanCacheMisses.Get()-initialMisses) + + require.Equal(t, int64(0), qe.queryCacheHitsDeprecated.Get()-initialHitsDeprecated) + require.Equal(t, int64(1), qe.queryCacheMissesDeprecated.Get()-initialMissesDeprecated) secondPlan, err := qe.GetPlan(ctx, logStats, firstQuery, false) require.NoError(t, err) @@ -215,8 +220,11 @@ func TestQueryPlanCache(t *testing.T) { assertPlanCacheSize(t, qe, 1) - require.Equal(t, int64(1), qe.queryCacheHits.Get()-initialHits) - require.Equal(t, int64(1), qe.queryCacheMisses.Get()-initialMisses) + require.Equal(t, int64(1), qe.queryEnginePlanCacheHits.Get()-initialHits) + require.Equal(t, int64(1), qe.queryEnginePlanCacheMisses.Get()-initialMisses) + + require.Equal(t, int64(1), qe.queryCacheHitsDeprecated.Get()-initialHitsDeprecated) + require.Equal(t, int64(1), qe.queryCacheMissesDeprecated.Get()-initialMissesDeprecated) qe.ClearQueryPlanCache() } From b1620481df197d50110ce37c70e9a7c51b5fd0cc Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 18 Jul 2024 00:47:02 +0200 Subject: [PATCH 53/55] `txthrottler`: move `ThrottlerInterface` to `go/vt/throttler`, use `slices` pkg, add stats (#16248) Signed-off-by: Tim Vaillancourt --- go/vt/throttler/demo/throttler_demo.go | 4 +- go/vt/throttler/manager.go | 10 +- go/vt/throttler/manager_test.go | 2 +- go/vt/throttler/max_replication_lag_module.go | 20 ++-- go/vt/throttler/result.go | 24 ++-- go/vt/throttler/result_test.go | 20 ++-- go/vt/throttler/throttler.go | 56 ++++++---- go/vt/throttler/throttler_test.go | 12 +- go/vt/throttler/throttlerlogz.go | 2 +- go/vt/throttler/throttlerlogz_test.go | 6 +- .../txthrottler/mock_throttler_test.go | 103 ++++++++++-------- .../tabletserver/txthrottler/tx_throttler.go | 28 +---- .../txthrottler/tx_throttler_test.go | 11 +- 13 files changed, 161 insertions(+), 137 deletions(-) diff --git a/go/vt/throttler/demo/throttler_demo.go b/go/vt/throttler/demo/throttler_demo.go index cd2a4e11307..032b1fae3ca 100644 --- a/go/vt/throttler/demo/throttler_demo.go +++ b/go/vt/throttler/demo/throttler_demo.go @@ -103,7 +103,7 @@ type replica struct { // throttler is used to enforce the maximum rate at which replica applies // transactions. It must not be confused with the client's throttler. - throttler *throttler.Throttler + throttler throttler.Throttler lastHealthUpdate time.Time lagUpdateInterval time.Duration @@ -226,7 +226,7 @@ type client struct { primary *primary healthCheck discovery.HealthCheck - throttler *throttler.Throttler + throttler throttler.Throttler stopChan chan struct{} wg sync.WaitGroup diff --git a/go/vt/throttler/manager.go b/go/vt/throttler/manager.go index c2ee9f0a652..ee142190f75 100644 --- a/go/vt/throttler/manager.go +++ b/go/vt/throttler/manager.go @@ -64,16 +64,16 @@ type managerImpl struct { // mu guards all fields in this group. mu sync.Mutex // throttlers tracks all running throttlers (by their name). - throttlers map[string]*Throttler + throttlers map[string]Throttler } func newManager() *managerImpl { return &managerImpl{ - throttlers: make(map[string]*Throttler), + throttlers: make(map[string]Throttler), } } -func (m *managerImpl) registerThrottler(name string, throttler *Throttler) error { +func (m *managerImpl) registerThrottler(name string, throttler Throttler) error { m.mu.Lock() defer m.mu.Unlock() @@ -207,7 +207,7 @@ func (m *managerImpl) throttlerNamesLocked() []string { // log returns the most recent changes of the MaxReplicationLag module. // There will be one result for each processed replication lag record. -func (m *managerImpl) log(throttlerName string) ([]result, error) { +func (m *managerImpl) log(throttlerName string) ([]Result, error) { m.mu.Lock() defer m.mu.Unlock() @@ -216,5 +216,5 @@ func (m *managerImpl) log(throttlerName string) ([]result, error) { return nil, fmt.Errorf("throttler: %v does not exist", throttlerName) } - return t.log(), nil + return t.Log(), nil } diff --git a/go/vt/throttler/manager_test.go b/go/vt/throttler/manager_test.go index 3d61d4d6b68..21b6ba2e67d 100644 --- a/go/vt/throttler/manager_test.go +++ b/go/vt/throttler/manager_test.go @@ -37,7 +37,7 @@ var ( type managerTestFixture struct { m *managerImpl - t1, t2 *Throttler + t1, t2 Throttler } func (f *managerTestFixture) setUp() error { diff --git a/go/vt/throttler/max_replication_lag_module.go b/go/vt/throttler/max_replication_lag_module.go index ac184fe7be8..6f86a50400f 100644 --- a/go/vt/throttler/max_replication_lag_module.go +++ b/go/vt/throttler/max_replication_lag_module.go @@ -313,7 +313,7 @@ func (m *MaxReplicationLagModule) recalculateRate(lagRecordNow replicationLagRec m.memory.ageBadRate(now) - r := result{ + r := Result{ Now: now, RateChange: unchangedRate, lastRateChange: m.lastRateChange, @@ -446,7 +446,7 @@ func stateGreater(a, b state) bool { // and we should not skip the current replica ("lagRecordNow"). // Even if it's the same replica we may skip it and return false because // we want to wait longer for the propagation of the current rate change. -func (m *MaxReplicationLagModule) isReplicaUnderTest(r *result, now time.Time, testedState state, lagRecordNow replicationLagRecord) bool { +func (m *MaxReplicationLagModule) isReplicaUnderTest(r *Result, now time.Time, testedState state, lagRecordNow replicationLagRecord) bool { if m.replicaUnderTest == nil { return true } @@ -472,7 +472,7 @@ func (m *MaxReplicationLagModule) isReplicaUnderTest(r *result, now time.Time, t return true } -func (m *MaxReplicationLagModule) increaseRate(r *result, now time.Time, lagRecordNow replicationLagRecord) { +func (m *MaxReplicationLagModule) increaseRate(r *Result, now time.Time, lagRecordNow replicationLagRecord) { m.markCurrentRateAsBadOrGood(r, now, stateIncreaseRate, unknown) oldRate := m.rate.Load() @@ -560,7 +560,7 @@ func (m *MaxReplicationLagModule) minTestDurationUntilNextIncrease(increase floa return minDuration } -func (m *MaxReplicationLagModule) decreaseAndGuessRate(r *result, now time.Time, lagRecordNow replicationLagRecord) { +func (m *MaxReplicationLagModule) decreaseAndGuessRate(r *Result, now time.Time, lagRecordNow replicationLagRecord) { // Guess replication rate based on the difference in the replication lag of this // particular replica. lagRecordBefore := m.lagCache(lagRecordNow).atOrAfter(discovery.TabletToMapKey(lagRecordNow.Tablet), m.lastRateChange) @@ -631,7 +631,7 @@ func (m *MaxReplicationLagModule) decreaseAndGuessRate(r *result, now time.Time, // guessReplicationRate guesses the actual replication rate based on the new bac // Note that "lagDifference" can be positive (lag increased) or negative (lag // decreased). -func (m *MaxReplicationLagModule) guessReplicationRate(r *result, avgPrimaryRate float64, lagBefore, lagNow int64, lagDifference, d time.Duration) (int64, string) { +func (m *MaxReplicationLagModule) guessReplicationRate(r *Result, avgPrimaryRate float64, lagBefore, lagNow int64, lagDifference, d time.Duration) (int64, string) { // avgReplicationRate is the average rate (per second) at which the replica // applied transactions from the replication stream. We infer the value // from the relative change in the replication lag. @@ -676,14 +676,14 @@ func (m *MaxReplicationLagModule) guessReplicationRate(r *result, avgPrimaryRate return int64(newRate), reason } -func (m *MaxReplicationLagModule) emergency(r *result, now time.Time, lagRecordNow replicationLagRecord) { +func (m *MaxReplicationLagModule) emergency(r *Result, now time.Time, lagRecordNow replicationLagRecord) { m.markCurrentRateAsBadOrGood(r, now, stateEmergency, unknown) decreaseReason := fmt.Sprintf("replication lag went beyond max: %d > %d", lagRecordNow.lag(), m.config.MaxReplicationLagSec) m.decreaseRateByPercentage(r, now, lagRecordNow, stateEmergency, m.config.EmergencyDecrease, decreaseReason) } -func (m *MaxReplicationLagModule) decreaseRateByPercentage(r *result, now time.Time, lagRecordNow replicationLagRecord, newState state, decrease float64, decreaseReason string) { +func (m *MaxReplicationLagModule) decreaseRateByPercentage(r *Result, now time.Time, lagRecordNow replicationLagRecord, newState state, decrease float64, decreaseReason string) { oldRate := m.rate.Load() rate := int64(float64(oldRate) - float64(oldRate)*decrease) if rate == 0 { @@ -695,7 +695,7 @@ func (m *MaxReplicationLagModule) decreaseRateByPercentage(r *result, now time.T m.updateRate(r, newState, rate, reason, now, lagRecordNow, m.config.MinDurationBetweenDecreases()) } -func (m *MaxReplicationLagModule) updateRate(r *result, newState state, rate int64, reason string, now time.Time, lagRecordNow replicationLagRecord, testDuration time.Duration) { +func (m *MaxReplicationLagModule) updateRate(r *Result, newState state, rate int64, reason string, now time.Time, lagRecordNow replicationLagRecord, testDuration time.Duration) { oldRate := m.rate.Load() m.currentState = newState @@ -723,7 +723,7 @@ func (m *MaxReplicationLagModule) updateRate(r *result, newState state, rate int // markCurrentRateAsBadOrGood determines the actual rate between the last rate // change and "now" and determines if that rate was bad or good. -func (m *MaxReplicationLagModule) markCurrentRateAsBadOrGood(r *result, now time.Time, newState state, replicationLagChange replicationLagChange) { +func (m *MaxReplicationLagModule) markCurrentRateAsBadOrGood(r *Result, now time.Time, newState state, replicationLagChange replicationLagChange) { if m.lastRateChange.IsZero() { // Module was just started. We don't have any data points yet. r.GoodOrBad = ignoredRate @@ -797,6 +797,6 @@ func (m *MaxReplicationLagModule) markCurrentRateAsBadOrGood(r *result, now time } } -func (m *MaxReplicationLagModule) log() []result { +func (m *MaxReplicationLagModule) log() []Result { return m.results.latestValues() } diff --git a/go/vt/throttler/result.go b/go/vt/throttler/result.go index 0976a180877..bd7a86b3b18 100644 --- a/go/vt/throttler/result.go +++ b/go/vt/throttler/result.go @@ -50,10 +50,10 @@ state (old/tested/new): {{.OldState}}/{{.TestedState}}/{{.NewState}} lag before: {{.LagBefore}} ({{.AgeOfBeforeLag}} ago) rates (primary/replica): {{.PrimaryRate}}/{{.GuessedReplicationRate}} backlog (old/new): {{.GuessedReplicationBacklogOld}}/{{.GuessedReplicationBacklogNew}} reason: {{.Reason}}`)) -// result is generated by the MaxReplicationLag module for each processed +// Result is generated by the MaxReplicationLag module for each processed // "replicationLagRecord". // It captures the details and the decision of the processing. -type result struct { +type Result struct { Now time.Time RateChange rateChange lastRateChange time.Time @@ -80,7 +80,7 @@ type result struct { GuessedReplicationBacklogNew int } -func (r result) String() string { +func (r Result) String() string { var b strings.Builder if err := resultStringTemplate.Execute(&b, r); err != nil { panic(fmt.Sprintf("failed to Execute() template: %v", err)) @@ -88,25 +88,25 @@ func (r result) String() string { return b.String() } -func (r result) Alias() string { +func (r Result) Alias() string { return topoproto.TabletAliasString(r.LagRecordNow.Tablet.Alias) } -func (r result) TimeSinceLastRateChange() string { +func (r Result) TimeSinceLastRateChange() string { if r.lastRateChange.IsZero() { return "n/a" } return fmt.Sprintf("%.1fs", r.Now.Sub(r.lastRateChange).Seconds()) } -func (r result) LagBefore() string { +func (r Result) LagBefore() string { if r.LagRecordBefore.isZero() { return "n/a" } return fmt.Sprintf("%ds", r.LagRecordBefore.Stats.ReplicationLagSeconds) } -func (r result) AgeOfBeforeLag() string { +func (r Result) AgeOfBeforeLag() string { if r.LagRecordBefore.isZero() { return "n/a" } @@ -123,18 +123,18 @@ type resultRing struct { // started reusing entries. wrapped bool // values is the underlying ring buffer. - values []result + values []Result } // newResultRing creates a new resultRing. func newResultRing(capacity int) *resultRing { return &resultRing{ - values: make([]result, capacity), + values: make([]Result, capacity), } } // add inserts a new result into the ring buffer. -func (rr *resultRing) add(r result) { +func (rr *resultRing) add(r Result) { rr.mu.Lock() defer rr.mu.Unlock() @@ -148,7 +148,7 @@ func (rr *resultRing) add(r result) { // latestValues returns all values of the buffer. Entries are sorted in reverse // chronological order i.e. newer items come first. -func (rr *resultRing) latestValues() []result { +func (rr *resultRing) latestValues() []Result { rr.mu.Lock() defer rr.mu.Unlock() @@ -162,7 +162,7 @@ func (rr *resultRing) latestValues() []result { count = rr.position } - results := make([]result, count) + results := make([]Result, count) for i := 0; i < count; i++ { pos := start - i if pos < 0 { diff --git a/go/vt/throttler/result_test.go b/go/vt/throttler/result_test.go index 8cc5357ef7b..8bab6d9296a 100644 --- a/go/vt/throttler/result_test.go +++ b/go/vt/throttler/result_test.go @@ -24,7 +24,7 @@ import ( ) var ( - resultIncreased = result{ + resultIncreased = Result{ Now: sinceZero(1234 * time.Millisecond), RateChange: increasedRate, lastRateChange: sinceZero(1 * time.Millisecond), @@ -46,7 +46,7 @@ var ( GuessedReplicationBacklogOld: 0, GuessedReplicationBacklogNew: 0, } - resultDecreased = result{ + resultDecreased = Result{ Now: sinceZero(5000 * time.Millisecond), RateChange: decreasedRate, lastRateChange: sinceZero(1234 * time.Millisecond), @@ -68,7 +68,7 @@ var ( GuessedReplicationBacklogOld: 10, GuessedReplicationBacklogNew: 20, } - resultEmergency = result{ + resultEmergency = Result{ Now: sinceZero(10123 * time.Millisecond), RateChange: decreasedRate, lastRateChange: sinceZero(5000 * time.Millisecond), @@ -94,7 +94,7 @@ var ( func TestResultString(t *testing.T) { testcases := []struct { - r result + r Result want string }{ { @@ -134,24 +134,24 @@ reason: emergency state decreased the rate`, func TestResultRing(t *testing.T) { // Test data. - r1 := result{Reason: "r1"} - r2 := result{Reason: "r2"} - r3 := result{Reason: "r3"} + r1 := Result{Reason: "r1"} + r2 := Result{Reason: "r2"} + r3 := Result{Reason: "r3"} rr := newResultRing(2) // Use the ring partially. rr.add(r1) - got, want := rr.latestValues(), []result{r1} + got, want := rr.latestValues(), []Result{r1} require.Equal(t, want, got, "items not correctly added to resultRing") // Use it fully. rr.add(r2) - got, want = rr.latestValues(), []result{r2, r1} + got, want = rr.latestValues(), []Result{r2, r1} require.Equal(t, want, got, "items not correctly added to resultRing") // Let it wrap. rr.add(r3) - got, want = rr.latestValues(), []result{r3, r2} + got, want = rr.latestValues(), []Result{r3, r2} require.Equal(t, want, got, "resultRing did not wrap correctly") } diff --git a/go/vt/throttler/throttler.go b/go/vt/throttler/throttler.go index 909888bd0d4..a12d8f241a2 100644 --- a/go/vt/throttler/throttler.go +++ b/go/vt/throttler/throttler.go @@ -38,6 +38,7 @@ import ( "vitess.io/vitess/go/vt/proto/topodata" throttlerdatapb "vitess.io/vitess/go/vt/proto/throttlerdata" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) const ( @@ -66,7 +67,22 @@ const ( InvalidMaxReplicationLag = -1 ) -// Throttler provides a client-side, thread-aware throttler. +// Throttler defines the throttler interface. +type Throttler interface { + Throttle(threadID int) time.Duration + ThreadFinished(threadID int) + Close() + MaxRate() int64 + SetMaxRate(rate int64) + RecordReplicationLag(time time.Time, th *discovery.TabletHealth) + GetConfiguration() *throttlerdatapb.Configuration + UpdateConfiguration(configuration *throttlerdatapb.Configuration, copyZeroValues bool) error + ResetConfiguration() + MaxLag(tabletType topodatapb.TabletType) uint32 + Log() []Result +} + +// ThrottlerImpl implements a client-side, thread-aware throttler. // See the package doc for more information. // // Calls of Throttle() and ThreadFinished() take threadID as parameter which is @@ -74,7 +90,7 @@ const ( // NOTE: Trottle() and ThreadFinished() assume that *per thread* calls to them // // are serialized and must not happen concurrently. -type Throttler struct { +type ThrottlerImpl struct { // name describes the Throttler instance and is used e.g. in the webinterface. name string // unit describes the entity the throttler is limiting e.g. "queries" or @@ -127,15 +143,15 @@ type Throttler struct { // unit refers to the type of entity you want to throttle e.g. "queries" or // "transactions". // name describes the Throttler instance and will be used by the webinterface. -func NewThrottler(name, unit string, threadCount int, maxRate, maxReplicationLag int64) (*Throttler, error) { +func NewThrottler(name, unit string, threadCount int, maxRate, maxReplicationLag int64) (Throttler, error) { return newThrottler(GlobalManager, name, unit, threadCount, maxRate, maxReplicationLag, time.Now) } -func NewThrottlerFromConfig(name, unit string, threadCount int, maxRateModuleMaxRate int64, maxReplicationLagModuleConfig MaxReplicationLagModuleConfig, nowFunc func() time.Time) (*Throttler, error) { +func NewThrottlerFromConfig(name, unit string, threadCount int, maxRateModuleMaxRate int64, maxReplicationLagModuleConfig MaxReplicationLagModuleConfig, nowFunc func() time.Time) (Throttler, error) { return newThrottlerFromConfig(GlobalManager, name, unit, threadCount, maxRateModuleMaxRate, maxReplicationLagModuleConfig, nowFunc) } -func newThrottler(manager *managerImpl, name, unit string, threadCount int, maxRate, maxReplicationLag int64, nowFunc func() time.Time) (*Throttler, error) { +func newThrottler(manager *managerImpl, name, unit string, threadCount int, maxRate, maxReplicationLag int64, nowFunc func() time.Time) (Throttler, error) { config := NewMaxReplicationLagModuleConfig(maxReplicationLag) config.MaxReplicationLagSec = maxReplicationLag @@ -143,7 +159,7 @@ func newThrottler(manager *managerImpl, name, unit string, threadCount int, maxR } -func newThrottlerFromConfig(manager *managerImpl, name, unit string, threadCount int, maxRateModuleMaxRate int64, maxReplicationLagModuleConfig MaxReplicationLagModuleConfig, nowFunc func() time.Time) (*Throttler, error) { +func newThrottlerFromConfig(manager *managerImpl, name, unit string, threadCount int, maxRateModuleMaxRate int64, maxReplicationLagModuleConfig MaxReplicationLagModuleConfig, nowFunc func() time.Time) (Throttler, error) { err := maxReplicationLagModuleConfig.Verify() if err != nil { return nil, fmt.Errorf("invalid max replication lag config: %w", err) @@ -176,7 +192,7 @@ func newThrottlerFromConfig(manager *managerImpl, name, unit string, threadCount threadThrottlers[i] = newThreadThrottler(i, actualRateHistory) runningThreads[i] = true } - t := &Throttler{ + t := &ThrottlerImpl{ name: name, unit: unit, manager: manager, @@ -215,7 +231,7 @@ func newThrottlerFromConfig(manager *managerImpl, name, unit string, threadCount // the backoff duration elapsed. // The maximum value for the returned backoff is 1 second since the throttler // internally operates on a per-second basis. -func (t *Throttler) Throttle(threadID int) time.Duration { +func (t *ThrottlerImpl) Throttle(threadID int) time.Duration { if t.closed { panic(fmt.Sprintf("BUG: thread with ID: %v must not access closed Throttler", threadID)) } @@ -227,7 +243,7 @@ func (t *Throttler) Throttle(threadID int) time.Duration { // MaxLag returns the max of all the last replication lag values seen across all tablets of // the provided type, excluding ignored tablets. -func (t *Throttler) MaxLag(tabletType topodata.TabletType) uint32 { +func (t *ThrottlerImpl) MaxLag(tabletType topodata.TabletType) uint32 { cache := t.maxReplicationLagModule.lagCacheByType(tabletType) var maxLag uint32 @@ -250,7 +266,7 @@ func (t *Throttler) MaxLag(tabletType topodata.TabletType) uint32 { // ThreadFinished marks threadID as finished and redistributes the thread's // rate allotment across the other threads. // After ThreadFinished() is called, Throttle() must not be called anymore. -func (t *Throttler) ThreadFinished(threadID int) { +func (t *ThrottlerImpl) ThreadFinished(threadID int) { if t.threadFinished[threadID] { panic(fmt.Sprintf("BUG: thread with ID: %v already finished", threadID)) } @@ -265,7 +281,7 @@ func (t *Throttler) ThreadFinished(threadID int) { // Close stops all modules and frees all resources. // When Close() returned, the Throttler object must not be used anymore. -func (t *Throttler) Close() { +func (t *ThrottlerImpl) Close() { for _, m := range t.modules { m.Stop() } @@ -278,7 +294,7 @@ func (t *Throttler) Close() { // threadThrottlers accordingly. // The rate changes when the number of thread changes or a module updated its // max rate. -func (t *Throttler) updateMaxRate() { +func (t *ThrottlerImpl) updateMaxRate() { // Set it to infinite initially. maxRate := int64(math.MaxInt64) @@ -319,39 +335,39 @@ func (t *Throttler) updateMaxRate() { } // MaxRate returns the current rate of the MaxRateModule. -func (t *Throttler) MaxRate() int64 { +func (t *ThrottlerImpl) MaxRate() int64 { return t.maxRateModule.MaxRate() } // SetMaxRate updates the rate of the MaxRateModule. -func (t *Throttler) SetMaxRate(rate int64) { +func (t *ThrottlerImpl) SetMaxRate(rate int64) { t.maxRateModule.SetMaxRate(rate) } // RecordReplicationLag must be called by users to report the "ts" tablet health // data observed at "time". // Note: After Close() is called, this method must not be called anymore. -func (t *Throttler) RecordReplicationLag(time time.Time, th *discovery.TabletHealth) { +func (t *ThrottlerImpl) RecordReplicationLag(time time.Time, th *discovery.TabletHealth) { t.maxReplicationLagModule.RecordReplicationLag(time, th) } // GetConfiguration returns the configuration of the MaxReplicationLag module. -func (t *Throttler) GetConfiguration() *throttlerdatapb.Configuration { +func (t *ThrottlerImpl) GetConfiguration() *throttlerdatapb.Configuration { return t.maxReplicationLagModule.getConfiguration() } // UpdateConfiguration updates the configuration of the MaxReplicationLag module. -func (t *Throttler) UpdateConfiguration(configuration *throttlerdatapb.Configuration, copyZeroValues bool) error { +func (t *ThrottlerImpl) UpdateConfiguration(configuration *throttlerdatapb.Configuration, copyZeroValues bool) error { return t.maxReplicationLagModule.updateConfiguration(configuration, copyZeroValues) } // ResetConfiguration resets the configuration of the MaxReplicationLag module // to its initial settings. -func (t *Throttler) ResetConfiguration() { +func (t *ThrottlerImpl) ResetConfiguration() { t.maxReplicationLagModule.resetConfiguration() } -// log returns the most recent changes of the MaxReplicationLag module. -func (t *Throttler) log() []result { +// Log returns the most recent changes of the MaxReplicationLag module. +func (t *ThrottlerImpl) Log() []Result { return t.maxReplicationLagModule.log() } diff --git a/go/vt/throttler/throttler_test.go b/go/vt/throttler/throttler_test.go index b33bb2ca255..74e8784f021 100644 --- a/go/vt/throttler/throttler_test.go +++ b/go/vt/throttler/throttler_test.go @@ -163,7 +163,7 @@ func sinceZero(sinceZero time.Duration) time.Time { // threadThrottler.newThreadThrottler() for more details. // newThrottlerWithClock should only be used for testing. -func newThrottlerWithClock(name, unit string, threadCount int, maxRate int64, maxReplicationLag int64, nowFunc func() time.Time) (*Throttler, error) { +func newThrottlerWithClock(name, unit string, threadCount int, maxRate int64, maxReplicationLag int64, nowFunc func() time.Time) (Throttler, error) { return newThrottler(GlobalManager, name, unit, threadCount, maxRate, maxReplicationLag, nowFunc) } @@ -264,14 +264,16 @@ func TestThreadFinished(t *testing.T) { // Max rate update to threadThrottlers happens asynchronously. Wait for it. timer := time.NewTimer(2 * time.Second) + throttlerImpl, ok := throttler.(*ThrottlerImpl) + require.True(t, ok) for { - if throttler.threadThrottlers[0].getMaxRate() == 2 { + if throttlerImpl.threadThrottlers[0].getMaxRate() == 2 { timer.Stop() break } select { case <-timer.C: - t.Fatalf("max rate was not propapgated to threadThrottler[0] in time: %v", throttler.threadThrottlers[0].getMaxRate()) + t.Fatalf("max rate was not propapgated to threadThrottler[0] in time: %v", throttlerImpl.threadThrottlers[0].getMaxRate()) default: // Timer not up yet. Try again. } @@ -369,7 +371,9 @@ func TestUpdateMaxRate_AllThreadsFinished(t *testing.T) { throttler.ThreadFinished(1) // Make sure that there's no division by zero error (threadsRunning == 0). - throttler.updateMaxRate() + throttlerImpl, ok := throttler.(*ThrottlerImpl) + require.True(t, ok) + throttlerImpl.updateMaxRate() // We don't care about the Throttler state at this point. } diff --git a/go/vt/throttler/throttlerlogz.go b/go/vt/throttler/throttlerlogz.go index 4023dcd7e68..8cace8ce5c4 100644 --- a/go/vt/throttler/throttlerlogz.go +++ b/go/vt/throttler/throttlerlogz.go @@ -159,7 +159,7 @@ func showThrottlerLog(w http.ResponseWriter, m *managerImpl, name string) { colorLevel = "high" } data := struct { - result + Result ColorLevel string }{r, colorLevel} diff --git a/go/vt/throttler/throttlerlogz_test.go b/go/vt/throttler/throttlerlogz_test.go index 22927f3f201..78151fc750b 100644 --- a/go/vt/throttler/throttlerlogz_test.go +++ b/go/vt/throttler/throttlerlogz_test.go @@ -54,7 +54,7 @@ func TestThrottlerlogzHandler(t *testing.T) { testcases := []struct { desc string - r result + r Result want string }{ { @@ -147,7 +147,9 @@ func TestThrottlerlogzHandler(t *testing.T) { request, _ := http.NewRequest("GET", "/throttlerlogz/t1", nil) response := httptest.NewRecorder() - f.t1.maxReplicationLagModule.results.add(tc.r) + throttler, ok := f.t1.(*ThrottlerImpl) + require.True(t, ok) + throttler.maxReplicationLagModule.results.add(tc.r) throttlerlogzHandler(response, request, f.m) got := response.Body.String() diff --git a/go/vt/vttablet/tabletserver/txthrottler/mock_throttler_test.go b/go/vt/vttablet/tabletserver/txthrottler/mock_throttler_test.go index aeb75d258a3..327a37dc43f 100644 --- a/go/vt/vttablet/tabletserver/txthrottler/mock_throttler_test.go +++ b/go/vt/vttablet/tabletserver/txthrottler/mock_throttler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: vitess.io/vitess/go/vt/vttablet/tabletserver/txthrottler (interfaces: ThrottlerInterface) +// Source: vitess.io/vitess/go/vt/throttler (interfaces: Throttler) // Package txthrottler is a generated GoMock package. package txthrottler @@ -13,45 +13,46 @@ import ( discovery "vitess.io/vitess/go/vt/discovery" throttlerdata "vitess.io/vitess/go/vt/proto/throttlerdata" topodata "vitess.io/vitess/go/vt/proto/topodata" + throttler "vitess.io/vitess/go/vt/throttler" ) -// MockThrottlerInterface is a mock of ThrottlerInterface interface. -type MockThrottlerInterface struct { +// MockThrottler is a mock of Throttler interface. +type MockThrottler struct { ctrl *gomock.Controller - recorder *MockThrottlerInterfaceMockRecorder + recorder *MockThrottlerMockRecorder } -// MockThrottlerInterfaceMockRecorder is the mock recorder for MockThrottlerInterface. -type MockThrottlerInterfaceMockRecorder struct { - mock *MockThrottlerInterface +// MockThrottlerMockRecorder is the mock recorder for MockThrottler. +type MockThrottlerMockRecorder struct { + mock *MockThrottler } -// NewMockThrottlerInterface creates a new mock instance. -func NewMockThrottlerInterface(ctrl *gomock.Controller) *MockThrottlerInterface { - mock := &MockThrottlerInterface{ctrl: ctrl} - mock.recorder = &MockThrottlerInterfaceMockRecorder{mock} +// NewMockThrottler creates a new mock instance. +func NewMockThrottler(ctrl *gomock.Controller) *MockThrottler { + mock := &MockThrottler{ctrl: ctrl} + mock.recorder = &MockThrottlerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockThrottlerInterface) EXPECT() *MockThrottlerInterfaceMockRecorder { +func (m *MockThrottler) EXPECT() *MockThrottlerMockRecorder { return m.recorder } // Close mocks base method. -func (m *MockThrottlerInterface) Close() { +func (m *MockThrottler) Close() { m.ctrl.T.Helper() m.ctrl.Call(m, "Close") } // Close indicates an expected call of Close. -func (mr *MockThrottlerInterfaceMockRecorder) Close() *gomock.Call { +func (mr *MockThrottlerMockRecorder) Close() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockThrottlerInterface)(nil).Close)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockThrottler)(nil).Close)) } // GetConfiguration mocks base method. -func (m *MockThrottlerInterface) GetConfiguration() *throttlerdata.Configuration { +func (m *MockThrottler) GetConfiguration() *throttlerdata.Configuration { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetConfiguration") ret0, _ := ret[0].(*throttlerdata.Configuration) @@ -59,27 +60,41 @@ func (m *MockThrottlerInterface) GetConfiguration() *throttlerdata.Configuration } // GetConfiguration indicates an expected call of GetConfiguration. -func (mr *MockThrottlerInterfaceMockRecorder) GetConfiguration() *gomock.Call { +func (mr *MockThrottlerMockRecorder) GetConfiguration() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfiguration", reflect.TypeOf((*MockThrottlerInterface)(nil).GetConfiguration)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfiguration", reflect.TypeOf((*MockThrottler)(nil).GetConfiguration)) +} + +// Log mocks base method. +func (m *MockThrottler) Log() []throttler.Result { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Log") + ret0, _ := ret[0].([]throttler.Result) + return ret0 +} + +// Log indicates an expected call of Log. +func (mr *MockThrottlerMockRecorder) Log() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Log", reflect.TypeOf((*MockThrottler)(nil).Log)) } // MaxLag mocks base method. -func (m *MockThrottlerInterface) MaxLag(tabletType topodata.TabletType) uint32 { +func (m *MockThrottler) MaxLag(arg0 topodata.TabletType) uint32 { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MaxLag", tabletType) + ret := m.ctrl.Call(m, "MaxLag", arg0) ret0, _ := ret[0].(uint32) return ret0 } -// MaxLag indicates an expected call of LastMaxLagNotIgnoredForTabletType. -func (mr *MockThrottlerInterfaceMockRecorder) MaxLag(tabletType interface{}) *gomock.Call { +// MaxLag indicates an expected call of MaxLag. +func (mr *MockThrottlerMockRecorder) MaxLag(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxLag", reflect.TypeOf((*MockThrottlerInterface)(nil).MaxLag), tabletType) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxLag", reflect.TypeOf((*MockThrottler)(nil).MaxLag), arg0) } // MaxRate mocks base method. -func (m *MockThrottlerInterface) MaxRate() int64 { +func (m *MockThrottler) MaxRate() int64 { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "MaxRate") ret0, _ := ret[0].(int64) @@ -87,61 +102,61 @@ func (m *MockThrottlerInterface) MaxRate() int64 { } // MaxRate indicates an expected call of MaxRate. -func (mr *MockThrottlerInterfaceMockRecorder) MaxRate() *gomock.Call { +func (mr *MockThrottlerMockRecorder) MaxRate() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxRate", reflect.TypeOf((*MockThrottlerInterface)(nil).MaxRate)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxRate", reflect.TypeOf((*MockThrottler)(nil).MaxRate)) } // RecordReplicationLag mocks base method. -func (m *MockThrottlerInterface) RecordReplicationLag(arg0 time.Time, arg1 *discovery.TabletHealth) { +func (m *MockThrottler) RecordReplicationLag(arg0 time.Time, arg1 *discovery.TabletHealth) { m.ctrl.T.Helper() m.ctrl.Call(m, "RecordReplicationLag", arg0, arg1) } // RecordReplicationLag indicates an expected call of RecordReplicationLag. -func (mr *MockThrottlerInterfaceMockRecorder) RecordReplicationLag(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockThrottlerMockRecorder) RecordReplicationLag(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordReplicationLag", reflect.TypeOf((*MockThrottlerInterface)(nil).RecordReplicationLag), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordReplicationLag", reflect.TypeOf((*MockThrottler)(nil).RecordReplicationLag), arg0, arg1) } // ResetConfiguration mocks base method. -func (m *MockThrottlerInterface) ResetConfiguration() { +func (m *MockThrottler) ResetConfiguration() { m.ctrl.T.Helper() m.ctrl.Call(m, "ResetConfiguration") } // ResetConfiguration indicates an expected call of ResetConfiguration. -func (mr *MockThrottlerInterfaceMockRecorder) ResetConfiguration() *gomock.Call { +func (mr *MockThrottlerMockRecorder) ResetConfiguration() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetConfiguration", reflect.TypeOf((*MockThrottlerInterface)(nil).ResetConfiguration)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetConfiguration", reflect.TypeOf((*MockThrottler)(nil).ResetConfiguration)) } // SetMaxRate mocks base method. -func (m *MockThrottlerInterface) SetMaxRate(arg0 int64) { +func (m *MockThrottler) SetMaxRate(arg0 int64) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetMaxRate", arg0) } // SetMaxRate indicates an expected call of SetMaxRate. -func (mr *MockThrottlerInterfaceMockRecorder) SetMaxRate(arg0 interface{}) *gomock.Call { +func (mr *MockThrottlerMockRecorder) SetMaxRate(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxRate", reflect.TypeOf((*MockThrottlerInterface)(nil).SetMaxRate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxRate", reflect.TypeOf((*MockThrottler)(nil).SetMaxRate), arg0) } // ThreadFinished mocks base method. -func (m *MockThrottlerInterface) ThreadFinished(arg0 int) { +func (m *MockThrottler) ThreadFinished(arg0 int) { m.ctrl.T.Helper() m.ctrl.Call(m, "ThreadFinished", arg0) } // ThreadFinished indicates an expected call of ThreadFinished. -func (mr *MockThrottlerInterfaceMockRecorder) ThreadFinished(arg0 interface{}) *gomock.Call { +func (mr *MockThrottlerMockRecorder) ThreadFinished(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ThreadFinished", reflect.TypeOf((*MockThrottlerInterface)(nil).ThreadFinished), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ThreadFinished", reflect.TypeOf((*MockThrottler)(nil).ThreadFinished), arg0) } // Throttle mocks base method. -func (m *MockThrottlerInterface) Throttle(arg0 int) time.Duration { +func (m *MockThrottler) Throttle(arg0 int) time.Duration { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Throttle", arg0) ret0, _ := ret[0].(time.Duration) @@ -149,13 +164,13 @@ func (m *MockThrottlerInterface) Throttle(arg0 int) time.Duration { } // Throttle indicates an expected call of Throttle. -func (mr *MockThrottlerInterfaceMockRecorder) Throttle(arg0 interface{}) *gomock.Call { +func (mr *MockThrottlerMockRecorder) Throttle(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Throttle", reflect.TypeOf((*MockThrottlerInterface)(nil).Throttle), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Throttle", reflect.TypeOf((*MockThrottler)(nil).Throttle), arg0) } // UpdateConfiguration mocks base method. -func (m *MockThrottlerInterface) UpdateConfiguration(arg0 *throttlerdata.Configuration, arg1 bool) error { +func (m *MockThrottler) UpdateConfiguration(arg0 *throttlerdata.Configuration, arg1 bool) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateConfiguration", arg0, arg1) ret0, _ := ret[0].(error) @@ -163,7 +178,7 @@ func (m *MockThrottlerInterface) UpdateConfiguration(arg0 *throttlerdata.Configu } // UpdateConfiguration indicates an expected call of UpdateConfiguration. -func (mr *MockThrottlerInterfaceMockRecorder) UpdateConfiguration(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockThrottlerMockRecorder) UpdateConfiguration(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfiguration", reflect.TypeOf((*MockThrottlerInterface)(nil).UpdateConfiguration), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfiguration", reflect.TypeOf((*MockThrottler)(nil).UpdateConfiguration), arg0, arg1) } diff --git a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go index 7cb774663a4..18fafa8eb96 100644 --- a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go +++ b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go @@ -19,7 +19,7 @@ package txthrottler import ( "context" "math/rand/v2" - "reflect" + "slices" "strings" "sync" "sync/atomic" @@ -34,7 +34,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" querypb "vitess.io/vitess/go/vt/proto/query" - throttlerdatapb "vitess.io/vitess/go/vt/proto/throttlerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -42,7 +41,7 @@ import ( // and go/vt/throttler. These are provided here so that they can be overridden // in tests to generate mocks. type healthCheckFactoryFunc func(topoServer *topo.Server, cell string, cellsToWatch []string) discovery.HealthCheck -type throttlerFactoryFunc func(name, unit string, threadCount int, maxRate int64, maxReplicationLagConfig throttler.MaxReplicationLagModuleConfig) (ThrottlerInterface, error) +type throttlerFactoryFunc func(name, unit string, threadCount int, maxRate int64, maxReplicationLagConfig throttler.MaxReplicationLagModuleConfig) (throttler.Throttler, error) var ( healthCheckFactory healthCheckFactoryFunc @@ -53,7 +52,7 @@ func resetTxThrottlerFactories() { healthCheckFactory = func(topoServer *topo.Server, cell string, cellsToWatch []string) discovery.HealthCheck { return discovery.NewHealthCheck(context.Background(), discovery.DefaultHealthCheckRetryDelay, discovery.DefaultHealthCheckTimeout, topoServer, cell, strings.Join(cellsToWatch, ",")) } - throttlerFactory = func(name, unit string, threadCount int, maxRate int64, maxReplicationLagConfig throttler.MaxReplicationLagModuleConfig) (ThrottlerInterface, error) { + throttlerFactory = func(name, unit string, threadCount int, maxRate int64, maxReplicationLagConfig throttler.MaxReplicationLagModuleConfig) (throttler.Throttler, error) { return throttler.NewThrottlerFromConfig(name, unit, threadCount, maxRate, maxReplicationLagConfig, time.Now) } } @@ -70,21 +69,6 @@ type TxThrottler interface { Throttle(priority int, workload string) (result bool) } -// ThrottlerInterface defines the public interface that is implemented by go/vt/throttler.Throttler -// It is only used here to allow mocking out a throttler object. -type ThrottlerInterface interface { - Throttle(threadID int) time.Duration - ThreadFinished(threadID int) - Close() - MaxRate() int64 - SetMaxRate(rate int64) - RecordReplicationLag(time time.Time, th *discovery.TabletHealth) - GetConfiguration() *throttlerdatapb.Configuration - UpdateConfiguration(configuration *throttlerdatapb.Configuration, copyZeroValues bool) error - ResetConfiguration() - MaxLag(tabletType topodatapb.TabletType) uint32 -} - // TxThrottlerName is the name the wrapped go/vt/throttler object will be registered with // go/vt/throttler.GlobalManager. const TxThrottlerName = "TransactionThrottler" @@ -159,7 +143,7 @@ type txThrottlerStateImpl struct { // throttleMu serializes calls to throttler.Throttler.Throttle(threadId). // That method is required to be called in serial for each threadId. throttleMu sync.Mutex - throttler ThrottlerInterface + throttler throttler.Throttler stopHealthCheck context.CancelFunc healthCheck discovery.HealthCheck @@ -304,6 +288,7 @@ func newTxThrottlerState(txThrottler *txThrottler, config *tabletenv.TabletConfi ctx, cancel := context.WithCancel(context.Background()) state.stopHealthCheck = cancel state.initHealthCheckStream(txThrottler.topoServer, target) + state.healthCheck.RegisterStats() go state.healthChecksProcessor(ctx, txThrottler.topoServer, target) state.waitForTermination.Add(1) go state.updateMaxLag() @@ -314,7 +299,6 @@ func newTxThrottlerState(txThrottler *txThrottler, config *tabletenv.TabletConfi func (ts *txThrottlerStateImpl) initHealthCheckStream(topoServer *topo.Server, target *querypb.Target) { ts.healthCheck = healthCheckFactory(topoServer, target.Cell, ts.healthCheckCells) ts.healthCheckChan = ts.healthCheck.Subscribe() - } func (ts *txThrottlerStateImpl) closeHealthCheckStream() { @@ -330,7 +314,7 @@ func (ts *txThrottlerStateImpl) updateHealthCheckCells(ctx context.Context, topo defer cancel() knownCells := fetchKnownCells(fetchCtx, topoServer, target) - if !reflect.DeepEqual(knownCells, ts.healthCheckCells) { + if !slices.Equal(knownCells, ts.healthCheckCells) { log.Info("txThrottler: restarting healthcheck stream due to topology cells update") ts.healthCheckCells = knownCells ts.closeHealthCheckStream() diff --git a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go index fe352cf96f4..25c855b898b 100644 --- a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go +++ b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go @@ -18,7 +18,7 @@ package txthrottler // Commands to generate the mocks for this test. //go:generate mockgen -destination mock_healthcheck_test.go -package txthrottler -mock_names "HealthCheck=MockHealthCheck" vitess.io/vitess/go/vt/discovery HealthCheck -//go:generate mockgen -destination mock_throttler_test.go -package txthrottler vitess.io/vitess/go/vt/vttablet/tabletserver/txthrottler ThrottlerInterface +//go:generate mockgen -destination mock_throttler_test.go -package txthrottler vitess.io/vitess/go/vt/throttler Throttler import ( "context" @@ -69,14 +69,17 @@ func TestEnabledThrottler(t *testing.T) { mockHealthCheck := NewMockHealthCheck(mockCtrl) hcCall1 := mockHealthCheck.EXPECT().Subscribe() hcCall1.Do(func() {}) - hcCall2 := mockHealthCheck.EXPECT().Close() + hcCall2 := mockHealthCheck.EXPECT().RegisterStats() + hcCall2.Do(func() {}) hcCall2.After(hcCall1) + hcCall3 := mockHealthCheck.EXPECT().Close() + hcCall3.After(hcCall2) healthCheckFactory = func(topoServer *topo.Server, cell string, cellsToWatch []string) discovery.HealthCheck { return mockHealthCheck } - mockThrottler := NewMockThrottlerInterface(mockCtrl) - throttlerFactory = func(name, unit string, threadCount int, maxRate int64, maxReplicationLagConfig throttler.MaxReplicationLagModuleConfig) (ThrottlerInterface, error) { + mockThrottler := NewMockThrottler(mockCtrl) + throttlerFactory = func(name, unit string, threadCount int, maxRate int64, maxReplicationLagConfig throttler.MaxReplicationLagModuleConfig) (throttler.Throttler, error) { assert.Equal(t, 1, threadCount) return mockThrottler, nil } From 96974ef3836e1cc46853b2e9218c5b3841d870e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Thu, 18 Jul 2024 07:28:16 +0200 Subject: [PATCH 54/55] Handle dual queries with LIMIT on the vtgate (#16400) Signed-off-by: Andres Taylor --- go/vt/vtgate/planbuilder/select.go | 19 +++++++++++++++- .../planbuilder/testdata/select_cases.json | 22 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/go/vt/vtgate/planbuilder/select.go b/go/vt/vtgate/planbuilder/select.go index 01dfd8aa387..6927c5315ac 100644 --- a/go/vt/vtgate/planbuilder/select.go +++ b/go/vt/vtgate/planbuilder/select.go @@ -242,11 +242,28 @@ func createSelectOperator(ctx *plancontext.PlanningContext, selStmt sqlparser.Se } func isOnlyDual(sel *sqlparser.Select) bool { - if sel.Where != nil || sel.GroupBy != nil || sel.Having != nil || sel.Limit != nil || sel.OrderBy != nil { + if sel.Where != nil || sel.GroupBy != nil || sel.Having != nil || sel.OrderBy != nil { // we can only deal with queries without any other subclauses - just SELECT and FROM, nothing else is allowed return false } + if sel.Limit != nil { + if sel.Limit.Offset != nil { + return false + } + limit := sel.Limit.Rowcount + switch limit := limit.(type) { + case nil: + case *sqlparser.Literal: + if limit.Val == "0" { + // A limit with any value other than zero can still return a row + return false + } + default: + return false + } + } + if len(sel.From) > 1 { return false } diff --git a/go/vt/vtgate/planbuilder/testdata/select_cases.json b/go/vt/vtgate/planbuilder/testdata/select_cases.json index f1134847deb..6dcd95ff09d 100644 --- a/go/vt/vtgate/planbuilder/testdata/select_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/select_cases.json @@ -2744,6 +2744,28 @@ ] } }, + { + "comment": "Dual query should be handled on the vtgate even with a LIMIT", + "query": "select last_insert_id() limit 1", + "plan": { + "QueryType": "SELECT", + "Original": "select last_insert_id() limit 1", + "Instructions": { + "OperatorType": "Projection", + "Expressions": [ + ":__lastInsertId as last_insert_id()" + ], + "Inputs": [ + { + "OperatorType": "SingleRow" + } + ] + }, + "TablesUsed": [ + "main.dual" + ] + } + }, { "comment": "PullOut subquery with an aggregation that should be typed in the final output", "query": "select (select sum(col) from user) from user_extra", From 8e9d294b68b3be22640008cd3429b954e3443ce9 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:19:27 +0300 Subject: [PATCH 55/55] Support `SHOW VITESS_MIGRATIONS` from inside a transaction (#16399) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- .../scheduler/onlineddl_scheduler_test.go | 5 ++++ go/test/endtoend/onlineddl/vtgate_util.go | 23 +++++++++++++++++++ go/vt/vttablet/tabletserver/query_executor.go | 6 +++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go b/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go index c059f68b8b7..c0541a04aea 100644 --- a/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go +++ b/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go @@ -572,6 +572,11 @@ func testScheduler(t *testing.T) { } }) }) + t.Run("show vitess_migrations in transaction", func(t *testing.T) { + // The function validates there is no error + rs := onlineddl.VtgateExecQueryInTransaction(t, &vtParams, "show vitess_migrations", "") + assert.NotEmpty(t, rs.Rows) + }) forceCutoverCapable, err := capableOf(capabilities.PerformanceSchemaDataLocksTableCapability) // 8.0 require.NoError(t, err) diff --git a/go/test/endtoend/onlineddl/vtgate_util.go b/go/test/endtoend/onlineddl/vtgate_util.go index 2cbdbebc2f3..7252edb8096 100644 --- a/go/test/endtoend/onlineddl/vtgate_util.go +++ b/go/test/endtoend/onlineddl/vtgate_util.go @@ -66,6 +66,29 @@ func VtgateExecQuery(t *testing.T, vtParams *mysql.ConnParams, query string, exp return qr } +// VtgateExecQueryInTransaction runs a query on VTGate using given query params, inside a transaction +func VtgateExecQueryInTransaction(t *testing.T, vtParams *mysql.ConnParams, query string, expectError string) *sqltypes.Result { + t.Helper() + + ctx := context.Background() + conn, err := mysql.Connect(ctx, vtParams) + require.Nil(t, err) + defer conn.Close() + + _, err = conn.ExecuteFetch("begin", -1, true) + require.NoError(t, err) + qr, err := conn.ExecuteFetch(query, -1, true) + if expectError == "" { + require.NoError(t, err) + } else { + require.Error(t, err, "error should not be nil") + assert.Contains(t, err.Error(), expectError, "Unexpected error") + } + _, err = conn.ExecuteFetch("commit", -1, true) + require.NoError(t, err) + return qr +} + // VtgateExecDDL executes a DDL query with given strategy func VtgateExecDDL(t *testing.T, vtParams *mysql.ConnParams, ddlStrategy string, query string, expectError string) *sqltypes.Result { t.Helper() diff --git a/go/vt/vttablet/tabletserver/query_executor.go b/go/vt/vttablet/tabletserver/query_executor.go index 86269050418..9422697f60c 100644 --- a/go/vt/vttablet/tabletserver/query_executor.go +++ b/go/vt/vttablet/tabletserver/query_executor.go @@ -203,7 +203,7 @@ func (qre *QueryExecutor) Execute() (reply *sqltypes.Result, err error) { case p.PlanRevertMigration: return qre.execRevertMigration() case p.PlanShowMigrations: - return qre.execShowMigrations() + return qre.execShowMigrations(nil) case p.PlanShowMigrationLogs: return qre.execShowMigrationLogs() case p.PlanShowThrottledApps: @@ -308,6 +308,8 @@ func (qre *QueryExecutor) txConnExec(conn *StatefulConnection) (*sqltypes.Result return qre.execLoad(conn) case p.PlanCallProc: return qre.execProc(conn) + case p.PlanShowMigrations: + return qre.execShowMigrations(conn) } return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "[BUG] %s unexpected plan type", qre.plan.PlanID.String()) } @@ -958,7 +960,7 @@ func (qre *QueryExecutor) execRevertMigration() (*sqltypes.Result, error) { return qre.tsv.onlineDDLExecutor.SubmitMigration(qre.ctx, qre.plan.FullStmt) } -func (qre *QueryExecutor) execShowMigrations() (*sqltypes.Result, error) { +func (qre *QueryExecutor) execShowMigrations(conn *StatefulConnection) (*sqltypes.Result, error) { if showStmt, ok := qre.plan.FullStmt.(*sqlparser.Show); ok { return qre.tsv.onlineDDLExecutor.ShowMigrations(qre.ctx, showStmt) }