Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2644173
D25789.1732280551.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
3 KB
Referenced Files
None
Subscribers
None
D25789.1732280551.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 13:02 (15 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
988748
Default Alt Text
D25789.1732280551.diff (3 KB)
Attached To
Mode
D25789: Remove unused *ParallelQueries() database connection methods
Attached
Detach File
Event Timeline
Log In to Comment