Page MenuHomePhabricator

Provide a fast path for resolving repository refs
ClosedPublic

Authored by epriestley on Jan 23 2015, 2:35 PM.
Tags
None
Referenced Files
F13085342: D11476.diff
Wed, Apr 24, 11:47 PM
Unknown Object (File)
Tue, Apr 16, 3:57 AM
Unknown Object (File)
Wed, Apr 10, 10:02 AM
Unknown Object (File)
Tue, Apr 9, 6:08 AM
Unknown Object (File)
Fri, Apr 5, 5:02 AM
Unknown Object (File)
Feb 6 2024, 6:34 PM
Unknown Object (File)
Jan 27 2024, 5:26 AM
Unknown Object (File)
Jan 16 2024, 5:41 PM
Subscribers
Tokens
"Mountain of Wealth" token, awarded by btrahan.

Details

Summary

Ref T2783. With service-oriented calls, we take a larger performacne hit than necessary resolving refs.

Instead of resolving refs over the wire, try to resolve them from the database first. This can resolve almost all refs (commit hashes, branch and tag names).

This can't resolve weird refs like master~50, and obviously can't resolve invalid refs. In those cases we'll go back to the old logic, call diffusion.resolverefs, and end up with the right result.

Test Plan
  • Browsed repositories in Diffusion.
  • Verified that service repositories no longer make unnecessary diffusion.resolverefs calls for common refs (branch names, commit hashes).
  • Resolved refs like master~50, saw call to underlying VCS and correct result.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Provide a fast path for resolving repository refs.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan awarded a token.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jan 23 2015, 6:22 PM
This revision was automatically updated to reflect the committed changes.