Homec4science

Modernize file storage engine selection

Authored by epriestley <git@epriestley.com> on Mar 12 2015, 21:28.

Description

Modernize file storage engine selection

Summary:
Fixes T5843. File storage engines use a very old "selector" mechanism which makes them difficult to extend.

This mechanism predates widespread use of PhutilSymbolLoader to discover available implementations at runtime. Runtime discovery has generally proven more flexible and easier to use than explicit selection (although it sometimes needs more UI to support it in cases where order or enabled/disabled flags can not be directly determined).

Use a modern runtime discovery mechanism instead of an explicit selector. This might break any installs which subclassed the Selector, but I believe almost no such installs exist, and they'll receive a meaningful exception upon upgrading (any custom engines will no longer implement all of the required methods).

Looking forward, this modernizes infrastructure to prepare for new "virtual" chunked-storage engines, with the eventual goal of supporting very large file uploads and data import into the Phacility cluster.

This uses D12051 to add UI to make it easier to understand the state of storage engines.

Test Plan:
Used new UI panel to assess storage engines:

{F336270}

  • Uploaded a small file, saw it go to MySQL engine.
  • Uploaded a larger file, saw it go to S3 engine.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5843

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

Details

Committed
epriestley <git@epriestley.com>Mar 12 2015, 21:28
Pushed
aubortJan 31 2017, 17:16
Parents
rPH973079a7da3d: Modularize application configuration panels
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe2296a0ff773: Modernize file storage engine selection (authored by epriestley <git@epriestley.com>).Mar 12 2015, 21:28