diff --git a/core/lib/Drupal/Core/Database/Query/Query.php b/core/lib/Drupal/Core/Database/Query/Query.php index 5be877056f..46c8173f4e 100644 --- a/core/lib/Drupal/Core/Database/Query/Query.php +++ b/core/lib/Drupal/Core/Database/Query/Query.php @@ -75,8 +75,6 @@ public function __construct(Connection $connection, $options) { $this->connectionKey = $this->connection->getKey(); $this->connectionTarget = $this->connection->getTarget(); - // @todo remove unsetting the 'target' options key in Drupal 9.0.0. - unset($options['target']); $this->queryOptions = $options; } diff --git a/core/modules/comment/src/CommentStatistics.php b/core/modules/comment/src/CommentStatistics.php index b58452c594..84c6097d17 100644 --- a/core/modules/comment/src/CommentStatistics.php +++ b/core/modules/comment/src/CommentStatistics.php @@ -64,8 +64,7 @@ public function __construct(Connection $database, AccountInterface $current_user * {@inheritdoc} */ public function read($entities, $entity_type, $accurate = TRUE) { - $options = $accurate ? [] : ['target' => 'replica']; - $stats = $this->database->select('comment_entity_statistics', 'ces', $options) + $stats = $this->database->select('comment_entity_statistics', 'ces') ->fields('ces') ->condition('ces.entity_id', array_keys($entities), 'IN') ->condition('ces.entity_type', $entity_type) diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index b043d63681..a43fc49a22 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -237,7 +237,7 @@ protected function findResults() { // Build matching conditions. $query = $this->database - ->select('search_index', 'i', ['target' => 'replica']) + ->select('search_index', 'i') ->extend('Drupal\search\SearchQuery') ->extend('Drupal\Core\Database\Query\PagerSelectExtender'); $query->join('node_field_data', 'n', 'n.nid = i.sid AND n.langcode = i.langcode');