[
https://issues.apache.org/jira/browse/NIFIREG-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16658494#comment-16658494
]
Koji Kawamura commented on NIFIREG-205:
---------------------------------------
[~bende] The reported issue can happen with any PersistenceProvider
implementation, not Git specific.
For #1, one of the root cause is, NiFi creates new flow in NiFi Registry, but
discard the created versioned flow info if it fails to receive successful
response from Registry to create the first snapshot. NiFi should keep the
created flow information so that it can retry creating the first snapshot
later. I think this is more of a NiFi side issue.
# NiFi sends a POST request to NiFi Registry to create a versioned flow
# NiFi Registry create a version 0, then respond with the created versioned
flow UUID
# NiFi sends another POST request to NiFi Registry to create the first flow
snapshot
# NiFi Registry returns a failure response
# NiFi loses the created versioned flow UUID, and keep trying to create new
versioned flow, but NiFi Registry returns error mentioning that the flow
already exist
Related code:
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java#L3768
[~bende] Do you agree? If so, I will submit a JIRA and PR to fix NiFi.
The issue #2 (failing to push), I tested this scenario, but couldn't reproduce
the issue. GitPersistenceProvider can keep working if it fails to push, as long
as it can commit to local git repo.
> 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
> 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)