public SessionInfo getSessionInfoOfPipeReceiver(IClientSession session, String databaseName) {
    return new SessionInfo(
        session.getId(),
        session.getUsername(),
        ZoneId.systemDefault(),
        session.getClientVersion(),
        databaseName,
        IClientSession.SqlDialect.TABLE);
  }
must be called after registerSession()) will mark the session login.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java