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/16 02:37:22 UTC

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

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



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/coordinator/Coordinator.java
##########
@@ -334,7 +345,8 @@ private TSStatus forwardPlan(List<PartitionGroup> partitionGroups, PhysicalPlan
   private TSStatus forwardPlan(Map<PhysicalPlan, PartitionGroup> planGroupMap, PhysicalPlan plan) {
     // the error codes from the groups that cannot execute the plan
     TSStatus status;
-    if (planGroupMap.size() == 1) {
+    // need to create substatus for multiPlan
+    if (planGroupMap.size() == 1 && !(plan instanceof CreateMultiTimeSeriesPlan)) {

Review comment:
       TSServiceImpl did privilege check and mark it in plan.getResults() map, so server mode privilege works fine. 
   But in cluster mode, if current user has no privilege and cannot create any timeseries, in Coordinator planGroupMap is always empty, then the processPartitionedPlan() method will always call upon itself to try split the plan. its an endless loop
   
   so i think we need a check here to break out the loop when planGroupMap is empty.
   please let me know if you have any workaround 




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