It's my understanding that if a server is disabled, then queries will no longer be sent to it. I'm having a problem that when a server is disabled programatically. (or via the database record), entity changes that fire of indexing still happen. This is unacceptable because I'm trying to disable the server so that people developing will not screw with the production server.

My install script looks something like this

drush sqlq "UPDATE search_api_server SET enabled = 0 WHERE machine_name = 'acquia_search_server'"
drush updb -y

The updates delete and create nodes. The index that is still pointing at the server is connecting to the server and updating it.

Comments

generalredneck’s picture

Version: 7.x-1.15 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.04 KB

This puts some checks in place that prevents query going to disable servers.

drunken monkey’s picture

Status: Needs review » Closed (won't fix)

Solution: Don't change data in the database if you don't know what you are doing!
If you'd use the proper code to disable the server, all indexes on it would be automatically removed from it and disabled, eliminating this problem.