1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Fix some minor errors (DarkConsole warning, unstable Ferret sort)

Summary:
DarkConsole could warn when "Analyze Query Plans" was not active.

`msort()` is not stable, so Ferret results with similar relevance could be returned out-of-order.

Test Plan: Saw fewer traces and more-stable result ordering.

Differential Revision: https://secure.phabricator.com/D19236
This commit is contained in:
epriestley 2018-03-18 14:33:40 -07:00
parent 7e43b74055
commit c5e4bd8187
2 changed files with 2 additions and 2 deletions

View file

@ -279,7 +279,7 @@ final class DarkConsoleServicesPlugin extends DarkConsolePlugin {
$analysis, $analysis,
); );
if ($row['trace']) { if (isset($row['trace'])) {
$rows[] = array( $rows[] = array(
null, null,
null, null,

View file

@ -104,7 +104,7 @@ final class PhabricatorFerretFulltextStorageEngine
// Reorder the results so that the highest-ranking results come first, // Reorder the results so that the highest-ranking results come first,
// no matter which object types they belong to. // no matter which object types they belong to.
$metadata = msort($metadata, 'getRelevanceSortVector'); $metadata = msortv($metadata, 'getRelevanceSortVector');
$list = array_select_keys($list, array_keys($metadata)) + $list; $list = array_select_keys($list, array_keys($metadata)) + $list;
$result_slice = array_slice($list, $offset, $limit, true); $result_slice = array_slice($list, $offset, $limit, true);