-
Notifications
You must be signed in to change notification settings - Fork 499
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
AO3-6712 Allow invites to be resent and index invitee_email #4791
base: master
Are you sure you want to change the base?
Conversation
The rails code that produces the slow query in AO3-6666 is Before, first iteration of this feature:
After, with the index added in this PR :
"Using index condition" sounds pretty good combined with the fact that it's using the
So in most cases only one row should be getting read from the table. (Invitee email seems to be intended to be unique, but this is not getting validated so it may be more than one row. But it should be pretty rare.) That sounds like near the best case we could have, so I would say just this index on It looks like previously it was doing this strategy with the If there are still performance problems after this PR, we could try to validate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Note: I only reviewed the new changes, not the code that was reverted in AO3-6666, because that already went through review and QA on staging.
<% if AdminSetting.current.invite_from_queue_enabled? %> | ||
<%= ts("We are sending out %{invites} invitations per day.", invites: AdminSetting.current.invite_from_queue_number) %> | ||
<%= t(".send_rate", invites: AdminSetting.current.invite_from_queue_number) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely optional, nitpick: It would be nice if this also used count as the interpolation variable and had the one/other distinction in the locale.
Issue
https://otwarchive.atlassian.net/browse/AO3-6712
Purpose
Testing Instructions
See Jira issue.