You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2016/01/06 01:27:39 UTC

[jira] [Commented] (HIVE-12758) Parallel compilation: Operator::resetId() is not thread-safe

    [ https://issues.apache.org/jira/browse/HIVE-12758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15084428#comment-15084428 ] 

Gopal V commented on HIVE-12758:
--------------------------------

We don't do multi-thread compilation (as in one query never spawns threads) - this variable needs to be made a thread-local.

> Parallel compilation: Operator::resetId() is not thread-safe
> ------------------------------------------------------------
>
>                 Key: HIVE-12758
>                 URL: https://issues.apache.org/jira/browse/HIVE-12758
>             Project: Hive
>          Issue Type: Bug
>          Components: Physical Optimizer
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Gopal V
>            Assignee: Sergey Shelukhin
>         Attachments: HIVE-12758.patch
>
>
> {code}
>   private static AtomicInteger seqId;
> ...
>   public Operator() {
>     this(String.valueOf(seqId.getAndIncrement()));
>   }
>   public static void resetId() {
>     seqId.set(0);
>   }
> {code}
> Potential race-condition.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)