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

Improve ScatterErrorsAsWarnings functionality #8139

Merged
merged 17 commits into from
May 20, 2021

Conversation

harshit-gangal
Copy link
Member

@harshit-gangal harshit-gangal commented May 17, 2021

Description

This PR improves ScatterErrorsAsWarnings by doing three things:

  • Make sure that it works in both OLAP and OLTP mode. It was previously not working in OLAP mode
  • When all shards fail, the query will still fail. ScatterErrorsAsWarnings should only kick in when a single or a few shards fail.
  • Adds better end to end tests to assert that everything works as expected
  • Support SHOW WARNINGS in OLAP mode

Note: this is a breaking change. Queries that failed on all shards were not returning an error earlier, but after this change, scatter errors are turned into warnings only if at least one shard was successful.

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

harshit-gangal and others added 8 commits May 17, 2021 13:51
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay added Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature) labels May 18, 2021
@systay systay marked this pull request as ready for review May 18, 2021 10:15
@systay systay self-requested a review as a code owner May 18, 2021 10:15
@systay systay changed the title Errs as warns Improve ScatterErrorsAsWarnings functionality May 18, 2021
@systay systay requested a review from deepthi May 18, 2021 10:16
harshit-gangal and others added 3 commits May 18, 2021 18:32
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
harshit-gangal and others added 3 commits May 19, 2021 11:29
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@harshit-gangal
Copy link
Member Author

Marked as breaking change. As earlier all the errors coming from executing the plan will be consumed as error, now at least 1 shard should return results then warnings are logged otherwise throws an error.

go/test/endtoend/mysqlserver/mysql_server_test.go Outdated Show resolved Hide resolved
go/test/endtoend/mysqlserver/mysql_server_test.go Outdated Show resolved Hide resolved
go/test/endtoend/mysqlserver/mysql_server_test.go Outdated Show resolved Hide resolved
go/test/endtoend/vtgate/main_test.go Outdated Show resolved Hide resolved
go/vt/vtgate/engine/route.go Outdated Show resolved Hide resolved
go/vt/vtgate/engine/session_primitive.go Outdated Show resolved Hide resolved
go/vt/vtgate/executor_select_test.go Outdated Show resolved Hide resolved
go/vt/vtgate/executor_select_test.go 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 d51a7ee into vitessio:master May 20, 2021
@harshit-gangal harshit-gangal deleted the errs-as-warns branch May 20, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants