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

Martin Tzvetanov Grigorov resolved AVRO-3642.
---------------------------------------------
    Fix Version/s: 1.12.0
                   1.11.2
         Assignee: Martin Tzvetanov Grigorov
       Resolution: Fixed

> GenericSingleObjectReader::read_value fails on non-exhaustive read
> ------------------------------------------------------------------
>
>                 Key: AVRO-3642
>                 URL: https://issues.apache.org/jira/browse/AVRO-3642
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: rust
>            Reporter: David Peklak
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0, 1.11.2
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> There is a bug in the Rust implementation of 
> [GenericSingleObjectReader::read_value|https://docs.rs/apache-avro/0.14.0/apache_avro/struct.GenericSingleObjectReader.html#method.read_value],
>  which is exposed when a call to reader.read reads less than 10 bytes. This 
> is a valid scenario, as according to the documentation of 
> [Read::read|https://doc.rust-lang.org/std/io/trait.Read.html#tymethod.read], 
> "It is not an error if the returned value {{n}} is smaller than the buffer 
> size, even when the reader is not at the end of the stream yet." This is also 
> a real-life scenario: in my use-case, I am chaining three implementations of 
> the Read trait to messages that can be deserialized (one for the two magic 
> bytes, one for the schema fingerprint, and one for the actual message 
> content). Each call to Read::read only returns the bytes of one chain link, 
> so the first call to Read::read only returns 2 bytes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to