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

[YSQL] Add schema version mismatch error messages #4810

Closed
jaki opened this issue Jun 17, 2020 · 0 comments
Closed

[YSQL] Add schema version mismatch error messages #4810

jaki opened this issue Jun 17, 2020 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/improve-ux Issues relating to improving user experience.
Projects

Comments

@jaki
Copy link
Contributor

jaki commented Jun 17, 2020

Add error messages to table schema version mismatch errors so that they are more understandable when users hit them.

@jaki jaki added kind/improve-ux Issues relating to improving user experience. area/ysql Yugabyte SQL (YSQL) labels Jun 17, 2020
@jaki jaki self-assigned this Jun 17, 2020
@jaki jaki closed this as completed in 5c02686 Jun 17, 2020
@frozenspider frozenspider added this to To do in YSQL via automation Jun 17, 2020
deeps1991 pushed a commit to deeps1991/yugabyte-db that referenced this issue Jul 22, 2020
Summary:

Sometimes in YSQL, one can come across

```
ERROR:  Query error:
```

It is difficult to tell what this means and where it came from.  A stack
trace doesn't help much because it's caught high up at the pggate layer.

An accompanying message would make these error messages more
understandable.

Schema version mismatch errors are one example of this.  Only the YSQL
read path has been fixed to send back an error message through the RPC
response (commit d62b414).  Fix other
such cases, checked below:

- [x] YCQL read (`Tablet::HandleQLReadRequest`)
- [ ] YSQL read (`Tablet::HandlePgsqlReadRequest`)
- [x] YCQL write (`Tablet::KeyValueBatchFromQLWriteBatch`)
- [x] YSQL write (`Tablet::PreparePgsqlWriteOperations`)

Close: yugabyte#4810

Test Plan:

1. Cause a schema version mismatch
1. Check that the error message looks like

   ```
   ERROR:  Query error: schema version mismatch for table 000030a9000030008000000000004000: expected 2, got 1
   ```

Reviewers: dmitry, alex

Reviewed By: alex

Differential Revision: https://phabricator.dev.yugabyte.com/D8694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/improve-ux Issues relating to improving user experience.
Projects
Archived in project
YSQL
  
To do
Development

No branches or pull requests

1 participant