You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2018/04/13 13:57:00 UTC

[jira] [Created] (HIVE-19203) Thread-Safety Issue in HiveMetaStore

BELUGA BEHR created HIVE-19203:
----------------------------------

             Summary: Thread-Safety Issue in HiveMetaStore
                 Key: HIVE-19203
                 URL: https://issues.apache.org/jira/browse/HIVE-19203
             Project: Hive
          Issue Type: Bug
          Components: Metastore
    Affects Versions: 3.0.0
            Reporter: BELUGA BEHR


[https://github.com/apache/hive/blob/550d1e1196b7c801c572092db974a459aac6c249/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L345-L351]
{code:java}
private static int nextSerialNum = 0;
private static ThreadLocal<Integer> threadLocalId = new ThreadLocal<Integer>() {
  @Override
  protected Integer initialValue() {
    return nextSerialNum++;
  }
};{code}
 

{{nextSerialNum}} needs to be an atomic value.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)