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
F18828315: D17164.diff
Fri, Oct 24, 3:44 PM
F18749083: D17164.id.diff
Sat, Oct 4, 2:21 AM
F18622186: D17164.diff
Sep 15 2025, 10:45 AM
F18594615: D17164.diff
Sep 12 2025, 6:46 PM
F18566037: D17164.id.diff
Sep 9 2025, 2:15 PM
F18500436: D17164.diff
Sep 4 2025, 9:04 PM
F18469261: D17164.id.diff
Sep 2 2025, 4:33 PM
F18461779: D17164.diff
Sep 1 2025, 9:06 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