-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Race condition in realm creation #21160
Comments
Hello @zulip/server-production members, this issue was labeled with the "area: production" label, so you may want to check it out! |
@zulipbot claim |
Welcome to Zulip, @cognusion! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip! Here's some tips to get you off to a good start:
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site. See you on the other side (that is, the pull request side)! |
@cognusion You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks! |
PR #22006 has been open for this issue. :patientlywaiting: on that 😄 |
It's possible for two realm creations with the same name to race, which triggers a 500 and raises an exception:
This is raised by
realm.save()
indo_create_realm
, which is (correctly) inside atransaction.atomic()
so we don't get inconsistent state in the database. The only problem is the potential user experience;accounts_register
inzerver/views/registration.py
should catch the IntegrityError that is so raised, and return a 400, not a 500.The text was updated successfully, but these errors were encountered: