Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-777

Query remains in queue even when driver is free

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None

      Description

      Scenario:

      Config

        <property>
          <name>driver.max.concurrent.launched.queries</name>
          <value>1</value>
          <description>Maximum queries which can be launched simultaneously on this driver. This should be equal to
            lens.driver.jdbc.pool.max.size. This configuration value is only useful when MaxConcurrentDriverQueriesConstraint
            is enabled by using org.apache.lens.server.api.query.constraint.MaxConcurrentDriverQueriesConstraintFactory as
            one of the factories in lens.driver.jdbc.query.constraint.factories property.</description>
        </property>
      <property>
          <name>lens.driver.jdbc.pool.max.size</name>
          <value>1</value>
          <description>Maximum number of concurrent connections allowed in pool</description>
        </property>
      

      Launched 1st query with user U1
      Launched 2nd query with user U2
      Launched 3rd query with user U1
      Launched 4th query with user U2

      Query Status
      ==========
      Q1 -> Running
      Q2 -> Queued(queue number = 1)
      Q3 -> Queued(queue number = 2)
      Q4 -> Queued(queue number = 3)

      When Q1 completes, Query Status
      ==========================
      Q1 -> Successful
      Q2 -> Queued(queue number = 1)
      Q3 -> Running
      Q4 -> Queued(queue number = 2)

      When Q2 completes, Query Status
      ==========================
      Q1 -> Successful
      Q2 -> Queued(queue number = 1)
      Q3 -> Successful
      Q4 -> Queued(queue number = 2)

      user "U2" query will never get picked. Another query launched by user "U1" will be answered.

        Attachments

        1. LENS-777.01.patch
          25 kB
          Akshay Goyal
        2. LENS-777.02.patch
          25 kB
          Akshay Goyal

          Issue Links

            Activity

              People

              • Assignee:
                akshaygoyal Akshay Goyal
                Reporter:
                arshadmatin20 Arshad Matin

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Issue deployment