You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Matt Gilman (JIRA)" <ji...@apache.org> on 2015/07/29 16:15:04 UTC

[jira] [Created] (NIFI-795) Inconsistencies in Rest Api when creating components when clustered

Matt Gilman created NIFI-795:
--------------------------------

             Summary: Inconsistencies in Rest Api when creating components when clustered
                 Key: NIFI-795
                 URL: https://issues.apache.org/jira/browse/NIFI-795
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Matt Gilman
            Assignee: Matt Gilman
            Priority: Minor
             Fix For: 0.3.0


When clustered the Rest Api returns response code 200 when creating new components. In standalone mode these same requests return response code 201. Both of these requests should be return 201 with the location header set in a response header when a new component is created.

This happens in clustered mode because when the NCM receives the request, it converts the POST into a PUT and replicates to the nodes. This happens in order to keep the UUID of the new component consistent across the cluster. Unfortunately, when these clustering features where introduced the response code of a PUT request was never modified to support either 200 or 201. Previously, it only supported 200. 

Bottom line, we need to return 201 when it results in the creation of a new component and 200 when it's an update to an existing component. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)