pvillard31 commented on code in PR #11885:
URL: https://github.com/apache/nifi/pull/11885#discussion_r4466484058


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardComponentStateDAO.java:
##########
@@ -108,6 +112,9 @@ private void clearState(final String componentId, final 
ComponentStateDTO compon
 
                 if (hasExactlyOneKeyRemoved(currentClusterState, 
newClusterState)) {
                     manager.setState(newClusterState, Scope.CLUSTER);

Review Comment:
   The read of the cluster state and this setState call are not atomic, so a 
processor update between them could be overwritten. Should we use 
manager.replace() with the StateMap we read, here or in a follow-up Jira?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to