-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Cannot Reproduce
-
Affects Version/s: None
-
Component/s: Streams
-
Tags:
-
Sprint:nxplatform #118
-
Story Points:3
Seen on production the stream/introspection is trying to read a record that is Java serialized (0xAC 0xED header bytes) instead of being Avro encoded.
A possible case is that the Metrics reporter (StreamMetricsReporter) has been called before the initialization of streams (LogStreamManager#initInternalStream),
the not yet initialized appender has produced a java serialized record.
Note that NXP-32441 should avoid to fail in such case but this needs to be fixed.
The stack:
stream/introspectionPool-00,in:0,inCheckpoint:0,out:0,lastRead:1721402320177,lastTimer:0,wm:0,loop:27,rebalance assigned ... java.lang.IllegalArgumentException: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:80) ~[nuxeo-stream-2021.50.12.jar:?] at org.nuxeo.lib.stream.log.kafka.KafkaLogTailer.read(KafkaLogTailer.java:196) ~[nuxeo-stream-2021.50.12.jar:?] at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:433) ~[nuxeo-stream-2021.50.12.jar:?] ... Caused by: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED at org.apache.avro.message.BinaryMessageDecoder.decode(BinaryMessageDecoder.java:156) ~[avro-1.9.2.jar:1.9.2] at org.apache.avro.message.MessageDecoder$BaseDecoder.decode(MessageDecoder.java:146) ~[avro-1.9.2.jar:1.9.2] at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:78) ~[nuxeo-stream-2021.50.12.jar:?] ... 10 more