Page MenuHomePhabricator

Fix an issue where a GROUP BY was missing when a query matched a revision using multiple hashes
ClosedPublic

Authored by epriestley on Sep 16 2020, 12:19 AM.
Tags
None
Referenced Files
F18993568: D21462.id51074.diff
Wed, Nov 19, 8:11 AM
F18903217: D21462.id51074.diff
Sat, Nov 8, 4:27 AM
F18863971: D21462.diff
Mon, Nov 3, 2:10 AM
F18857433: D21462.diff
Sat, Nov 1, 3:20 PM
F18809838: D21462.id.diff
Oct 19 2025, 5:14 PM
F18799047: D21462.diff
Oct 17 2025, 10:57 AM
F18734358: D21462.id.diff
Sep 30 2025, 10:52 PM
F18654009: D21462.id51090.diff
Sep 21 2025, 11:33 PM
Subscribers
None

Details

Summary

Ref T13581. If you query for revisions by hash and provide multiple hashes (A, B) which match a single revision (e.g., older and newer diffs for that revision), the query omits a GROUP BY clause but should contain one.

Add a GROUP BY clause in this case.

Test Plan

With a working copy that has multiple hashes corresponding to a single revision, ran arc branches before and after the change. Before, got this error:

[2020-09-15 17:02:07] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Rows passed to "loadAllFromArray(...)" include two or more rows with the same ID ("130"). Rows must have unique IDs. An underlying query may be missing a GROUP BY. at [<arcanist>/src/conduit/ConduitFuture.php:65]

After, clean execution.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable