diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java index 647e4d5605..9fb13f670e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java @@ -349,22 +349,16 @@ public class StandardFunnel implements Funnel { readLock.lock(); try { Set available = context.getAvailableRelationships(); - int transferred = 0; while (!available.isEmpty()) { - final List flowFiles = session.get(10); + final List flowFiles = session.get(100); if (flowFiles.isEmpty()) { break; } - transferred += flowFiles.size(); session.transfer(flowFiles, Relationship.ANONYMOUS); session.commit(); available = context.getAvailableRelationships(); } - - if (transferred == 0) { - context.yield(); - } } finally { readLock.unlock(); } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java index ceb85f25b7..9432d6c428 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java @@ -73,10 +73,8 @@ public class LocalPort extends AbstractPort { public void onTrigger(final ProcessContext context, final ProcessSession session) { readLock.lock(); try { - final List flowFiles = session.get(10); - if (flowFiles.isEmpty()) { - context.yield(); - } else { + final List flowFiles = session.get(100); + if (!flowFiles.isEmpty()) { session.transfer(flowFiles, Relationship.ANONYMOUS); } } finally {