void shutdown() {
      if (!isShutdown()) {
        synchronized (this) {
          if (!isShutdown()) {
            LOGGER.info("Shutting down {}...", this.name);

            this.executor.shutdown();
            try {
              if (!this.executor.awaitTermination(
                  AWAIT_TERMINATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
                this.executor.shutdownNow();
                LOGGER.warn(
                    "Interrupt the worker, which may cause some task inconsistent. Please check the biz logs.");
                if (!this.executor.awaitTermination(
                    AWAIT_TERMINATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
                  LOGGER.error(
                      "Thread pool can't be shutdown even with interrupting worker threads, which may cause some task inconsistent. Please check the biz logs.");
                }
              }
            } catch (final InterruptedException e) {
              this.executor.shutdownNow();
              LOGGER.error(
                  "The current thread is interrupted when it is trying to stop the worker threads. This may leave an inconsistent state. Please check the biz logs.");
              Thread.currentThread().interrupt();
            }

            this.executor = null;
          }
        }
      }
    }
Downstream Data Flow Executor: execute poll task
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/consumer/base/SubscriptionExecutorServiceManager.java