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
Unknown Object (File)
Fri, Dec 20, 7:46 PM
Unknown Object (File)
Fri, Dec 13, 8:13 AM
Unknown Object (File)
Fri, Dec 6, 10:00 AM
Unknown Object (File)
Sat, Nov 30, 10:30 AM
Unknown Object (File)
Nov 14 2024, 10:58 PM
Unknown Object (File)
Oct 24 2024, 1:09 AM
Unknown Object (File)
Aug 31 2024, 12:06 AM
Unknown Object (File)
Aug 24 2024, 8:42 PM
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