markap14 commented on code in PR #10749:
URL: https://github.com/apache/nifi/pull/10749#discussion_r2676653852
##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java:
##########
@@ -492,8 +462,14 @@ private void startComponent(final ScheduledExecutorService
scheduler, final Comp
@Override
public void verifyCanDelete() {
+ final QueueSize queueSize =
getActiveFlowContext().getManagedProcessGroup().getQueueSize();
+ if (queueSize.getObjectCount() > 0) {
+ throw new IllegalStateException("Cannot delete " + this + "
because its Process Group has " + queueSize.getObjectCount()
+ + " FlowFiles queued; all FlowFiles must be removed before it
can be deleted.");
+ }
+
final ConnectorState currentState = getCurrentState();
- if (currentState == ConnectorState.STOPPED || currentState ==
ConnectorState.DISABLED) {
+ if (currentState == ConnectorState.STOPPED) {
Review Comment:
Yeah that's a good point. UPDATED or UPDATE_FAILED either way should also
allow for deletion. Will update that.
--
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]