sijie commented on a change in pull request #6695: [issue 6694][AVRO ENCODE]
Reset cursor if message encode fails.
URL: https://github.com/apache/pulsar/pull/6695#discussion_r407252324
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/writer/AvroWriter.java
##########
@@ -47,6 +47,11 @@ public AvroWriter(Schema schema) {
} catch (Exception e) {
throw new SchemaSerializationException(e);
} finally {
+ try {
+ this.encoder.flush();
Review comment:
(1) seems fine to me.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services