You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Ryan Skraba (Jira)" <ji...@apache.org> on 2021/01/14 12:16:00 UTC

[jira] [Updated] (AVRO-2983) BinaryDecoder on NetStandard 2.1+ Fails To Read Large Strings

     [ https://issues.apache.org/jira/browse/AVRO-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Skraba updated AVRO-2983:
------------------------------
    Fix Version/s: 1.10.2
                   1.11.0

> 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
>            Priority: Major
>             Fix For: 1.11.0, 1.10.2
>
>
> 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)