Page MenuHomePhabricator

Improve use of keys when iterating over commits in "bin/audit delete" and "bin/repository rebuild-identities"
ClosedPublic

Authored by epriestley on Nov 19 2019, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 8, 3:56 AM
Unknown Object (File)
Feb 20 2024, 9:47 PM
Unknown Object (File)
Feb 12 2024, 3:30 PM
Unknown Object (File)
Feb 11 2024, 8:25 PM
Unknown Object (File)
Jan 6 2024, 6:02 AM
Unknown Object (File)
Dec 31 2023, 1:54 PM
Unknown Object (File)
Dec 26 2023, 4:11 AM
Unknown Object (File)
Nov 30 2023, 4:02 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Nov 19 2019, 6:19 PM
This revision was automatically updated to reflect the committed changes.