public void closeStatement(
      IClientSession session, long statementId, LongConsumer releaseByQueryId) {
    Set<Long> queryIdSet = session.removeStatementId(statementId);
    if (queryIdSet != null) {
      for (Long queryId : queryIdSet) {
        releaseByQueryId.accept(queryId);
      }
    }
    session.removeStatementId(statementId);
  }
Check whether current user has logged in.

@return true: If logged in; false: If not logged in
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java