@Override
  protected DriverTask pollFirst() {
    // Always choose tasks in the highestPriorityLevelQueue first.
    if (!highestPriorityLevelQueue.isEmpty()) {
      return highestPriorityLevelQueue.poll();
    }

    DriverTask result;
    while (true) {
      result = chooseLevelAndTask();
      if (result.updatePriority()) {
        // result.updatePriority() returns true means that the Priority of DriverTaskHandle the
        // result belongs to has changed.
        // All the DriverTasks of one DriverTaskHandle should be in the same level.
        // We push the result into the queue and choose another DriverTask.
        pushToQueue(result);
        continue;
      }
      int selectedLevel = result.getPriority().getLevel();
      levelMinScheduledTime[selectedLevel].set(result.getPriority().getLevelScheduledTime());
      return result;
    }
  }
During periods of time when a level has no waiting splits, it will not accumulate scheduled
time and will fall behind relative to other levels.

<p>This can cause temporary starvation for other levels when splits do reach the
previously-empty level.

<p>To prevent this we set the scheduled time for levels which were empty to the expected
scheduled time.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/MultilevelPriorityQueue.java