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

Race condition in formatters of TimestampColumnVector and DateColumnVector

    XMLWordPrintableJSON

Details

    Description

      HIVE-22405 added support for proleptic calendar. It uses java's SimpleDateFormat/Calendar APIs which are not thread-safe and cause race in some scenarios.

      As a result of those race conditions, we see some exceptions like

      1) java.lang.NumberFormatException: For input string: "" 
      OR 
      java.lang.NumberFormatException: For input string: ".821582E.821582E44"
      
      OR
      
      2) Caused by: java.lang.ArrayIndexOutOfBoundsException: -5325980
          	at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:453)
          	at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2397)
      

      This issue is to address those thread-safety issues/race conditions.

      cc jcamachorodriguez abstractdog omalley

      Attachments

        1. HIVE-22840.03.patch
          15 kB
          Shubham Chaurasia
        2. HIVE-22840.04.patch
          15 kB
          Shubham Chaurasia
        3. HIVE-22840.05.patch
          15 kB
          Shubham Chaurasia
        4. HIVE-22840.1.patch
          18 kB
          Shubham Chaurasia
        5. HIVE-22840.2.patch
          19 kB
          Shubham Chaurasia
        6. HIVE-22840.patch
          15 kB
          Shubham Chaurasia

        Issue Links

          Activity

            People

              ShubhamChaurasia Shubham Chaurasia
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m