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
F15585018: D21583.diff
Thu, May 8, 6:29 AM
F15548383: D21583.id.diff
Sat, Apr 26, 11:22 PM
F15542181: D21583.diff
Fri, Apr 25, 4:09 PM
F15527087: D21583.diff
Tue, Apr 22, 12:34 AM
F15509827: D21583.diff
Wed, Apr 16, 4:23 PM
F15452170: D21583.id51388.diff
Mar 29 2025, 2:19 AM
F15447966: D21583.id51380.diff
Mar 28 2025, 2:34 AM
F15438565: D21583.id.diff
Mar 26 2025, 1:33 AM
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