Page MenuHomePhabricator

Fix an issue where "bin/differential migrate-hunk" could decompress data
ClosedPublic

Authored by epriestley on Sep 18 2017, 7:27 PM.
Tags
None
Referenced Files
F18586864: D18624.id.diff
Thu, Sep 11, 7:54 PM
F18509116: D18624.id.diff
Fri, Sep 5, 3:13 AM
F18501651: D18624.diff
Thu, Sep 4, 9:52 PM
F18372749: D18624.diff
Aug 28 2025, 6:47 AM
F18189646: D18624.id44718.diff
Aug 16 2025, 10:10 PM
F18091405: D18624.id.diff
Aug 6 2025, 9:32 PM
F18082902: D18624.diff
Aug 5 2025, 7:55 AM
F17836337: D18624.id44715.diff
Jul 26 2025, 4:02 PM
Subscribers
None

Details

Summary

Fixes T12986. I caught this bug in the changes from D18584: when we moved a large hunk to file storage, we would decompress it but keep the "deflated" flag. This could cause confusion when loading it later. I missed this in testing since I wasn't exhaustive enough in checking hunks and didn't run into a compressed one.

Instead of compressing on save(), compress during the normal workflow.

We currently never advise users to run this workflow so I didn't bother trying to clean up possible existing migrations.

Test Plan
  • Ran bin/differential migrate-hunk on compressed hunks, moving them to and from file storage. Saw them work correctly and remain compressed.
  • Created new small (uncompressed) and large (compressed) hunks, verified they work properly and get compressed (if applicable).
  • Used bin/cache purge --caches changeset to clear changeset caches and make sure the actual table was being hit.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable