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

fix: race condition compiling migrations when concurrently creating new tenants #406

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

skrioify
Copy link
Contributor

@skrioify skrioify commented Oct 17, 2024

I ran into an issue where concurrently creating new tenants in async tests crashed due to ash_postgres attempting to concurrently compile the same tenant migration file.

Contributor checklist

  • Bug fixes include regression tests (attempted, but hard to ensure it wouldn't be flaky)

Notes

I attempted to write a regression test as well, but came to the conclusion that it would end up being brittle since it is timing-based and needs multiple DB connections. It would also require me to add a whole new domain with context-based multitenancy instead of attribute-based to the test repo.

@zachdaniel zachdaniel merged commit a9f1a00 into ash-project:main Oct 18, 2024
12 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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