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

Sql. Avoid spamming execution tasks when possible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • 3.0
    • sql

    Description

      Need to revise all usages of org.apache.ignite.internal.sql.engine.exec.ExecutionContext#execute and check whether spawning a new task is legit in every particular case or it's better to do the work right now.

      For example, lets take a look at org.apache.ignite.internal.sql.engine.exec.rel.ScanNode#request:

      @Override
          public void request(int rowsCnt) throws Exception {
              assert rowsCnt > 0 && requested == 0 : "rowsCnt=" + rowsCnt + ", requested=" + requested;
      
              checkState();
      
              requested = rowsCnt;
      
              if (!inLoop) {
                  context().execute(this::push, this::onError);
              }
          }
      

      in case of the very first request we will spawn a new task, but it would be better to drain the first batch of rows as well.

      Attachments

        Issue Links

          Activity

            People

              korlov Konstantin Orlov
              korlov Konstantin Orlov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m