Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-17699

Improve implementation of QueryTaskExecuter

    XMLWordPrintableJSON

Details

    Description

      Current implementation is based on StrippedThreadExecutor which has major downside: long-living task prevents others task from the same stripe from being executed. This means that the sql engine can be blocked by any query that will take a thread for a long time (most simple example is UDF invoking a Thread.sleep()).

      Let's think about how we can improve this.

      Every implementation of QueryTaskExecuter must meet following requirements:

      1. tasks with the same (queryId, fragmentId) can't be reordered
      2. tasks with the same (queryId, fragmentId) can't be executed in parallel: if T1 and T2 are tasks, submit_time(T1) < submit_time(T2), then end_time(T1) < start_time(T2)
      3. there must be 'happens-before' relation between execution of task with the same (queryId, fragmentId)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jooger Iurii Gerzhedovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: