mirror of https://github.com/apache/nifi.git
NIFI-2751 - Pull batch in round-robin manner - fix for / by 0
This commit is contained in:
parent
76b859c4ef
commit
45bc3e054d
|
@ -1443,6 +1443,10 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
|||
|
||||
// get batch of flow files in a round-robin manner
|
||||
final List<Connection> connections = context.getPollableConnections();
|
||||
if(connections.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
final Connection connection = connections.get(context.getNextIncomingConnectionIndex() % connections.size());
|
||||
|
||||
return get(connection, new QueuePoller() {
|
||||
|
|
Loading…
Reference in New Issue