mychaow commented on a change in pull request #2698:
URL: https://github.com/apache/iotdb/pull/2698#discussion_r579614210



##########
File path: 
server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1097,6 +1101,27 @@ public void insert(InsertRowsOfOneDevicePlan 
insertRowsOfOneDevicePlan)
     }
   }
 
+  @Override
+  public void insert(InsertRowsPlan plan) throws QueryProcessException {
+    boolean allSuccess = true;
+    for (int i = 0; i < plan.getInsertRowPlanList().size(); i++) {
+      if (plan.getResults().containsKey(i)) {
+        allSuccess = false;
+        continue;
+      }
+      try {
+        insert(plan.getInsertRowPlanList().get(i));
+        plan.getResults().put(i, 
RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS));
+      } catch (QueryProcessException e) {
+        plan.getResults().put(i, RpcUtils.getStatus(e.getErrorCode(), 
e.getMessage()));
+        allSuccess = false;
+      }
+      if (!allSuccess) {

Review comment:
       do we need to insert the left records while one record is failed? 
@qiaojialin 




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