You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jimmy Xiang (JIRA)" <ji...@apache.org> on 2015/08/18 23:30:46 UTC

[jira] [Updated] (HIVE-11586) ObjectInspectorFactory.getReflectionObjectInspector is not thread-safe

     [ https://issues.apache.org/jira/browse/HIVE-11586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HIVE-11586:
-------------------------------
    Attachment: HIVE-11586.1.patch

> 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
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: HIVE-11586.1.patch
>
>
> 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)