Page MenuHomePhabricator

Add an alternate "modern" hunk datastore

Authored by epriestley on May 25 2014, 4:36 PM.
Referenced Files
F13212391: D9290.id22329.diff
Fri, May 17, 6:39 AM
F13208296: D9290.diff
Thu, May 16, 1:12 PM
F13208034: D9290.id22057.diff
Thu, May 16, 8:06 AM
Sun, May 12, 10:18 AM
F13181428: D9290.id22055.diff
Thu, May 9, 12:14 PM
F13176401: D9290.diff
Wed, May 8, 1:36 PM
Unknown Object (File)
Tue, May 7, 5:01 AM
Unknown Object (File)
Sun, May 5, 2:46 AM



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

rP Phabricator
Lint Skipped
Tests Skipped

Event Timeline

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.
  • Add date created / date modified.
  • Spell "dateModified" correctly.
  • Make the dataEncoding column nullable for consistency ("encoding is not known").
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jun 3 2014, 10:17 PM
epriestley updated this revision to Diff 22329.

Closed by commit rP0aa913805d14 (authored by @epriestley).