Page MenuHomePhabricator

When updating revisions in response to commits, reuse previously generated diffs
ClosedPublic

Authored by epriestley on Jan 9 2017, 7:45 PM.
Tags
None
Referenced Files
F15572030: D17164.diff
Mon, May 5, 11:50 AM
F15568811: D17164.id41276.diff
Sat, May 3, 9:40 AM
F15559016: D17164.id41278.diff
Tue, Apr 29, 6:36 AM
F15542211: D17164.id.diff
Fri, Apr 25, 4:14 PM
F15538658: D17164.diff
Thu, Apr 24, 8:45 PM
F15526704: D17164.id.diff
Mon, Apr 21, 10:23 PM
F15505145: D17164.id.diff
Tue, Apr 15, 12:04 AM
F15446645: D17164.id41278.diff
Mar 27 2025, 7:39 PM
Subscribers
None

Details

Summary

Fixes T10968. In rare situations, we can generate a diff, then hit an error which causes this update to fail.

When it does, we tend to get stuck in a loop creating diffs, which can fill the database up with garbage. We saw this once in the Phacility cluster, and one instance hit it, too.

Instead: when we create a diff, keep track of which commit we generated it from. The next time through, reuse it if we already built it.

Test Plan
  • Used bin/differential attach-commit <commit> <revision> to hit this code.
  • Simulated a filesystem write failure, saw the diff get reused.
  • Also did a normal update, which worked properly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable