[ https://issues.apache.org/jira/browse/HIVE-21852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16859733#comment-16859733 ]
mahesh kumar behera commented on HIVE-21852: -------------------------------------------- +1 [^HIVE-21852.5.patch] looks fine to me. # There is no synchronization mechanisms to protect the static variables. # There is no check if the static variables are already initialized and thus the list will keep on growing with each call to constructor. # The read and write can happen in parallel causing exceptions. # The list size is not significant so having copy for each object is not an issue. > Testcases are randomly failing with ArrayIndexOutOfBoundException > ----------------------------------------------------------------- > > Key: HIVE-21852 > URL: https://issues.apache.org/jira/browse/HIVE-21852 > Project: Hive > Issue Type: Bug > Affects Versions: 4.0.0 > Reporter: Naresh P R > Assignee: Naresh P R > Priority: Major > Attachments: HIVE-21852.1.patch, HIVE-21852.2.patch, > HIVE-21852.3.patch, HIVE-21852.4.patch, HIVE-21852.5.patch > > > Testcases like > "org.apache.hadoop.hive.ql.lockmgr.TestDbTxnManager2.checkExpectedLocks2" are > randomly failing with ArrayIndexOutOfBoundException at these lines > [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java#L75-L83] > {code:java} > Caused by: java.lang.ArrayIndexOutOfBoundsException > at java.lang.System.arraycopy(Native Method) ~[?:1.8.0_102] > at java.util.ArrayList.addAll(ArrayList.java:580) ~[?:1.8.0_102] > at > org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer.<init>(MetastoreDefaultTransformer.java:75) > ~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)