private void handleRedirection(IDeviceID deviceId, TEndPoint endpoint) {
    if (enableRedirection) {
      // no need to redirection
      if (endpoint.ip.equals("0.0.0.0")) {
        return;
      }
      if (!tableModelDeviceIdToEndpoint.containsKey(deviceId)
          || !tableModelDeviceIdToEndpoint.get(deviceId).equals(endpoint)) {
        tableModelDeviceIdToEndpoint.put(deviceId, endpoint);
      }
      SessionConnection connection =
          endPointToSessionConnection.computeIfAbsent(
              endpoint,
              k -> {
                try {
                  return constructSessionConnection(this, endpoint, zoneId);
                } catch (IoTDBConnectionException ex) {
                  return null;
                }
              });
      if (connection == null) {
        tableModelDeviceIdToEndpoint.remove(deviceId);
      }
    }
  }
insert data in one row, if you want to improve your performance, please use insertRecords
method or insertTablet method

@see Session#insertRecords(List, List, List, List, List)
@see Session#insertTablet(Tablet)
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java