1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications/diffusion/query
epriestley 16648c28bc Add GROUP BY to commit query
Summary:
Ref T4715. Some minor stuff I caught locally while poking around:

  - Since we don't `GROUP BY`, we can still get duplicate commits. These get silently de-duplicated by `loadAllFromArray()` because that returns an array keyed by `id`, but we fetch too much data and this can cause us to execute too many queries to fill pages. Instead, `GROUP BY` if we joined the audit table.
  - After adding `GROUP BY`, getting the audit IDs out of the query is no longer reliable. Instead, query audits by the commit PHIDs. This is approximately equiavlent.
  - Since we always `JOIN`, we currently never return commits that don't have any audits. If we don't know that all results will have an audit, just `LEFT JOIN`.
  - Add some `!== null` to catch the `withIDs(array())` issue that we hit with Khan Academy a little while ago.

Test Plan:
  - Verified that "All Commits" shows commits with no audits of any kind.
  - Verified that the raw data comes out of the query without duplicates.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5433, T4715

Differential Revision: https://secure.phabricator.com/D8879
2014-07-10 10:16:26 -07:00
..
__tests__ Allow parenthesis in author name 2014-03-06 11:28:46 -08:00
filecontent Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
lowlevel Never use "{branches}" in Mercurial 2014-06-20 11:48:31 -07:00
pathchange Don't show changes for commits which affect more than 1,000 files 2013-01-30 12:01:49 -08:00
pathid Various linter fixes. 2014-02-26 12:44:58 -08:00
rawdiff Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
DiffusionCommitQuery.php Add GROUP BY to commit query 2014-07-10 10:16:26 -07:00
DiffusionLintCountQuery.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
DiffusionPathQuery.php Delete license headers from files 2012-11-05 11:16:51 -08:00
DiffusionQuery.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
DiffusionRenameHistoryQuery.php Fix an issue with pulling Subversion blame data 2013-11-07 12:10:43 -08:00
DiffusionResolveUserQuery.php Provide a standalone query for resolution of commit author/committer into Phabricator users 2013-12-19 11:05:17 -08:00
DiffusionSymbolQuery.php Remove @group annotations 2014-07-10 08:12:48 +10:00