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
Unknown Object (File)
Jun 1 2025, 8:02 PM
Unknown Object (File)
May 30 2025, 11:07 PM
Unknown Object (File)
May 29 2025, 4:08 PM
Unknown Object (File)
May 8 2025, 6:29 AM
Unknown Object (File)
Apr 26 2025, 11:22 PM
Unknown Object (File)
Apr 25 2025, 4:09 PM
Unknown Object (File)
Apr 22 2025, 12:34 AM
Unknown Object (File)
Apr 16 2025, 4:23 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