You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Koji Kawamura (JIRA)" <ji...@apache.org> on 2018/11/06 05:03:00 UTC

[jira] [Commented] (NIFIREG-205) NiFi Registry DB gets out of sync with git repository, no apprent remediation

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

Koji Kawamura commented on NIFIREG-205:
---------------------------------------

[~kdoran] Thanks for your comment. I've created NIFI-5792 to track NiFi side fix. Having a single endpoint to create a flow and first snapshot would be nice, but require fixes among broader components, NiFi, NiFi Reg client and NiFi Reg API. I'm going to fix NiFi logic.

Also, I'm going to submit a PR to this JIRA, in order to fix GitFlowPersistenceProvider behavior for Flow deletion. Currently, GitFlowPersistenceProvider throws FlowPersistenceException if the target flow doesn't exist. That happens when a user tries to delete a Flow that doesn't have any snapshot (having version 0). GitFlowPersistenceProvider should not throw an exception in that case because there's nothing to delete. This fix let users to recover from the reported situation, too, by deleting the Flow having version 0 snapshot from NiFi Registry UI, then retry 'Start version control' from NiFi.

> NiFi Registry DB gets out of sync with git repository, no apprent remediation
> -----------------------------------------------------------------------------
>
>                 Key: NIFIREG-205
>                 URL: https://issues.apache.org/jira/browse/NIFIREG-205
>             Project: NiFi Registry
>          Issue Type: Bug
>         Environment: Centos 7.5
>            Reporter: Dye357
>            Assignee: Koji Kawamura
>            Priority: Major
>
> I've observed a couple issues with the GitFlowPersistenceAdapter:
>  # When adding a new process group to NIFREG If for any reason the git repository is in a "dirty" (untracked file) state the adding of the process group fails. However an entry is still created in the DB with a version of 0. Once in this state you cannot delete the flow from NIFIREG and you cannot restart version control from nifi with the same name. I assume the only way to fix this is to manually go into the DB and delete the record.
>  # When using Remote To Push, if the push fails the same behavior in #1 is exhibited. It's not reasonable to expect that a push will always succeed. The remote git repository could be offline for maintenance etc...
> Steps to reproduce:
>  # Start nifi registry with an empty db and clean git repo.
>  # add an untracked file to the git repo but do-not commit it.
>  # Start a processgroup under version control.
>  # Expect Failure in Nifi UI
>  # Expect Exception in Log saying untracked files in git repo.
>  # Delete flow from nifi-registry using Actions -> Delete.
>  # Expect Failure case, recieve error deleting flow message.
>  # Refresh nifi-registry UI - flow is still present, version is 0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)