You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/12/04 18:29:56 UTC

[iotdb] 01/01: fix when one row failed, then insertRecords() does not clear the failed messages

This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch fix_insertplan_not_clear
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ed33c4ca4af89d8e99f1304ad538c75b7f5a9c1e
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Sat Dec 5 02:29:22 2020 +0800

    fix when one row failed, then insertRecords() does not clear the failed messages
---
 server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index a075813..5d31794 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -1236,10 +1236,11 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
     }
 
     List<TSStatus> statusList = new ArrayList<>();
-    InsertRowPlan plan = new InsertRowPlan();
+
     boolean isAllSuccessful = true;
     for (int i = 0; i < req.deviceIds.size(); i++) {
       try {
+        InsertRowPlan plan = new InsertRowPlan();
         plan.setDeviceId(new PartialPath(req.getDeviceIds().get(i)));
         plan.setTime(req.getTimestamps().get(i));
         plan.setMeasurements(req.getMeasurementsList().get(i).toArray(new String[0]));