]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Explicitly close requests obj in SolidFire Driver
authorJohn Griffith <john.griffith8@gmail.com>
Thu, 13 Nov 2014 14:43:13 +0000 (07:43 -0700)
committerJohn Griffith <john.griffith8@gmail.com>
Thu, 13 Nov 2014 14:58:56 +0000 (07:58 -0700)
Currently we're not explicitly returning requests
connection objects back to the ConnectionPool when
we're done with them.  For most cases this isn't a
problem, however if we start adding higher and higher
concurrent actions the internal Connection Pool management
doesn't keep up.

This patch just adds an explicit close of the requests
connection after we're done with it to keep the ConnectionPool
as full as possible and avoid any resource issues that could
occur during heavy concurrent usage.

Change-Id: Ib074ca15286060d2aa11cdc66e74be1b8eed3c93

cinder/volume/drivers/solidfire.py

index be56afb7c0ff3d3ea3276d5621974466790a7578..fe228133b7f394aa7d66c158eb3ef80566e38131 100644 (file)
@@ -169,6 +169,7 @@ class SolidFireDriver(SanISCSIDriver):
                             timeout=2)
 
         response = req.json()
+        req.close()
         if (('error' in response) and
                 (response['error']['name'] in self.retryable_errors)):
             msg = ('Retryable error (%s) encountered during '