You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Brian Davidson (Jira)" <ji...@apache.org> on 2020/11/20 18:19:00 UTC
[jira] [Created] (AVRO-2983) BinaryDecoder on NetStandard 2.1+
Fails To Read Large Strings
Brian Davidson created AVRO-2983:
------------------------------------
Summary: BinaryDecoder on NetStandard 2.1+ Fails To Read Large Strings
Key: AVRO-2983
URL: https://issues.apache.org/jira/browse/AVRO-2983
Project: Apache Avro
Issue Type: Bug
Components: csharp
Affects Versions: 1.10.0
Environment: netstandard2.1+
Reporter: Brian Davidson
In 1.10.0 support was added to use ArrayPool<byte>.Shared.Rent and ArrayPool<byte>.Shared.Return to get a buffer from the system.
ArrayPool<T>.Rent(Int32) returns a buffer that is at least minimumLength in length, but can be more.
The span that is used is Read into until it isEmpty, and when this buffer returned from ArrayPool is not exactly the same as the requested minimumLength this causes an exception
{code:java}
Message:
Avro.AvroException : End of stream reached
Stack Trace:
BinaryDecoder.Read(Span`1 buffer) line 97
BinaryDecoder.ReadString() line 74 {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)