Page MenuHomePhabricator

When a GlobalLock with an external connection is released, don't return it to the pool
ClosedPublic

Authored by epriestley on Mar 2 2021, 8:49 PM.
Tags
None
Referenced Files
F18901953: D21583.id.diff
Nov 7 2025, 11:17 PM
F18878344: D21583.diff
Nov 6 2025, 5:00 PM
F18852859: D21583.diff
Oct 31 2025, 12:34 PM
F18792219: D21583.id51380.diff
Oct 16 2025, 7:11 PM
F18749549: D21583.diff
Oct 4 2025, 4:14 AM
F18743683: D21583.id.diff
Oct 3 2025, 12:28 AM
F18740006: D21583.diff
Oct 1 2025, 11:57 PM
F18739083: D21583.diff
Oct 1 2025, 7:34 PM
Subscribers
None

Details

Summary

Ref T13627. Currently, global locks always return connections (even external connections) to the connection pool when unlocked.

This code is obviously buggy: isExternalConnection is set to false immediately before it is tested. This bug has existed since this code was introduced, in D15792.

  • Instead of storing a flag, store the actual connection.
  • Don't clear it when unlocking.
  • Don't return external connections to the pool.
Test Plan
  • Added a failing test, made it pass.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable