Uploaded image for project: 'Livy (READ-ONLY)'
  1. Livy (READ-ONLY)
  2. LIVY-143

Interactive session should not spin waiting for statement result

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.3
    • Component/s: Server
    • Labels:
      None

      Description

      Currently, when submitting statements for execution, the session code does this:

          val future = Future {
            val id = client.submitReplCode(content.code)
            info(s"Running statement $id: ${content.code}")
            waitForStatement(id)
          }
      

      waitForStatement calls itself recursively until the statement is finished; that means that a thread in the global pool will be blocked until that statement finishes, which is bad and limits how many statements can be submitted concurrently.

      We either should make the polling a recurring task (instead of a blocking task), or make the monitoring asynchronous.

        Attachments

          Activity

            People

            • Assignee:
              tc0312 Alex Man
              Reporter:
              vanzin Marcelo Vanzin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: