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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • 4.0.0-alpha-1
    • Affects Version/s: 2.1.0, 2.3.2
    • Component/s: HiveServer2
    • None

      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.

        1. HIVE-22165.02.patch
          1 kB
          László Bodor
        2. HIVE-22165.02.patch
          1 kB
          László Bodor
        3. HIVE-22165.patch.1
          1 kB
          Amruth Sampath
        4. HIVE-22165.patch
          1 kB
          Amruth Sampath

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

              Created:
              Updated:
              Resolved: