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

workload/schemachange: update and disable ALTER TYPE DROP VALUE #114853

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

chrisseto
Copy link
Contributor

@chrisseto chrisseto commented Nov 21, 2023

31a2ac9 workload/schemachange: update and disable ALTER TYPE DROP VALUE

Previously, ALTER TYPE DROP VALUE was using the procedural generation
that is most common in this workload.

The desire to add support UDFs required revisiting the implement as
referenced enum values cannot be dropped.

Unfortunately, there is not a straightforward way to determine if a
specific enum is being referenced by other descriptors (namely default
expressions for columns and UDFs).

After the initial update and a few testing rounds with UDF support, a
bug between enums and UDFs was discovered. (See #114844 for details).

This commit upgrades the implementation of ALTER TYPE DROP VALUE to
utilize the Generate helper and dodge cases of referenced enum values.

Due to the aforementioned bug and another outstanding flake, this commit
also disabled ALTER TYPE DROP VALUE to prevent further flakes an
noise.

Epic: CRDB-19168
Informs: #113859, #114844
Release note: None

@chrisseto chrisseto requested review from a team as code owners November 21, 2023 21:09
@chrisseto chrisseto requested review from herkolategan and DarrylWong and removed request for a team November 21, 2023 21:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@chrisseto chrisseto changed the title workload/schemachange: update and disable ALTER TYPE DROP VALUE workload/schemachange: update and disable ALTER TYPE DROP VALUE Nov 21, 2023
@chrisseto chrisseto force-pushed the rsw-drop-value branch 2 times, most recently from 6663235 to f2b181f Compare November 29, 2023 22:12
@rafiss rafiss requested a review from Xiang-Gu December 4, 2023 15:11
Copy link
Contributor

@Xiang-Gu Xiang-Gu left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. I left a few comments. I'm okay disabling this for now (but I'm also curious to see if #115612 would fix anything, but it should not block us from merging this first). We can always enable it again later and see once that issue is fixed.

pkg/workload/schemachange/optype.go Outdated Show resolved Hide resolved
pkg/workload/schemachange/query_util.go Show resolved Hide resolved
pkg/workload/schemachange/query_util.go Show resolved Hide resolved
pkg/workload/schemachange/operation_generator.go Outdated Show resolved Hide resolved
@chrisseto chrisseto force-pushed the rsw-drop-value branch 4 times, most recently from 5e5483d to cd2285c Compare December 6, 2023 20:26
Previously, `ALTER TYPE DROP VALUE` was using the procedural generation
that is most common in this workload.

The desire to add support UDFs required revisiting the implement as
referenced enum values cannot be dropped.

Unfortunately, there is not a straightforward way to determine if a
specific enum is being referenced by other descriptors (namely default
expressions for columns and UDFs).

After the initial update and a few testing rounds with UDF support, a
bug between enums and UDFs was discovered. (See cockroachdb#114844 for details).

This commit upgrades the implementation of `ALTER TYPE DROP VALUE` to
utilize the `Generate` helper and dodge cases of referenced enum values.

Due to the aforementioned bug and another outstanding flake, this commit
also disabled `ALTER TYPE DROP VALUE` to prevent further flakes an
noise.

Epic: CRDB-19168
Informs: cockroachdb#113859, cockroachdb#114844
Release note: None
@chrisseto
Copy link
Contributor Author

bors r=Xiang-Gu

@craig
Copy link
Contributor

craig bot commented Dec 11, 2023

Build succeeded:

@craig craig bot merged commit 4bdde4c into cockroachdb:master Dec 11, 2023
9 checks passed
@rafiss
Copy link
Collaborator

rafiss commented Dec 12, 2023

blathers backport 23.2.0-rc 23.2

Copy link

blathers-crl bot commented Dec 12, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 31a2ac9 to blathers/backport-release-23.2.0-rc-114853: 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.2.0-rc failed. See errors above.


error creating merge commit from 31a2ac9 to blathers/backport-release-23.2-114853: 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.2 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@chrisseto
Copy link
Contributor Author

Ah, I'm guessing the conflicts are because I alphabetized some of the operations. I'll take a stab at manually backporting!

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