launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17688
[Merge] lp:~wgrant/launchpad/bug-1408557-mitigate into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/bug-1408557-mitigate into lp:launchpad.
Commit message:
Mitigate librarian swift FD leaks (bug #1408557) by reusing connections on 404.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-1408557-mitigate/+merge/246022
Mitigate librarian swift FD leaks (bug #1408557) by reusing connections on 404.
This isn't a complete fix, but it's worked on production for a couple of days.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-1408557-mitigate into lp:launchpad.
=== modified file 'lib/lp/services/librarianserver/storage.py'
--- lib/lp/services/librarianserver/storage.py 2014-10-17 09:21:23 +0000
+++ lib/lp/services/librarianserver/storage.py 2015-01-09 23:17:01 +0000
@@ -99,7 +99,9 @@
swift_stream = TxSwiftStream(swift_connection, chunks)
defer.returnValue(swift_stream)
except swiftclient.ClientException as x:
- if x.http_status != 404:
+ if x.http_status == 404:
+ swift.connection_pool.put(swift_connection)
+ else:
self.swift_download_fails += 1
log.err(x)
except Exception as x:
Follow ups