Page MenuHomePhabricator

Deduplicate parents from PhabricatorGitGraphStream
ClosedPublic

Authored by epriestley on May 31 2014, 1:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 4:43 AM
Unknown Object (File)
Tue, Dec 17, 10:18 AM
Unknown Object (File)
Tue, Dec 17, 6:19 AM
Unknown Object (File)
Sun, Dec 8, 2:42 PM
Unknown Object (File)
Sun, Dec 8, 12:51 AM
Unknown Object (File)
Tue, Dec 3, 8:22 PM
Unknown Object (File)
Tue, Dec 3, 2:07 PM
Unknown Object (File)
Sat, Nov 30, 11:41 AM
Subscribers

Details

Summary

Fixes T5226. It's rare (but possible) for a commit to have the same parent more than once in Git.

Test Plan

Ran bin/repository parents on a normal repository.

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

epriestley retitled this revision from to Deduplicate parents from PhabricatorGitGraphStream.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: joshuaspence.
joshuaspence edited edge metadata.

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.

This revision is now accepted and ready to land.Jun 1 2014, 12:11 PM

How long does it take? Can you just sneak it in between backups?

epriestley updated this revision to Diff 22262.

Closed by commit rP8ea9935ea5c2 (authored by @epriestley).