assertion failed with assertion: NotExist when updating a masterialized table
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
create table t(a int);
create materialized view log on t (a);
insert into t values (1);
select _tidb_rowid, a from t;
select _tidb_rowid, a, `_MLOG$_DML_TYPE`, `_MLOG$_OLD_NEW` from `$mlog$t`;
update t set a = a+1 where a = 1;
insert into t values (2), (3);
```
### 2. What did you expect to see? (Required)
no error
### 3. What did you see instead (Required)
an error reported:
```
> insert into t values (2), (3);
(HY000): assertion failed: key: 7480000000000086535f728000000000000003, assertion: NotExist, start_ts: 464245659724677120, existing start ts: 464245659724414977, existing commit ts: 464245659724414978
```
### 4. What is your TiDB version? (Required)
feature/release-8.5-materialized-view
Contributor guide
Research direction
No files or tests are named. Start by running the provided SQL reproduction on the feature/release-8.5-materialized-view version, focusing on the update followed by the multi-row insert and the assertion details. Done means the sequence completes without the NotExist assertion failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100