Closed kwannoel closed 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.
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.
What does inconsistent
mean here?
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.
Is it reasonable to dedup this operation in the same batch?
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
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;
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] }
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 None
s at the end.
But I didn't find full-outer join in their test cases. Only left join and inner join.
Describe the bug
No response
To Reproduce
Expected behavior
No panic
Additional context
compute-node.log