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

Too many locks acquired for partitioned read

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.3.0
    • None
    • Transactions
    • None

    Description

      consider

      create table TAB_PART (a int, b int) partitioned by (p string) clustered by (a) into 2  buckets stored as orc TBLPROPERTIES ('transactional'='true')
      select a from  TAB_PART where p = 'blah'
      

      If the table is truly empty (exactly as above) then DbLockManger will acquire SHARED_READ lock on the table (for the select stmt)

      If prior to Select, one runs "alter table TAB_PART add partition (p = 'blah')" then 2 SHARED_LOCKS are acquired: 1 on table and 1 on partition.

      Should only get 1 partition level lock.
      The behavior of lock manager is such because the generated query plan creates ReadEntity objects this way.

      Todo: try actually inserting data and see if that changes anything.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: