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

Locking on Insert into for non native and managed tables.



    • Target Version/s:


      Current state of the art: 

      Managed non native table like Druid Tables, will need to get a Lock on Insert into or insert Over write. The nature of this lock is set to Exclusive by default for any non native table.

      This implies that Inserts into Druid table will Lock any read query as well during the execution of the insert into. IMO this lock (on insert into) is  not needed since the insert statement is appending data and the state of loading it is managed partially by Hive Storage handler hook and part of it by Druid. 

      What i am proposing is to relax the lock level to shared for all non native tables on insert into operations and keep it as Exclusive Write for insert Overwrite for now.


      Any feedback is welcome.

      cc Eugene Koifman / Ashutosh Chauhan / Jason Dere / Gunther Hagleitner

      Also am not sure what is the best way to unit test this currently am using debugger to check if locks are what i except, please let me know if there is a better way to do this. 



        1. HIVE-19490.2.patch
          9 kB
          Slim Bouguerra
        2. HIVE-19490.3.patch
          20 kB
          Slim Bouguerra
        3. HIVE-19490.4.patch
          657 kB
          Slim Bouguerra
        4. HIVE-19490.5.patch
          23 kB
          Slim Bouguerra
        5. HIVE-19490.6.patch
          23 kB
          Slim Bouguerra
        6. HIVE-19490.6.patch
          23 kB
          Slim Bouguerra
        7. HIVE-19490.7.patch
          24 kB
          Ashutosh Chauhan
        8. HIVE-19490.patch
          6 kB
          Slim Bouguerra



            • Assignee:
              bslim Slim Bouguerra
              bslim Slim Bouguerra
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: