HomePhabricator

(stable) Fix an issue where querying for a large number of projects by slug…

Description

(stable) Fix an issue where querying for a large number of projects by slug could paginate incorrectly

Summary:
See PHI1809. This query may join the "slug" table, but each project may have multiple slugs, and the query does not "GROUP BY" when this join occurs.

This may lead to partial result sets and unusual paging behavior.

This could likely be caught categorically in loadAllFromArray(); I'll adjust this in a followup.

Test Plan:
A minimal reproduction case is something like:

  • Give project P slugs: a, b, c.
  • Give project Q slugs: d.
  • Query for slugs: a, b, c, d; with limit 2.
  • Order the query so P returns first.
  • Expect: P and Q.
  • Actual: P generates 3 raw rows and the final result is just P with no pagination cursor.

Differential Revision: https://secure.phabricator.com/D21399

Details

Provenance
epriestleyAuthored on Jul 9 2020, 5:42 PM
epriestleyPushed on Jul 9 2020, 5:50 PM
Differential Revision
D21399: Fix an issue where querying for a large number of projects by slug could paginate incorrectly
Parents
rPb2f0937e300c: (stable) Promote 2020 Week 26
Branches
Unknown
Tags
Unknown
Build Status
Buildable 24758
Build 34143: Run Core Tests