Homec4science

Allow Phabricator storage engines to be extended and configured

Authored by epriestley <git@epriestley.com> on Jul 20 2011, 07:48.

Description

Allow Phabricator storage engines to be extended and configured

Summary:
See T344. Currently, there's a hard-coded 12MB filesize limit and some awkward
interactions with MySQL's max_allowed_packet. Make this system generally more
robust:

  • Move the upload limit to configuration.
  • Add setup steps which reconcile max_allowed_packet vs MySQL file storage

limits.

  • Add a layer of indirection between uploading files and storage engines.
  • Allow the definition of new storage engines.
  • Define a local disk storage engine.
  • Add a "storage engine selector" class which manages choosing which storage

engines to put files in.

  • Document storage engines.
  • Document file storage classes.

Test Plan:
Setup mode:

  • Disabled MySQL storage engine, misconfigured it, configured it correctly.
  • Disabled file storage engine, set it to something invalid, set it to

something valid.

  • Verified max_allowed_packet is read correctly.

Application mode:

  • Configured local file storage.
  • Uploaded large and small files.
  • Verified larger files were written to local storage.
  • Verified smaller files were written to MySQL blob storage.

Documentation:

  • Read documentation.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 695

Details

Committed
epriestley <git@epriestley.com>Jul 22 2011, 01:44
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7b40c616d6cd: Refactor user settings
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH2b7210260f10: Allow Phabricator storage engines to be extended and configured (authored by epriestley <git@epriestley.com>).Jul 22 2011, 01:44