Homec4science

Provide a fast path for resolving repository refs

Authored by epriestley <git@epriestley.com> on Jan 23 2015, 22:31.

Description

Provide a fast path for resolving repository refs

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783

Differential Revision: https://secure.phabricator.com/D11476

Details

Committed
epriestley <git@epriestley.com>Jan 23 2015, 22:31
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd94d1da61098: Proxy Diffusion Conduit API calls
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd98eb2c8b809: Provide a fast path for resolving repository refs (authored by epriestley <git@epriestley.com>).Jan 23 2015, 22:31