@SuppressWarnings({"squid:S112"}) // ignore Generic exceptions should never be throw
  @Override
  public void insertTablets(Map<String, Tablet> tablets, boolean sorted)
      throws IoTDBConnectionException, StatementExecutionException {
    ISession session = getSession();
    try {
      session.insertTablets(tablets, sorted);
      putBack(session);
    } catch (IoTDBConnectionException e) {
      // TException means the connection is broken, remove it and get a new one.
      LOGGER.warn("insertTablets failed", e);
      cleanSessionAndMayThrowConnectionException(session, FINAL_RETRY, e);
    } catch (StatementExecutionException | RuntimeException e) {
      putBack(session);
      throw e;
    } catch (Throwable e) {
      LOGGER.error("unexpected error in insertTablets", e);
      putBack(session);
      throw new RuntimeException(e);
    }
  }
use batch interface to insert aligned data

@param tablets multiple batch
iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java