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] Secondary index + main table queries cannot withstand a rolling upgrade from 2.14 to anything 2.16+ #17380

Closed
1 task done
tanujnay112 opened this issue May 17, 2023 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/high High Priority

Comments

@tanujnay112
Copy link
Contributor

tanujnay112 commented May 17, 2023

Jira Link: DB-6567

Description

If we make a configuration of the form:
Node 1 -> 2.14.6.0
Node 2 -> 2.16.2.0+
And execute the following queries from node 2

create table hhh (h int primary key, r int);
create index hhh (h asc);
insert into hhh values (1), (2), (3), (4), (5), (6);
SELECT * FROM hhh WHERE h <= 5;

We get the following error

ERROR:  Query error: ybctid arguments can be batched only

The cause of this is that when the upgraded node does a ybctid batch-fueled request to the old node, it does not populate the ybctid_column_value field as of this commit. This causes us to run into this line on the old node.

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@tanujnay112 tanujnay112 added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels May 17, 2023
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue priority/high High Priority and removed priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage labels May 17, 2023
tanujnay112 added a commit that referenced this issue May 23, 2023
…cans for upgrade compatibility

Summary: `ybctid_column_value` is not set in index scans past 2.14, yet tserver code in 2.14 expect this to be filled in ybctid batch fetches. That causes upgrade issues that this change ameliorates.

Test Plan:
Jenkins

Make a 2.14 cluster with two nodes and load the following table:
```
create table hhh (h int primary key, r int);
create index hhh (h asc);
insert into hhh values (1), (2), (3), (4), (5), (6);
```
Upgrade the second node to 2.16 and launch an index scan from that node to the old node:
```
SELECT * FROM hhh WHERE h <= 5;
```
The query runs to completion and returns results.

Reviewers: mihnea, sergei, amartsinchyk

Reviewed By: amartsinchyk

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D25538
tanujnay112 added a commit that referenced this issue May 23, 2023
…sent in index scans for upgrade compatibility

Summary:
`ybctid_column_value` is not set in index scans past 2.14, yet tserver code in 2.14 expect this to be filled in ybctid batch fetches. That causes upgrade issues that this change ameliorates.
Original commit: 91baa2c / D25538

Test Plan:
Jenkins

Make a 2.14 cluster with two nodes and load the following table:
```
create table hhh (h int primary key, r int);
create index hhh (h asc);
insert into hhh values (1), (2), (3), (4), (5), (6);
```
Upgrade the second node to 2.16 and launch an index scan from that node to the old node:
```
SELECT * FROM hhh WHERE h <= 5;
```
The query runs to completion and returns results.

Reviewers: mihnea, sergei, amartsinchyk

Reviewed By: amartsinchyk

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D25618
tanujnay112 added a commit that referenced this issue May 23, 2023
…sent in index scans for upgrade compatibility

Summary:
`ybctid_column_value` is not set in index scans past 2.14, yet tserver code in 2.14 expect this to be filled in ybctid batch fetches. That causes upgrade issues that this change ameliorates.
Original commit: 91baa2c / D25538

Test Plan:
Jenkins

Make a 2.14 cluster with two nodes and load the following table:
```
create table hhh (h int primary key, r int);
create index hhh (h asc);
insert into hhh values (1), (2), (3), (4), (5), (6);
```
Upgrade the second node to 2.16 and launch an index scan from that node to the old node:
```
SELECT * FROM hhh WHERE h <= 5;
```
The query runs to completion and returns results.

Reviewers: mihnea, sergei, amartsinchyk

Reviewed By: amartsinchyk

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D25617
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/bug This issue is a bug priority/high High Priority
Projects
None yet
Development

No branches or pull requests

2 participants