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

LockManager may be too coarse grained

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0.0
    • None
    • Transactions
    • None

    Description

      Consider

      create table target (a int, b int)
            partitioned by (p int, q int) clustered by (a) into 2  buckets 
            stored as orc TBLPROPERTIES ('transactional'='true')")
      insert into target partition(p=1,q) values (1,2,3)
      

      this insert will lock the whole table. See

      DbTxnManager.acquireLocks()
      switch (output.getType()) {
              case DUMMYPARTITION:   //
      

      Insert operation runs with SHARED_READ lock but once HIVE-15032 is addressed this will be an issue for Update/Delete/Merge which use a more restrictive SHARED_WRITE lock.

      This can probably be achieved using "like /db/table/part/*" predicate making the LM operations more expensive TxnHandler.checkLock()

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: