[ https://issues.apache.org/jira/browse/HIVE-11586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702033#comment-14702033 ]
Jimmy Xiang commented on HIVE-11586: ------------------------------------ Patch 1 is on RB: https://reviews.apache.org/r/37591/ > 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)