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

ttl: allow outbound foreign keys on TTL tables #101236

Merged
merged 3 commits into from Apr 12, 2023
Merged

ttl: allow outbound foreign keys on TTL tables #101236

merged 3 commits into from Apr 12, 2023

Conversation

ecwall
Copy link
Contributor

@ecwall ecwall commented Apr 11, 2023

Fixes #101225

This change allows TTL tables to have outbound foreign keys. Outbound foreign
keys are unaffected by rows being deleted from the TTL table itself.

Release note (sql change): Allow outbound foreign keys on TTL tables.

@ecwall ecwall requested review from rafiss, otan and a team April 11, 2023 18:28
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Removes a text column a few subtests have that is not part of the actual tests.

Release note: None
The row_level_ttl logic test is now broken down into subtests to more easily
isolate failures.

Release note: None
Fixes #101225

This change allows TTL tables to have outbound foreign keys. Outbound foreign
keys are unaffected by rows being deleted from the TTL table itself.

Release note (sql change): Allow outbound foreign keys on TTL tables.
desc.GetName(),
))
}
if desc.HasRowLevelTTL() && len(desc.InboundForeignKeys()) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason not to support all the cases if we're not doing strict filtering?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will handle it in a followup PR.

There is an issue with job SessionData not respecting optDrivenFKCascadesClusterLimit that I have to resolve #101265.

Copy link
Contributor

@otan otan left a comment

Choose a reason for hiding this comment

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

probably want rafi to double check

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

nice!

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

@ecwall
Copy link
Contributor Author

ecwall commented Apr 12, 2023

bors r=otan,rafiss

@craig
Copy link
Contributor

craig bot commented Apr 12, 2023

Build succeeded:

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.

sql: support outbound FKs on TTL tables
4 participants