Page MenuHomePhabricator

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

Authored by epriestley on Jul 9 2020, 5:47 PM.
Tags
None
Referenced Files
F18621351: D21399.id50937.diff
Mon, Sep 15, 7:52 AM
F18571090: D21399.id50937.diff
Wed, Sep 10, 4:41 AM
F18571089: D21399.id50936.diff
Wed, Sep 10, 4:41 AM
F18541184: D21399.id50936.diff
Sun, Sep 7, 8:19 PM
F18519112: D21399.diff
Fri, Sep 5, 3:55 PM
F18518980: D21399.diff
Fri, Sep 5, 3:48 PM
F18198373: D21399.id50937.diff
Aug 18 2025, 12:20 AM
F18160053: D21399.id50936.diff
Aug 15 2025, 1:34 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable