confluentinc / libserdes

Avro Serialization/Deserialization C/C++ library with Confluent schema-registry support
Apache License 2.0
5 stars 64 forks source link

Fix Bytes only created by java KafkaAvroSerializer #24

Closed beeender closed 4 years ago

beeender commented 4 years ago

If the avro schema contains a bytes field only, instead of parsing the length, just read the whole buffer as the bytes content.

See https://github.com/confluentinc/schema-registry/issues/1411

Java KafkaAvroSerializer won't follow the avro protocol to add bytes length when the data only contains a bytes field. And this workaround also exists in the Java KafkaAvroDeserializer.

Since some users rely on this buggy behaviour already, just work around in the libserdes as well.

ghost commented 4 years ago

It looks like @beeender hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence. Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

beeender commented 4 years ago

[clabot:check]

ghost commented 4 years ago

@confluentinc It looks like @beeender just signed our Contributor License Agreement. :+1:

Always at your service,

clabot

edenhill commented 4 years ago

@mhowlett I believe you did this same workaround in the .NET serializers, care to review this?

edenhill commented 4 years ago

Thank you for this fix!