@Override
    public int compare(DriverTask o1, DriverTask o2) {
      if (o1.getDriverTaskId().equals(o2.getDriverTaskId())) {
        return 0;
      }
      int result =
          Long.compare(
              o1.priority.get().getLevelScheduledTime(), o2.priority.get().getLevelScheduledTime());
      if (result != 0) {
        return result;
      }
      return o1.getDriverTaskId().compareTo(o2.getDriverTaskId());
    }
a comparator of DriverTask, the higher the levelScheduledTime is, the lower order it has.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/task/DriverTask.java