Page MenuHomePhabricator

Make re-running `rebuild-identities` a bit faster and add a little progress information
ClosedPublic

Authored by epriestley on Jun 12 2018, 2:08 PM.

Details

Summary

Ref T13151. Ref T12164. Two small tweaks:

  • If we aren't actually going to change anything, just skip the writes. This makes re-running/resuming a lot faster (~20x, locally).
  • Print when we touch a commit so there's some kind of visible status.

This is just a small quality-of-life tweak that I wrote anyway while investigating T13152, and will make finishing off db024, db025 and db010 manually a little easier.

Test Plan
  • Set authorIdentityPHID + committerIdentityPHID to NULL.
  • Ran rebuild-identities, saw status information.
  • Ran rebuild-identiites again, saw it go faster with status information.

Diff Detail

Repository
rP Phabricator
Branch
faster1
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 20406
Build 27710: Run Core Tests
Build 27709: arc lint + arc unit

Event Timeline

epriestley created this revision.Jun 12 2018, 2:08 PM
epriestley requested review of this revision.Jun 12 2018, 2:09 PM
amckinley accepted this revision.Jun 12 2018, 7:18 PM
amckinley added inline comments.
src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php
36–38

I was thinking we could speed this up instead by searching for commits without identities, but presumably users might want to actually "rebuild all identities", as advertised...

66–73

I'm convinced that reusing $identity_phid here is ok, but it took me a second.

81–83

...and presumably doing all these writes is the expensive part of the operation anyway.

This revision is now accepted and ready to land.Jun 12 2018, 7:18 PM
This revision was automatically updated to reflect the committed changes.