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
F14028106: D21583.diff
Fri, Nov 8, 11:51 AM
F13973061: D21583.diff
Thu, Oct 17, 10:46 PM
Unknown Object (File)
Sep 21 2024, 3:24 AM
Unknown Object (File)
Sep 19 2024, 1:30 AM
Unknown Object (File)
Sep 6 2024, 8:44 AM
Unknown Object (File)
Sep 6 2024, 8:44 AM
Unknown Object (File)
Sep 6 2024, 8:44 AM
Unknown Object (File)
Sep 3 2024, 7:02 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
Branch
lock1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25188
Build 34761: Run Core Tests
Build 34760: arc lint + arc unit