risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
7k stars 575 forks source link

bug: risingwave-streaming-actor' panicked at 'mem-table operation inconsistent! #8059

Closed kwannoel closed 1 year ago

kwannoel commented 1 year ago

Describe the bug

No response

To Reproduce

CREATE TABLE supplier (
    s_suppkey int,
    s_name character varying,
    s_address character varying,
    s_nationkey int,
    s_phone character varying,
    s_acctbal numeric,
    s_comment character varying,
    PRIMARY KEY (s_suppkey)
);

CREATE TABLE part (
    p_partkey int,
    p_name character varying,
    p_mfgr character varying,
    p_brand character varying,
    p_type character varying,
    p_size int,
    p_container character varying,
    p_retailprice numeric,
    p_comment character varying,
    PRIMARY KEY (p_partkey)
);

CREATE TABLE partsupp (
    ps_partkey int,
    ps_suppkey int,
    ps_availqty int,
    ps_supplycost numeric,
    ps_comment character varying,
    PRIMARY KEY (ps_partkey, ps_suppkey)
);

CREATE TABLE customer (
    c_custkey int,
    c_name character varying,
    c_address character varying,
    c_nationkey int,
    c_phone character varying,
    c_acctbal numeric,
    c_mktsegment character varying,
    c_comment character varying,
    PRIMARY KEY (c_custkey)
);

CREATE TABLE orders (
    o_orderkey bigint,
    o_custkey int,
    o_orderstatus character varying,
    o_totalprice numeric,
    o_orderdate date,
    o_orderpriority character varying,
    o_clerk character varying,
    o_shippriority int,
    o_comment character varying,
    PRIMARY KEY (o_orderkey)
);

CREATE TABLE lineitem (
    l_orderkey bigint,
    l_partkey int,
    l_suppkey int,
    l_linenumber int,
    l_quantity numeric,
    l_extendedprice numeric,
    l_discount numeric,
    l_tax numeric,
    l_returnflag character varying,
    l_linestatus character varying,
    l_shipdate date,
    l_commitdate date,
    l_receiptdate date,
    l_shipinstruct character varying,
    l_shipmode character varying,
    l_comment character varying,
    PRIMARY KEY (l_orderkey, l_linenumber)
);

CREATE TABLE nation (
    n_nationkey int,
    n_name character varying,
    n_regionkey int,
    n_comment character varying,
    PRIMARY KEY (n_nationkey)
);

CREATE TABLE region (
    r_regionkey int,
    r_name character varying,
    r_comment character varying,
    PRIMARY KEY (r_regionkey)
);

CREATE TABLE person (
    id bigint,
    name character varying,
    email_address character varying,
    credit_card character varying,
    city character varying,
    state character varying,
    date_time timestamp,
    extra character varying,
    PRIMARY KEY (id)
);

CREATE TABLE auction (
    id bigint,
    item_name character varying,
    description character varying,
    initial_bid bigint,
    reserve bigint,
    date_time timestamp,
    expires timestamp,
    seller bigint,
    category bigint,
    extra character varying,
    PRIMARY KEY (id)
);

CREATE TABLE bid (
    auction bigint,
    bidder bigint,
    price bigint,
    channel character varying,
    url character varying,
    date_time timestamp,
    extra character varying
);

CREATE TABLE alltypes1 (
    c1 boolean,
    c2 smallint,
    c3 int,
    c4 bigint,
    c5 real,
    c6 double,
    c7 numeric,
    c8 date,
    c9 character varying,
    c10 time,
    c11 timestamp,
    c13 interval
);

CREATE TABLE alltypes2 (
    c1 boolean,
    c2 smallint,
    c3 int,
    c4 bigint,
    c5 real,
    c6 double,
    c7 numeric,
    c8 date,
    c9 character varying,
    c10 time,
    c11 timestamp,
    c13 interval
);

CREATE MATERIALIZED VIEW m0 AS
SELECT
    approx_count_distinct (REAL '661') AS col_0
FROM
    tumble (auction, auction.expires, INTERVAL '74') AS tumble_0
WHERE
    FALSE
GROUP BY
    tumble_0.date_time,
    tumble_0.expires,
    tumble_0.initial_bid,
    tumble_0.category;

CREATE MATERIALIZED VIEW m1 AS
SELECT
    t_0.c11 AS col_0
FROM
    alltypes2 AS t_0
    FULL JOIN nation AS t_1 ON t_0.c3 = t_1.n_regionkey
GROUP BY
    t_0.c11;

CREATE MATERIALIZED VIEW m2 AS
SELECT
    (INTERVAL '-60') AS col_0
FROM
    alltypes1 AS t_0
    RIGHT JOIN alltypes2 AS t_1 ON t_0.c10 = t_1.c10
WHERE
    CAST((int '771') AS BOOLEAN)
GROUP BY
    t_0.c4,
    t_0.c7,
    t_0.c10,
    t_1.c8,
    t_0.c6,
    t_1.c13,
    t_0.c13,
    t_1.c5
HAVING
    TRUE;

CREATE MATERIALIZED VIEW m3 AS
SELECT
    ((REAL '781') / (REAL '1785949806')) AS col_0,
    TIMESTAMP '2022-11-11 11:42:29' AS col_1
FROM
    tumble (m1, m1.col_0, INTERVAL '67') AS tumble_0
WHERE
    TRUE
GROUP BY
    tumble_0.col_0
HAVING ((BIGINT '794') > ((((INT '818') << (INT '440')) / (SMALLINT '846')) - (SMALLINT '-32768')));

CREATE MATERIALIZED VIEW m4 AS
WITH with_0 AS (
    SELECT
        (tumble_1.c11 + (INTERVAL '-1')) AS col_0,
        tumble_1.c2 AS col_1,
        (FLOAT '412') AS col_2
    FROM
        tumble (alltypes2, alltypes2.c11, INTERVAL '9') AS tumble_1
    GROUP BY
        tumble_1.c7,
        tumble_1.c6,
        tumble_1.c9,
        tumble_1.c11,
        tumble_1.c2,
        tumble_1.c5
)
SELECT
    (SMALLINT '564') AS col_0,
    (SMALLINT '1') AS col_1,
    TIME '10:43:30' AS col_2,
    ((REAL '0') - (REAL '807')) AS col_3
FROM
    with_0;

CREATE MATERIALIZED VIEW m5 AS
SELECT
    TIMESTAMP '2022-11-11 10:43:30' AS col_0,
    TIMESTAMP '2022-11-11 10:43:30' AS col_1,
    ((TIMESTAMP '2022-11-11 11:43:29') - (INTERVAL '-909690')) AS col_2,
    hop_0.col_1 AS col_3
FROM
    hop (m3, m3.col_1, INTERVAL '88', INTERVAL '1056') AS hop_0
WHERE (FALSE)
GROUP BY
    hop_0.col_1
HAVING
    FALSE;

CREATE MATERIALIZED VIEW m6 AS
SELECT
    (
        CASE WHEN FALSE THEN
            hop_0.col_0
        WHEN FALSE THEN
            TIMESTAMP '2022-11-11 11:43:30'
        ELSE
            TIMESTAMP '2022-11-11 10:43:31'
        END) AS col_0
FROM
    hop (m1, m1.col_0, INTERVAL '16', INTERVAL '288') AS hop_0
GROUP BY
    hop_0.col_0;

CREATE MATERIALIZED VIEW m7 AS
WITH with_0 AS (
    SELECT
        (INT '995') AS col_0,
        (sq_4.col_3 / (SMALLINT '288')) AS col_1
    FROM (
        SELECT
            (t_3.o_custkey + (SMALLINT '433')) AS col_0,
            ((SMALLINT '18819') / (BIGINT '0')) AS col_1,
            (INT '139') AS col_2,
            t_3.o_custkey AS col_3
        FROM
            orders AS t_3
        GROUP BY
            t_3.o_custkey
        HAVING
            FALSE) AS sq_4
    WHERE
        FALSE
    GROUP BY
        sq_4.col_3
)
SELECT
    (161) AS col_0,
    (FLOAT '743') AS col_1,
    (FLOAT '602') AS col_2
FROM
    with_0
WHERE
    TRUE;

CREATE MATERIALIZED VIEW m8 AS
SELECT
    t_2.s_name AS col_0,
    'bQX1wjhA58' AS col_1,
    t_2.s_name AS col_2,
    t_2.s_phone AS col_3
FROM
    supplier AS t_2
WHERE (FALSE)
GROUP BY
    t_2.s_name,
    t_2.s_suppkey,
    t_2.s_phone,
    t_2.s_comment;

CREATE MATERIALIZED VIEW m9 AS
SELECT
    (FLOAT '104') AS col_0,
    tumble_0.col_0 AS col_1
FROM
    tumble (m6, m6.col_0, INTERVAL '11') AS tumble_0
WHERE
    FALSE
GROUP BY
    tumble_0.col_0;

INSERT INTO supplier VALUES ((INT '1'), 'SuubvTHAPK', 'i85l700psD', (INT '113'), '0lNHMdmBOT', (-2147483648), 'uldl7r5IUJ'), ((INT '910'), 'oaqJYpdilV', 'oGg4SXP18n', (INT '1'), 'NxFUXOmie7', (-2147483648), 'iWuG1hg4LI'), ((INT '597'), 'zgEa3BHY4L', 'rz2fn8pN40', (INT '93'), 'FOdc27Rzay', (1237060338), 'Q1xM8ZNvtx'), ((INT '0'), 'XMVUJK8mwF', 'IGANbNawAm', (INT '16'), 'N4C40bjfNX', (101), 'yp2PXmFUwh'), ((INT '233'), 'ItmuPdgV3T', 'sIoADGtoLG', (INT '86'), 'nN8usvZ8zh', (0), 'U4KoYGrXAy'), ((INT '695'), 'CXmn3nIjPQ', 'VNwHqvyEo1', (INT '2147483647'), 'ZOViHv3inn', (435), 'eQJdblnWhm'), ((INT '0'), 'S5HfPn97Xy', 'pdV9UKA9PX', (INT '1'), 'HCBkNCx2PR', (560), '9qx6A7BKLq'), ((INT '2147483647'), '9AxAgqtIw1', 'b9RAcjcjyD', (INT '-2147483648'), 'V1FVRbPTbV', (328), '31VB3rgWbk'), ((INT '792'), '4gi6FYJ3ey', 'b1BoBJf2Me', (INT '535'), 'ZVEJp6K4HF', (186), 'rQ3XOnuAo2'), ((INT '1'), '1X7bavOeJB', '3WyBMIZR92', (INT '0'), 'Ar61nqwJkB', (-2147483648), 'v4WLEI8kVt');
INSERT INTO part VALUES ((INT '911'), 'KsJ5JqGbA0', 'ruucnoLLof', 'X3jLDD86Sa', 'E1zmWTUM6F', (INT '811'), 'zBW98hKpay', (-1353364549), 's5eqVbfhWx'), ((INT '461'), 'KGY6Ck8UWr', '7iJObnBeYv', 'lQ0TkSD9GF', 'yw3PhPr7vE', (INT '663'), 'A1rmOixDch', (433), '18p7Qhxt2i'), ((INT '1'), 'u62dNCWMyb', 'ek9e5jWR3d', '6G3qKK4zgB', 'bdIJxNrJVL', (INT '532'), 'rmvG1Ryw0Y', (-2147483648), 'Sdb0UdDHAY'), ((INT '125'), '2gYRNlwSCz', 'OrtD25H9hf', 'oC96INOhAP', 'rvHZoCsPwT', (INT '380'), 'OmUH2b0XEK', (58), 'AHIII7cSCg'), ((INT '782'), 'gLCr0IgaGh', 'eTbOX7gYzm', 'aF8MJD4i6d', 'oGacfFrpS7', (INT '506'), 'ZLMAZgJuJ4', (952), 'YzpC9SmCEC'), ((INT '416'), 'SymBy9vrNo', 'zUOkMc4Ye2', 'jZT544iRKh', 'DvvxQpwFLe', (INT '0'), 'C93IxF9plg', (858), 'KpLtzFlU1t'), ((INT '1502270332'), 'aTUXz2oXW8', '080PPfvwmu', 'M603kq6zB5', 's0sPL0bhjJ', (INT '2147483647'), 'EDVQojFy2z', (949), 'cHRt57ErtO'), ((INT '-1215933811'), 'bPTIPBMij0', '6MbYRpTlCk', 'F96UWEzID7', 's44303hTRL', (INT '0'), 'WixDynIwfm', (2147483647), 'gsdU8AVImc'), ((INT '1658947589'), 'XtouR03lcB', 'pdKA6JZVb1', 'D6P52gTHbP', '2PazpstbRf', (INT '417'), 'DzPvXyr2cc', (767), 'cJxKRGbzdd'), ((INT '839'), 'Ese88tKYFx', 'z6jWZMMeQa', 'RdNFb5gSji', 'LBYRMPOt2Y', (INT '715'), 'A61H5bV3dI', (522), 'BMclYpQgeC');
INSERT INTO partsupp VALUES ((INT '145'), (INT '1658610418'), (INT '454'), (439), 'oWpZIiJ5bU'), ((INT '782'), (INT '620'), (INT '976'), (404), 'Z6qgacyhf0'), ((INT '727'), (INT '464'), (INT '51'), (650), 'ktDum8Rl6s'), ((INT '524'), (INT '645'), (INT '148'), (324), 'zhrclyNojn'), ((INT '438'), (INT '392'), (INT '491'), (439), 'cv7plVSbnx'), ((INT '0'), (INT '0'), (INT '704'), (446), 'anZADom1Px'), ((INT '358'), (INT '723'), (INT '704'), (500), 'cT7Sq42rXi'), ((INT '-2147483648'), (INT '56'), (INT '1'), (496), 'lZM51vZMje'), ((INT '756'), (INT '200'), (INT '357'), (55), 'UjaBpwrOIe'), ((INT '-2147483648'), (INT '2147483647'), (INT '536'), (0), 's0ozzXEufx');
INSERT INTO customer VALUES ((INT '344'), 'gg7YB2wPkC', 'V7HpurPVFw', (INT '6'), '7tuqv9vHUZ', (0), 'Xr6iSBMWJf', 'K8g4LSgTvc'), ((INT '1'), 'FAMXyuubtq', '8knhagkkl8', (INT '1'), 'jqaQalsUgo', (667), 'SFUebWIB8d', '7alO8ZiYBl'), ((INT '467'), 'FTVeL6pdep', 'HvQHudtmIG', (INT '817'), 'CLCNVGf90R', (0), 'qihDU1sGTO', 'VgK3MwSqFR'), ((INT '-1401192278'), 'yFMyH7s2ps', 'IBv3ipGrij', (INT '126'), 'UjJPnh1hri', (0), 'C1yFRHPisr', 'UFIJL8F62c'), ((INT '301'), 'lposYx8dlo', 'WuXq7Ma3sl', (INT '475'), 'RQG14pd7O4', (450), 'sU1wiMdIYx', 'ifNcHAHusW'), ((INT '945'), 'RnZAUdmMYi', 'vCL1eksbwE', (INT '507052433'), 'IXqoAiX81E', (67), 'IE5aBhzZG9', 'JBNn1YjmOD'), ((INT '327'), 'FxM35b3Axa', 'ZgkXzleg2Y', (INT '-1560094945'), 'zNtfZ5Srwa', (1), 'J6RBHEepTN', 'yLyOo7KiHN'), ((INT '2147483647'), 'B8Y4RLVvXX', '6mQHqwVSXg', (INT '257902310'), 'n11cE5h9q9', (410), '4icrXdkxlb', 'xiJqbzXNVW'), ((INT '1604092394'), 'y7z8yECaSS', 'IO63T94T0q', (INT '667'), 'Ohc0m3RWFm', (742), 'YcjXxj1hV7', 'y932Cyw7DW'), ((INT '211'), 'CndxUOKJbh', 'EtGwqo8AY3', (INT '11'), 'IqMyinny7D', (26597570), 'nKJQalss8i', 'ZhOrT3kHY8');
INSERT INTO orders VALUES ((BIGINT '1'), (INT '315'), 'HRmA4BzoGE', (697), DATE '2022-11-11', 'czwiIebfxa', '0PYsbNo7bY', (INT '170'), '6kHaalDg2P'), ((BIGINT '274'), (INT '1'), 'or74mLfLzw', (29), DATE '2022-11-11', 'uREH8eLFwr', 'BX7SUz3Vhp', (INT '200'), 'VLDjvJXd2D'), ((BIGINT '214'), (INT '971'), 't5Y91usVea', (896), DATE '2022-11-11', '6Sle7NWGhz', 'ysKxS5XgNE', (INT '500'), 'BKazdnryYm'), ((BIGINT '419'), (INT '407'), 'NuhBB4Od3C', (409), DATE '2022-11-11', 'taVnN4SXO8', '4PsktYxnQI', (INT '513'), 'KmxwxPB3bH'), ((BIGINT '258'), (INT '1'), '7LH3IlfpmW', (-2147483648), DATE '2022-11-10', 'UlcjZqfVwc', '1CfORucuN5', (INT '72'), 'qZrqHhe0xG'), ((BIGINT '3080519517683155888'), (INT '415'), 'e3jdLTScAs', (1924149487), DATE '2022-11-11', 'GhZ3PLG5E3', 'VtLINRzfXd', (INT '184'), 'kOtNB6udwt'), ((BIGINT '5105505471528694848'), (INT '40'), 'sReONaypV9', (824), DATE '2022-11-04', '89smLZErOn', 'XO7Opq5Wzz', (INT '726'), 'UDmLtHtzeR'), ((BIGINT '867'), (INT '32'), '5EwY90Ec7b', (439), DATE '2022-11-11', 'KJFNNPPbGa', 'dlX8teMhpn', (INT '119'), '5X7vHW6QbP'), ((BIGINT '467'), (INT '688'), 'F36JWqNbGS', (0), DATE '2022-11-11', 'JSVzfu35wW', 'Gt6X59QNZz', (INT '3'), 'pJ7CHypYmo'), ((BIGINT '634'), (INT '10'), '0PkS2Kb9g1', (845), DATE '2022-11-11', '4ZOBt3Blx0', 'hETtPLd9j5', (INT '0'), 'YZH3ddGM9l');
INSERT INTO lineitem VALUES ((BIGINT '548'), (INT '313'), (INT '11'), (INT '968'), (-746668241), (474), (528), (349), 'snVCzodhqR', 'l60A0y0TkC', DATE '2022-11-04', DATE '2022-11-10', DATE '2022-11-11', '1JN7lM8LLJ', 'l4yRaAtUfI', 'zGN34nn23p'), ((BIGINT '871'), (INT '740'), (INT '2147483647'), (INT '590'), (766), (715), (125), (984), 'ivgbKfMgBs', 'uA3NXd3kOj', DATE '2022-11-11', DATE '2022-11-10', DATE '2022-11-11', 'yOnkk0Iwkl', 'wZKSezlcqf', 'Ktd43GpwoX'), ((BIGINT '8251340721603871621'), (INT '465'), (INT '915'), (INT '1'), (250), (2147483647), (860), (617), 'rid7pfHL3I', 'TQkPa232Ik', DATE '2022-11-11', DATE '2022-11-04', DATE '2022-11-11', '4SYbFIouLU', 'Ll9QEFFr5Z', 'ksAmOfOWf5'), ((BIGINT '253'), (INT '860'), (INT '704'), (INT '250'), (101), (577), (183), (600), 'cwwdKLqsV2', 'yTyVUx783u', DATE '2022-11-11', DATE '2022-11-11', DATE '2022-11-04', 'XVGBqiCVfb', 'ocrhLVYdQe', 'I7Vuiczd3E'), ((BIGINT '482'), (INT '760'), (INT '-254209993'), (INT '229'), (488), (639), (202), (-362918931), '5cJabp7d2C', 'W2UUEWrPWQ', DATE '2022-11-03', DATE '2022-11-11', DATE '2022-11-11', 'zLbbKpO10o', 'ooT0JX0R90', 'AU6J87TxVy'), ((BIGINT '393'), (INT '264'), (INT '-2147483648'), (INT '800'), (73), (0), (422), (377), '6XjfvBDTTf', 'Udk4SiucWW', DATE '2022-11-11', DATE '2022-11-04', DATE '2022-11-10', 'ORb2qK7YUt', 'tojQkjT0od', 'rKnWp6x88g'), ((BIGINT '410'), (INT '-2147483648'), (INT '1'), (INT '190'), (476), (712), (112), (2147483647), 'wc6K0u1XKK', '9wMiEtGlCk', DATE '2022-11-10', DATE '2022-11-11', DATE '2022-11-11', 'JSy40RBU7e', 'tqAmK8dvJ4', 'Lr2jaJFWYu'), ((BIGINT '484'), (INT '-2147483648'), (INT '965'), (INT '482'), (1), (458), (2147483647), (14), 'f3ZPIIfvYS', 'Ptl6Buw1NJ', DATE '2022-11-04', DATE '2022-11-06', DATE '2022-11-11', 'njUp6Zx0lS', 'VrW0hCxljy', 'D3agupXe9y'), ((BIGINT '170'), (INT '845'), (INT '304'), (INT '594'), (510), (1695182798), (24), (-145499366), 'x0rfmwn8qt', '2bdZMKKPvc', DATE '2022-11-10', DATE '2022-11-11', DATE '2022-11-10', 'B9HbGPl8Ge', 'IjyCpHJmXD', '7D6PVarzhE'), ((BIGINT '415'), (INT '1'), (INT '949'), (INT '939'), (517), (0), (772), (235), '8dyCki3qvd', '7MnCIzBVYr', DATE '2022-11-10', DATE '2022-11-11', DATE '2022-11-11', 'vddOyKRCzr', 'zTD8bTGHMO', 'DbLr9oCJ77');
INSERT INTO nation VALUES ((INT '0'), 'fPvCiIzq61', (INT '234'), 'KFRDwwdQ9s'), ((INT '899'), 'pn4Dx5zFyk', (INT '48284029'), 'e2RWQGuwWM'), ((INT '153'), 'efDf9S2WnB', (INT '380'), 'Py4ae2Icjv'), ((INT '2147483647'), 'wtuiNrI5Sg', (INT '552'), 'KhqhwM7dWi'), ((INT '1'), 'h1IE0HeJvN', (INT '855'), 'ANlQfRnFPm'), ((INT '688'), 'WzhFu6GCvz', (INT '323'), 'PHqGaWTaEe'), ((INT '549'), 'ize5IurEcg', (INT '569'), 'qwQYa1eiPR'), ((INT '873'), 'zbs96sviS6', (INT '815'), '3F7dRs6rYo'), ((INT '667'), 'jCjejcjHsj', (INT '364'), 'qmbj3Fw3of'), ((INT '324'), 'fRq8kTmZFE', (INT '-268425830'), '8ER5on3dJ2');
INSERT INTO region VALUES ((INT '-1343016627'), 'DaeyyOuS3k', '7oHMXZwDtV'), ((INT '2147483647'), '95T2QdZ6NU', 'ENjG4Sf42j'), ((INT '242'), 'gBctD7qM8K', 'pOlQtbA701'), ((INT '466'), 'LUCLChvSmx', 'yXnAE6eF78'), ((INT '578'), 'TyqNKk2DC7', 'd4Ph0b6icG'), ((INT '918'), '7IvOfvDu2f', 'TSBMxWnV2A'), ((INT '983'), 'KsT1YnDaAg', 'ktd5UQlwIK'), ((INT '206'), 'smEUJYXfBA', 'nQA6HdWSwk'), ((INT '782'), 'lNIO5dlNzV', 'kxmNOg6NN1'), ((INT '168'), 'UTpiArrQFB', 'gFhzaOeGU9');
INSERT INTO person VALUES ((BIGINT '565'), 'SbHWGeCDRx', 'vymIpQH8QP', 'zjIRldv8f1', 'xJbB8GOBqt', 'Zs8sRLtono', TIMESTAMP '2022-11-10 11:43:32', 'kzFeQBZfvW'), ((BIGINT '971'), 'bb1qrfFnXA', 'csgIHbrGAo', 'NL3sXIzZM4', '2RxWTlRbYW', 'pD6OYqCmTI', TIMESTAMP '2022-11-04 11:43:32', '2E7cjD7Xzr'), ((BIGINT '960'), 'JecDL5GHwj', '9zbZbtafXA', 'mcsqB1GRNd', '6K7v60Idey', 'rneymEzKth', TIMESTAMP '2022-11-11 10:43:32', 'HR1xtBCMld'), ((BIGINT '-4288680901307653455'), 'FmvqAgYE5R', 'mb7l80vdJN', 'N2iitTZKCI', 'GxA7CDR8LK', 'Xs9JgpLFDQ', TIMESTAMP '2022-11-11 10:43:32', '9bYV0AkCEN'), ((BIGINT '0'), 'CfsNqRMI4j', 'zy0GRyLGPS', 'aJABGLivBk', 'PAcVUOrAeq', 'KaRgjHIXk5', TIMESTAMP '2022-11-07 21:11:09', 'OgtbV8U9l1'), ((BIGINT '477'), 'AYbikmiI9K', 'JhXTDaslIA', '4CJeAzVDJb', 'IIfbwU4QYm', 'k0USGiHwOG', TIMESTAMP '2022-11-11 11:43:32', '8unwThP5TF'), ((BIGINT '0'), 'gPDajMtqu2', 'DbgSTaPor8', 'jcfIAUqB5R', '8g1JK5QhRE', 'wtUmRSdqA7', TIMESTAMP '2022-11-10 11:43:32', 'hm6ZdBT1rK'), ((BIGINT '9223372036854775807'), 'MdADDcPq8B', 'EHiLHCGFSm', '1iT5Q7Oq1H', 'Evh10q4cVV', 't1zzehHOf1', TIMESTAMP '2022-11-11 11:42:32', 'NWhcNaLThr'), ((BIGINT '30'), 'JkkE2HDvBn', 'j5dTWTEJvR', 'Aca7hln5M9', '6F04DwVfRn', 'KLOWwWQ8jL', TIMESTAMP '2022-11-10 11:43:32', 'AcPFiXHHxt'), ((BIGINT '0'), 'Zvbf3Icrq6', 'sHcZYUNdKQ', '8FVNniCFaD', '48qa4ROmTs', 'dj4PZGeerG', TIMESTAMP '2022-11-04 11:43:32', 'hCr2CSEYQQ');
INSERT INTO auction VALUES ((BIGINT '361'), 'uQaRwJvrBt', '6GJYM6q3Wg', (BIGINT '-9223372036854775808'), (BIGINT '-4799156136849595711'), TIMESTAMP '2022-11-11 10:43:32', TIMESTAMP '2022-11-11 11:43:32', (BIGINT '530'), (BIGINT '366'), '6w4OG4zqh2'), ((BIGINT '604'), 'SQdUVyKmpq', 'TD2B3BeIAT', (BIGINT '650'), (BIGINT '350'), TIMESTAMP '2022-11-11 10:43:32', TIMESTAMP '2022-11-11 11:43:31', (BIGINT '1'), (BIGINT '371'), '3dyrKTrMsM'), ((BIGINT '674'), 'yyOAC2WLwj', 'dR4VWNvlrl', (BIGINT '9223372036854775807'), (BIGINT '-9223372036854775808'), TIMESTAMP '2022-11-11 11:43:31', TIMESTAMP '2022-11-11 10:43:32', (BIGINT '547'), (BIGINT '203'), 'D04BYekW6S'), ((BIGINT '268'), 'zz24U4E94K', 'ReZeMRXyry', (BIGINT '523'), (BIGINT '734'), TIMESTAMP '2022-11-10 11:43:32', TIMESTAMP '2022-11-11 10:43:32', (BIGINT '381'), (BIGINT '0'), 'Of5i7fV6b6'), ((BIGINT '859'), 'LsY7hfBfFI', 'kxthhySOg6', (BIGINT '6778397189789419351'), (BIGINT '2'), TIMESTAMP '2022-11-06 14:53:40', TIMESTAMP '2022-11-01 07:49:31', (BIGINT '596'), (BIGINT '120'), 'ZYntobwNZG'), ((BIGINT '377'), 'a9VnLBKIj2', 'HbtgonuKfG', (BIGINT '380'), (BIGINT '577'), TIMESTAMP '2022-11-11 10:43:32', TIMESTAMP '2022-11-03 21:58:04', (BIGINT '328'), (BIGINT '-339173619826850671'), 'EJIus8Mtmj'), ((BIGINT '-9223372036854775808'), '9ZYKJtRgmg', 'yeIWOs6Tva', (BIGINT '558'), (BIGINT '468'), TIMESTAMP '2022-11-11 10:43:32', TIMESTAMP '2022-11-04 11:43:32', (BIGINT '263'), (BIGINT '250'), 'AHGYDr5mtL'), ((BIGINT '728'), 'QPMGJlDiVl', 'ScFv4JBw2Z', (BIGINT '568'), (BIGINT '965'), TIMESTAMP '2022-11-04 11:43:32', TIMESTAMP '2022-11-11 11:43:32', (BIGINT '8274700402764399041'), (BIGINT '955'), 'NHrg9quSk1'), ((BIGINT '913'), 'jafY42wYhm', 'nrpLKEMhS6', (BIGINT '719'), (BIGINT '675'), TIMESTAMP '2022-11-11 11:43:32', TIMESTAMP '2022-11-10 11:43:32', (BIGINT '6933749139694534309'), (BIGINT '1'), 'Zev18uAIMN'), ((BIGINT '541'), 'cr5rA850zS', 'qytGL6yxeW', (BIGINT '253'), (BIGINT '892'), TIMESTAMP '2022-11-11 11:43:31', TIMESTAMP '2022-11-11 11:43:32', (BIGINT '9223372036854775807'), (BIGINT '977'), 'fqkxXwlqt9');
INSERT INTO bid VALUES ((BIGINT '175'), (BIGINT '95'), (BIGINT '727'), 'DiLGjh8GO0', '33GChke6IP', TIMESTAMP '2022-11-11 11:42:32', 'Lwev73091A'), ((BIGINT '0'), (BIGINT '481'), (BIGINT '535'), 'elEs4Gcuap', 'cttWedrIFC', TIMESTAMP '2022-11-11 10:43:32', 'CR2oJFuUYO'), ((BIGINT '236'), (BIGINT '229'), (BIGINT '6875634101229931720'), 'pChmhPXMnC', '81GbF9VMhD', TIMESTAMP '2022-11-11 11:43:31', 'Bmsnh5XMBb'), ((BIGINT '0'), (BIGINT '-9223372036854775808'), (BIGINT '541'), 'ckkQdkrYrs', '4ZgjXeKjSQ', TIMESTAMP '2022-11-11 11:43:31', 'B3Q1ax2Spa'), ((BIGINT '788'), (BIGINT '186'), (BIGINT '88'), 'Hm6w0TngXI', '9bsDBOkINy', TIMESTAMP '2022-11-11 11:43:32', 'Hwj30FC2BR'), ((BIGINT '991'), (BIGINT '77'), (BIGINT '9223372036854775807'), '52T0kueWRf', 'UhberU7tMG', TIMESTAMP '2022-11-11 10:43:32', 'qk22GAz6Gf'), ((BIGINT '159'), (BIGINT '4168691487268366886'), (BIGINT '851'), 'OINAVsHNDz', 'Big7WVFFDN', TIMESTAMP '2022-11-11 11:43:31', '0jRWJC8uzm'), ((BIGINT '335'), (BIGINT '722'), (BIGINT '235'), 'yxZyEA19fO', 'SjPc4r7zK4', TIMESTAMP '2022-11-11 11:42:32', '2vWt9Tx6OI'), ((BIGINT '1'), (BIGINT '30'), (BIGINT '9223372036854775807'), '81O3d4qsHj', 'gPtxfhle6K', TIMESTAMP '2022-11-11 11:43:32', 'ZmjshxRG3O'), ((BIGINT '1'), (BIGINT '2077247503746553770'), (BIGINT '-9223372036854775808'), 'kXg699EMbK', 'jpV5O1ICZK', TIMESTAMP '2022-11-04 11:43:32', 'V0aivgOBL2');
INSERT INTO alltypes1 VALUES (true, (SMALLINT '0'), (INT '134'), (BIGINT '396'), (REAL '0'), (FLOAT '0'), (820), DATE '2022-11-10', 'NdSGcp37a2', TIME '11:43:32', TIMESTAMP '2022-11-07 14:43:28', (INTERVAL '-1')), (false, (SMALLINT '707'), (INT '1'), (BIGINT '20'), (REAL '927'), (FLOAT '10'), (74), DATE '2022-11-11', '71x7ppN9ip', TIME '11:43:31', TIMESTAMP '2022-11-04 11:43:32', (INTERVAL '-3600')), (false, (SMALLINT '264'), (INT '255'), (BIGINT '607'), (REAL '538'), (FLOAT '458'), (1), DATE '2022-11-04', 'vzxMcMwXTK', TIME '11:43:32', TIMESTAMP '2022-11-04 11:43:32', (INTERVAL '0')), (false, (SMALLINT '-9369'), (INT '963702515'), (BIGINT '836'), (REAL '612'), (FLOAT '0'), (0), DATE '2022-11-10', 'nBACmIb05P', TIME '11:43:32', TIMESTAMP '2022-11-04 11:43:32', (INTERVAL '-3600')), (true, (SMALLINT '471'), (INT '507'), (BIGINT '-9223372036854775808'), (REAL '1'), (FLOAT '926'), (896), DATE '2022-10-30', '5oyL76vRvf', TIME '11:43:31', TIMESTAMP '2022-11-11 10:43:32', (INTERVAL '-60')), (true, (SMALLINT '-2347'), (INT '900'), (BIGINT '321'), (REAL '999'), (FLOAT '141'), (751), DATE '2022-11-11', 'FjYSunXDcb', TIME '03:01:14', TIMESTAMP '2022-11-11 11:43:32', (INTERVAL '-604423')), (false, (SMALLINT '-32768'), (INT '494'), (BIGINT '-3411238576812754923'), (REAL '45'), (FLOAT '788'), (507), DATE '2022-11-11', 'Y0mPvbjTto', TIME '11:43:31', TIMESTAMP '2022-11-04 11:43:32', (INTERVAL '1')), (true, (SMALLINT '-32768'), (INT '94'), (BIGINT '503'), (REAL '715'), (FLOAT '390'), (893), DATE '2022-11-11', '3ugrzVE26d', TIME '11:43:32', TIMESTAMP '2022-11-11 11:42:32', (INTERVAL '0')), (true, (SMALLINT '747'), (INT '0'), (BIGINT '1'), (REAL '-8117108'), (FLOAT '823'), (2147483647), DATE '2022-11-01', 't0ir0iLuWt', TIME '11:42:32', TIMESTAMP '2022-11-11 11:43:32', (INTERVAL '604800')), (false, (SMALLINT '67'), (INT '905'), (BIGINT '615'), (REAL '564'), (FLOAT '324'), (220), DATE '2022-11-10', 'iG8kAilRNr', TIME '11:42:32', TIMESTAMP '2022-11-03 22:50:37', (INTERVAL '473488'));
INSERT INTO alltypes2 VALUES (false, (SMALLINT '7046'), (INT '526'), (BIGINT '0'), (REAL '547'), (FLOAT '712'), (407), DATE '2022-11-04', 'p6onI9IZyL', TIME '09:23:47', TIMESTAMP '2022-11-10 11:43:32', (INTERVAL '903892')), (false, (SMALLINT '582'), (INT '408'), (BIGINT '9223372036854775807'), (REAL '0'), (FLOAT '1'), (726), DATE '2022-11-11', 'FLXs9lTGY1', TIME '11:43:32', TIMESTAMP '2022-11-11 11:43:32', (INTERVAL '60')), (true, (SMALLINT '40'), (INT '758'), (BIGINT '291'), (REAL '82'), (FLOAT '699'), (707), DATE '2022-11-10', 'L3RfFGJvJo', TIME '11:43:32', TIMESTAMP '2022-11-10 11:43:32', (INTERVAL '86400')), (true, (SMALLINT '-32768'), (INT '555'), (BIGINT '171'), (REAL '862'), (FLOAT '465'), (1677284047), DATE '2022-11-10', 'Og7E3LJog6', TIME '11:43:32', TIMESTAMP '2022-11-11 11:43:32', (INTERVAL '-604800')), (false, (SMALLINT '706'), (INT '752'), (BIGINT '550'), (REAL '21'), (FLOAT '491'), (519), DATE '2022-11-11', 'yCudph9Uc8', TIME '09:18:08', TIMESTAMP '2022-11-05 14:09:06', (INTERVAL '60')), (true, (SMALLINT '1172'), (INT '810'), (BIGINT '560'), (REAL '981'), (FLOAT '143'), (707), DATE '2022-11-11', 'GiHMBkgahK', TIME '11:43:32', TIMESTAMP '2022-11-05 14:32:19', (INTERVAL '-1')), (false, (SMALLINT '509'), (INT '496'), (BIGINT '8'), (REAL '34'), (FLOAT '0'), (160), DATE '2022-11-11', 'ASjJSYf98b', TIME '10:43:32', TIMESTAMP '2022-11-04 11:43:32', (INTERVAL '-1')), (true, (SMALLINT '-1662'), (INT '991'), (BIGINT '425'), (REAL '360'), (FLOAT '-2147483648'), (735), DATE '2022-11-11', 'v5SZ4wq02P', TIME '06:08:46', TIMESTAMP '2022-11-11 11:43:31', (INTERVAL '1')), (false, (SMALLINT '383'), (INT '611'), (BIGINT '869'), (REAL '838'), (FLOAT '373'), (285), DATE '2022-11-11', 'YETnriJHhn', TIME '11:43:32', TIMESTAMP '2022-11-04 04:40:17', (INTERVAL '-604800')), (true, (SMALLINT '969'), (INT '-2147483648'), (BIGINT '979'), (REAL '-24712215'), (FLOAT '0'), (950), DATE '2022-11-11', 'TuOwtfxthT', TIME '17:44:29', TIMESTAMP '2022-11-11 11:43:31', (INTERVAL '1'));
CREATE MATERIALIZED VIEW stream_query AS
SELECT
    TRUE AS col_0,
    max(t_0.col_0) AS col_1,
    (FLOAT '922') AS col_2
FROM
    m1 AS t_0
    FULL JOIN m1 AS t_1 ON t_0.col_0 = t_1.col_0
GROUP BY
    t_0.col_0
HAVING
    max(((BIGINT '160') <> (FLOAT '493'))) FILTER (WHERE TRUE);

Expected behavior

No panic

Additional context

compute-node.log

thread 'risingwave-streaming-actor' panicked at 'mem-table operation inconsistent! table_id: 1045, vnode: 169, key: OwnedRow([None, Some(Bool(true)), None]), prev: Insert(Ok(OwnedRow([None, Some(Bool(true)), None]))), new: Insert(Ok(OwnedRow([None, Some(Bool(true)), None])))', /Users/noelkwan/projects/risingwave/src/stream/src/common/table/state_table.rs:587:17
stack backtrace:
2023-02-20T09:43:59.644166Z DEBUG risingwave_storage::hummock::event_handler::uploader: upload task finish UploadTaskInfo { task_size: 25058, epochs: [3909290522574848], imm_ids: [103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0] }
2023-02-20T09:43:59.644222Z DEBUG risingwave_storage::hummock::event_handler::hummock_event_handler: epoch has been synced: 3909290522574848.
2023-02-20T09:43:59.650600Z DEBUG risingwave_storage::hummock::event_handler::hummock_event_handler: update to hummock version: 49, epoch: 3909290522574848
   0: rust_begin_unwind
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/panicking.rs:64:14
   2: risingwave_stream::common::table::state_table::StateTable<S>::handle_mem_table_error
             at ./src/stream/src/common/table/state_table.rs:587:17
   3: risingwave_stream::common::table::state_table::StateTable<S>::write_chunk::{{closure}}
             at ./src/stream/src/common/table/state_table.rs:690:45
   4: core::result::Result<T,E>::unwrap_or_else
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/result.rs:1503:23
   5: risingwave_stream::common::table::state_table::StateTable<S>::write_chunk
             at ./src/stream/src/common/table/state_table.rs:686:25
   6: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::apply_chunk::{{closure}}::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:305:21
   7: core::iter::traits::iterator::Iterator::for_each::call::{{closure}}
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/iter/traits/iterator.rs:834:29
   8: core::iter::traits::iterator::Iterator::fold
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/iter/traits/iterator.rs:2438:21
   9: core::iter::traits::iterator::Iterator::for_each
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/iter/traits/iterator.rs:837:9
  10: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::apply_chunk::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:295:9
  11: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::execute_inner::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:553:68
  12: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  13: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  14: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  15: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  16: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  17: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/minitrace-0.4.0/src/future.rs:118:19
  18: risingwave_stream::executor::wrapper::trace::trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:53:60
  19: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  20: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  21: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  22: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  23: <async_stack_trace::StackTraced<F,_> as core::future::future::Future>::poll
             at ./src/utils/async_stack_trace/src/lib.rs:182:23
  24: risingwave_stream::executor::wrapper::trace::stack_trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:120:70
  25: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  26: risingwave_stream::executor::wrapper::schema_check::schema_check::{{closure}}
             at ./src/stream/src/executor/wrapper/schema_check.rs:24:1
  27: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  28: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  29: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  30: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  31: risingwave_stream::executor::wrapper::epoch_check::epoch_check::{{closure}}
             at ./src/stream/src/executor/wrapper/epoch_check.rs:31:44
  32: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  33: risingwave_stream::executor::wrapper::update_check::update_check::{{closure}}
             at ./src/stream/src/executor/wrapper/update_check.rs:27:1
  34: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  35: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  36: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  37: risingwave_stream::executor::simple::SimpleExecutorWrapper<E>::execute_inner::{{closure}}
             at ./src/stream/src/executor/simple.rs:73:5
  38: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  39: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  40: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  41: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  42: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  43: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/minitrace-0.4.0/src/future.rs:118:19
  44: risingwave_stream::executor::wrapper::trace::trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:53:60
  45: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  46: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  47: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  48: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  49: <async_stack_trace::StackTraced<F,_> as core::future::future::Future>::poll
             at ./src/utils/async_stack_trace/src/lib.rs:182:23
  50: risingwave_stream::executor::wrapper::trace::stack_trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:120:70
  51: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  52: risingwave_stream::executor::wrapper::schema_check::schema_check::{{closure}}
             at ./src/stream/src/executor/wrapper/schema_check.rs:24:1
  53: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  54: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  55: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  56: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  57: risingwave_stream::executor::wrapper::epoch_check::epoch_check::{{closure}}
             at ./src/stream/src/executor/wrapper/epoch_check.rs:31:44
  58: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  59: risingwave_stream::executor::wrapper::update_check::update_check::{{closure}}
             at ./src/stream/src/executor/wrapper/update_check.rs:27:1
  60: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  61: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  62: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  63: risingwave_stream::executor::simple::SimpleExecutorWrapper<E>::execute_inner::{{closure}}
             at ./src/stream/src/executor/simple.rs:73:5
  64: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  65: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  66: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  67: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  68: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  69: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/minitrace-0.4.0/src/future.rs:118:19
  70: risingwave_stream::executor::wrapper::trace::trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:53:60
  71: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  72: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  73: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  74: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  75: <async_stack_trace::StackTraced<F,_> as core::future::future::Future>::poll
             at ./src/utils/async_stack_trace/src/lib.rs:182:23
  76: risingwave_stream::executor::wrapper::trace::stack_trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:120:70
  77: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  78: risingwave_stream::executor::wrapper::schema_check::schema_check::{{closure}}
             at ./src/stream/src/executor/wrapper/schema_check.rs:24:1
  79: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  80: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  81: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  82: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  83: risingwave_stream::executor::wrapper::epoch_check::epoch_check::{{closure}}
             at ./src/stream/src/executor/wrapper/epoch_check.rs:31:44
  84: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  85: risingwave_stream::executor::wrapper::update_check::update_check::{{closure}}
             at ./src/stream/src/executor/wrapper/update_check.rs:27:1
  86: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  87: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /Users/noelkwan/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

*** async stack trace context of current task ***

Actor 191: `CREATE MATERIALIZED VIEW stream_query AS SELECT true AS col_0, max(t_0.col_0) AS col_1, (FLOAT '922') AS col_2 FROM m1 AS t_0 FULL JOIN m1 AS t_1 ON t_0.col_0 = t_1.col_0 GROUP BY t_0.col_0 HAVING max(((BIGINT '160') <> (FLOAT '493'))) FILTER(WHERE true)` [394.945832ms]
  Epoch 3909290530504704 [338.017332ms]
    MaterializeExecutor BF0000009A (actor 191, executor 154) [338.017332ms]
      ProjectExecutor BF00000099 (actor 191, executor 153) [338.020165ms]
        FilterExecutor BF00000097 (actor 191, executor 151) [338.020165ms]
          ProjectExecutor BF00000095 (actor 191, executor 149) [338.020165ms]
            HashAggExecutor BF00000093 (actor 191, executor 147) [338.014125ms]  <== current

Mon Feb 20 09:43:59 UTC 2023 [risedev]: Program exited with 134
kwannoel commented 1 year ago

Seems related to stream engine, but feel free to re-assign @chenzl25 . I may take a closer look if I have some bandwidth.

kwannoel commented 1 year ago

FYI I'm also planning to write a simple shrinker after #7879 , to remove extra inserts and ddl statements. Will update the sql to reproduce when that happens. So may it will be easier to investigate then.

twocode commented 1 year ago

What does inconsistent mean here?

lmatz commented 1 year ago

What does inconsistent mean here?

There is already an insert(XXX) in an operator's state, and a new insert(XXX) (same pk) comes in. It can only be either Update(XXX) or Delete(XXX), but never insert(XXX).

I think this is the same as the one mem-table operation conflicts. conflicts seems to be changed to inconsistent in recent days.

twocode commented 1 year ago

Is it reasonable to dedup this operation in the same batch?

chenzl25 commented 1 year ago

It seems that only full join is the root cause. I simplify the mv into the following case. Both inner join and left join work well.

CREATE MATERIALIZED VIEW stream_query AS
select t_0.* FROM
    m1 AS t_0
    full JOIN m1 AS t_1 ON t_0.col_0 = t_1.col_0
chenzl25 commented 1 year ago

Minimal reproducible example:

create table t (a int primary key);
insert into t values(null);
create materialized view v as select t1.* from t as t1 full join t as t2 on t1.a = t2.a;
kwannoel commented 1 year ago
                              QUERY PLAN                               
-----------------------------------------------------------------------
 StreamMaterialize { columns: [a, t.a(hidden)], pk_columns: [a, t.a] }
 └─StreamExchange { dist: HashShard(t.a, t.a) }
   └─StreamHashJoin { type: FullOuter, predicate: t.a = t.a }
     ├─StreamExchange { dist: HashShard(t.a) }
     | └─StreamTableScan { table: t, columns: [a] }
     └─StreamExchange { dist: HashShard(t.a) }
       └─StreamTableScan { table: t, columns: [a] }
lmatz commented 1 year ago

Just try to provide another data point, double-checked the mem-table operation conflicts! that occurred in the user's cluster

The conflicting rows(pk) are all in the form of OwnedRow([Some(XXX), None, None, None, None, None, None]) Sometimes there are multiple Some(YYY) at the beginning, but all have multiple Nones at the end.

But I didn't find full-outer join in their test cases. Only left join and inner join.