Page MenuHomePhorge

D25789.1732281013.diff
No OneTemporary

D25789.1732281013.diff

diff --git a/src/infrastructure/storage/connection/AphrontDatabaseConnection.php b/src/infrastructure/storage/connection/AphrontDatabaseConnection.php
--- a/src/infrastructure/storage/connection/AphrontDatabaseConnection.php
+++ b/src/infrastructure/storage/connection/AphrontDatabaseConnection.php
@@ -63,10 +63,6 @@
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
--- a/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php
+++ b/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php
@@ -145,79 +145,6 @@
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
--- a/src/infrastructure/storage/future/QueryFuture.php
+++ b/src/infrastructure/storage/future/QueryFuture.php
@@ -56,18 +56,6 @@
}
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) {

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 13:10 (15 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
988748
Default Alt Text
D25789.1732281013.diff (3 KB)

Event Timeline