changxue created IOTDB-4935:
-------------------------------

             Summary: [UDF] beforeStart and beforeDestroy would be called more 
than once
                 Key: IOTDB-4935
                 URL: https://issues.apache.org/jira/browse/IOTDB-4935
             Project: Apache IoTDB
          Issue Type: Bug
    Affects Versions: 0.14.0-SNAPSHOT
            Reporter: changxue
            Assignee: Yuan Tian
         Attachments: normla-udf-0.14-SNAPSHOT.jar

[UDF] beforeStart and beforeDestroy would be called more than once

文档中,说明了这两个方法只会被调用一次,但是实际结果并非如此。

reproduction:
{code}
create function count_sec as 
"com.timecho.udf.normal.TestSessionTimeWindowAccessStrategy";

CREATE DATABASE root.udf;
CREATE TIMESERIES root.udf.d1.s1 WITH DATATYPE=text, ENCODING=PLAIN;
CREATE TIMESERIES root.udf.d1.s2 WITH DATATYPE=text, ENCODING=PLAIN;

insert into root.udf.d1 (time, s1, s2) values (1, 'udf', 'trigger'),(2, 'some' 
, 'old'),(3, null, 'trigger'),(9, 'udf', 'new'),(5, 'woman', 'udf'),(12, 
'trigger', null),(14, 'udf', 14),(18, 'udf', 16),(21, 'trigger', 18),(24, 
'udf', 20);

select count_sec(s1, 'max_interval'=4, 'standard'='null') from root.udf.d1;
{code}


{code:shell}
2022-11-15 10:56:00,949 
[pool-25-IoTDB-ClientRPC-Processor-6$20221115_025601_00221_1] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:25 - ###### TestSessionTimeWindow # 
beforeStart ####### 
2022-11-15 10:56:00,949 
[pool-25-IoTDB-ClientRPC-Processor-6$20221115_025601_00221_1] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:26 - attributes: {max_interval=4, 
standard=null} 
2022-11-15 10:56:00,949 
[pool-25-IoTDB-ClientRPC-Processor-6$20221115_025601_00221_1] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:57 - ###### TestSessionTimeWindow # 
beforeDestroy ####### 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:25 - ###### TestSessionTimeWindow # 
beforeStart ####### 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:26 - attributes: {max_interval=4, 
standard=null} 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:57 - ###### TestSessionTimeWindow # 
beforeDestroy ####### 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:25 - ###### TestSessionTimeWindow # 
beforeStart ####### 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:26 - attributes: {max_interval=4, 
standard=null} 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:57 - ###### TestSessionTimeWindow # 
beforeDestroy ####### 
2022-11-15 10:56:00,951 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:25 - ###### TestSessionTimeWindow # 
beforeStart ####### 
2022-11-15 10:56:00,952 
[pool-21-IoTDB-MPPCoordinator-1$20221115_025601_00221_1.1.0] INFO  
c.t.u.n.TestSessionTimeWindowAccessStrategy:26 - attributes: {max_interval=4, 
standard=null} 
2022-11-15 10:56:00,953 [Query-Worker-Thread-0$20221115_025601_00221_1.1.0] 
INFO  c.t.u.n.TestSessionTimeWindowAccessStrategy:45 - ######### 
TestSlidingTimeWindow # [1] 3 ######## 
2022-11-15 10:56:00,953 [Query-Worker-Thread-0$20221115_025601_00221_1.1.0] 
INFO  c.t.u.n.TestSessionTimeWindowAccessStrategy:45 - ######### 
TestSlidingTimeWindow # [9] 3 ######## 
2022-11-15 10:56:00,953 [Query-Worker-Thread-0$20221115_025601_00221_1.1.0] 
INFO  c.t.u.n.TestSessionTimeWindowAccessStrategy:45 - ######### 
TestSlidingTimeWindow # [18] 3 ######## 
2022-11-15 10:56:00,953 [Query-Worker-Thread-0$20221115_025601_00221_1.1.0] 
INFO  c.t.u.n.TestSessionTimeWindowAccessStrategy:57 - ###### 
TestSessionTimeWindow # beforeDestroy #######  {code}



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

Reply via email to