Skip to content

Commit

Permalink
insertByTablet execute synchronize
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuheng55555 committed Sep 21, 2023
1 parent 02e8b02 commit 24817a3
Showing 1 changed file with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,16 @@ public IoTDBSessionBase(DBConfig dbConfig) {

public Status insertOneBatchByTablet(IBatch batch) {
Tablet tablet = genTablet(batch);
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();
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());
}
}

public Status insertOneBatchByRecord(IBatch batch) {
Expand Down

0 comments on commit 24817a3

Please sign in to comment.