@Override
  public void addQueryId(Long statementId, long queryId) {
    Set<Long> queryIds = statementIdToQueryId.get(statementId);
    if (queryIds == null) {
      throw new IllegalStateException(
          "StatementId: " + statementId + " doesn't exist in this session " + this);
    }
    queryIds.add(queryId);
  }
Client Session is the only identity for a connection.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/ClientSession.java