You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "liaolanyu (Jira)" <ji...@apache.org> on 2022/11/16 01:12:00 UTC

[jira] [Commented] (IOTDB-4869) [trigger]getFailureStrategy throws exception, 在insert时报错连不上node的9003端口

    [ https://issues.apache.org/jira/browse/IOTDB-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634588#comment-17634588 ] 

liaolanyu commented on IOTDB-4869:
----------------------------------

我们会根据 failureStrategy 的设置来决定触发出错的处理逻辑,这个方法理论上只会return enum的两种值,不会抛异常的。由于我们是在触发逻辑中才会用到这个方法,如果这个方法抛异常,我们就没办法知道到底该选择什么策略处理了,因为不知道抛的异常是来自这个方法还是触发本身。

> [trigger]getFailureStrategy throws exception, 在insert时报错连不上node的9003端口
> ----------------------------------------------------------------------
>
>                 Key: IOTDB-4869
>                 URL: https://issues.apache.org/jira/browse/IOTDB-4869
>             Project: Apache IoTDB
>          Issue Type: Bug
>    Affects Versions: 0.14.0-SNAPSHOT
>            Reporter: changxue
>            Assignee: liaolanyu
>            Priority: Minor
>         Attachments: ExceptionOnStopTrigger.java, log_datanode_all.log, strategy-test-0.14-SNAPSHOT.jar
>
>
> [trigger]getFailureStrategy throws exception, 在insert时报错连不上node的9003端口
> environment:
> 3C3D cluster Nov.7th 代码
>  
> 错误信息:
> {code:java}
> -- [1]8:CREATE STATELESS TRIGGER `getFailureStrategy` AFTER INSERT ON root.sg1.d1.s1 AS 'com.timecho.test.ExceptionTrigger'
> STRICT{
> PASS
> }
> -- [1]9:insert into root.sg1.d1(time, s1) values (1, 2)
> STRICT{
> SQLSTATE : 310: can't connect to node {}TEndPoint(ip:172.20.70.46, port:9003)
> } {code}
> 问题:
> 这个错误信息可以在上层拦截或判断一下,使提示信息更加友好。
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)