Homec4science

Simplify Aphront transaction code

Authored by epriestley <git@epriestley.com> on Feb 7 2012, 23:58.

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

Committed
epriestley <git@epriestley.com>Feb 7 2012, 23:58
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf19d5fbeae67: Fix existence test in "reconcile.php"
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH4ac29d108cc2: Simplify Aphront transaction code (authored by epriestley <git@epriestley.com>).Feb 7 2012, 23:58