THRIFT-4548: python binary accelerated protocol with multiplexing via decoration#1547
Conversation
|
Very nice - I knew something was wrong when I had to disable that many tests as I added multiplexed support to TestClient, so I'm really glad to see you figured it out and removed the test exclusions! Test failures: Appveyor: Looks like oracle moved a download link and the chocolatey package hasn't been updated yet. Not relevant to this change. sca build failure: Recommend you run the flake8 commands in build/docker/scripts/sca.sh after making python code changes to avoid that in the future. We might even want to teach our regular make to do this if it's fast. ubsan failure is an intermittent lisp compiler issue where it cannot find a temporary file it just wrote - not relevant here. Cross test failure is real and related to the changes: |
| if (type == TMessageType.CALL or | ||
| type == TMessageType.ONEWAY): | ||
| self.protocol.writeMessageBegin( | ||
| super().writeMessageBegin( |
There was a problem hiding this comment.
super() takes at least 1 argument
| ) | ||
| else: | ||
| self.protocol.writeMessageBegin(name, type, seqid) | ||
| super().writeMessageBegin(name, type, seqid) |
There was a problem hiding this comment.
super() takes at least 1 argument
|
I've cleared most of the cross-test failures. It looks like the remaining failures are SSL-related timeouts (if I've interpreted the logs correctly). I don't think they're related to this change, but please let me know if they are. |
jeking3
left a comment
There was a problem hiding this comment.
If you could rebase on master and push, it'll kick a new appveyor build for us. When this was submitted, chocolatey was down or something related to jdk8 was unavailable.
TMultiplexedProtocol objects did not inherit from TProtocol, so the decorated protocol object passed into the binary accelerated C extension was not really a TProtocol object, which caused errors. This implementation decorates the protocol object by dynamically creating a new class that extends both the class of the protocol being decorated and TMultiplexedProtocol.
7976d7e to
f6bf42a
Compare
|
That's done. The travis build still has the same SSL timeouts, but the AppVeyor build succeeded (even though it looks like there was a problem with javadoc). |
jeking3
left a comment
There was a problem hiding this comment.
I think the following failures are related:
cpp-py multic http-ip failure(timeout)
cpp-py multic http-ip-ssl failure(timeout)
cpp-py multic-multiac http-ip failure(timeout)
cpp-py multic-multiac http-ip-ssl failure(timeout)
cpp-py multij http-ip failure(timeout)
cpp-py multij http-ip-ssl failure(timeout)
cpp-py multi http-ip failure(timeout)
cpp-py multi http-ip-ssl failure(timeout)
cpp-py multi-multia http-ip failure(timeout)
cpp-py multi-multia http-ip-ssl failure(timeout)
cpp-py3 multic http-ip failure(timeout)
cpp-py3 multic http-ip-ssl failure(timeout)
cpp-py3 multic-multiac http-ip failure(timeout)
cpp-py3 multic-multiac http-ip-ssl failure(timeout)
cpp-py3 multij http-ip failure(timeout)
cpp-py3 multij http-ip-ssl failure(timeout)
cpp-py3 multi http-ip failure(timeout)
cpp-py3 multi http-ip-ssl failure(timeout)
cpp-py3 multi-multia http-ip failure(timeout)
cpp-py3 multi-multia http-ip-ssl failure(timeout)
You can leave the http based cpp server tests disabled. cpp has known issues with http documented in THRIFT-3877 on Jira.
As far as I know, the C extension does not care what protocol type Python passed into. It just uses the BinaryProtocol or CompatProtocol define in bianry/compat.h to do encoding and decoding. In my opinion, the real problem is that |
|
I have disabled the http based cpp server tests - the remaining cross language tests are all passing. |
THRIFT-4548: multiplexed (decorated) protocols inherit from TProtocolBase
Client: py
TMultiplexedProtocol objects did not inherit from TProtocolBase, so the decorated protocol object passed into the binary accelerated C extension was not really a TProtocolBase object, which caused errors. This implementation decorates the protocol object by dynamically creating a new class that extends both the class of the protocol being decorated and TMultiplexedProtocol.
I tested the changes locally. I had trouble running the full suite of cross tests, but running the py,py3 cross tests worked, although I'm not sure these are testing multiplexed protocols.