@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+5
+5
src/applications/project/query/PhabricatorProjectQuery.php
··· 656 656 if ($this->memberPHIDs || $this->watcherPHIDs || $this->nameTokens) { 657 657 return true; 658 658 } 659 + 660 + if ($this->slugs) { 661 + return true; 662 + } 663 + 659 664 return parent::shouldGroupQueryResultRows(); 660 665 } 661 666