[
https://issues.apache.org/jira/browse/NIFI-4752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319895#comment-16319895
]
ASF subversion and git services commented on NIFI-4752:
-------------------------------------------------------
Commit 6153fb64655701f7bfdaadfe1ff7c8def111422c in nifi's branch
refs/heads/master from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=6153fb6 ]
NIFI-4752: Addressed issue with some event types having potentially the wrong
FlowFile UUID listed (could have child UUID when it's supposed to have parent
flowfile UUID). In testing fix, also found an issue with Search threads not
being daemon and Re-Index threads not propertly being shutdown so addressed
those as well.
This closes #2390.
Signed-off-by: Koji Kawamura <[email protected]>
> REPLAY events returned by WriteAheadProvenanceRepository have child FlowFile
> UUID as event FlowFile UUID
> --------------------------------------------------------------------------------------------------------
>
> Key: NIFI-4752
> URL: https://issues.apache.org/jira/browse/NIFI-4752
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.4.0
> Reporter: Koji Kawamura
> Assignee: Mark Payne
>
> The ['Provenance Events'
> documentation|https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html#provenance_events]
> describes about REPLAY event as follows:
> {quote}
> 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
> {quote}
> 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
> {code}
> 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);
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)