From 4a98b5ddb6804b7c21e983e142c0f414d76c4070 Mon Sep 17 00:00:00 2001 From: liyuheng Date: Thu, 21 Sep 2023 14:24:03 +0800 Subject: [PATCH] Revert "insertByTablet execute synchronize" This reverts commit 24817a347f1b18497bc5a7b8c263e7545eb8a546. --- .../benchmark/iotdb110/IoTDBSessionBase.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) 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) {