Page MenuHomePhabricator

Require rows passed to "loadAllFromArray()" have unique keys
Needs ReviewPublic

Authored by epriestley on Thu, Jul 9, 5:56 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

See PHI1809, which identified a bug in Project search where queries with a large number of slugs could paginate improperly.

This change detects problems in this category: cases where multiple rows with the same ID are passed to "loadAllFromArray()". It's likely that all cases it detects are cases where a GROUP BY is missing.

Since this might have some false positives or detect some things which aren't fundamentally problematic, I'm planning to hold it until the next release.

Test Plan
  • Reverted D21399, then created a project with multiple slugs and queried for one of them via "project.search". Hit this new exeception.
  • Browsed around a bit, didn't immediately catch any collateral damage.

Diff Detail

Repository
rP Phabricator
Branch
unique1
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 24759
Build 34145: Run Core Tests
Build 34144: arc lint + arc unit

Event Timeline

epriestley created this revision.Thu, Jul 9, 5:56 PM
epriestley requested review of this revision.Thu, Jul 9, 5:58 PM