1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-04 02:48:25 +01:00
phorge-phorge/src/applications/audit
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
..
application Provide bucketing for commits in Audit 2017-01-12 12:04:05 -08:00
conduit Rename "PhabricatorAuditCommitStatusConstants" to "DiffusionCommitAuditStatus"; remove "MODERN_" 2018-09-12 12:44:43 -07:00
constants Rename "PhabricatorAuditCommitStatusConstants" to "DiffusionCommitAuditStatus"; remove "MODERN_" 2018-09-12 12:44:43 -07:00
controller Merge "Audit" more completely into "Diffusion" 2017-01-11 16:28:42 -08:00
editor Fix missing link targets for "View Object" header buttons in HTML email 2019-06-18 13:20:56 -07:00
mail Allow multiple mail receivers to react to an individual email 2019-01-16 12:28:02 -08:00
management 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
query Show "hold reasons" on commit page, not on "Edit" page 2019-04-25 09:22:49 -07:00
storage Stabilize sorting of feed stories with similar strength 2019-05-22 15:50:59 -07:00
view Introduce an AuditStatus object for commits and move some callsites to it 2018-09-07 10:20:04 -07:00