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

Run Scheduler#warm_cache operation in threadpool executor #242

Merged
merged 1 commit into from May 10, 2021

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Apr 27, 2021

Reduces the number of created database connections by not creating a connection on the main thread.

First observed in #236 (comment)

Also fixes a deadlock observed in #236 (comment). Reasoning here:

Essentially any gem that has a DB call as part of a class/module definition that can be autoloaded will fall prey to deadlock issues. rails/rails#34310 (comment)

@bensheldon bensheldon added this to In progress in Backlog Apr 27, 2021
@bensheldon bensheldon added the bug Something isn't working label Apr 28, 2021
@bensheldon bensheldon force-pushed the warm_cache_on_thread branch 2 times, most recently from d4845fb to 77cf86f Compare April 28, 2021 14:11
@bensheldon bensheldon force-pushed the warm_cache_on_thread branch 2 times, most recently from de8c892 to 91d3240 Compare May 9, 2021 13:48
Reduces the number of created database connections by not creating a connection on the main thread.
@bensheldon bensheldon merged commit 680ff1b into main May 10, 2021
Backlog automation moved this from In progress to Done May 10, 2021
@bensheldon bensheldon deleted the warm_cache_on_thread branch May 10, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Backlog
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant