-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
THRIFT-5492: Add readEnd to TBufferedTransport #2496
Conversation
client: cpp Add a readEnd implementation to TBufferedTransport which resets the consumed message size. Without this it was noticed that calls to the transport's consume method would slowly decrement the remainingMessageSize_ and the remainingMessageSize_ was never reset. A client could send many messages to the server, eventually bringing remainingMessageSize_ below zero causing an EOD_OF_FILE exception.
This stage failed.
|
@Jens-G thanks for pointing out the failures. Looking at several of them it appears to be because I added to test/StessTest.thrift but only updated test/cpp/src/StessTest.cpp and NOT lib/d/test/stress_test_server.d so there is an unimplemented function. |
This looks promising and relevant. @slicking , there is a small favor that would be very helpful in moving this forward. Could you provide a separate PR with a test case, that shows that indeed client messages would bring Do you think you could provide a test? |
Do you think Message Size check is implemented the right way ? |
I've moved from 0.11.0 to 0.20.0 and encountered the issue described here, fix in this PR seems to solve it, is there a plan for this change to be merged? |
I merged the fix part in 86b05bf, but left the rest, as there are unfortunately still open questions etc. |
Thank you, I guess this will be in next thrift release, when do you plan it? |
Is the remainder of this PR still valid? Anyone able to comment on the remaining issues? |
Thanks @Jens-G for merging the fix; I'm glad it could be of help to a few others. |
client: cpp
Add a readEnd implementation to TBufferedTransport which resets the consumed
message size. Without this it was noticed that calls to the transport's
consume method would slowly decrement the remainingMessageSize_ and the
remainingMessageSize_ was never reset. A client could send many messages to
the server, eventually bringing remainingMessageSize_ below zero causing an
EOD_OF_FILE exception.