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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17264830#comment-17264830 ] 

ASF subversion and git services commented on AVRO-2983:
-------------------------------------------------------

Commit 21e39347f227516aa353ee84367a0d46d18420ab in avro's branch refs/heads/master from Brian Davidson
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=21e3934 ]

AVRO-2983: Set Span length of ArrayPool Rent buffer (#1013)

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 is empty. When this buffer returned from ArrayPool
is not exactly the same as the requested minimumLength this causes an
Avro.AvroException : End of stream reached

> 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
>
> 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)