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

Synchronisation introduced by HIVE-14296 on SessionManager.closeSession causes high latency in a busy hive server

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0, 2.3.2
    • Fix Version/s: None
    • Component/s: HiveServer2
    • Labels:
      None

      Description

      HIVE-14296 introduces this commit which adds synchronization to SessionManager.closeSession.

      And it looks like it is used only for logging purposes.

      In a busy hive server where 5-10 sessions are created closed every second, an increase in latency of any other downstream services (Zk, HDFS) causes a queueing effect (lot of threads getting blocked on SessionManager.closeSession) creating an induced latency of 3-5 minutes at times for just closing the session. 

      Since the gauge (MetricsConstant.HS2_OPEN_SESSIONS) is already tracking the open session counts, the synchronization (along with the additional logging) can be removed without any functionality losses.

        Attachments

        1. HIVE-22165.patch.1
          1 kB
          Amruth Sampath
        2. HIVE-22165.patch
          1 kB
          Amruth Sampath

          Issue Links

            Activity

              People

              • Assignee:
                amrk7 Amruth Sampath
                Reporter:
                amrk7 Amruth Sampath
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: