@Override
  public void stop(Throwable t) {
    // only stop once
    if (stopped.compareAndSet(false, true) && this.scheduler != null) {
      this.scheduler.stop(t);
    }
  }
QueryExecution stores all the status of a query which is being prepared or running inside the MPP
frame. It takes three main responsibilities: 1. Prepare a query. Transform a query from statement
to DistributedQueryPlan with fragment instances. 2. Dispatch all the fragment instances to
corresponding physical nodes. 3. Collect and monitor the progress/states of this query.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java