HomePhorge

Simplify Aphront transaction code

Description

Simplify Aphront transaction code

Summary:
In D1515, I introduced some excessively-complicated semantics for detecting
connections that are lost while transactional. These semantics cause us to
reenter establishConnection() and establish twice as many connections as we need
in the common case.

We don't need a hook there at all -- it's sufficient to throw the exception
rather than retrying the query when we encounter it. This doesn't have
reentrancy problems.

Test Plan:

  • Added some encapsulation-violating hooks and a unit test for them
  • Verified we no longer double-connect.

Reviewers: btrahan, nh

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T835

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

Details

Provenance
epriestleyAuthored on Feb 7 2012, 2:58 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPf19d5fbeae67: Fix existence test in "reconcile.php"
Branches
Unknown
Tags
Unknown

Event Timeline