-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 10.10-HF28, 11.2
-
Fix Version/s: 10.10-HF33, 11.3, 2021.0
-
Component/s: Streams
-
Release Notes Summary:A default value is set in Avro BulkCommand schema.
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform #17
-
Story Points:2
Since NXP-29038 a new boolean field has been added to the BulkCommand, there is no default value for this field and trying to process old version of the BulkCommand raises an AvroTypeException like this
2020-09-17T02:37:10,538 WARN [scrollerPool-01] [org.nuxeo.lib.stream.computation.AbstractComputation] Computation: scroller fails last record: command-01:+79087527788544, retrying ... org.apache.avro.AvroTypeException: Found org.nuxeo.ecm.core.bulk.message.BulkCommand, expecting org.nuxeo.ecm.core.bulk.message.BulkCommand, missing required field genericScroller at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:292) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.io.parsing.Parser.advance(Parser.java:88) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.io.ResolvingDecoder.readFieldOrder(ResolvingDecoder.java:130) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:215) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:175) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:153) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:145) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.message.RawMessageDecoder.decode(RawMessageDecoder.java:96) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.message.BinaryMessageDecoder.decode(BinaryMessageDecoder.java:169) ~[avro-1.8.2.jar:1.8.2] at org.apache.avro.message.MessageDecoder$BaseDecoder.decode(MessageDecoder.java:155) ~[avro-1.8.2.jar:1.8.2] at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:78) ~[nuxeo-stream-10.10-HF27.jar:?] at org.nuxeo.ecm.core.bulk.computation.BulkScrollerComputation.processRecord(BulkScrollerComputation.java:116) ~[nuxeo-core-bulk-10.10-HF28.jar:?]
This can happen when upgrading to 10.10-HF28 while some bulk commands are scheduled.
The default false value for the genericScoller field should be provided:
{ "type" : "record", "name" : "BulkCommand", "namespace" : "org.nuxeo.ecm.core.bulk.message", "fields" : [ { ... }, { "name" : "genericScroller", "type" : "boolean" }, ... }
must be updated to:
{ "type" : "record", "name" : "BulkCommand", "namespace" : "org.nuxeo.ecm.core.bulk.message", "fields" : [ { ... }, { "name" : "genericScroller", "type" : "boolean", "default" : false }, { ... }
- is caused by
-
NXP-29038 Extend Bulk Service to accept non Document command
- Resolved
- Is referenced in