VGalaxies commented on code in PR #12511:
URL: https://github.com/apache/iotdb/pull/12511#discussion_r1599339516
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -905,6 +906,25 @@ private SessionDataSet executeStatementMayRedirect(String
sql, long timeoutInMs)
}
}
+ private SessionConnection getQuerySessionConnection() {
+ Optional<TEndPoint> endPoint =
+ availableNodes == null ? Optional.empty() :
availableNodes.getQueryEndPoint();
+ if (!endPoint.isPresent()) {
+ return defaultSessionConnection;
+ }
+ SessionConnection connection =
+ endPointToSessionConnection.computeIfAbsent(
Review Comment:
If both `enableRedirection` and `enableQueryRedirection` are set to false,
this will cause an NPE since `endPointToSessionConnection` has not been
initialized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]