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
F18091305: D17164.id41276.diff
Wed, Aug 6, 8:56 PM
F18088072: D17164.id41278.diff
Wed, Aug 6, 6:44 AM
F18014690: D17164.id.diff
Sat, Aug 2, 5:33 PM
F17757608: D17164.id41278.diff
Tue, Jul 22, 4:17 PM
F17754718: D17164.id41276.diff
Tue, Jul 22, 11:14 AM
F17739798: D17164.diff
Jul 21 2025, 3:52 AM
F17656942: D17164.id.diff
Jul 12 2025, 11:48 AM
Unknown Object (File)
May 31 2025, 8:23 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