You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/18 11:03:03 UTC

[GitHub] [iotdb] wangchao316 commented on a change in pull request #2867: IOTDB-1241 support redirect query for cluster

wangchao316 commented on a change in pull request #2867:
URL: https://github.com/apache/iotdb/pull/2867#discussion_r596745154



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -452,7 +457,28 @@ public long getTimeout() {
    */
   public SessionDataSet executeQueryStatement(String sql)
       throws StatementExecutionException, IoTDBConnectionException {
-    return defaultSessionConnection.executeQueryStatement(sql, timeout);
+    try {
+      logger.info("{} execute sql {}", defaultSessionConnection.getEndPoint(), sql);
+      return defaultSessionConnection.executeQueryStatement(sql, timeout);
+    } catch (RedirectException e) {
+      handleQueryRedirection(e.getEndPoint());
+      if (enableQueryRedirection) {

Review comment:
       line 464-481 and  499-510,  could extract method..




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org