exceptionfactory commented on code in PR #115:
URL: https://github.com/apache/nifi-api/pull/115#discussion_r4568530110
##########
src/main/java/org/apache/nifi/components/connector/AbstractConnector.java:
##########
@@ -202,9 +206,9 @@ public CompletableFuture<Void> drainFlowFiles(final
FlowContext flowContext) {
initialQueueSize.getObjectCount(),
NumberFormat.getNumberInstance().format(initialQueueSize.getByteCount()));
Thread.startVirtualThread(() -> {
+ final ProcessGroupLifecycle lifecycle =
flowContext.getRootGroup().getLifecycle();
try {
- stopSourceComponents(flowContext).get();
- startNonSourceComponents(result, flowContext);
+ lifecycle.beginDrain().get();
Review Comment:
That sounds good under the circumstances, placing the responsibility on the
implementer is a tradeoff, but understandable given the open-ended nature of
the behavior.
--
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]