Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4752

REPLAY events returned by WriteAheadProvenanceRepository have child FlowFile UUID as event FlowFile UUID

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.6.0
    • Core Framework
    • None

    Description

      The 'Provenance Events' documentation describes about REPLAY event as follows:

      Indicates a provenance event for replaying a FlowFile. The UUID of the event indicates the UUID of the original FlowFile that is being replayed. The event contains one Parent UUID that is also the UUID of the FlowFile that is being replayed and one Child UUID that is the UUID of the a newly created FlowFile that will be re-queued for processing

      The default PersistentProvenanceRepository behaves as written in the doc. But WriteAheadProvenanceRepository returns REPLAY events having Child UUID as its FlowFile UUID instead.

      Here is the lines of code that set FlowFile UUID for the provenance events.
      https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/schema/LookupTableEventRecord.java#L276-L280

              String uuid = updatedAttributes == null ? null : updatedAttributes.get(CoreAttributes.UUID.key());
              if (uuid == null) {
                  uuid = previousAttributes == null ? null : previousAttributes.get(CoreAttributes.UUID.key());
              }
              builder.setFlowFileUUID(uuid);
      

      WriteAheadProvenanceRepository does not seem to have 'FlowFile UUID' value persisted, which is set by FlowController when replay events are registered. Instead, WriteAheadProvenanceRepository fill 'FlowFile UUID' from updated or previous 'UUID' attribute.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              ijokarumawak Koji Kawamura
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: