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 2020/10/12 08:38:51 UTC

[GitHub] [iotdb] jt2594838 commented on a change in pull request #1771: [IOTDB-884] batch create timeSeriesPlan

jt2594838 commented on a change in pull request #1771:
URL: https://github.com/apache/iotdb/pull/1771#discussion_r503130699



##########
File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
##########
@@ -1607,9 +1607,9 @@ public TSStatus createMultiTimeseries(TSCreateMultiTimeseriesReq req) {
 
       boolean isAllSuccessful = true;
 
-      for (Map.Entry<Integer, Boolean> entry : createMultiTimeSeriesPlan.getResults().entrySet()) {
-        if (!entry.getValue()) {
-          isAllSuccessful = false;
+      if (createMultiTimeSeriesPlan.getResults().entrySet().size() > 0) {
+        isAllSuccessful = false;
+        for (Map.Entry<Integer, Exception> entry : createMultiTimeSeriesPlan.getResults().entrySet()) {
           statusList.set(entry.getKey(), RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR));

Review comment:
       I think the messages of the exceptions should be put into the statuses.
   `RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, entry.getValue().getMessage())`




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