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

fixes race condition Ecto.Repo.Supervisor if adapter needs compiling #2823

Merged

Conversation

evadne
Copy link
Contributor

@evadne evadne commented Nov 18, 2018

- Previously, it uses Core.ensure_loaded?/1 which could cause errors when the adapter is not yet compiled.

- See https://hexdocs.pm/elixir/Code.html#ensure_loaded/1-code-loading-on-the-erlang-vm “When invoked, ensure_compiled/1 halts the compilation of the caller until the module given to ensure_compiled/1 becomes available or all files for the current project have been compiled. If compilation finishes and the module is not available, an error tuple is returned.”
@josevalim josevalim merged commit 5c8c481 into elixir-ecto:master Nov 18, 2018
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

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