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

Fix HyperLogLog to be threadsafe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      not sure if this is an issue in reality or not; but there are 3 static fields in HyperLogLog which are rewritten during working; if there are multiple threads are calculating HLL in the same JVM, there is a theoretical chance that they might overwrite eachothers value...

      static fields:
      https://github.com/apache/hive/blob/8028ce8a4cf5a03e2998c33e032a511fae770b47/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/ndv/hll/HyperLogLog.java#L65

      usage:
      https://github.com/apache/hive/blob/8028ce8a4cf5a03e2998c33e032a511fae770b47/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/ndv/hll/HyperLogLog.java#L216

        Attachments

        1. HIVE-19501.01.patch
          7 kB
          László Bodor

          Issue Links

            Activity

              People

              • Assignee:
                abstractdog László Bodor
                Reporter:
                kgyrtkirk Zoltan Haindrich
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: