1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 04:02:43 +01:00
phorge-phorge/src/applications/repository
epriestley 1e7cc72cd8 Improve performance when marking commits as unreachable after multiple ref deletions
Summary:
See PHI1688. If many refs with a large amount of shared ancestry are deleted from a repository, we can spend much longer than necessary marking their mutual ancestors as unreachable over and over again.

For example, if refs A, B and C all point near the head of an obsolete "develop" branch and have about 1K shared commits reachable from no other refs, deleting all three refs will lead to us performing 3,000 mark-as-unreachable operations (once for each "<ref, commit>" pair).

Instead, we can stop exploring history once we reach an already-unreachable commit.

Test Plan:
  - Destroyed 7 similar refs simultaneously.
  - Ran `bin/repository refs`, saw 7 entries appear in the `oldref` table.
  - Ran `bin/repository discover` with some debugging statements added, saw sensible-seeming behavior which didn't double-mark any newly-unreachable refs.

Differential Revision: https://secure.phabricator.com/D21056
2020-04-03 13:28:42 -07:00
..
codex When destorying a repository, print a notification about removing the working copy 2017-08-01 08:57:39 -07:00
conduit Update Diffusion conduit text 2017-07-02 14:25:10 +00:00
config Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
constants Simplify Create Repository page 2017-08-15 11:05:50 -07:00
customfield Move various other callsites away from callsigns 2016-01-04 06:54:42 -08:00
daemon Update some Phabricator behaviors for changes to Futures 2020-04-03 12:28:16 -07:00
data In the repository URI index, store Phabricator's own URIs as tokens 2019-10-28 14:44:06 -07:00
editor Modularize Repository transactions 2018-11-28 14:29:18 -08:00
engine Improve performance when marking commits as unreachable after multiple ref deletions 2020-04-03 13:28:42 -07:00
graphcache Bail out of PhabricatorRepositoryGraphCache more aggressively after cache fills 2017-10-06 14:12:58 -07:00
mail Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
management Add a "--dry-run" flag to "bin/repository rebuild-identities" 2019-11-19 12:38:20 -08:00
phid Remove "State Icons" from handles 2019-10-31 12:04:43 -07:00
query Add additional flags to "bin/repository rebuild-identities" to improve flexibility 2019-11-19 09:39:48 -08:00
response Accept and route VCS HTTP requests 2013-10-29 15:32:40 -07:00
search Add controllers/search/edit engine functionality to RepositoryIdentity 2018-05-31 07:03:25 -07:00
storage Distinguish between "Assigned" and "Effective" identity PHIDs more clearly and consistently 2019-11-19 09:37:44 -08:00
worker Update repository identities after all mutations to users and email addresses 2019-11-19 09:41:59 -08:00
xaction Provide a simple read-only maintenance mode for repositories 2019-08-29 15:23:10 -07:00