diff --git a/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDBSessionBase.java b/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDBSessionBase.java index a4a8f6d47..01c474ffd 100644 --- a/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDBSessionBase.java +++ b/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDBSessionBase.java @@ -71,16 +71,20 @@ public IoTDBSessionBase(DBConfig dbConfig) { public Status insertOneBatchByTablet(IBatch batch) { Tablet tablet = genTablet(batch); - try { - if (config.isVECTOR()) { - sessionWrapper.insertAlignedTablet(tablet); - } else { - sessionWrapper.insertTablet(tablet); - } - return new Status(true); - } catch (IoTDBConnectionException | StatementExecutionException e) { - return new Status(false, 0, e, e.toString()); - } + future = + service.submit( + () -> { + try { + if (config.isVECTOR()) { + sessionWrapper.insertAlignedTablet(tablet); + } else { + sessionWrapper.insertTablet(tablet); + } + } catch (IoTDBConnectionException | StatementExecutionException e) { + LOGGER.error("insert tablet failed", e); + } + }); + return waitFuture(); } public Status insertOneBatchByRecord(IBatch batch) {