PipelineDB连续视图失败断言!(ActiveSnapshotSet())

时间:2017-03-24 18:11:22

标签: pipelinedb

我有两个连续观点:tikets2second_view

CREATE CONTINUOUS VIEW tickets2 AS 
   SELECT ticketid,
     TO_TIMESTAMP(min(event_time)::double precision /1000000) as t0,
     keyed_min(event_time, status) as t0_status,
     TO_TIMESTAMP(max(event_time)::double precision /1000000) as tc,
     keyed_max(event_time, status) as tc_status
   FROM tickets_stream2 
   group by ticketid;

CREATE CONTINUOUS VIEW second_view AS
SELECT (new).tc FROM output_of('tickets2’);

当我将数据插入tickets_stream2时,我收到一个断言错误。

  

TRAP:FailedAssertion(“!(ActiveSnapshotSet())”,文件:“postgres.c”,   行:824,PID:5275,查询:ticket2)

删除second_view,数据插入tickets_stream2执行时没有问题。

我无法弄清楚我错过了什么。

OB的。我正在使用PipelineDB 0.9.7

编辑:

同时我尝试了没有TO_TIMESTAMP()函数并且没有发生异常。

CREATE CONTINUOUS VIEW tickets2 AS 
            SELECT 
                ticketid, 
                min(event_time) as t0, 
                keyed_min(event_time, status) as t0_status,
                max(event_time) as tc, 
                keyed_max(event_time, status) as tc_status   
            FROM tickets_stream_test_output 
            GROUP BY ticketid;

编辑2,0.9.7u3 (可能对其他人有用

我测试了更新版本。我不再让断言失败,但是当我将数据插入test_version_stream时仍然会发生错误。

CREATE STREAM test_version_stream(event_time bigint, ticketid uuid, status text);

CREATE CONTINUOUS VIEW test_version_view AS 
   SELECT ticketid,
     TO_TIMESTAMP(min(event_time)::double precision /1000000) as t
   FROM test_version_stream
   GROUP BY ticketid;

CREATE CONTINUOUS VIEW e_test_version_view AS
SELECT (new).t FROM output_of('test_version_view');

我改变了函数minto_timestamp的顺序,一切顺利:)

1 个答案:

答案 0 :(得分:0)

此问题已通过0.9.7版本的最新更新修复:

https://github.com/pipelinedb/pipelinedb/releases