gianm commented on code in PR #15018:
URL: https://github.com/apache/druid/pull/15018#discussion_r1332303094
##########
extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemaAvroBytesDecoder.java:
##########
@@ -88,7 +88,6 @@ public GenericRecord parse(ByteBuffer bytes)
return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream,
null));
}
catch (EOFException eof) {
- // waiting for avro v1.9.0 (#AVRO-813)
Review Comment:
Hmm. Do you have more info on the `EOFException` you saw?
One of those cases you mentioned (connection reset), I don't see how it can
happen. I don't think our decoders make network calls inside this `try` block.
At least I hope they don't! If they do we should try to adjust it so they don't.
You mentioned another case too (producer didn't close properly). Maybe in
that case we get corrupt data, in which case, yeah, a `ParseException` is
appropriate.
If that's what's happening, not a network call, then IMO it makes sense to
remove the `EOFException` block and have an `IOException` block that wraps in a
more normal-looking `ParseException` that doesn't reference AVRO-813.
##########
extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemaAvroBytesDecoder.java:
##########
@@ -88,7 +88,6 @@ public GenericRecord parse(ByteBuffer bytes)
return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream,
null));
}
catch (EOFException eof) {
- // waiting for avro v1.9.0 (#AVRO-813)
Review Comment:
Hmm. Do you have more info on the `EOFException` you saw?
One of those cases you mentioned (connection reset), I don't see how it can
happen. I don't think our decoders make network calls inside this `try` block.
At least I hope they don't! If they do we should try to adjust it so they don't.
You mentioned another case too (producer didn't close properly). Maybe in
that case we get corrupt data, in which case, yeah, a `ParseException` is
appropriate.
If that's what's happening, not a network call, then IMO it makes sense to
remove the `EOFException` block and have an `IOException` block that wraps in a
more normal-looking `ParseException` that doesn't reference AVRO-813.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]