public IClientSession getCurrSession() {
    return currSession.get();
  }
this method can be only used in client-thread model.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java