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

Optimise lock acquisition in TxnHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Hive
    • None

    Description

      With concurrent queries, time taken for lock acquisition increases substantially. As part of lock acquisition in the query, TxnHandler::checkLock gets invoked. This involves getting a mutex and compare the locks being requested for, with that of existing locks in HIVE_LOCKS table.

      With concurrent queries, time taken to do this check increase and this significantly increases the time taken for getting mutex for other threads (due to select for update). In a synthetic workload, it was in the order of 10+ seconds. This codepath can be optimized when all lock requests are SHARED_READ.

       

       

      Attachments

        1. HIVE-22850.6.patch
          7 kB
          Rajesh Balamohan
        2. HIVE-22850.4.patch
          22 kB
          Rajesh Balamohan
        3. HIVE-22850.3.patch
          23 kB
          Rajesh Balamohan
        4. jumpTableInfo.png
          197 kB
          Rajesh Balamohan
        5. HIVE-22850.2.patch
          5 kB
          Rajesh Balamohan
        6. Screenshot 2020-02-07 at 4.14.51 AM.jpg
          961 kB
          Rajesh Balamohan
        7. HIVE-22850.1.patch
          5 kB
          Rajesh Balamohan

        Activity

          People

            Unassigned Unassigned
            rajesh.balamohan Rajesh Balamohan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: