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

Flink Jira Bot updated FLINK-21385:
-----------------------------------
    Labels: auto-deprioritized-major stale-minor  (was: 
auto-deprioritized-major)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is 
still Minor, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> AvroDeserializationSchema corrupted after getting invalid data
> --------------------------------------------------------------
>
>                 Key: FLINK-21385
>                 URL: https://issues.apache.org/jira/browse/FLINK-21385
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Type Serialization System
>    Affects Versions: 1.12.1
>            Reporter: Leonid Ilyevsky
>            Priority: Minor
>              Labels: auto-deprioritized-major, stale-minor
>         Attachments: Test.out, Test.scala, TestRec.avsc
>
>
> After getting the data which cannot be deserialized, 
> AvroDeserializationSchema goes into some corrupted state, which prevents it 
> from properly deserializing good data that comes later.
> Looks like some buffer inside it gets messed up; the "bad" data is not 
> properly skipped.
> Please see the attached files that help to reproduce the issue: 
> TestRec.avsc with Avro schema, Test.scala with test code, and Test.out with 
> the output of my test run.
> In my test, I generate 10 testing records, serialize them, and then 
> deserialize using two methods: "decode2" using AvroDeserializationSchema and, 
> for comparison, "decode" using SpecificDatumReader.
> Every other record is intentionally broken by adding extra 5 bytes in the 
> front (I simulated the Confluent schema ID, because this is how I discovered 
> this problem).
> Ideally, the "bad" records should just result in the exception, and the 
> "good" records should be properly decoded. This is true for the simple 
> "decode" method.
> However, "decode2" using AvroDeserializationSchema, after the first "bad" 
> record cannot decode the good one. Further down, it does decode something, 
> but not the data just passed in; it returns some previous record instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to