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
F18843474: D20921.id49859.diff
Tue, Oct 28, 10:35 PM
F18842733: D20921.id.diff
Tue, Oct 28, 6:04 PM
F18840126: D20921.id.diff
Mon, Oct 27, 9:28 PM
F18837941: D20921.id49860.diff
Mon, Oct 27, 8:29 AM
F18828503: D20921.diff
Fri, Oct 24, 4:36 PM
F18821096: D20921.id.diff
Wed, Oct 22, 7:05 PM
F18819249: D20921.diff
Wed, Oct 22, 5:14 AM
F18749747: D20921.diff
Oct 4 2025, 5:01 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
Branch
identity1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23688
Build 32567: Run Core Tests
Build 32566: arc lint + arc unit

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.