Page MenuHomePhorge

AphrontMySQLDatabaseConnection calls external method fb_parallel_query()
Closed, ResolvedPublic

Description

In https://we.phorge.it/source/phorge/browse/master/src/infrastructure/storage/connection/mysql/AphrontMySQLDatabaseConnection.php, executeParallelQueries() calls the non-existing method fb_parallel_query().

This was originally introduced in https://secure.phabricator.com/rPHU17f4c313e34d583b9174499e1f65714684c192c2 :

Introduce QueryFuture

Summary:
This supports four ways for executing queries against MySQL:

# [[ http://php.net/mysqli.poll | Async queries ]]
# [[ https://github.com/facebook/hiphop-php/blob/363d1bb20fe84b4cdc2dc0f4c7b1dd39d167a1f5/hphp/idl/fb.idl.php#L911 | Parallel queries ]]
# Multi queries: [[ http://php.net/mysqli.multi_query | PHP ]], [[ https://github.com/facebook/hiphop-php/blob/363d1bb20fe84b4cdc2dc0f4c7b1dd39d167a1f5/hphp/idl/mysql.idl.php#L757 | HPHP ]]
# Plain old single queries

including

+  public function supportsParallelQueries() {
+    return function_exists('fb_parallel_query');
+  }

changed in followup commit https://secure.phabricator.com/lrPHU93fa62a55d545593bbc17e5bad6b9356d89d7299 to

   public function supportsParallelQueries() {
-    return function_exists('fb_parallel_query');
+    // fb_parallel_query() doesn't support results with different columns.
+    return false;
   }

Only place calling supportsParallelQueries() and/or executeParallelQueries() is src/infrastructure/storage/future/QueryFuture.php:

      if ($this->conn->supportsParallelQueries()) {
[...]
        $results = $this->conn->executeParallelQueries($queries, $conns);
[...]

Thus this code is never reached.
Furthermore, HHVM is incompatible with PHP 7, cf T15047: Officially raise minimum required PHP version to 7.2.