[
https://issues.apache.org/jira/browse/NIFI-6017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16766466#comment-16766466
]
Mark Payne commented on NIFI-6017:
----------------------------------
[~SunSatION] Thanks for reporting this - and for providing a patch! I do
believe the code in the patch makes sense, and I would love to pull this into
1.9.0. However, whenever I attempted to pull in the patch with `git`, it failed:
{quote}nifi $ git am --signoff -3 <
NIFI-6017_-_ArrayIndexOutOfBounds_Load_Balancer_CorrelationAttributePartitioner.patch
Applying: IDEA additional info:
error: sha1 information is lacking or useless
(nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/partition/CorrelationAttributePartitioner.java).
error: could not build fake ancestor
Patch failed at 0001 IDEA additional info:
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
{quote}
It does not appear to be a Git patch file - was this generated by IDEA?
Generally, we would create a patch using `git format-patch HEAD -1`
> ArrayIndexOutOfBounds Load Balancer CorrelationAttributePartitioner
> -------------------------------------------------------------------
>
> Key: NIFI-6017
> URL: https://issues.apache.org/jira/browse/NIFI-6017
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.8.0
> Reporter: Dorian Bugeja
> Assignee: Mark Payne
> Priority: Critical
> Fix For: 1.9.0
>
> Attachments:
> NIFI-6017_-_ArrayIndexOutOfBounds_Load_Balancer_CorrelationAttributePartitioner.patch,
>
> NIFI-6017_-_ArrayIndexOutOfBounds_Load_Balancer_CorrelationAttributePartitioner.patch
>
>
> When trying to perform load balancing on queue using 'partition by
> attribute', the use of the hashCode() function can return a negative value
> which in turns, the '%' operation might return a negative value (which is
> used as index) which throws an ArrayIndexOutOfBounds exception.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)