From d1395ea7eea71fa20b520bc61d9278b2a1b33938 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Mon, 7 Dec 2015 21:13:57 -0500 Subject: [PATCH] NIFI-1269: Ensure that we roll back session if not transferring FlowFile Signed-off-by: joewitt --- .../org/apache/nifi/processors/standard/DistributeLoad.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java index 73ada842d4..8c1f9bdf13 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java @@ -351,6 +351,9 @@ public class DistributeLoad extends AbstractProcessor { final int numRelationships = context.getProperty(NUM_RELATIONSHIPS).asInteger(); final boolean allDestinationsAvailable = (available.size() == numRelationships); if (!allDestinationsAvailable && strategy.requiresAllDestinationsAvailable()) { + // can't transfer the FlowFiles. Roll back and yield + session.rollback(); + context.yield(); return; }