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

opt: add tests for FK delete cascade fast-path with UDF #88933

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

mgartner
Copy link
Collaborator

The FK delete cascade fast-path remaps the DELETE filter into a filter on child table, avoiding buffering the parent's deleted rows like in the non-fast-path plan. It is possible to plan this fast-path if the filters contain UDF invocations, as long as they are immutable or stable. (Of course, if the user creates a UDF with mislabeled volatility, data corruption is possible. To mitigate this and other corruption from mislabeled UDF volatility in the future, we're considering performing some analysis during CREATE FUNCTION to prevent users from incorrectly assigning volatility.)

This commit adds tests for FK delete cascades with UDFs and removes an unnecessary TODO.

Release note: None

The FK delete cascade fast-path remaps the `DELETE` filter into a filter
on child table, avoiding buffering the parent's deleted rows like in the
non-fast-path plan. It is possible to plan this fast-path if the filters
contain UDF invocations, as long as they are immutable or stable. (Of
course, if the user creates a UDF with mislabeled volatility, data
corruption is possible. To mitigate this and other corruption from
mislabeled UDF volatility in the future, we're considering performing
some analysis during `CREATE FUNCTION` to prevent users from incorrectly
assigning volatility.)

This commit adds tests for FK delete cascades with UDFs and removes an
unnecessary TODO.

Release note: None
@mgartner mgartner requested a review from a team as a code owner September 28, 2022 17:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@mgartner
Copy link
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 30, 2022

Build succeeded:

@craig craig bot merged commit 5990da6 into cockroachdb:master Sep 30, 2022
@mgartner mgartner deleted the fk-delete-fast-path-udf branch September 30, 2022 22:13
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.

3 participants