[
https://issues.apache.org/jira/browse/NIFI-14959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18021915#comment-18021915
]
Michael W Moser commented on NIFI-14959:
----------------------------------------
I was able to confirm this bug on a 3-node cluster. "Partition by attribute"
load balance strategy was only distributing flowfiles to 2 nodes, while
favoring 1 of the nodes. The nodes at index 0 received roughly 2/N flowfiles
while other nodes received 1/N flowfiles.
Rather than modifying the input to the findIndex() method, perhaps we can fix
the findIndex method itself.
> CorrelationAttributePartitioner.findIndex always returns 0 if partitions == 2
> -----------------------------------------------------------------------------
>
> Key: NIFI-14959
> URL: https://issues.apache.org/jira/browse/NIFI-14959
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Andreas Koch
> Priority: Major
>
> Ways to reproduce. Added static to findIndex
>
> {code:java}
> for (int i = Integer.MIN_VALUE; i < Integer.MAX_VALUE; i++) {
> int idx = findIndex(i, 2);
> if (idx != 0) {
> System.out.println(i);
> }
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)