bbende commented on code in PR #6138:
URL: https://github.com/apache/nifi/pull/6138#discussion_r901961532


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java:
##########
@@ -1433,6 +1433,14 @@ public void synchronize(final ParameterContext 
parameterContext, final Versioned
                 } else {
                     final Map<String, Parameter> updatedParameters = 
createParameterMap(proposed.getParameters());
 
+                    // If any parameters are removed, need to add a null value 
to the map in order to make sure that the parameter is removed.

Review Comment:
   Good point. The synchronize for the whole process group is primarily used 
when changing version with NiFi Registry, and in that case we don't want to 
remove parameters because it isn't clear if the parameter context is used by 
multiple version controlled flows. 
   
   For the case in this PR, it is the specific synchronize method for a 
parameter context where some external system is specifying that the desired 
state is for the parameter context. So I think it makes sense to only add this 
here.



-- 
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