Vitess is a database clustering system for horizontal scaling of MySQL.
Перейти к файлу
vitess-bot[bot] 5fe3d63440
[release-15.0] [bugfix] Allow VTExplain to handle shards that are not active during resharding (#11640) (#11652)
* VTexplain topology only uses serving shards

This addresses isse #11632 , which
causes vtexplain to sometimes give bad results if the keyspace is being
resharded, because sometimes it picks source shards and other times target
shards, for routing the query.

The issue is that the `VTExplain.buildTopolog()` adds both source and
destination shards to the map that holds shards per keyspace, when only one of
them is actually serving traffic at any point in time. Later on, vtexplain
loops over this map. Because looping over the map gives a non-deterministic
order, sometimes the results are correct, and sometimes incorrect - that is,
sometimes it gives the result of the shard that is serving, and other times,
the shard that is not serving.

This change ensures that only the serving shards are added to the shards per
keyspace map, thus avoiding the incorrect vtexplain.

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>

* This addresses issue #11632 , which
causes vtexplain to sometimes give bad results if the keyspace is being
resharded, because sometimes it picks source shards and other times target
shards, for routing the query.

The issue is that the VTExplain.buildTopolog() adds both source and
destination shards to the map that holds shards per keyspace, when only one of
them is actually serving traffic at any point in time. Later on, vtexplain
loops over this map. Because looping over the map gives a non-deterministic
order, sometimes the results are correct, and sometimes incorrect - that is,
sometimes it gives the result of the shard that is serving, and other times,
the shard that is not serving.

This change ensures that only the serving shards are added to the shards per
keyspace map, thus avoiding the incorrect vtexplain.

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>

* Fix check_make_vtadmin_authz_testgen

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>

* empty commit to trigger CI

Signed-off-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>
2022-11-10 19:14:21 +01:00
.github
config
data/test
doc [release-15.0] Do not multiply `AggregateRandom` in JOINs (#11672) 2022-11-09 14:18:07 -05:00
docker [release-15.0] Docker Image Context Fix (#11628) (#11637) 2022-11-04 14:20:41 +05:30
examples
go [release-15.0] [bugfix] Allow VTExplain to handle shards that are not active during resharding (#11640) (#11652) 2022-11-10 19:14:21 +01:00
java
misc
proto
resources
support
test
tools
vitess-mixin
web
.codeclimate.yml
.dockerignore
.gitattributes
.gitignore
.gitmodules
.golangci.yml
ADOPTERS.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DCO
Dockerfile
GITHUB_SELF_HOSTED_RUNNERS.md
GOVERNANCE.md
GUIDING_PRINCIPLES.md
LICENSE
MAINTAINERS.md
Makefile
README.md
SECURITY.md
SEVERITY.md
STEERING.md
bootstrap.sh
build.env
dev.env
go.mod
go.sum
sonar-project.properties
test.go

README.md

Maven Central Build Status codebeat badge Go Report Card FOSSA Status CII Best Practices Coverage

Vitess

Vitess is a database clustering system for horizontal scaling of MySQL through generalized sharding.

By encapsulating shard-routing logic, Vitess allows application code and database queries to remain agnostic to the distribution of data onto multiple shards. With Vitess, you can even split and merge shards as your needs grow, with an atomic cutover step that takes only a few seconds.

Vitess has been a core component of YouTube's database infrastructure since 2011, and has grown to encompass tens of thousands of MySQL nodes.

For more about Vitess, please visit vitess.io.

Vitess has a growing community. You can view the list of adopters here.

Reporting a Problem, Issue, or Bug

To report a problem, the best way to get attention is to create a GitHub issue using proper severity level based on this guide.

For topics that are better discussed live, please join the Vitess Slack workspace. You may post any questions on the #general channel or join some of the special-interest channels.

Follow Vitess Blog for low-frequency updates like new features and releases.

Security

Reporting Security Vulnerabilities

To report a security vulnerability, please email vitess-maintainers.

See Security for a full outline of the security process.

Security Audit

A third party security audit was performed by Cure53. You can see the full report here.

License

Unless otherwise noted, the Vitess source files are distributed under the Apache Version 2.0 license found in the LICENSE file.

FOSSA Status