Fixes T5226. It's rare (but possible) for a commit to have the same parent more than once in Git.
Details
Details
- Reviewers
joshuaspence - Maniphest Tasks
- T5226: `./bin/repository parents` fails with `AphrontQueryDuplicateKeyException`
- Commits
- Restricted Diffusion Commit
rP8ea9935ea5c2: Deduplicate parents from PhabricatorGitGraphStream
Ran bin/repository parents on a normal repository.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- duparents
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 799 Build 799: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
This appears to fix my problem, although now I have another issue:
> ./bin/repository parents GAF Rebuilding "rGAF"... Rebuilding branch "master"... Found 83,756 total commit(s); updating... [2014-06-01 17:20:02] EXCEPTION: (AphrontQueryException) #1317: Query execution was interrupted at [/usr/src/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:311] #0 AphrontMySQLDatabaseConnectionBase::throwQueryCodeException(1317, Query execution was interrupted) called at [/usr/src/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:278] #1 AphrontMySQLDatabaseConnectionBase::throwQueryException(Object mysqli) called at [/usr/src/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:184] #2 AphrontMySQLDatabaseConnectionBase::executeRawQuery(SELECT id, commitIdentifier FROM `repository_commit` WHERE commitIdentifier IN ('7501a8790ef92f4f690d74eb4132e053580ddcde', 'e89617fe337dd4d76fa14bc7bad2bf4d4c875b08') AND repositoryID = 393) called at [/usr/src/libphutil/src/xsprintf/queryfx.php:9] #3 queryfx(Object AphrontMySQLiDatabaseConnection, SELECT id, commitIdentifier FROM %T WHERE commitIdentifier IN (%Ls) AND repositoryID = %d, repository_commit, Array of size 2 starting with: { 0 => 7501a8790ef92f4f690d74eb4132e053580ddcde }, 393) #4 call_user_func_array(queryfx, Array of size 5 starting with: { 0 => Object AphrontMySQLiDatabaseConnection }) called at [/usr/src/libphutil/src/xsprintf/queryfx.php:25] #5 queryfx_all(Object AphrontMySQLiDatabaseConnection, SELECT id, commitIdentifier FROM %T WHERE commitIdentifier IN (%Ls) AND repositoryID = %d, repository_commit, Array of size 2 starting with: { 0 => 7501a8790ef92f4f690d74eb4132e053580ddcde }, 393) called at [/usr/src/phabricator/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php:113] #6 PhabricatorRepositoryManagementParentsWorkflow::rebuildRepository(Object PhabricatorRepository) called at [/usr/src/phabricator/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php:43] #7 PhabricatorRepositoryManagementParentsWorkflow::execute(Object PhutilArgumentParser) called at [/usr/src/libphutil/src/parser/argument/PhutilArgumentParser.php:396] #8 PhutilArgumentParser::parseWorkflowsFull(Array of size 14 starting with: { PhabricatorRepositoryManagementCacheWorkflow => Object PhabricatorRepositoryManagementCacheWorkflow }) called at [/usr/src/libphutil/src/parser/argument/PhutilArgumentParser.php:292] #9 PhutilArgumentParser::parseWorkflows(Array of size 14 starting with: { PhabricatorRepositoryManagementCacheWorkflow => Object PhabricatorRepositoryManagementCacheWorkflow }) called at [/usr/src/phabricator/scripts/repository/manage_repositories.php:22]
I'm pretty sure this occurs whilst our DB is temporarily down for backup.