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
F20380836: D17164.diff
Sat, Jun 13, 1:24 AM
Unknown Object (File)
Apr 21 2026, 11:45 PM
Unknown Object (File)
Apr 4 2026, 4:36 AM
Unknown Object (File)
Mar 30 2026, 9:02 PM
Unknown Object (File)
Mar 10 2026, 1:02 PM
Unknown Object (File)
Feb 28 2026, 1:11 AM
Unknown Object (File)
Feb 1 2026, 11:40 PM
Unknown Object (File)
Dec 23 2025, 4:33 AM
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