Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-19203

Thread-Safety Issue in HiveMetaStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 4.0.0-alpha-1
    • Metastore
    • None

    Description

      https://github.com/apache/hive/blob/550d1e1196b7c801c572092db974a459aac6c249/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L345-L351

      private static int nextSerialNum = 0;
      private static ThreadLocal<Integer> threadLocalId = new ThreadLocal<Integer>() {
        @Override
        protected Integer initialValue() {
          return nextSerialNum++;
        }
      };

       

      nextSerialNum needs to be an atomic value.

      Attachments

        1. HIVE-19203.1.patch
          0.8 kB
          Alice Fan

        Activity

          People

            afan Alice Fan
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: