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

Make initializing dag ids in TezWork thread safe for parallel compilation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • HiveServer2, Query Planning
    • None

    Description

      When parallel query compilation is enabled, it is possible for concurrent running threads to create TezWork objects that have the same dag id. This is because the counter used to obtain the next dag id is not thread safe. The counter should be an AtomicInteger rather than an int.

        private static int counter;
        ...
        public TezWork(String queryId, Configuration conf) {
          this.dagId = queryId + ":" + (++counter);
          ...
        }
      

      Attachments

        1. HIVE-13512.1.patch
          5 kB
          Peter Slawski
        2. HIVE-13512.1.patch
          5 kB
          Peter Slawski

        Activity

          People

            petersla Peter Slawski
            petersla Peter Slawski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: