1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 02:12:41 +01:00
phorge-phorge/src
epriestley 63d84e0b44 Improve use of keys when iterating over commits in "bin/audit delete" and "bin/repository rebuild-identities"
Summary:
Fixes T13457. Ref T13444. When we iterate over commits in a particular repository, the default iteration strategy can't effectively use the keys on the table.

Tweak the ordering so the "<repositoryID, epoch, [id]>" key can be used.

Test Plan:
  - Ran `bin/audit delete --repository X` and `bin/repository rebuild-identities --repository X` before and after changes.
    - With just the key changes, performance was slightly better. My local data isn't large enough to really emphasize the key changes.
    - With the page size changes, performance was a bit better (~30%, but on 1-3 second run durations).
  - Used `--trace` and ran `EXPLAIN ...` on the new queries, saw them select the "<repositoryID, epoch, [id]>" key and report a bare "Using index condition" in the "Extra" column.

Maniphest Tasks: T13457, T13444

Differential Revision: https://secure.phabricator.com/D20921
2019-11-19 10:18:55 -08:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Make HTTP/403 say "Yikes!" 2019-09-30 09:27:39 -07:00
applications Improve use of keys when iterating over commits in "bin/audit delete" and "bin/repository rebuild-identities" 2019-11-19 10:18:55 -08:00
docs Remove "PhabricatorEventType::TYPE_DIFFUSION_LOOKUPUSER" event 2019-11-19 09:38:03 -08:00
extensions
infrastructure Improve use of keys when iterating over commits in "bin/audit delete" and "bin/repository rebuild-identities" 2019-11-19 10:18:55 -08:00
view Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
__phutil_library_init__.php
__phutil_library_map__.php Update repository identities after all mutations to users and email addresses 2019-11-19 09:41:59 -08:00