Page MenuHomePhabricator

Require rows passed to "loadAllFromArray()" have unique keys
ClosedPublic

Authored by epriestley on Jul 9 2020, 5:56 PM.
Tags
None
Referenced Files
F15392180: D21400.id.diff
Sat, Mar 15, 1:37 PM
F15383422: D21400.diff
Fri, Mar 14, 4:39 PM
F15335715: D21400.id51039.diff
Sat, Mar 8, 5:27 PM
F15333703: D21400.id50940.diff
Sat, Mar 8, 4:07 AM
F15329397: D21400.id.diff
Fri, Mar 7, 6:39 AM
Unknown Object (File)
Mon, Mar 3, 5:32 PM
Unknown Object (File)
Wed, Feb 26, 6:59 AM
Unknown Object (File)
Feb 9 2025, 9:44 AM
Subscribers
None

Details

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 Passed
Unit
Tests Passed
Build Status
Buildable 24759
Build 34145: Run Core Tests
Build 34144: arc lint + arc unit