Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: alter add and drop unique index concurrent test reported SQL parser error: table "__mo_index_unique_0193ce3e-b010-7f2a-9fd2-589f21018311" does not exist #20775

Open
1 task done
heni02 opened this issue Dec 16, 2024 · 3 comments
Assignees
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@heni02
Copy link
Contributor

heni02 commented Dec 16, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

2.0-dev

Commit ID

d570bbd

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

测试场景:alter add unique index和alter drop index 同时并发50测试(100个表)运行5分钟
测试结果:alter drop index 报错SQL parser error: table "__mo_index_unique_0193ce43-1fde-7bb4-af7d-216ee17065b8" does not exist(预期结果报错:internal error: Can't DROP 'index_65'; check that column/key exists)
测试复现步骤见Steps to Reproduce
企业微信截图_12bff27d-5c70-458b-9027-0f59b7739015

并发测试sql:
企业微信截图_3832e612-2079-48d0-8590-4c6dc8f1f034

测试日志:
test.log

Expected Behavior

No response

Steps to Reproduce

1. git clone mo-load工具
2. 准备mo 100个表数据:
mysql -h 127.0.0.1 -udump -P6001 -p111 -e "drop database if exists concurrent_test;create database concurrent_test;"
for i in {1..100}; do mysql -h 127.0.0.1 -udump -P6001 -p111 -e "create table concurrent_test.index_$i(col1 bigint primary key auto_increment,col2 int);insert into concurrent_test.index_$i(col2) values(56),(222),(686),(9985)";done
4.执行测试:
cd mo-load
./start.sh -b concurrent_test -c cases/ddl/alter_add_drop_unique_index

Additional information

No response

@heni02 heni02 added kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Dec 16, 2024
@heni02 heni02 added this to the 2.1.0 milestone Dec 16, 2024
@heni02
Copy link
Contributor Author

heni02 commented Dec 16, 2024

此方法测试必现
相关issue:#19206

@heni02
Copy link
Contributor Author

heni02 commented Dec 16, 2024

相同的并发测试场景,alter drop次级索引也是报错
企业微信截图_046f24ec-1242-41df-b617-4f91935143e0

测试sql:
企业微信截图_09c32ca5-ec1d-4941-b879-a65448d8d5f2

ddl:
for i in {1..100}; do mysql -h 127.0.0.1 -udump -P6001 -p111 -e "create table concurrent_test.table_$i(col1 bigint primary key auto_increment,col2 int);insert into concurrent_test.table_$i(col2) values(56),(222),(686),(9985)";done

@heni02
Copy link
Contributor Author

heni02 commented Dec 16, 2024

相同并发测试场景,alter table add/drop column也报错
企业微信截图_ebee329b-2776-4699-acc3-48331197ade3

测试sql:
企业微信截图_153908dc-0997-49d1-a8bd-5f110e678f4d

ddl:
for i in {1..100}; do mysql -h 127.0.0.1 -udump -P6001 -p111 -e "create table concurrent_test.table_$i(col1 bigint primary key auto_increment,col2 int);insert into concurrent_test.table_$i(col2) values(56),(222),(686),(9985)";done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

2 participants