提交 f4159506 编写于 作者: M Matthew Draper

Re-check that the connection is still stale before we reap it

A concurrent thread may have also detected it to be stale, and already
released (or even reassigned) it by now.

Fixes #25585
上级 76ce08a4
* Ensure concurrent invocations of the connection reaper cannot allocate the
same connection to two threads.
Fixes #25585.
*Matthew Draper*
* Inspecting an object with an associated array of over 10 elements no longer
truncates the array, preventing `inspect` from looping infinitely in some
cases.
......
......@@ -561,6 +561,8 @@ def reap
stale_connections.each do |conn|
synchronize do
next unless conn.in_use? && !conn.owner.alive?
if conn.active?
conn.reset!
checkin conn
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册