Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.2, 3.1.2, 4.0.0
Description
There's a hidden synchronization across threads when looking up isStateful and isDeterministic.
// 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); } }
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+