You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Allen George (JIRA)" <ji...@apache.org> on 2017/12/11 16:10:01 UTC
[jira] [Commented] (THRIFT-4390) Rust socket class cannot handle
binary output larger than 4096 bytes
[ https://issues.apache.org/jira/browse/THRIFT-4390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286101#comment-16286101 ]
Allen George commented on THRIFT-4390:
--------------------------------------
[~jking3]
It appears there are two problems: I'd like to split them up into two JIRAs. First:
* I misunderstood the rust stdlib's implementation of {{write_all}} - it bails if 0 bytes are written; this caused the buffered transport to fail. I now {{flush}} if there's no space in the internal buffer to allow the writes to continue
* There was a bug in the binary protocol where I accidentally used {{write}} instead of {{write_all}}
Second:
* The framed protocol uses a fixed buffer size; it should use a growable buffer.
Finally, I also reverted the change to the {{TTcpChannel}} {{write}} -> {{write_all}} that was made to work around these issues.
> Rust socket class cannot handle binary output larger than 4096 bytes
> --------------------------------------------------------------------
>
> Key: THRIFT-4390
> URL: https://issues.apache.org/jira/browse/THRIFT-4390
> Project: Thrift
> Issue Type: Bug
> Components: Rust - Library
> Affects Versions: 0.10.0
> Environment: docker image ubuntu-artful
> Reporter: James E. King, III
> Assignee: Allen George
> Priority: Critical
>
> While working on improving test coverage and fixing busted cross tests I reworked the cpp test client to send binary in at size 0, 1, 2, 4, 6, 16, ..., 131072 and after 4096 the rust server gave up.
> {noformat}
> 12, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128])
> WARN:thrift::server::threaded: processor completed with error: TransportError { kind: Unknown, message: "failed to write whole buffer" }
> Server process is successfully killed.
> {noformat}
> @gadLinux this may be the root cause of some of the issues you were seeing with the interop against c_glib recently. It is the root cause of some (if not all of) the rs-csharp test failures.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)