[
https://issues.apache.org/jira/browse/AVRO-4014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated AVRO-4014:
---------------------------------
Labels: pull-request-available (was: )
> [Rust] Sporadic value-schema mismatch with fixed struct
> -------------------------------------------------------
>
> Key: AVRO-4014
> URL: https://issues.apache.org/jira/browse/AVRO-4014
> Project: Apache Avro
> Issue Type: Bug
> Components: rust
> Affects Versions: 1.11.3
> Reporter: Matthew Tanous
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We are trying to Avro encode a structure before writing to Kafka, and when we
> are at high load writing the struct into an Avro writer (we started seeing
> around 2.6% error rates at 500K messages per minute) we start seeing this
> error:
> {code:java}
> Value does not match schema: Reason: Unsupported value-schema
> combination{code}
> This is surprising as the same logic is used to build the record in each
> case, and that record is built using the Avro record type with the same
> schema:
> {code:java}
> Record::new(&self.schema){code}
> This is the code that is ultimately raising the error, but because it is not
> specifying _which_ value does not match _which_ part of the schema, it is
> extremely difficult to debug.
> {code:java}
> let mut writer = Writer::new(&self.schema, Vec::new());
> writer
> .append(record) // This will fail if the message and
> schema don't match
> .map_err(|err| Report::msg(err.to_string()))?;{code}
> A simple start would be to add logging of the value and the schema that are
> mismatched to help us debug this issue, as I'm not able to determine if the
> `apache-avro` library is doing something erroneous or our code is breaking in
> some unforeseen way.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)