PipelineDB 连续视图断言失败!(ActiveSnapshotSet())
PipelineDB Continuous View Failed Assertion !(ActiveSnapshotSet())
我有两个连续的观点:tikets2
和second_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())", File: "postgres.c",
Line: 824, PID: 5275, Query: tickets2)
删除 second_view
,数据插入 tickets_stream2
执行没有问题。
我不知道我错过了什么。
观察。我正在使用 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');
我更改了函数 min
和 to_timestamp
的顺序,一切正常:)
此问题已通过 0.9.7 版的最新更新得到修复:
我有两个连续的观点:tikets2
和second_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())", File: "postgres.c", Line: 824, PID: 5275, Query: tickets2)
删除 second_view
,数据插入 tickets_stream2
执行没有问题。
我不知道我错过了什么。
观察。我正在使用 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');
我更改了函数 min
和 to_timestamp
的顺序,一切正常:)
此问题已通过 0.9.7 版的最新更新得到修复: