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 Ensure DB is active before processing #318

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Mar 23, 2022

When using the TestSession with behat on a project while silverstripe-fulltextsearch is installed, the following chain of events happens

  • Temporary database used by TestSession is destroyed
  • PHP shuts down
  • The following is run, which was defined in FullTextSearch - SearchUpdater.php
  • register_shutdown_function(array(SearchUpdater::class, "flush_dirty_indexes"));
  • flush_dirty_indexes will eventually call SearchUpdateProcessor::process() - which will do a bunch of DB queries
  • however there's no database, which triggers No database selected errors

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