Homec4science

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

Authored by epriestley <git@epriestley.com> on Jan 9 2017, 20:39.

Description

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

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10968

Differential Revision: https://secure.phabricator.com/D17164

Details

Committed
epriestley <git@epriestley.com>Jan 9 2017, 21:13
Pushed
aubortJan 31 2017, 17:16
Parents
rPH27ecedd1d5d8: Use some more human-readable Conduit keys in updated API methods
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH2dfe79cfc713: When updating revisions in response to commits, reuse previously generated diffs (authored by epriestley <git@epriestley.com>).Jan 9 2017, 21:13