aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kunal Thakar <kun...@gmail.com>
Subject Re: Review Request 42656: Don't destroy session between requests with TRequestsTransport
Date Mon, 07 Mar 2016 19:38:02 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42656/
-----------------------------------------------------------

(Updated March 7, 2016, 7:38 p.m.)


Review request for Aurora and Stephan Erb.


Changes
-------

I have added the isOpen() check back to flush as it was breaking unit tests that did not explicitly
call transport.open() before making client calls. I can fix the unit tests, but I think this
is safer.

On a related note, it looks like this code was copied from THttpClient from the thrift repo
(https://github.com/apache/thrift/blob/master/lib/py/src/transport/THttpClient.py#L115), where
it made sense to open a new connection with every flush, but in our case, it doesn't make
sense.


Repository: aurora


Description
-------

As an API consumer, I want the API client to reuse open connections and not create a new one
for every query.


Diffs (updated)
-----

  src/main/python/apache/aurora/common/transport.py 909021ac203185862267d4359d332fc169a06b7e

  src/test/python/apache/aurora/common/test_transport.py 1f589a9ae08e1f13be34ad6002ceb11a43fdeb5f


Diff: https://reviews.apache.org/r/42656/diff/


Testing
-------

./pants test.pytest src/test/python::


Thanks,

Kunal Thakar


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message