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

Drop FKs referencing DomainHistory #2621

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

gbrodman
Copy link
Collaborator

@gbrodman gbrodman commented Dec 9, 2024

  • We never delete rows from DomainHistory (and even if we do in the future, they'll be old / the references won't matter)
  • This is likely creating lock contention when lots of requests come through at once for domains with many DomainHistory entries

We add them as indexes just in case


This change is Reviewable

- We never delete rows from DomainHistory (and even if we do in the
  future, they'll be old / the references won't matter)
- This is likely creating lock contention when lots of requests come
  through at once for domains with many DomainHistory entries
Copy link
Collaborator

@jianglai jianglai left a comment

Choose a reason for hiding this comment

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

I'm curious how you arrived at these files with no change in the Java file to drop the fk constraint AFAICT. Did you do this manually?

Reviewed 19 of 19 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @CydeWeys)

Copy link
Collaborator Author

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Yes, I did this manually (except for the generated SQL file obviously). All of the foreign keys that we're removing in this PR, except for GracePeriodHistory, were created manually in the first place since the generated code only generates foreign keys when one object (in this case DomainHistory) stores another (in this case GracePeriodHistory).

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @CydeWeys)

Copy link
Collaborator

@jianglai jianglai left a comment

Choose a reason for hiding this comment

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

Good to know, thanks.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @CydeWeys)

@gbrodman gbrodman added this pull request to the merge queue Dec 10, 2024
Merged via the queue into google:master with commit c6a6bc7 Dec 10, 2024
9 checks passed
@gbrodman gbrodman deleted the dropFks branch December 10, 2024 19:38
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.

2 participants