NissimShiman commented on code in PR #10018:
URL: https://github.com/apache/nifi/pull/10018#discussion_r2162448986
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java:
##########
@@ -268,7 +272,35 @@ public void
activateControllerServicesAdvice(ProceedingJoinPoint proceedingJoinP
operation = Operation.Disable;
}
- saveUpdateAction(groupId, operation);
+ saveUpdateProcessGroupAction(groupId, operation);
+ for (final ControllerServiceNode csNode : controllerServiceNodes) {
+ saveUpdateControllerServiceAction(csNode, operation);
+ }
+ }
+
+ private List<ControllerServiceNode>
getControllerServicesChangingState(final String groupId, final
ControllerServiceState state, Collection<String> serviceIds) throws Throwable {
+ final ProcessGroupDAO processGroupDAO = getProcessGroupDAO();
+ final ProcessGroup processGroup =
processGroupDAO.getProcessGroup(groupId);
+ final List<ControllerServiceNode> csNodes = new ArrayList<>();
+ for (String serviceId : serviceIds) {
+ final ControllerServiceNode csNode =
processGroup.findControllerService(serviceId, true, true);
+ if (csNode != null && isControllerServiceStateChanged(csNode,
state)) {
Review Comment:
I just discovered today that the `isControllerServiceStateChanged()` may not
be a necessary check. (i.e. it looks like all controller services at this
point will have had a state change)
It would be useful for future proofing, but does not currently appear to be
needed.
If it is determined that its only use is for future proofing, should it be
kept?
--
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]