Page MenuHomePhabricator

Define "idle" connections that are safe to close (no transactions, no held locks)

Authored by epriestley on Nov 20 2018, 6:47 PM.



Ref T13216. See PHI916. When workers are spending 20 minutes in ssh ... ./, we'd like to drop database connections to reduce the cost of having a large fleet of build agents.

To prepare for this, define what it means for a connection to be "idle": no held locks and no open transactions. These connections are safe to close without loss of state.

Test Plan

See next revision for use.

Diff Detail

rPHU libphutil
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Nov 20 2018, 6:47 PM
epriestley requested review of this revision.Nov 20 2018, 6:48 PM
amckinley accepted this revision.Nov 20 2018, 10:06 PM
This revision is now accepted and ready to land.Nov 20 2018, 10:06 PM
This revision was automatically updated to reflect the committed changes.