NIFI-1269: Ensure that we roll back session if not transferring FlowFile

Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
Mark Payne 2015-12-07 21:13:57 -05:00 committed by joewitt
parent 3ecccf02de
commit d1395ea7ee
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}