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

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

Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/454#discussion_r63874050
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-optimistic-locking/src/main/java/org/apache/nifi/web/revision/NaiveRevisionManager.java
 ---
    @@ -423,7 +440,7 @@ public boolean requestWriteLock(final Revision 
proposedRevision) throws ExpiredR
                             throw ise;
                         }
     
    -                    if (stamp.getClientId() == null || 
stamp.getClientId().equals(proposedRevision.getClientId())) {
    +                    if (stamp.getUser() == null || 
stamp.getUser().equals(user)) {
    --- End diff --
    
    I think we need to be checking both the user and the client id here. To 
protect against the case when the same user has multiple clients open (like 
multiple browser windows). One client shouldn't be able to assume the 
transaction from another client. Should also have a unit test for this scenario.


> Refactor how NCM federates requests to nodes
> --------------------------------------------
>
>                 Key: NIFI-1745
>                 URL: https://issues.apache.org/jira/browse/NIFI-1745
>             Project: Apache NiFi
>          Issue Type: Task
>    Affects Versions: 1.0.0
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 1.0.0
>
>
> Currently, all of the logic to federate requests exists within the 
> WebClusterManager class. This needs to be refactored into better encapsulated 
> code so that the logic is more easily moved to the nodes.



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

Reply via email to