diff --git a/src/infrastructure/storage/connection/AphrontDatabaseConnection.php b/src/infrastructure/storage/connection/AphrontDatabaseConnection.php index 0d4597b34f..f0eb2f9fe1 100644 --- a/src/infrastructure/storage/connection/AphrontDatabaseConnection.php +++ b/src/infrastructure/storage/connection/AphrontDatabaseConnection.php @@ -63,10 +63,6 @@ abstract class AphrontDatabaseConnection return false; } - public function supportsParallelQueries() { - return false; - } - public function setReadOnly($read_only) { $this->readOnly = $read_only; return $this; diff --git a/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php b/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php index 40a2c6c357..c761fadfbb 100644 --- a/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php +++ b/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php @@ -145,79 +145,6 @@ final class AphrontMySQLDatabaseConnection mysql_free_result($result); } - public function supportsParallelQueries() { - // fb_parallel_query() doesn't support results with different columns. - return false; - } - - /** - * @phutil-external-symbol function fb_parallel_query - */ - public function executeParallelQueries( - array $queries, - array $conns = array()) { - assert_instances_of($conns, __CLASS__); - - $map = array(); - $is_write = false; - foreach ($queries as $id => $query) { - $is_write = $is_write || $this->checkWrite($query); - $conn = idx($conns, $id, $this); - - $host = $conn->getConfiguration('host'); - $port = 0; - $match = null; - if (preg_match('/(.+):(.+)/', $host, $match)) { - list(, $host, $port) = $match; - } - - $pass = $conn->getConfiguration('pass'); - if ($pass instanceof PhutilOpaqueEnvelope) { - $pass = $pass->openEnvelope(); - } - - $map[$id] = array( - 'sql' => $query, - 'ip' => $host, - 'port' => $port, - 'username' => $conn->getConfiguration('user'), - 'password' => $pass, - 'db' => $conn->getConfiguration('database'), - ); - } - - $profiler = PhutilServiceProfiler::getInstance(); - $call_id = $profiler->beginServiceCall( - array( - 'type' => 'multi-query', - 'queries' => $queries, - 'write' => $is_write, - )); - - $map = fb_parallel_query($map); - - $profiler->endServiceCall($call_id, array()); - - $results = array(); - $pos = 0; - $err_pos = 0; - foreach ($queries as $id => $query) { - $errno = idx(idx($map, 'errno', array()), $err_pos); - $err_pos++; - if ($errno) { - try { - $this->throwQueryCodeException($errno, $map['error'][$id]); - } catch (Exception $ex) { - $results[$id] = $ex; - } - continue; - } - $results[$id] = $map['result'][$pos]; - $pos++; - } - return $results; - } - protected function fetchAssoc($result) { return mysql_fetch_assoc($result); } diff --git a/src/infrastructure/storage/future/QueryFuture.php b/src/infrastructure/storage/future/QueryFuture.php index 0f1fc3b9d4..252a136e73 100644 --- a/src/infrastructure/storage/future/QueryFuture.php +++ b/src/infrastructure/storage/future/QueryFuture.php @@ -56,18 +56,6 @@ final class QueryFuture extends Future { } if (!$this->conn->supportsAsyncQueries()) { - if ($this->conn->supportsParallelQueries()) { - $queries = array(); - $conns = array(); - foreach (self::$futures as $id => $future) { - $queries[$id] = $future->query; - $conns[$id] = $future->conn; - } - $results = $this->conn->executeParallelQueries($queries, $conns); - $this->processResults($results); - return true; - } - $conns = array(); $conn_queries = array(); foreach (self::$futures as $id => $future) {