public void cleanUp() {
    regionIdToBatch.values().forEach(batch -> batch.cleanUp(true));
    regionIdToBatch.clear();
  }
@return {@code true} if there are subscription events consumed.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatches.java