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
opt: fix index alteration recommendation for multiple invisible indexes #108576
Conversation
Fixes cockroachdb#108490 Release note (bug fix): Fixed a bug in the index recommendations provided in the EXPLAIN output where ALTER INDEX ... VISIBLE index recommendations may suggest making the wrong index visible when there are multiple invisible indexes in a table.
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @msirek)
TFTR! bors r+ |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 507e594 to blathers/backport-release-22.2-108576: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2.x failed. See errors above. error creating merge commit from 507e594 to blathers/backport-release-23.1-108576: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
A bug was introduced in cockroachdb#108576 in code that compares index columns of an existing index and a hypothetical index. Prior to this commit, this logic only checked that the hypothetical index column was an inverted column (the last explicitly indexed column in an inverted index) before fetching the inverted source column ordinal for both the hypothetical and existing index column. When the existing index column was not an inverted column, and internal error would occur. This commit fixes the bug by checking that both the hypothetical and existing index columns are inverted columns before fetching the source column ordinals. There is no release note because this bug does not exist in any releases. Fixes cockroachdb#109974 Release note: None
110116: indexrec: fix internal error with inverted indexes r=mgartner a=mgartner A bug was introduced in #108576 in code that compares index columns of an existing index and a hypothetical index. Prior to this commit, this logic only checked that the hypothetical index column was an inverted column (the last explicitly indexed column in an inverted index) before fetching the inverted source column ordinal for both the hypothetical and existing index column. When the existing index column was not an inverted column, and internal error would occur. This commit fixes the bug by checking that both the hypothetical and existing index columns are inverted columns before fetching the source column ordinals. There is no release note because this bug does not exist in any releases. Fixes #109974 Release note: None Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com>
A bug was introduced in #108576 in code that compares index columns of an existing index and a hypothetical index. Prior to this commit, this logic only checked that the hypothetical index column was an inverted column (the last explicitly indexed column in an inverted index) before fetching the inverted source column ordinal for both the hypothetical and existing index column. When the existing index column was not an inverted column, and internal error would occur. This commit fixes the bug by checking that both the hypothetical and existing index columns are inverted columns before fetching the source column ordinals. There is no release note because this bug does not exist in any releases. Fixes #109974 Release note: None
A bug was introduced in #108576 in code that compares index columns of an existing index and a hypothetical index. Prior to this commit, this logic only checked that the hypothetical index column was an inverted column (the last explicitly indexed column in an inverted index) before fetching the inverted source column ordinal for both the hypothetical and existing index column. When the existing index column was not an inverted column, and internal error would occur. This commit fixes the bug by checking that both the hypothetical and existing index columns are inverted columns before fetching the source column ordinals. There is no release note because this bug does not exist in any releases. Fixes #109974 Release note: None
A bug was introduced in cockroachdb#108576 in code that compares index columns of an existing index and a hypothetical index. Prior to this commit, this logic only checked that the hypothetical index column was an inverted column (the last explicitly indexed column in an inverted index) before fetching the inverted source column ordinal for both the hypothetical and existing index column. When the existing index column was not an inverted column, and internal error would occur. This commit fixes the bug by checking that both the hypothetical and existing index columns are inverted columns before fetching the source column ordinals. There is no release note because this bug does not exist in any releases. Fixes cockroachdb#109974 Release note: None
Fixes #108490
Release note (bug fix): Fixed a bug in the index recommendations provided in the
EXPLAIN
output whereALTER INDEX ... VISIBLE
index recommendations may suggest making the wrong index visible when there are multiple invisible indexes in a table.