Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.13.0
-
None
-
None
Description
I'm testing various combinations of protocols and transports in C#. Without a transport layering, everything looks pretty good and I can use binary, compact and json protocols as expected. But when I wrap the transport in a buffered transport, it seems the buffer is running over-full after a while and I get the following error in the client:
Test method threw exception: Thrift.Transport.TTransportException: MaxMessageSize reached Stack Trace: at Thrift.Transport.TEndpointTransport.CountConsumedMessageBytes(Int64 numBytes) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/TEndpointTransport.cs:line 85 at Thrift.Transport.Client.TMemoryBufferTransport.ReadAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/Client/TMemoryBufferTransport.cs:line 126 at Thrift.Transport.TBufferedTransport.ReadAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/Layered/TBufferedTransport.cs:line 101 at Thrift.Transport.TTransport.ReadAllAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/TTransport.cs:line 134 at Thrift.Protocol.TBinaryProtocol.ReadBinaryAsync(CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Protocol/TBinaryProtocol.cs:line 399 at DemoAPI.DemoAPI.fetchDataResult.ReadAsync(TProtocol iprot, CancellationToken cancellationToken) in /home/user/Source/ThriftTestManaged/src/gen-netstd/DemoAPI/DemoAPI.cs:line 2268 [...]
The maximum transferred data size should be ~16MB, whereas the default MaxMessageSize is larger than 100MB, so I assume the buffer should be big enough to hold the message. There is only a single client connected to the server, and the client is constantly polling data blocks from the server (just a simple benchmark with random byte[] blocks of sizes between 1 Byte and 16 MB).