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/06/26 04:03:58 UTC

[GitHub] [iotdb] neuyilan commented on a change in pull request #3275: cluster bug - fix privilege check

neuyilan commented on a change in pull request #3275:
URL: https://github.com/apache/iotdb/pull/3275#discussion_r659115152



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/coordinator/Coordinator.java
##########
@@ -250,6 +258,20 @@ public TSStatus processPartitionedPlan(PhysicalPlan plan) throws UnsupportedPlan
     return forwardPlan(planGroupMap, plan);
   }
 
+  /**
+   * check if batch execution plan has privilege on any sg
+   *
+   * @param plan
+   * @return
+   */
+  private boolean checkPrivilegeForBatchExecution(PhysicalPlan plan) {
+    if (plan instanceof BatchPlan) {
+      return ((BatchPlan) plan).getResults().size() != plan.getPaths().size();
+    } else {
+      return true;
+    }

Review comment:
       IMO, If` ((BatchPlan) plan).getResults().size()>0`, which means some plan not have the privilege on some sg. 
   I do not clearly know what's the above code mean.




-- 
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: reviews-unsubscribe@iotdb.apache.org

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