Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 376 lines (336 sloc) 13.541 kb
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
1 require 'monitor'
50cd4bd @nicksieger Introduce synchronization around connection pool access
nicksieger authored
2 require 'set'
e8550ee @jeremy Cherry-pick core extensions
jeremy authored
3 require 'active_support/core_ext/module/synchronization'
50cd4bd @nicksieger Introduce synchronization around connection pool access
nicksieger authored
4
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
5 module ActiveRecord
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
6 # Raised when a connection could not be obtained within the connection
7 # acquisition timeout period.
8 class ConnectionTimeoutError < ConnectionNotEstablished
9 end
10
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
11 module ConnectionAdapters
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
12 # Connection pool base class for managing ActiveRecord database
13 # connections.
14 #
a293278 @lifo Merge docrails
lifo authored
15 # == Introduction
16 #
17 # A connection pool synchronizes thread access to a limited number of
18 # database connections. The basic idea is that each thread checks out a
19 # database connection from the pool, uses that connection, and checks the
20 # connection back in. ConnectionPool is completely thread-safe, and will
21 # ensure that a connection cannot be used by two threads at the same time,
22 # as long as ConnectionPool's contract is correctly followed. It will also
23 # handle cases in which there are more threads than connections: if all
24 # connections have been checked out, and a thread tries to checkout a
25 # connection anyway, then ConnectionPool will wait until some other thread
26 # has checked in a connection.
27 #
28 # == Obtaining (checking out) a connection
29 #
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
30 # Connections can be obtained and used from a connection pool in several
31 # ways:
32 #
817a07b @nicksieger More doco and class/method renames. Now have a strategy for integration ...
nicksieger authored
33 # 1. Simply use ActiveRecord::Base.connection as with ActiveRecord 2.1 and
34 # earlier (pre-connection-pooling). Eventually, when you're done with
35 # the connection(s) and wish it to be returned to the pool, you call
36 # ActiveRecord::Base.clear_active_connections!. This will be the
37 # default behavior for ActiveRecord when used in conjunction with
38 # ActionPack's request handling cycle.
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
39 # 2. Manually check out a connection from the pool with
40 # ActiveRecord::Base.connection_pool.checkout. You are responsible for
41 # returning this connection to the pool when finished by calling
42 # ActiveRecord::Base.connection_pool.checkin(connection).
43 # 3. Use ActiveRecord::Base.connection_pool.with_connection(&block), which
44 # obtains a connection, yields it as the sole argument to the block,
45 # and returns it to the pool after the block completes.
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
46 #
a293278 @lifo Merge docrails
lifo authored
47 # Connections in the pool are actually AbstractAdapter objects (or objects
48 # compatible with AbstractAdapter's interface).
49 #
50 # == Options
51 #
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
52 # There are two connection-pooling-related options that you can add to
53 # your database connection configuration:
54 #
55 # * +pool+: number indicating size of connection pool (default 5)
56 # * +wait_timeout+: number of seconds to block and wait for a connection
57 # before giving up and raising a timeout error (default 5 seconds).
817a07b @nicksieger More doco and class/method renames. Now have a strategy for integration ...
nicksieger authored
58 class ConnectionPool
cccb998 @josevalim Expose connections available in the connection pool.
josevalim authored
59 attr_reader :spec, :connections
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
60
a293278 @lifo Merge docrails
lifo authored
61 # Creates a new ConnectionPool object. +spec+ is a ConnectionSpecification
62 # object which describes database connection information (e.g. adapter,
63 # host name, username, password, etc), as well as the maximum size for
64 # this ConnectionPool.
65 #
66 # The default ConnectionPool maximum size is 5.
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
67 def initialize(spec)
68 @spec = spec
dd77733 @jeremy Timeout the connection pool monitor on ruby 1.8 only
jeremy authored
69
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
70 # The cache of reserved connections mapped to threads
71 @reserved_connections = {}
dd77733 @jeremy Timeout the connection pool monitor on ruby 1.8 only
jeremy authored
72
cab76ce @nicksieger Add synchronization to connection pool also
nicksieger authored
73 # The mutex used to synchronize pool access
74 @connection_mutex = Monitor.new
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
75 @queue = @connection_mutex.new_cond
dd77733 @jeremy Timeout the connection pool monitor on ruby 1.8 only
jeremy authored
76
77 # default 5 second timeout unless on ruby 1.9
78 @timeout =
79 if RUBY_VERSION < '1.9'
80 spec.config[:wait_timeout] || 5
81 end
82
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
83 # default max pool size to 5
84 @size = (spec.config[:pool] && spec.config[:pool].to_i) || 5
dd77733 @jeremy Timeout the connection pool monitor on ruby 1.8 only
jeremy authored
85
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
86 @connections = []
87 @checked_out = []
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
88 end
89
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
90 # Retrieve the connection associated with the current thread, or call
91 # #checkout to obtain one if necessary.
92 #
93 # #connection can be called any number of times; the connection is
94 # held in a hash keyed by the thread id.
95 def connection
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
96 if conn = @reserved_connections[current_connection_id]
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
97 conn
98 else
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
99 @reserved_connections[current_connection_id] = checkout
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
100 end
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
101 end
102
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
103 # Signal that the thread is finished with the current connection.
817a07b @nicksieger More doco and class/method renames. Now have a strategy for integration ...
nicksieger authored
104 # #release_connection releases the connection-thread association
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
105 # and returns the connection to the pool.
817a07b @nicksieger More doco and class/method renames. Now have a strategy for integration ...
nicksieger authored
106 def release_connection
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
107 conn = @reserved_connections.delete(current_connection_id)
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
108 checkin conn if conn
109 end
110
5501b99 @coderrr Ensure ActiveRecord::Base.connection_pool.with_connection creates a new ...
coderrr authored
111 # If a connection already exists yield it to the block. If no connection
112 # exists checkout a connection, yield it to the block, and checkin the
113 # connection when finished.
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
114 def with_connection
5501b99 @coderrr Ensure ActiveRecord::Base.connection_pool.with_connection creates a new ...
coderrr authored
115 fresh_connection = true unless @reserved_connections[current_connection_id]
116 yield connection
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
117 ensure
5501b99 @coderrr Ensure ActiveRecord::Base.connection_pool.with_connection creates a new ...
coderrr authored
118 release_connection if fresh_connection
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
119 end
120
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
121 # Returns true if a connection has already been opened.
122 def connected?
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
123 !@connections.empty?
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
124 end
125
a293278 @lifo Merge docrails
lifo authored
126 # Disconnects all connections in the pool, and clears the pool.
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
127 def disconnect!
128 @reserved_connections.each do |name,conn|
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
129 checkin conn
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
130 end
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
131 @reserved_connections = {}
132 @connections.each do |conn|
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
133 conn.disconnect!
134 end
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
135 @connections = []
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
136 end
137
50cd4bd @nicksieger Introduce synchronization around connection pool access
nicksieger authored
138 # Clears the cache which maps classes
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
139 def clear_reloadable_connections!
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
140 @reserved_connections.each do |name, conn|
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
141 checkin conn
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
142 end
143 @reserved_connections = {}
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
144 @connections.each do |conn|
145 conn.disconnect! if conn.requires_reloading?
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
146 end
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
147 @connections = []
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
148 end
149
817a07b @nicksieger More doco and class/method renames. Now have a strategy for integration ...
nicksieger authored
150 # Verify active connections and remove and disconnect connections
151 # associated with stale threads.
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
152 def verify_active_connections! #:nodoc:
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
153 clear_stale_cached_connections!
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
154 @connections.each do |connection|
7ba2872 @nicksieger Deprecate verification_timeout and verify before reset
nicksieger authored
155 connection.verify!
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
156 end
157 end
158
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
159 # Return any checked-out connections back to the pool by threads that
160 # are no longer alive.
161 def clear_stale_cached_connections!
162 remove_stale_cached_threads!(@reserved_connections) do |name, conn|
163 checkin conn
164 end
165 end
166
a293278 @lifo Merge docrails
lifo authored
167 # Check-out a database connection from the pool, indicating that you want
168 # to use it. You should call #checkin when you no longer need this.
169 #
170 # This is done by either returning an existing connection, or by creating
171 # a new connection. If the maximum number of connections for this pool has
172 # already been reached, but the pool is empty (i.e. they're all being used),
173 # then this method will wait until a thread has checked in a connection.
174 # The wait time is bounded however: if no connection can be checked out
175 # within the timeout specified for this pool, then a ConnectionTimeoutError
176 # exception will be raised.
177 #
178 # Returns: an AbstractAdapter object.
179 #
180 # Raises:
181 # - ConnectionTimeoutError: no connection can be obtained from the pool
182 # within the timeout period.
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
183 def checkout
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
184 # Checkout an available connection
185 @connection_mutex.synchronize do
21eb18a @alk Fix race in ConnectionPool#checkout
alk authored
186 loop do
187 conn = if @checked_out.size < @connections.size
188 checkout_existing_connection
189 elsif @connections.size < @size
190 checkout_new_connection
191 end
192 return conn if conn
193 # No connections available; wait for one
194 if @queue.wait(@timeout)
195 next
196 else
8343611 @alk made ConnectionPool#checkout more robust by trying to loot dead threads ...
alk authored
197 # try looting dead threads
198 clear_stale_cached_connections!
199 if @size == @checked_out.size
dd77733 @jeremy Timeout the connection pool monitor on ruby 1.8 only
jeremy authored
200 raise ConnectionTimeoutError, "could not obtain a database connection#{" within #{@timeout} seconds" if @timeout}. The max pool size is currently #{@size}; consider increasing it."
8343611 @alk made ConnectionPool#checkout more robust by trying to loot dead threads ...
alk authored
201 end
21eb18a @alk Fix race in ConnectionPool#checkout
alk authored
202 end
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
203 end
204 end
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
205 end
206
a293278 @lifo Merge docrails
lifo authored
207 # Check-in a database connection back into the pool, indicating that you
208 # no longer need this connection.
209 #
210 # +conn+: an AbstractAdapter object, which was obtained by earlier by
211 # calling +checkout+ on this pool.
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
212 def checkin(conn)
213 @connection_mutex.synchronize do
471a394 @nicksieger Modify connection pool callbacks to be compatible w/ new style
nicksieger authored
214 conn.run_callbacks :checkin do
215 @checked_out.delete conn
216 @queue.signal
217 end
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
218 end
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
219 end
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
220
113cc4e @nicksieger Remove some synchronization that's probably overkill, assuming one doesn...
nicksieger authored
221 synchronize :clear_reloadable_connections!, :verify_active_connections!,
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
222 :connected?, :disconnect!, :with => :@connection_mutex
223
224 private
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
225 def new_connection
a3f12f5 @nicksieger Default connection allow_concurrency to false (for PostgreSQL)
nicksieger authored
226 ActiveRecord::Base.send(spec.adapter_method, spec.config)
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
227 end
228
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
229 def current_connection_id #:nodoc:
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
230 Thread.current.object_id
231 end
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
232
029952e @nicksieger Extract a base class for connection pools, start to flesh out reserve/re...
nicksieger authored
233 # Remove stale threads from the cache.
234 def remove_stale_cached_threads!(cache, &block)
235 keys = Set.new(cache.keys)
236
237 Thread.list.each do |thread|
238 keys.delete(thread.object_id) if thread.alive?
239 end
240 keys.each do |key|
241 next unless cache.has_key?(key)
242 block.call(key, cache[key])
243 cache.delete(key)
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
244 end
245 end
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
246
247 def checkout_new_connection
248 c = new_connection
249 @connections << c
a96b7d4 @nicksieger Add connection reset and verification upon each connection checkout
nicksieger authored
250 checkout_and_verify(c)
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
251 end
252
253 def checkout_existing_connection
d7d2d73 @nicksieger Fix typo: was using brackets instead of parens. Must need more sleep.
nicksieger authored
254 c = (@connections - @checked_out).first
a96b7d4 @nicksieger Add connection reset and verification upon each connection checkout
nicksieger authored
255 checkout_and_verify(c)
256 end
257
258 def checkout_and_verify(c)
471a394 @nicksieger Modify connection pool callbacks to be compatible w/ new style
nicksieger authored
259 c.run_callbacks :checkout do
260 c.verify!
261 @checked_out << c
262 end
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
263 c
264 end
265 end
266
a293278 @lifo Merge docrails
lifo authored
267 # ConnectionHandler is a collection of ConnectionPool objects. It is used
268 # for keeping separate connection pools for ActiveRecord models that connect
269 # to different databases.
270 #
271 # For example, suppose that you have 5 models, with the following hierarchy:
272 #
273 # |
274 # +-- Book
275 # | |
276 # | +-- ScaryBook
277 # | +-- GoodBook
278 # +-- Author
279 # +-- BankAccount
280 #
281 # Suppose that Book is to connect to a separate database (i.e. one other
282 # than the default database). Then Book, ScaryBook and GoodBook will all use
283 # the same connection pool. Likewise, Author and BankAccount will use the
284 # same connection pool. However, the connection pool used by Author/BankAccount
285 # is not the same as the one used by Book/ScaryBook/GoodBook.
286 #
287 # Normally there is only a single ConnectionHandler instance, accessible via
288 # ActiveRecord::Base.connection_handler. ActiveRecord models use this to
289 # determine that connection pool that they should use.
ca6d717 @nicksieger Deprecate allow_concurrency and make it have no effect
nicksieger authored
290 class ConnectionHandler
72d959d @nicksieger Split connection handler into single- and multiple-thread versions.
nicksieger authored
291 def initialize(pools = {})
292 @connection_pools = pools
293 end
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
294
72d959d @nicksieger Split connection handler into single- and multiple-thread versions.
nicksieger authored
295 def connection_pools
296 @connection_pools ||= {}
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
297 end
298
299 def establish_connection(name, spec)
8e5e02b @nicksieger Collapse connection pool class hierarchy; YAGNI.
nicksieger authored
300 @connection_pools[name] = ConnectionAdapters::ConnectionPool.new(spec)
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
301 end
302
d07a6b1 @nicksieger Make clear_active_connections! also return stale connections back to the...
nicksieger authored
303 # Returns any connections in use by the current thread back to the pool,
304 # and also returns connections to the pool cached by threads that are no
305 # longer alive.
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
306 def clear_active_connections!
529c271 @nicksieger Simplify dispatcher callbacks to eliminate unnecessary stale thread purg...
nicksieger authored
307 @connection_pools.each_value {|pool| pool.release_connection }
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
308 end
309
310 # Clears the cache which maps classes
311 def clear_reloadable_connections!
312 @connection_pools.each_value {|pool| pool.clear_reloadable_connections! }
313 end
314
315 def clear_all_connections!
72d959d @nicksieger Split connection handler into single- and multiple-thread versions.
nicksieger authored
316 @connection_pools.each_value {|pool| pool.disconnect! }
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
317 end
318
319 # Verify active connections.
320 def verify_active_connections! #:nodoc:
817a07b @nicksieger More doco and class/method renames. Now have a strategy for integration ...
nicksieger authored
321 @connection_pools.each_value {|pool| pool.verify_active_connections! }
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
322 end
323
324 # Locate the connection of the nearest super class. This can be an
325 # active or defined connection: if it is the latter, it will be
326 # opened and set as the active connection for the class it was defined
327 # for (not necessarily the current class).
328 def retrieve_connection(klass) #:nodoc:
329 pool = retrieve_connection_pool(klass)
330 (pool && pool.connection) or raise ConnectionNotEstablished
331 end
332
82fcd9d @nicksieger Clean up the code, get rid of reserve/release, add some more docs
nicksieger authored
333 # Returns true if a connection that's accessible to this class has
334 # already been opened.
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
335 def connected?(klass)
0832bc6 @lifo Make sure ActiveRecord::Base.connected? doesn't raise an exception for d...
lifo authored
336 conn = retrieve_connection_pool(klass)
337 conn ? conn.connected? : false
ff97e9d @nicksieger Connection handling methods extracted out into separate ConnectionHandle...
nicksieger authored
338 end
339
340 # Remove the connection for this class. This will close the active
341 # connection and the defined connection (if they exist). The result
342 # can be used as an argument for establish_connection, for easily
343 # re-establishing the connection.
344 def remove_connection(klass)
345 pool = @connection_pools[klass.name]
346 @connection_pools.delete_if { |key, value| value == pool }
347 pool.disconnect! if pool
348 pool.spec.config if pool
349 end
350
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
351 def retrieve_connection_pool(klass)
3007545 @nicksieger Minor tweak to retrieve_connection_pool -- recurse instead of loop
nicksieger authored
352 pool = @connection_pools[klass.name]
353 return pool if pool
354 return nil if ActiveRecord::Base == klass
355 retrieve_connection_pool klass.superclass
fe575dd @nicksieger Nearing the finish line. Initial fixed-size connection pool implemented,...
nicksieger authored
356 end
72d959d @nicksieger Split connection handler into single- and multiple-thread versions.
nicksieger authored
357 end
1b22071 @josh Ensure ActiveRecord session store's connections are checked in after eac...
josh authored
358
359 class ConnectionManagement
360 def initialize(app)
361 @app = app
362 end
363
364 def call(env)
365 @app.call(env)
366 ensure
e033b5d @lifo Merge docrails
lifo authored
367 # Don't return connection (and perform implicit rollback) if
1b22071 @josh Ensure ActiveRecord session store's connections are checked in after eac...
josh authored
368 # this request is a part of integration test
369 unless env.key?("rack.test")
370 ActiveRecord::Base.clear_active_connections!
371 end
372 end
373 end
6edaa26 @nicksieger Initial conversion to connection pool
nicksieger authored
374 end
21eb18a @alk Fix race in ConnectionPool#checkout
alk authored
375 end
Something went wrong with that request. Please try again.