You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jimmy Xiang (JIRA)" <ji...@apache.org> on 2015/08/17 22:09:45 UTC
[jira] [Created] (HIVE-11586)
ObjectInspectorFactory.getReflectionObjectInspector is not thread-safe
Jimmy Xiang created HIVE-11586:
----------------------------------
Summary: ObjectInspectorFactory.getReflectionObjectInspector is not thread-safe
Key: HIVE-11586
URL: https://issues.apache.org/jira/browse/HIVE-11586
Project: Hive
Issue Type: Bug
Reporter: Jimmy Xiang
Assignee: Jimmy Xiang
ObjectInspectorFactory#getReflectionObjectInspectorNoCache addes newly create object inspector to the cache before calling its init() method, to allow reusing the cache when dealing with recursive types. So a second thread can then call getReflectionObjectInspector and fetch an uninitialized instance of ReflectionStructObjectInspector.
Another issue is that if two threads calls ObjectInspectorFactory.getReflectionObjectInspector at the same time. One thread could get an object inspector not in the cache, i.e. they could both call getReflectionObjectInspectorNoCache() but only one will put the new object inspector to cache successfully.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)