function db_ignore_replica

Sets a session variable specifying the lag time for ignoring a replica server (A replica server is traditionally referred to as a "slave" in database server documentation).

Deprecated

in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal::service('database.replica_kill_switch')->trigger() instead.

See also

https://www.drupal.org/node/2997500

https://www.drupal.org/node/2275877

1 call to db_ignore_replica()
DatabaseLegacyTest::testDbIgnoreReplica in core/tests/Drupal/KernelTests/Core/Database/DatabaseLegacyTest.php
Tests the db_ignore_replica() function.

File

core/includes/database.inc, line 1140

Code

function db_ignore_replica() {
    @trigger_error('db_ignore_replica() is deprecated in drupal:8.7.0. It will be removed from drupal:9.0.0. Use \\Drupal\\Core\\Database\\ReplicaKillSwitch::trigger() instead. See https://www.drupal.org/node/2997500', E_USER_DEPRECATED);
    \Drupal::service('database.replica_kill_switch')->trigger();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.