-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: version gating pkey virtual column validation. #79659
Conversation
Porting this over to master, since we need the same fix to avoid issues for now. At some point the version bump will happen and we can rip this code out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming this is the same as #79609
pkg/workload/schemachange/operation_generator.go, line 1138 at r1 (raw file):
sorry...my nasal congestion probably makes me not thinking clearly. But should we make this check more precise that check column is |
Thanks for picking this up :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @chengxiong-ruan)
pkg/workload/schemachange/operation_generator.go, line 1138 at r1 (raw file):
Previously, chengxiong-ruan (Chengxiong Ruan) wrote…
sorry...my nasal congestion probably makes me not thinking clearly. But should we make this check more precise that check column is
virtual
instead of checkingcomputed
since computed column can be stored. Also should we check the index is primary?
Yes your right, this should be checking for virtual not computed
Fixes: cockroachdb#79329 Previously, the schemachange workload on master was failing because 21.2 does not support virtual columns inside primary keys. So, the mixed version variant of the schemachange workload can fail when a primary key with virtual columns exists, specifically these tables become inaccessible from 21.2 nodes. To address, this patch introduces a version gate to prevent creating prevent creating primary indexes with virtual columns and updates the schemachange workload to detect when this error will be generated in mixed version workloads. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @chengxiong-ruan)
@chengxiong-ruan @postamar TFTR! |
bors r+ |
Build succeeded: |
Fixes: #79329
Previously, the schemachange workload on master was failing
because 21.2 does not support virtual columns inside primary
keys. So, the mixed version variant of the schemachange workload
can fail when a primary key with virtual columns exists, specifically
these tables become inaccessible from 21.2 nodes. To address, this
patch introduces a version gate to prevent creating prevent
creating primary indexes with virtual columns and updates the
schemachange workload to detect when this error will be generated
in mixed version workloads.
Release note: None