You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/09 18:36:00 UTC

[jira] [Commented] (NIFI-4752) REPLAY events returned by WriteAheadProvenanceRepository have child FlowFile UUID as event FlowFile UUID

    [ https://issues.apache.org/jira/browse/NIFI-4752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318888#comment-16318888 ] 

ASF GitHub Bot commented on NIFI-4752:
--------------------------------------

GitHub user markap14 opened a pull request:

    https://github.com/apache/nifi/pull/2390

    NIFI-4752: Addressed issue with some event types having potentially t…

    …he 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.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/markap14/nifi NIFI-4752

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2390.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2390
    
----
commit 3db96374c461cba8826f94522498d8f89009c011
Author: Mark Payne <ma...@...>
Date:   2018-01-09T18:34:41Z

    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.

----


> 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
>
> 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)