1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/audit
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
..
application (Redesign) Clean up older "Tile" code 2014-06-03 15:47:27 -07:00
conduit Add GROUP BY to commit query 2014-07-10 10:16:26 -07:00
constants Audit - tweak colors 2014-01-06 16:07:47 -08:00
controller Move audit rendering into SearchEngine 2014-05-08 20:04:18 -07:00
editor Applied various linter fixes. 2014-06-09 16:04:12 -07:00
events Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
mail Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
management Add GROUP BY to commit query 2014-07-10 10:16:26 -07:00
query Allow users to select QueryPanel search engines from a list 2014-06-12 13:22:20 -07:00
storage Delete license headers from files 2012-11-05 11:16:51 -08:00
view Make ObjectItem default as "Card" 2014-06-07 12:12:11 -07:00