Skip to content

opt: fix upsert fast path for hash-sharded primary indexes#77775

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
mgartner:hash-index-upsert-fast-path
Mar 15, 2022
Merged

opt: fix upsert fast path for hash-sharded primary indexes#77775
craig[bot] merged 1 commit intocockroachdb:masterfrom
mgartner:hash-index-upsert-fast-path

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

In #76358, a change was made to consider both partitioning and
hash-shard columns as implicit, which was required for finding arbiters
for UPSERT statements in tables that have partitioned, hash-sharded
primary indexes. A side-effect of this change is that it prevents the
planning of the fast-path of UPSERTs into tables with hash-sharded
primary indexes. This commit fixes this regression.

Release justification: This fixes a performance regression for
hash-sharded indexes, which are being released as non-experimental in
the upcoming release.

There is no release note because this regression is not present in any
releases.

Release note: None

In cockroachdb#76358, a change was made to consider both partitioning and
hash-shard columns as implicit, which was required for finding arbiters
for UPSERT statements in tables that have partitioned, hash-sharded
primary indexes. A side-effect of this change is that it prevents the
planning of the fast-path of UPSERTs into tables with hash-sharded
primary indexes. This commit fixes this regression.

Release justification: This fixes a performance regression for
hash-sharded indexes, which are being released as non-experimental in
the upcoming release.

There is no release note because this regression is not present in any
releases.

Release note: None
@mgartner mgartner requested review from a team, chengxiong-ruan and rytaft March 14, 2022 16:53
@mgartner mgartner requested a review from a team as a code owner March 14, 2022 16:53
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@chengxiong-ruan chengxiong-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: glad it's an easy fix. Many thanks.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rytaft)

Copy link
Copy Markdown
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: nice fix!

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @mgartner)

@mgartner
Copy link
Copy Markdown
Contributor Author

TFTRs!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 15, 2022

Build succeeded:

@craig craig bot merged commit a1c1879 into cockroachdb:master Mar 15, 2022
@mgartner mgartner deleted the hash-index-upsert-fast-path branch March 15, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants