Casecommons / pg_search

pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
http://www.casebook.net
MIT License
1.34k stars 371 forks source link

Fixes #446, enable usage of pg_search with multithreaded servers like puma #447

Closed aried3r closed 4 years ago

aried3r commented 4 years ago

This reverts commit 7ff41966026d990db95cda8ad4414f33264e734d.

Fixes #446. Users were reporting problems after this PR using multithreaded servers like puma. I decided to revert the whole commit because except for the trailing whitespace that was removed, all that rubocop-thread_safety would achieve is that we'd have to add ignore comments.

Sadly I was unable to write a failing test for this in our own system, even with system tests that use puma as their webserver. I'd have to check if puma settings are somehow different in development and test and in which way. Others have also reported that this was the case

For reproduction steps to reproduce the error with even simple setups, see https://github.com/Casecommons/pg_search/issues/446#issuecomment-701550610.

All credit goes to the people in #446 however, especially @connorshea who found the commit that needed to be reverted.

andrepcg commented 4 years ago

Should a patch be released?