You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/11/18 08:57:58 UTC
[iotdb] 01/01: Remove the usage of TriggerExecutionException in storage engine
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch remove_TriggerExecutionException
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit cd329e1e2b607f8cc25c62f1e9f4c8305c86a8aa
Author: HTHou <hh...@outlook.com>
AuthorDate: Fri Nov 18 16:57:40 2022 +0800
Remove the usage of TriggerExecutionException in storage engine
---
.../consensus/statemachine/visitor/DataExecutionVisitor.java | 7 +++----
.../org/apache/iotdb/db/engine/storagegroup/DataRegion.java | 12 +++++-------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/visitor/DataExecutionVisitor.java b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/visitor/DataExecutionVisitor.java
index bc7b8c15c5..2202b4ecad 100644
--- a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/visitor/DataExecutionVisitor.java
+++ b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/visitor/DataExecutionVisitor.java
@@ -23,7 +23,6 @@ import org.apache.iotdb.commons.path.PartialPath;
import org.apache.iotdb.commons.utils.StatusUtils;
import org.apache.iotdb.db.engine.storagegroup.DataRegion;
import org.apache.iotdb.db.exception.BatchProcessException;
-import org.apache.iotdb.db.exception.TriggerExecutionException;
import org.apache.iotdb.db.exception.WriteProcessException;
import org.apache.iotdb.db.exception.query.OutOfTTLException;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode;
@@ -59,7 +58,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
} catch (OutOfTTLException e) {
LOGGER.warn("Error in executing plan node: {}, caused by {}", node, e.getMessage());
return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
- } catch (WriteProcessException | TriggerExecutionException e) {
+ } catch (WriteProcessException e) {
LOGGER.error("Error in executing plan node: {}", node, e);
return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
}
@@ -73,7 +72,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
} catch (OutOfTTLException e) {
LOGGER.warn("Error in executing plan node: {}, caused by {}", node, e.getMessage());
return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
- } catch (TriggerExecutionException | WriteProcessException e) {
+ } catch (WriteProcessException e) {
LOGGER.error("Error in executing plan node: {}", node, e);
return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
} catch (BatchProcessException e) {
@@ -143,7 +142,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
try {
dataRegion.insert(node);
return StatusUtils.OK;
- } catch (WriteProcessException | TriggerExecutionException e) {
+ } catch (WriteProcessException e) {
LOGGER.error("Error in executing plan node: {}", node, e);
return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
} catch (BatchProcessException e) {
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
index f28627a720..228e6f5233 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
@@ -58,7 +58,6 @@ import org.apache.iotdb.db.exception.BatchProcessException;
import org.apache.iotdb.db.exception.DataRegionException;
import org.apache.iotdb.db.exception.DiskSpaceInsufficientException;
import org.apache.iotdb.db.exception.LoadFileException;
-import org.apache.iotdb.db.exception.TriggerExecutionException;
import org.apache.iotdb.db.exception.TsFileProcessorException;
import org.apache.iotdb.db.exception.WriteProcessException;
import org.apache.iotdb.db.exception.WriteProcessRejectException;
@@ -874,8 +873,7 @@ public class DataRegion {
*
* @param insertRowNode one row of data
*/
- public void insert(InsertRowNode insertRowNode)
- throws WriteProcessException, TriggerExecutionException {
+ public void insert(InsertRowNode insertRowNode) throws WriteProcessException {
// reject insertions that are out of ttl
if (!isAlive(insertRowNode.getTime())) {
throw new OutOfTTLException(insertRowNode.getTime(), (DateTimeUtils.currentTime() - dataTTL));
@@ -925,7 +923,7 @@ public class DataRegion {
*/
@SuppressWarnings("squid:S3776") // Suppress high Cognitive Complexity warning
public void insertTablet(InsertTabletNode insertTabletNode)
- throws TriggerExecutionException, BatchProcessException, WriteProcessException {
+ throws BatchProcessException, WriteProcessException {
if (enableMemControl) {
StorageEngineV2.blockInsertionIfReject(null);
}
@@ -3053,7 +3051,7 @@ public class DataRegion {
* @param insertRowsOfOneDeviceNode batch of rows belongs to one device
*/
public void insert(InsertRowsOfOneDeviceNode insertRowsOfOneDeviceNode)
- throws WriteProcessException, TriggerExecutionException, BatchProcessException {
+ throws WriteProcessException, BatchProcessException {
if (enableMemControl) {
StorageEngineV2.blockInsertionIfReject(null);
}
@@ -3135,7 +3133,7 @@ public class DataRegion {
InsertRowNode insertRowNode = insertRowsNode.getInsertRowNodeList().get(i);
try {
insert(insertRowNode);
- } catch (WriteProcessException | TriggerExecutionException e) {
+ } catch (WriteProcessException e) {
insertRowsNode.getResults().put(i, RpcUtils.getStatus(e.getErrorCode(), e.getMessage()));
}
}
@@ -3156,7 +3154,7 @@ public class DataRegion {
InsertTabletNode insertTabletNode = insertMultiTabletsNode.getInsertTabletNodeList().get(i);
try {
insertTablet(insertTabletNode);
- } catch (TriggerExecutionException | WriteProcessException | BatchProcessException e) {
+ } catch (WriteProcessException | BatchProcessException e) {
insertMultiTabletsNode
.getResults()
.put(i, RpcUtils.getStatus(e.getErrorCode(), e.getMessage()));