Page MenuHomePhabricator

Add an alternate "modern" hunk datastore
ClosedPublic

Authored by epriestley on May 25 2014, 4:36 PM.

Details

Summary

Ref T4045. Ref T5179. Hunk storage has two major issues:

  • It's utf8, but actual diffs are binary.
  • It's huge and can't be compressed or archived.

This introduces a second datastore which solves these problems: by recording hunk encoding, supporting compression, and supporting alternate storage. There's no actual compression or storage support yet, but there's space in the table for them.

Since nothing actually uses hunk IDs, it's fine to have these tables exist at the same time and use the same IDs. We can migrate data between the tables gradually without requiring downtime or disrupting installs.

Test Plan
  • There are no writes to the new table yet.
  • The only effect this has is making us issue one extra query when looking for hunks.
  • Observed the query issue, but everything else continue working fine.
  • Created a new diff.
  • Ran unit tests.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

epriestley updated this revision to Diff 22055.May 25 2014, 4:36 PM
epriestley retitled this revision from to Add an alternate "modern" hunk datastore.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
epriestley updated this revision to Diff 22056.May 25 2014, 4:43 PM
  • Add date created / date modified.
epriestley updated this revision to Diff 22057.May 25 2014, 4:54 PM
  • Spell "dateModified" correctly.
epriestley updated this revision to Diff 22061.May 25 2014, 7:24 PM
  • Make the dataEncoding column nullable for consistency ("encoding is not known").
btrahan accepted this revision.Jun 3 2014, 10:17 PM
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jun 3 2014, 10:17 PM
epriestley closed this revision.Jun 4 2014, 1:03 AM
epriestley updated this revision to Diff 22329.

Closed by commit rP0aa913805d14 (authored by @epriestley).