Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30671

Avoid avro MissingSchemaException when updating core messages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF57, 2021.14
    • Component/s: Bulk
    • Release Notes Summary:
      Backward compatibility is added when avro codec was used.
    • Backlog priority:
      600
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #51
    • Story Points:
      2

      Description

      When the schema of a core message (like a bulk command, bulk status, data bucket, ...) is updated, to be able to read an old message the previous schema must be present in the Avro registry (the NUXEO_DATA/Avro directory).
      If the old schema is not available then we have an exception like:

      org.apache.avro.message.MissingSchemaException: Cannot resolve schema for fingerprint: -3241799369462705787
      	at org.apache.avro.message.BinaryMessageDecoder.getDecoder(BinaryMessageDecoder.java:141) ~[avro-1.9.2.jar:1.9.2]
      	at org.apache.avro.message.BinaryMessageDecoder.decode(BinaryMessageDecoder.java:159) ~[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.8.6.jar:?]
      	at org.nuxeo.ecm.core.bulk.BulkServiceImpl.getCommand(BulkServiceImpl.java:246) ~[nuxeo-core-bulk-2021.8.6.jar:?]
      

      this can cause a stream failure like:

      Action: retention/retentionExpired fails on record: retention-retentionExpired-00:+2776690 after retries.
      

      And this is happening when a node is provisioned with the new version and the avro directory is not persisted.

      This could be avoided by registering old schemas in Nuxeo, each time they are updated.

      For instance, NXP-29815 (11.5) and NXP-29585 (11.4) have updated the bulk command messages.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: