fanhualta commented on a change in pull request #3191:
URL: https://github.com/apache/iotdb/pull/3191#discussion_r640802379



##########
File path: 
cluster/src/main/java/org/apache/iotdb/cluster/query/reader/DataSourceInfo.java
##########
@@ -96,19 +96,21 @@ public boolean hasNextDataClient(boolean byTimestamp, long 
timestamp) {
         Long newReaderId = getReaderId(node, byTimestamp, timestamp);
         if (newReaderId != null) {
           logger.debug("get a readerId {} for {} from {}", newReaderId, 
request.path, node);
-          if (newReaderId != -1) {
+          if (newReaderId >= 0) {
             // register the node so the remote resources can be released
-            context.registerRemoteNode(node, partitionGroup.getHeader());
+            context.registerRemoteNode(node, partitionGroup.getHeader(), 
partitionGroup.getId());
             this.readerId = newReaderId;
             this.curSource = node;
             this.curPos = nextNodePos;
             return true;
-          } else {
+          } else if (newReaderId == -1) {
             // the id being -1 means there is no satisfying data on the remote 
node, create an
             // empty reader to reduce further communication
             this.isNoClient = true;
             this.isNoData = true;
             return false;
+          } else {
+            logger.debug("change other client for better query performance.");

Review comment:
       This is just temporary code,I have rolled back.

##########
File path: 
cluster/src/main/java/org/apache/iotdb/cluster/query/reader/DataSourceInfo.java
##########
@@ -96,19 +96,21 @@ public boolean hasNextDataClient(boolean byTimestamp, long 
timestamp) {
         Long newReaderId = getReaderId(node, byTimestamp, timestamp);
         if (newReaderId != null) {
           logger.debug("get a readerId {} for {} from {}", newReaderId, 
request.path, node);
-          if (newReaderId != -1) {
+          if (newReaderId >= 0) {
             // register the node so the remote resources can be released
-            context.registerRemoteNode(node, partitionGroup.getHeader());
+            context.registerRemoteNode(node, partitionGroup.getHeader(), 
partitionGroup.getId());
             this.readerId = newReaderId;
             this.curSource = node;
             this.curPos = nextNodePos;
             return true;
-          } else {
+          } else if (newReaderId == -1) {
             // the id being -1 means there is no satisfying data on the remote 
node, create an
             // empty reader to reduce further communication
             this.isNoClient = true;
             this.isNoData = true;
             return false;
+          } else {
+            logger.debug("change other client for better query performance.");

Review comment:
       This is just temporary codes,I have rolled back.




-- 
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:
[email protected]


Reply via email to