[
https://issues.apache.org/jira/browse/PHOENIX-3769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114210#comment-16114210
]
Sneha Kanekar commented on PHOENIX-3769:
----------------------------------------
I found another workaround for this issue. I noticed that the respective
lengths of the arrays are not passed to compareTo function. On making this
change, the test passes on ppc64le as well as x86.
{code:borderStyle=solid}
diff --git
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
index 5011245..acb139e 100644
---
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
+++
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
@@ -354,7 +354,7 @@ public class PhoenixIndexBuilder extends NonTxIndexBuilder {
int repeating1 = oldInput.readShort();
if (Bytes.compareTo(
oldOnDupKeyBytes, ON_DUP_KEY_HEADER_BYTE_SIZE,
oldOnDupKeyBytes.length - ON_DUP_KEY_HEADER_BYTE_SIZE,
- newOnDupKeyBytes, Bytes.SIZEOF_SHORT +
Bytes.SIZEOF_BOOLEAN, oldOnDupKeyBytes.length - ON_DUP_KEY_HEADER_BYTE_SIZE) ==
0) {
+ newOnDupKeyBytes, Bytes.SIZEOF_SHORT +
Bytes.SIZEOF_BOOLEAN, newOnDupKeyBytes.length - ON_DUP_KEY_HEADER_BYTE_SIZE) ==
0) {
// If both old and new ON DUPLICATE KEY UPDATE clauses match,
// reduce the size of data we're sending over the wire.
// TODO: optimization size of RPC more.
{code}
> OnDuplicateKeyIT#testNewAndMultiDifferentUpdateOnSingleColumn fails on ppc64le
> ------------------------------------------------------------------------------
>
> Key: PHOENIX-3769
> URL: https://issues.apache.org/jira/browse/PHOENIX-3769
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.11.0
> Environment: $ uname -a
> Linux 6945c232192e 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15
> 17:42:36 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
> $ java -version
> openjdk version "1.8.0_111"
> OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-3~14.04.1-b14)
> OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)
> Reporter: Sneha Kanekar
> Labels: ppc64le
> Attachments: OnDuplicateKeyIT_Standard_output.txt,
> PHOENIX-3769.patch, TEST-org.apache.phoenix.end2end.OnDuplicateKeyIT.xml
>
>
> The testcase
> org.apache.phoenix.end2end.OnDuplicateKeyIT.testNewAndMultiDifferentUpdateOnSingleColumn
> fails consistently on ppc64le architechture. The error message is as follows:
> {code: borderStyle=solid}
> java.lang.ArrayIndexOutOfBoundsException: 179
> at
> org.apache.phoenix.end2end.OnDuplicateKeyIT.testNewAndMultiDifferentUpdateOnSingleColumn(OnDuplicateKeyIT.java:392)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)