thenatog commented on code in PR #6154:
URL: https://github.com/apache/nifi/pull/6154#discussion_r931290657


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ControllerServiceEntityMerger.java:
##########
@@ -36,6 +36,17 @@
 
 public class ControllerServiceEntityMerger implements 
ComponentEntityMerger<ControllerServiceEntity> {
 
+    @Override
+    public void merge(ControllerServiceEntity clientEntity, 
Map<NodeIdentifier, ControllerServiceEntity> entityMap) {
+        ComponentEntityMerger.super.merge(clientEntity, entityMap);
+        for (Map.Entry<NodeIdentifier, ControllerServiceEntity> entry : 
entityMap.entrySet()) {
+            final ControllerServiceEntity entityStatus = entry.getValue();
+            if (clientEntity != entityStatus) {

Review Comment:
   In this case, it may be find to use .equals()..  it would mean we will not 
bother doing a StatusMerge if the statuses are the same, which seems logical.



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ControllerServiceEntityMerger.java:
##########
@@ -36,6 +36,17 @@
 
 public class ControllerServiceEntityMerger implements 
ComponentEntityMerger<ControllerServiceEntity> {
 
+    @Override
+    public void merge(ControllerServiceEntity clientEntity, 
Map<NodeIdentifier, ControllerServiceEntity> entityMap) {
+        ComponentEntityMerger.super.merge(clientEntity, entityMap);
+        for (Map.Entry<NodeIdentifier, ControllerServiceEntity> entry : 
entityMap.entrySet()) {
+            final ControllerServiceEntity entityStatus = entry.getValue();
+            if (clientEntity != entityStatus) {

Review Comment:
   In this case, it may be fine to use .equals()..  it would mean we will not 
bother doing a StatusMerge if the statuses are the same, which seems logical.



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