Hive
  1. Hive
  2. HIVE-3106

Add option to make multi inserts more atomic

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently, with multi-insert queries as soon the output of one of the inserts is ready the move task associated with that insert is run, creating the table/partition. However, if concurrency is enabled the lock on this table/partition is not released until the entire query finishes, which can be much later.

      This causes issues if, for example, a user is waiting for an output of the multi-insert query which is created long before the other outputs, and checking for it's existence using the metastore's Thrift methods (get_table/get_partition). In which case, the user will run their query which uses the output, and it will experience a timeout trying to acquire the lock on the table/partition.

      If all the move tasks depend on the parent's of all other move tasks, the output creation will be much closer to atomic relieving this problem.

      1. HIVE-3106.1.patch.txt
        313 kB
        Kevin Wilfong
      2. HIVE-3106.2.patch.txt
        462 kB
        Kevin Wilfong

        Activity

        Ashutosh Chauhan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ashutosh Chauhan made changes -
        Fix Version/s 0.10.0 [ 12320745 ]
        Kevin Wilfong made changes -
        Attachment HIVE-3106.2.patch.txt [ 12532238 ]
        Namit Jain made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Resolution Fixed [ 1 ]
        Kevin Wilfong made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Namit Jain made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Kevin Wilfong made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Kevin Wilfong made changes -
        Field Original Value New Value
        Attachment HIVE-3106.1.patch.txt [ 12531456 ]
        Kevin Wilfong created issue -

          People

          • Assignee:
            Kevin Wilfong
            Reporter:
            Kevin Wilfong
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development