[ https://issues.apache.org/jira/browse/HIVE-22161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16919862#comment-16919862 ]
Hive QA commented on HIVE-22161: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12979008/HIVE-22161.1.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 16745 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18430/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18430/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18430/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.YetusPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase {noformat} This message is automatically generated. ATTACHMENT ID: 12979008 - PreCommit-HIVE-Build > UDF: FunctionRegistry synchronizes on org.apache.hadoop.hive.ql.udf.UDFType > class > --------------------------------------------------------------------------------- > > Key: HIVE-22161 > URL: https://issues.apache.org/jira/browse/HIVE-22161 > Project: Hive > Issue Type: Bug > Components: UDF > Reporter: Gopal V > Assignee: Gopal V > Priority: Major > Attachments: HIVE-22161.1.patch > > > There's a hidden synchronization across threads when looking up isStateful > and isDeterministic. > https://github.com/apache/hive/blob/master/common/src/java/org/apache/hive/common/util/AnnotationUtils.java#L27 > {code} > // to avoid https://bugs.openjdk.java.net/browse/JDK-7122142 > public static <T extends Annotation> T getAnnotation(Class<?> clazz, > Class<T> annotationClass) { > synchronized (annotationClass) { > return clazz.getAnnotation(annotationClass); > } > } > {code} > This is serializing multiple threads initializing UDFs (or checking them > during compilation) & also being locked across threads for each instance of > GenericUDFOpEqual in the specific scenario. > https://bugs.openjdk.java.net/browse/JDK-7122142 is fixed in jdk8+ -- This message was sent by Atlassian Jira (v8.3.2#803003)