Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce query warnings for using features not supported when sharded #7538

Merged
merged 11 commits into from
Mar 22, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented Feb 23, 2021

Description

When a user is using Vitess in unsharded mode, but they know that they will need to shard to scale, enabling this feature will start producing query warnings when a feature is used that is not supported in sharded mode.
By adding the flag -warn_sharded_only=true to the vtgate start parameters, warnings will be produced for these features.

Example:

mysql> call sp_insert();
Query OK, 1 row affected, 1 warning (0.04 sec)

mysql> show warnings;
+---------+------+---------------------------------------------------------------+
| Level   | Code | Message                                                       |
+---------+------+---------------------------------------------------------------+
| Warning | 1235 | use of feature that is only supported in unsharded mode: CALL |
+---------+------+---------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Checklist

  • Tests were added or are not required

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay changed the title Log warnings for queries unsupported in a sharded keyspace Produce query warnings for using features not supported when sharded Mar 9, 2021
@systay systay marked this pull request as ready for review March 9, 2021 08:44
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
go/vt/vtgate/executor.go Show resolved Hide resolved
go/vt/vtgate/vcursor_impl.go Outdated Show resolved Hide resolved
go/vt/vtgate/vcursor_impl.go Outdated Show resolved Hide resolved
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@harshit-gangal harshit-gangal merged commit 9fd81c8 into vitessio:master Mar 22, 2021
@harshit-gangal harshit-gangal deleted the sharded-warnings branch March 22, 2021 07:45
@askdba askdba added this to the v10.0 milestone Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants