matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Bug]: insert ignore 100threads into non empty table reported deadlock detected and other errors #15393

Open heni02 opened 7 months ago

heni02 commented 7 months ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

6d42483cee0475ac42dbd4c70bbf5e724a06b3dc

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

insert ignore values 100threads into one table which rows 1000000+, and insert ignore into primary key overwrite conflicting and non conflicting values,then reported same errors: 1.ErrorMessage : info: constructValueScanBatch failed, node id: 018ebcf1-c6a9-7817-bd82-597e6e6085d3 2.ErrorMessage : deadlock detected 3.ErrorMessage : Communications link failure The last packet successfully received from the server was 100,536 milliseconds ago. The last packet sent successfully to the server was 100,536 milliseconds ago.

企业微信截图_e847108f-33cb-417d-bcff-9783d83268f9 企业微信截图_e677e96f-64a9-4872-b8b2-e19f9ea1be7b

table ddl: CREATE TABLE test01 ( c1 INT NOT NULL, c2 INT DEFAULT NULL, PRIMARY KEY (c1) )

and tps is very slow:

企业微信截图_4cbeb97b-5003-444f-8c62-783f1e05bfa7

test report: report.tar.gz

mo log: mo_log (2).tar.gz

Expected Behavior

No response

Steps to Reproduce

1.use mo-load tool :git clone https://github.com/matrixorigin/mo-load.git
2.mysql client exec sql :create database db;create table test01(c1 int primary key,c2 int);
3.alter file :cd mo-load && vim cases/ddl/run.yml 
#stdout=console, 过程数据输出到控制台和文件
#stdout=file, 过程文件仅输出到文件
stdout: "console"
duration: 5 #所有transaction的执行时间,单位分钟
transaction:
  - name: "insert"  #transaction名称
    vuser: 100   #执行该transaction测试的并发量
    mode: 0 #执行模式,值为0表示script的中sql直接顺序执行,值为1表示把script的sql封装成一个数据库事务进行执行
    prepared: "false"   #是否需要对script的sql进行prepare
    #transaction的sql语句,可多条
    script:
    - sql: "insert into test01 values ({index},{tbx});"

4.table test01 prepare data:cd mo-load && ./start.sh -c cases/ddl/
5.alter file: cd mo-load && vim cases/ddl/replace.yml
- name: tbx
  type: random
  range: 1000000,1193320
6.alter file :cd mo-load && vim cases/ddl/run.yml 
#stdout=console, 过程数据输出到控制台和文件
#stdout=file, 过程文件仅输出到文件
stdout: "console"
duration: 5 #所有transaction的执行时间,单位分钟
transaction:
  - name: "insert"  #transaction名称
    vuser: 100   #执行该transaction测试的并发量
    mode: 0 #执行模式,值为0表示script的中sql直接顺序执行,值为1表示把script的sql封装成一个数据库事务进行执行
    prepared: "false"   #是否需要对script的sql进行prepare
    #transaction的sql语句,可多条
    script:
    - sql: "insert ignore into test01 values ({tbx},{tbx});"
7.run test:cd mo-load && ./start.sh -c cases/ddl/
8.report view: cd mo-load/report/

Additional information

No response

heni02 commented 7 months ago

insert on duplicate update 100threads也有同样的问题

企业微信截图_c00dac3b-1585-4055-bdba-c8f8a50095c0
ouyuanning commented 7 months ago

https://github.com/matrixorigin/MO-Cloud/issues/2956

jensenojs commented 7 months ago

not working on it

jensenojs commented 7 months ago

等文档评审

jensenojs commented 7 months ago

等文档评审

jensenojs commented 6 months ago

同上

jensenojs commented 6 months ago

同上

jensenojs commented 6 months ago

同上

jensenojs commented 6 months ago

暂无进展

jensenojs commented 6 months ago

同上

jensenojs commented 6 months ago

处理

jensenojs commented 5 months ago

同上

jensenojs commented 5 months ago

等重新设计方案

jensenojs commented 5 months ago

处理 moc#3351

jensenojs commented 5 months ago

无进展

jensenojs commented 5 months ago

no process

jensenojs commented 5 months ago

同上

jensenojs commented 5 months ago

同上

jensenojs commented 4 months ago

处理中移物联的insert pprof

jensenojs commented 4 months ago

处理中移物联的insert pprof

jensenojs commented 4 months ago

等on duplicate update的方案

jensenojs commented 4 months ago

等on dup的解决方案

jensenojs commented 4 months ago

not working on it

jensenojs commented 4 months ago

not working on it

aunjgr commented 4 months ago

17500 完成后再看

aunjgr commented 3 months ago

not working on it today

aunjgr commented 3 months ago

17500 完成后再看

aunjgr commented 2 days ago

insert ignore性能已改善